As I was trying to hook up the motor to Arduino, I realized that there wasn’t any H Bridge and it was way too cold to go out and get it. Hmm… I figure there must be some H Bridge on the control board I just rip out of the car. As I located the two H bridge on the board, I notice the RX-2 chip. Out of curiosity, I decide to google for this chip. To a pleasant surprise, I found RX-2/TX-2 Datasheet in Chinese and guide for exactly the board in the car and remote. Decide to replace RX-2 in the car with Arduino so the H-Bridge on board can be reused and the RF for the remote can still work. Still trying to figure out what I am going to do with those remote control signal. A few facts about RX-2/TX-2 chip I found is that the RC frequency can be adjusted by different resistance from 100K to 500K Ohm between OSCI/OSCO pins. ]]>
TX-2/RX-2: Heart of the cheap RC Toys from China
January 9th, 2011 § 12 comments § permalink
ART Telemetry wireless solution
January 9th, 2011 § 2 comments § permalink
Been researching wireless solutions to transmit in real-time sensor and decision information from ART in addition to possibly enabling minimal controls (on/off/behavior switch) and perhaps even wireless firmware updates.
- Low-cost (<200RMB, preferably <100RMB)
- Simplex or half-duplex OK
- Low-bandwidth (>1,200 bit/s)
- Low-power (<100 mAh)
- Medium-range (500m-1000m)
- TTL or SPI interface
- PTR8000+ [Nordic nRF905 (433/868/915MHz)]
- Laipac Tech RF 900DV(900 mhz)
- Laipac ASK Transmitters (315 mhz)
- Databridge
- http://www.starmanelectric.com/OrderDataBridge/tabid/71/Default.aspx
- http://www.starmanelectric.com/LinkClick.aspx?fileticket=REf/38lk/L4%3d&tabid=75&mid=456
- Expensive (87$USD) and not available here?
- JZ871 Data RF transceiver for wireless telemetry system (433 MHz or 868Mhz/915Mhz)
- http://www.alibaba.com/product-gs/252550553/RF_data_transceiver.html
- http://www.jizhuo.com/download/product_images/f/cn_f__101.pdf
- I’m guessing if Alibaba is selling it, it’s ok in China? Or is it exactly just an export product?
新车间开放日:休闲机器人的时代 Robot Contest Kick Off- Xin Che Jian Open House: the coming of entertainment robots
January 7th, 2011 § 0 comments § permalink
新车间开放日:休闲机器人的时代 时间: 2011年元月十六日,下午一点到五点 地点:徐汇区永嘉路50号新单位(近陕西南路) 费用: 免费 随着数字零件价格的降低加上丰富的开源机器人软件,DIY机器人已经可以当做事一个假日的休闲活动。这次的新车间开放日我们将介绍几个会员DIY的机器人和介绍一个将要举办的积极人竞赛。如果你对机器人有兴趣,请在这个周日加入我们,一起了解现代机器人的发展,一起讨论如何玩机器人。如果有小孩的话,非常欢迎他们一起来参加这个的活动。 – 关于HC Robot http://code.google.com/p/hcrobot/ – 关于A.R.T. http://xinchejian.com/?p=289 在这里注册 Robot Contest Kick Off- Xin Che Jian Open House: the coming of entertainment robots Time: 13:00 – 17:00, Jan 16, 2011 Location: Xindanwei, 50 Yongjia Rd Cost: Free, Open house Building robots is fun and building robots to race is doubling the fun! The era of robot building as hobby has come and we plan to celebrate the beginning of this era with a festive robot contest. At this Xin Che Jian open house, we will present a few home built robots and the plan for a contest for discussion. Come and see how you can get involved! If you are a parent, bring the kids! We are sure they will love the robots! Robots on site: – HC Robot: open source home help robots http://code.google.com/p/hcrobot/ – A.R.T. http://xinchejian.com/?p=289 Register for the event here]]>
A.R.T. Glamour
January 6th, 2011 § 1 comment § permalink
ART Platform v3, Control v4 and the future platform v4
January 3rd, 2011 § 3 comments § permalink
many iterations of both the software (the controller) after updating the platform (sensors+chassis) itself to have an additional ultrasonic sensor looking backward. So now, when I rotate the ultrasonic sensor, I read values in front (right side, angle looking right, looking forward and at angle to the left) and towards the back (left-side, side angle looking backward towards the left, angle straight on towards the back and angle looking backward towards the right). So six values in total… Having the servo rotate the sensors is necessary right now so as not to go over budget on the digital pins of the Arduino Dueminalove board as each of the two sensors require two signal cable (one for trigger and one for echo). I’ve done many changes and many tests but I’m not yet satisfied with the controller for that particular configuration and I still have ideas that I need to implement to make the robot behavior interesting… However, in the meantime, I’m also preparing for the next platform. I’m thinking of designing a circuit to select one ultrasonic sensor at a time out of four. Since two sensors cannot be triggered simultaneously (they would interfere with each other) I would want to trigger one at a time and then wait for the echo. To help with that task, I’ve discovered two wonderful OpenSource software:
- Fritzing: a very good design software that lets you design breadboard, schematic and final PCB layout with a library of parts (or very easy to create custom parts) in an optimized workflow
- Logic Gate Simulator: create and test logic gates design
ARTv2 goes Ultrasonic!
December 30th, 2010 § 1 comment § permalink
Me: …since we don’t have many working sensors, I’m waiting for the ultrasonic sensors we ordered… BTW, Xu, any news about them? Xu: Oh, they’re at my desk! Me: screams like a little girl Xu: … ok, I’ll go get them now… So yeah, I finally got my 10 (!) ultrasonic sensors (HC-SR04) this evening, just in time as I had worked out how to control the servo to do sensor sweeps (left and right on 180 degrees). BTW, if you’re a Xinchejian member, please feel free to borrow one or two to try them out. They’re affordable (37RMB on Taobao or 5.60$USD), ridiculously easy to install and seem to work as advertised, although I haven’t benchmarked much. I’ve also spent quite a bit of time this evening on a reasonably workable controller with a state machine but only had time to test it once before I had to call it a day. I can probably use more sensors (on the sweeper, sideways, looking backward), but I’m thinking that I really need to combine them with infrared sensors as there’s a longer delay than infrared in detecting obstacles and they can work at angles simultaneously. Anyway, more testing and experiments are in order. [gallery]]]>
RoboMaster: a new robot contest for kids in Shanghai
December 30th, 2010 § 0 comments § permalink
Photos from the new robot contest for kids in Shanghai called RoboMaster. Looks a lot of fun! ]]>
A.R.T. Version 2 (with instructions!)
December 30th, 2010 § 0 comments § permalink
Today I built a second new A.R.T. to test new configurations.
It’s also because it is a bit frustrating not to have a working version at all times for demos while I’m trying out new mechanical layouts… I took the opportunity to write down a detailed list of parts, tools and steps that I’ve checked in to github (note that I have not finished as I still have to solve the ranging sensor and write a new program):
https://github.com/rngadam/ART/blob/master/ART_Control3/BUILD.txt
See gallery for pictures…
[gallery link="file"] ]]>First successful autonomous run of A.R.T.
December 27th, 2010 § 1 comment § permalink
const int FORWARD = 2; const int REVERSE = 3; const int LEFT = 4; const int RIGHT = 5; const int INFRARED_FORWARD = A0; const int INFRARED_REVERSE = A1; const int MINIMUM_INFRARED_READING = 500; int current_reverse = LEFT; int alt_forward = RIGHT; char current_state; void setup() { pinMode(FORWARD, OUTPUT); pinMode(REVERSE, OUTPUT); pinMode(LEFT, OUTPUT); pinMode(RIGHT, OUTPUT); pinMode(INFRARED_FORWARD, INPUT); pinMode(INFRARED_REVERSE, INPUT); Serial.begin(9600); } char update_state(char state, int reason) { char previous_state = current_state; if(state != current_state) { current_state = state; Serial.print(current_state); Serial.println(reason); } return previous_state; } void loop(){ // always check if we can go forward int value = analogRead(INFRARED_FORWARD); if(value >= MINIMUM_INFRARED_READING) { // maybe we were correcting, so check that char last_state = update_state('F', value); digitalWrite(current_reverse, LOW); digitalWrite(REVERSE, LOW); if(last_state == 'R') { // we just successfully exited a bad loop, turn for a bit for half a second digitalWrite(alt_forward, HIGH); digitalWrite(FORWARD, HIGH); delay(1000); digitalWrite(alt_forward, LOW); } digitalWrite(FORWARD, HIGH); } else { // otherwise, still correcting, keep off digitalWrite(FORWARD, LOW); // we want to try to find an alt path int value = analogRead(INFRARED_REVERSE); if(value >= MINIMUM_INFRARED_READING) { //still have some ability to go backward update_state('R', value); digitalWrite(current_reverse, HIGH); digitalWrite(REVERSE, HIGH); } else { // whooaah, even backward is not possible, we're stuck digitalWrite(current_reverse, LOW); digitalWrite(REVERSE, LOW); update_state('S', value); } } }Wins:
- Wooden board and tie-wraps work exceptionally well to prototype the physical arrangement
- Using the breadboard to prototype the electronics also works well
- The Arduino “Vin” to provide current in the board header works very well (and can seamlessy switch between USB and that without resetting!)
- Sticking the RF transmitter board directly on the robot and controlling the motors with that from the Arduino works well
- The LED that comes on when an obstacle is detected by the infrared sensors is very useful for debugging (need to keep that in mind when using other sensors)
- It works!
- Uses Alkaline AA batteries (I want to switch to the exact same Rechargeable NiCad as the car uses)
- I spent too much time working with Sketchup instead of manually testing the mechanical design first (and then Sketchup)
- There’s not much around Xindanwei in terms of computer, electronic or small mechanical stores, so I should plan ahead to shop on Beijing road
- The infrared sensors that I found in the pile of stuff in Xinchejian work, but more like “on/off” sensors (don’t seem to have any linearity in the distance)
- No bumper (the infrared sensor was crashing into the walls…)
- Making an obstacle course big enough is annoying
- I had forgotten to make the holes to attach the sensors (more holes == better)
- No on/off switch so have to manually remove the connections to turn off power
- You can never have enough tie-wraps… We only had four at Xinchejian before I bought a pack of 500 for 15RMB (but really, worth about 5RMB)
- I need to learn how to solder… without blowing fuses…
RC Transmitter reverse-engineering attempt
December 26th, 2010 § 1 comment § permalink
TX2C ATS302T which is available on Taobao) , so I thought I would try to figure out the circuit by looking at it. Kind of inconvenient because the components are on one side while the circuit trace is in the other. Flipping over the board constantly is annoying and it’s rather hard to follow. Best would be to see both sides at the same time, no? So this is what I did:
- took a picture of both sides in macro mode
- cropped both pictures
- created layers using GIMP (a cross-platform OpenSource software similar to Photoshop)
- Put each image on their layers
- Change opacity of top layer
- “Image > Transform > Flip Horizontally” one of the image
- Move one of the image until screw holes on both align