Another Rover 5
I started playing with Arduino a couple of months ago. I stumbled on this site looking for some information and thought it would be a cool idea to built something similar. I'm very new to all this, so it took me some time to figure everything out. I started by writing a sketch to remote control the rover with another arduino using a couple of Nrf24L01 modules. I've now mounted the SRF06 module and IR compound eye, so I'm going to write a sketch so it can drive around autonomous. I'm using the Dagu red back spider robot controller and 4 channel motor controller. I've bought 90% of the parts from Yourduino.
9 March 2012
Finally made a video of my rover 5 in autonomous mode. Have had lots of problems with my rover. The tracks keep falling of when its driving at full power. There seems to be a lot of play on one axle and sometimes even a wheel with the axle still attached comes loose and falls off :(
I've attached 2 encoders (one on each side) to the spider controller but I'm having some issues with the interrupt pins or software. I never get the same reading left/right. They sometimes differ by hundreds after only 10 seconds.
9 April 2012
After getting the encoders to work I tried to write a sketch so that when an object is detected by the ultrasonic sensor the rover does a 90° turn. I needed some help on how to program this which I got here -> http://letsmakerobots.com/node/31936 So I turned the example NilsB gave me into a usable Arduino sketch. After some fiddling with the code I had a sketch that kind of works. After playing with it for hours I learned some things: the faster the rover turns the more it "slips" so you need more pulses from the encoder to turn 90°. There is an enormous difference between running the motors at a pwm of 60 or 200. The surface on which it runs also matters of course. So this is something you will never get perfect with encoders.
I have quite a lot of electronic parts so I thought why not add some leds to my Rover. I gave my Rover some headlights (6 white leds) and added 4 small 3mm leds on the corners. The white leds are powered from the lipo and are controlled by a small transistor. The orange leds are "blinked" with a 555 timer circuit. The whole circuit is controlled from another transistor. I've programmed it so it turns the timer circuit on when the Rover is turning :)
I also bought a really cheap 9 dof board (ADXL345 / HMC5883L / ITG3200) on ebay. So my next step is to integrate this in my code. To be continued...
5 May 2012
The regulator on the Red back spider controller died so I bought a new red back spider straight from Dagu. I know Dagu makes a cool 2 DOF gripper and I couldn't resist and ordered one. It's bloody cheap for what you get. So now I had to mount the gripper on something? So I thought why not mount it on my rover. The gripper is only 2 DOF so I mounted it on a spare servo I had. It's only a plastic gear servo and not really strong enough to hold the complete gripper, I'll replace it with a stronger metal gear/horn servo. The MG995 can be found really cheap on Ebay, think I'll order that one. To mount the gripper/servo I used my dremel to make a hole in the plexi glass that sits on top of my Rover chassis. I then drilled 2 holes in it and bolted the servo/gripper to the plexi glass. The backside of the servo rests against the rover chassis which helps with stability.
This is the gripper:
And here it is mounted on the rover 5:
My rover is fitted with a nRF24L01 (2,4GHz wireless) module for remote control. To control it I used an Arduino Duemilanove with a joystick, I2C LCD and nRF24L01 module attached. It was not very practical to use, try to imagine walking around with this:
I was very jealous of the transmitter kit that Rocket brand studios sells and thought of making my own. I ordered a Joystick shield and drew 2 plates in Autocad. I had it cut in acrylic by a local company. This is the end result:
It has an Arduino Uno with joystick shield on top. A small PCB holds a 3,3V regulator and the nRF24L01 module. The wireless module is actually gigantic overkill for what I use it for. I think I can control my rover from more then 1km distance. haha I bought another I2C LCD, this time a 4x20 characters version. This is a very handy thing. When you try to debug code in Arduino you can use serial.print to see what is going on. But when you have a robot that is driving/walking around autonomously it is a bit hard to follow it with your laptop and the USB cable attached (I've actually done this). I'm to lazy, so I put all parameters that I want to see in an array and sent them to my remote control where I print them on the LCD. So you can sit on your lazy ass and watch what is going on. For example I have the current pins of the motor controller attached to 4 analog pins on the red back spider. I sent those values to my remote control and then print them to the lcd. I have done the same with the readings from an ultrasonic sensor and the encoders. The remote is powered by a 2 cell 500mAh Lipo battery. I made a voltage divider with 2 resistors and soldered the middle point of the divider to an analog input, that way I can monitor the battery voltage. I do the same thing on my rover, the value is also sent to my remote.
I've written / copied some code for my 9 DOF board. It works when I have it on my desk but when I tried to mount it on my rover the readings went berserk. The magnetometer is uber sensitive, I'll find a way to mount it and get accurate readings. But now I'm going to try and control the gripper with my remote :)
I have to say playing with Arduino / robots is really fun but it takes up a lot of time. Summer is almost here and then I'll be busy with my other hobby/job (motorsport photography). So it could be a long time for the next update.
And another photo of my remote and rover :)
6 May 2012
Added a video of the gripper. I connected the 3 servos to my spare Arduino Mega2560 together with 3 potentiometers. I wrote some code to control the 3 servos without using the delay function. Since I use RF modules for remote control and want instant reaction from my Rover and gripper I do not want any delays in my code. You can use the millis function instead, see the blink without delay example in the Arduino IDE. This makes your robot much more responsive. I powered the 3 servos from my powerful lab power supply. I learned that the small servo that closes the gripper has a stall current of more then 1 amp. To make sure I don't destroy another red back spider controller I'll power the servos from an UBEC.
20 May 2012
Found some time to integrate the code to control the gripper into my "remote control" sketch. I've added a small video where you can see the Rover and gripper in action. I've used a cheap 4A UBEC to power the servos. I soldered some pins to a small piece of PCB to connect the servos to the UBEC and red back spider. In the video you can see that the Rover isn't moving very smooth, this was because of the cheap UBEC interfering with the wireless module. I've since added a big cap to the output of the UBEC and relocated the UBEC to the underside of the plexi base. Problem solved :) I would like to make a couple of IR beacons and let the rover drive to one beacon, pick up a box and then take it to another beacon. But I haven't got a clue where to start. I will need to do some more investigation about "IR technology". I've put the code I used in the video on my website if you're interested, but take into account that I'm a real noob programmer.
2 September 2012
Finally made a video of my Rover 5 with the 9DOF board mounted on it. I'm only using the ADXL345 accelerometer and HMC5883L magnetometer to calculate the heading of the Rover. The board also has a gyrometer. I found a tilt compensated sketch and libraries for the 2 sensors on this website: https://www.loveelectronics.co.uk/Tutorials/13/tilt-compensated-compass-arduino-tutorial I integrated the sketch to my existing code and then sent the values to my remote control and print them to my LCD. Two values are shown on the LCD, the HNC value is without compensation and the HC value is with the tilt compensation. The 9 DOF board is mounted on some nylon spacers well above the Rover as its quite sensitive. If you hold a piece of metal close to the board the reading go berserk.
21 November 2012
I'm still playing with my Rover 5 :) It is now my official research and development platform :D I've spent some money on it the last months. In September when the weather was still nice and warm I was driving the Rover through the garden chasing some birds. The gripper got stuck in some bushes and cracked the plexiglass base plate I had mounted on the chassis. It was a thin plate of plexi glass so it didn't surprise me. I had some acrylic parts laser cut to make a hexapod so I also ordered a new 4mm thick acrylic plate to mount my electronics on. It is a lot stronger and doesn't bend much when I pick up things with the gripper. I have successfully picked up a shoe and driven it across the room. Should make a video of that. This all happened when I was controlling the Rover with my remote control using a pair of nRF24L01 modules. I have now mounted a Wiicam sensor from Rocket Brand Studios. I've written some code to track an IR led. Very cool stuff. I hope to write some more advanced programs for my Rover so it can drive around the house autonomously guided by my "nRF24L01 + IR beacon project". But that's stuff for another node...
Made some more photos of my Rover: