IAN LANG ELECTRONICS
We apologise for the late arrival of this bot. This was due to the wrong kind of snow on the line. Actually it was due to the wrong kind of brain in design, as I spent a fortnight wondering how to fit a Boarduino, a transistor H bridge and RF receiver in the small space inside BOB. Fourteen days to realise you're pretty stupid is a sure sign of total brain meltdown and I can only blame it on the fact that I'm getting old. Eventually I drank some Red Bull and realised that I could use a Pro-mini and an L293 motor driver IC and then the project took Saturday afternoon. DOH!!
Below is a picture of BOB, and under that a video of him on the move. The quality of this video is awful, since I took it on my phone after breaking my camera irreparably. I told you I'm getting old.
BOB stands for Bodged Old Bot because that's basically what he is. He used to be a line-tracker, but one day he decided he'd had enough of that and chased one of the pets instead. So, I put him away and decided a few weeks ago to turn him into an RC toy using an Arduino and a transmitter and receiver salvaged from an old toy. His wiring is as below:
I decided that BOB wasn't going to have a reverse function so that he could make noises triggered by the fourth channel. I've got young nephews ( 3 & 5) and so farty noises are a must.
The orange wires above run from the four channels of the RX board and the values at the analogue pins depend on the button you press. I tested the values using this code:
Serial.print(" A0= ");Serial.print(analogRead(A0));
Serial.print(" A1= ");Serial.print(analogRead(A1));
Serial.print(" A2= ");Serial.print(analogRead(A2));
Serial.print(" A3= ");Serial.print(analogRead(A3));
The lack of a reverse function means that I can do minimal wiring on the L239 chip as above. To turn left, BOB spins his right wheel only, to turn right, his left only, and to go forward both wheels at the same rate. He's powered by a 9V battery, I haven't shown it above but the positive goes to RAW and the negative to GND. You take the 5V supply for the RX board as a tap from the red wires, and send the ground connections to GND. It really is as simple as that. Here's the code I slapped into the Pro-mini:
int azero;int aone;int athree;int atwo;
And the micro-controller controls the chip and the work's done for me. Setting a pin to 1 stops that wheel, and to 0 spins it. I used strings because it made it easier to see in the serial monitor what was happening where and couldn't be bothered to change it afterwards.
You'll notice BOB has a big antenna. It does precisely nothing. The real aerial is the loop of wire at the back. And yes, as the uncharitably disposed have pointed out, BOB does indeed look like "Darth Vader's punk nephew".
Later on, on an as and when basis, I'm going to be tinkering with BOB. I'll post new developments as they happen.
Ian Lang December 2011.