Let's Make Robots!

Bajdi's service droid

Development platform

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...

Original post:

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:

High res version: http://www.bajdi.com/wp-content/uploads/2014/01/dagu-service-droid-back-text.jpg

 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

It's a small tube with Chinese characters on it. The only English words on it are "heatsink plaster". Not sure where I bought it, Ebay or some Chinese webshop.

And the 1W Leds on either side are fantastic!  What  "Heatsink Cement" are you using for these?

 

Hey Bajdi, I'm starting work on my Vader code using 4 channel controller and spider.  Would you mind posting your code to give me a starting place? Thanks! 

nhbill, I have an electrical engineering degree. So connecting a couple of boards together is easy for me. I started playing with micro controllers and robots because I wanted to learn how to program. And I got a bit hooked :D For me this is just the start. The motors and servos work. The Raspberry Pi + camera work. But now I need to make it all work together. That's a very daunting task for me. I'm a bit of a GNU/Linux geek. I've been using GNU/Linux exclusively for more then 10 years at home. But I'm absolutely no programmer.

My first goal is to let the RPi run a webservice that provides an interface to control the robot. I'm thinking about a simple webpage with some buttons and the output of the camera. The RPi should then sent commands over serial to the ATmega2560. I was thinking of using node.js to accomplish that.

Once I have that figured out I would like to play with OpenCV. It should work pretty well with the RPI camera board. Have seen several videos on youtube of people using it with success.

My experience is almost all Windows so learning Linux on the RasPi.  So, you are way ahead of me on the electrical and the operating system. 

SOAP via a web service is kind of "chirpy" protocol with a fair amount of overhead.  I assume you will use Java for the Web Service (I have done only 6 months of dev on Web Services in Java so no guru) but you could do JSON and make it an Ajax call via jQuery or perhaps through Node.js (no experience with Node.js-got a book on it ready to be read though!).  I am pretty sure we streamed video via ajax (another team member wrote it, so a little hazy) on a previous project.  I think you have to tell it the data type to expect and the library does the rest for you.  That is a cleaner less bandwidth eating protocol.

OpenCV - I have read three books on it now and all of the books I have found to be disappointing.  They will have examples that work with test images and exactly as documented in the book, but not with real images I pull from webcams or take with my camera to apply the same concepts to.  Often the book will show how to do a particular transform, filter etc, but not why one would choose to use that over another.  One of the books was on SimpleCV (www.simplecv.org) which is a subset of OpenCV and has a Python interface.  Same problems as above, but the book was well written, the samples closer to what I might do with a robot.  The books all seem to miss the special sauce of how to work an image in the real world and filter out what you don't want.   Sure, you can write code that works in a very specific spot with certain lighting, looking for very particular features, but writing that code to work generically has so far eluded me.  Very frustrating.  I like the SimpleCV interface (it is simpler than OpenCV) so I would recommend you look at it.

Good luck!  I look forward to seeing more of your SD.  Will be certain to post my son's SD when farther along.  Have a bunch of learning curve in the meantime...

Regards,

Bill

I bought a Service Droid with 2 motor + encoders on a Rover 5 for my 15 year old son for Christmas.  I am a little surprised he hasn't done hardly anything with it except to get the rover to go backwards and forwards.  I expected him to really get excited but he has pretty much ignored it.  I decided this weekend to start putting the Droid torso and arms together to see if that doesn't perk some interest.  If not, I will play with it until he wants it or goes off to college and leaves it to me!

For the droid, I have a RasPi but do a Mini Driver instead at Oddbot's suggestion.  I have a cheap webcam for it since I heard as you found out the field of view on the RasPi camera is pretty narrow. I think the video quality will be good enough but definitely will be slower since the RasPi will have to read it in over USB.  I am especially curious about OpenCV and what you do there.  

I was wondering what I was going to do for a power supply going from my batteries to the RasPi since it needs at least 0.7 amp at 5V so will have to look closer at your solution.  I am a software guy by trade, so was hoping to buy something but haven't really seen anything I liked.

Thanks for posting.  It looks like you have gotten pretty far with this; I look forward to your updates on it.  

Regards,

Bill

Kids are funny like that. I bought my son a ton of lego and K'nex and for over a year he barely touched them. Now, he's slowly starting to play with them.

I don't know your son, sounds like he's a teenager, but once he start seeing you have fun with it he will probably jump in. If not then you get a bonus present :D

Kids is right!

What is funny is he is on a FIRST Robotics team at his high school which he absolutely loves.  I thought the Droid would encourage him, get him more into it, maybe he could take it to school since I had code ready to make it work with a remote.  I gave him a Mini Driver to run the Rover so it would be easy to setup and kept the RasPi out of sight because getting that to work is harder.  I gave him some starting code to work with the FET H bridge, printed out the documentation from the website, and even hightlighted the section to work with the H bridge. 

Sometimes I wonder if it is intimidating because it looks to our kids like it all comes so easy - whether creating cool things with Legos and K'nex or making the Service Droid work.  Kids should come with manuals.  Either way I win here though; I get to see my son do something cool with the Droid and know I got him the best present ever, or I do something with the Droid.

You did a great job on the design, packaging and directions on both the Rover 5 and the Service Droid.  I am very happy I bought this and would recommend either or both to anyone.  One nice thing on the Rover 5 might be to have a piece of plastic with a number of holes around the edges for wires to pop through that would fit in the bottom of the Rover 5.  Otherwise it gets a bit messy with a controller, battery pack etc.all jammed into that area.  

Regards,

Bill

 

Your suggestion for improving the Rover 5 had me a little confused. Do you mean something like the expansion plates from Pololu?

 

That would be nice as well.  Didn't know that was available. 

I was thinking a thin flat piece of plastic that would sit on top of the motor wells (not be screwed down).  That way there could be a thin compartment between the motor wells and the Service Droid when it is screwed onto the rover for a controller, shield etc.  Otherwise the aluminum brackets that hold the motors could short out a controller or shield.  If it had a hole in the middle and at each end, the encoder wires could come through those holes.  Unfortunately, I just checked on my son's Rover, and I think you would need to have more height so that the Service Droid could attach if the battery pack is laid flat.  I am sure that means new injection molds etc as well as perhaps mess with the arm dimensions of the Service Doid. The more I am looking at this, the more I am not sure this is a good idea.

Regards,

Bill