Bajdi's service droid
Update march 30 2014
I've added a mini wide angle lens to my Raspberry Pi camera board. I managed to attach the lens to the camera board with a small piece of polysterene board and some small screws. I then bolted 2 heatsinks to the side of the pan/tilt kit. With some Chinese "heatsink plaster" I attached 2 1W power leds to the heatsinks. The leds are driven by a small 1W led driver that has a pwm input. So I can control it from the Red back spider.
This is the result:
I have hot glued a pressure sensor to the pincer:
The sensor is pretty sensitive. It works very well to detect if the servo is stalled.
For the gripper I needed another method to detect if the servo is stalled. I tried 2 different methods. First I soldered a wire to the pot in the servo like OddBot has done.
This method is not very accurate so I tried something else that gave me better results. I bought an ACS712 breakout board from sparkfun. The board has an opamp to adjust the gain. This gives me a very precise measurent of the current the servo draws. Ideal to detect if the servo is stalled :) The back of the robot is becoming a big wire mess:
I have finally connected the Raspberry Pi and Red back spider through the I2C port, using a logic level converter. I have a simple python script that lets me control the Service droid through a webpage. The webpage has some buttons to control the robot and shows the camera stream. I'm not very happy with this solution and I'm trying out some different things...
I coudn't resist OddBots special Service droid offer so I bought me one. I also ordered a new Rover 5 chassis, Dagu Red back spider and a 4 channel motor controller. The package arrived pretty quickly thanks to DHL.
So I now have 2 Rover 5's. I've actually moved all the parts from my old Rover 5 to the new chassis. The new version of the Rover has a new style of wheels and different encoders. I wanted to try the encoders with my mecanum wheels. So I used the new wheels and tracks on my old chassis. And used that as the platform for the service droid you see here.
I'm using a 2S Lipo battery to power the motors and servos. To distribute the power to the motor controller, red back spider and UBEC (powers the servos) I designed a small PCB. This PCB has a voltage divider to monitor the battery voltage. There are 2 voltage regulators, a 5V (LM2940) voltage regulator for the logic of the motor controller and a small LP2950-3.3 regulator for 3.3V devices. The PCB also has a couple of leds which are handy for debugging and I also added a couple of transistors which may be useful in the future. Most importantly the board has a bunch of male pins that allow me to power the 8 servos of the service droid. 2 servos are powered straight from the Lipo battery. These are the servos that move the arms up and down. The other 6 servos are powered from a 5A UBEC.
I made a cable with a power switch and a 10A automotive blade fuse to power the robot. The cable has an XT60 connector to connect the battery. I made the cable pretty long as I haven't decided yet where I'm going to put the battery. The biggest 2S Lipo battery I currently have is a 3000mAh one, I'll probably order a bigger one from Hobbyking in the near future. I used flexible AWG16 silicon insulated wire to make the cable.
To wire up my first Rover 5 I had used premade cables to connect the motor controller and sensors to the micro controller. This time I made my own wires with Dupont connectors. I've bought some new tools to attach Dupont connectors to wires.
By making my own wires I can minimize the wire mess. The Rover 5 chassis I'm using has 4 motors with encoders. I've also attached the current feedback pins of the motor controller. In total I use 16 pins on the micro controller to control the motors. 4 digital outputs for the direction, 4 pwm pins to control the speed, 4 interrupt pins for the encoders and 4 analog inputs for the current feedback. I also use one analog input to monitor the battery voltage.
After building the kit I took my remote control sketch for my old Rover 5 and modified it for the service droid. This lets me control the service droid with my self built remote control using a pair of 2.4GHz nRF24L01 modules. I made the above video.
OddBot saw my video and told me that the arms weren't functioning correctly. I should have taken a better look at the manual. I have since corrected my mistakes :)
It's not my intention to control the service droid with the nRF24L01 modules. I just used them to test all the functions of the robot. The next step is to add a Raspberry pi and camera. And try to control it over wifi. When I have that figured out I would like to try some autonomous things using OpenCV.
Then I decided it was time to add a Raspberry Pi to my Dagu service droid. I already had a Pi shell so that came in handy to attach the Raspberry Pi to the service droid. It has 2 mounting holes in the back which are ideal to mount it. I drilled 2 holes in the back of the torso of the service droid, had to take the torso apart to be able to do this. I then used 2 brass spacers to bolt it in place.
I then fitted the Raspberry Pi camera board to the pan/tilt kit using nylon screws and spacers. The cable that comes with the Camera board was not long enough so I bought a longer (25cm) cable on Ebay. I immediately tried the camera and came to conclusion that the viewing angle is pretty narrow. I also couldn't move the camera down enough to be able to see the gripper and pincer. So I decided to modify the pan/tilt kit so it sits higher above the torso. I used some metal brackets I had laying around and bolted them together. Now the camera can look down so I can see the gripper and pincer and also the front edge of the robot. Which is handy to accurately position the robot. I have ordered a wide angle lens for a smartphone on Ebay. That should give me a wider viewing angle, if I manage to fit it to the camera board...
To power the Raspberry Pi I run 2 wires from the RPi to the Dagu red back spider controller. It has a 3A 5V switch mode regulator so can give more then enough current. At the moment it only powers the RPi.
This is the back of my Dagu service droid showing the different parts: