Tuesday, September 16, 2014

Post #2: Parts is Parts

The creeper bot project...... Rounding up the parts.

VIDEO PROCESSING


The first step was of course figuring out how to deal with the image data and detect a "person" to track.  After finding that PIXY the wheels started spinning, now to put this little jewel on a platform that is worthy of it!

MOBILE PLATFORM


I've searched and searched.  I found lots of platforms, all had their advantages/disadvantages.  I started out looking for a 4 wheel drive platform, I don't know why, I just thought it would be cool.  What I soon realized about robotic mobile platforms is that they are expensive, especially ones with 4 motors!  In other words, motors are expensive if you get nice geared ones.

Amazon, RobotShop and DFRobots had some good choices, but I really didn't want to spend over $100 on a platform.  It wasn't long till I exhausted Google and opened up my search criteria to 2 wheel drive platforms (but still with 4 wheels), and that led me to 2 wheeled platforms with a caster.

Bingo, that was the key.  I wasn't too keen on the smaller plastic platforms, I can see this thing roaming around the hallways of a high school and wanted something a bit more substantial but not bank breaking.  Finally, after hours of hunting, I turned to EBAY, and I'm glad I did.  Search for "Robot Platform" and you get all kinds of choices at reasonable prices.

I was looking for one that was all metal, big enough to mount my PIXY, sensors, arduino and everything else I needed to make this thing move and search.  I finally settled on this great little platform from a seller I would recommend.

You may choose something different depending on your need, but I think this is perfect.  The platform is 7 inches wide like the drawing shows, plenty of room for a 4 inch Arduino Mega 2560, the PIXY and the pan/tilt at the front, plus other things I need.

The Middle platform looks perfect for a battery, the motor controller (which the Ebay seller throws in with the platform!), some signal conditioning circuitry, a DC to DC Voltage converter (the motors are 12 volts, the Arduino and the Pixy are 5 volts), plus more.

POWER


After the platform, now the power.  I started with the best, Lithium Ion (and Lithium Polymer).  Super expensive!  I was looking for something with pretty good power ratings since this platform looked pretty heavy and could burn through batteries pretty fast.  After many hours, I gave up, the cost was just too expensive.  So I began looking at Nickel Metal Hydride, lower prices, but still more than I wanted to pay for the amp hours I wanted.  I even looked at drill batteries/chargers... I thought I could buy 2 chargers, take one apart and mount it to the platform so all you would need to do is drop in a battery and go.... but the chargers were more expensive than the batteries.

I finally settled on the battery that the seller of the platform recommended, and it is perfect.  It is a 1.3 ampHour sealed lead acid battery that fits perfect in the middle layer.  I could have gone with a bigger battery, and I still might depending on how long this one lasts in operation, but this one will get me started. (don't forget the battery charger too!).  SOURCE: www.batterymart.com

This little battery fits perfectly in the middle platform, it is 2" high, less than 4" long and just over 1.5" wide.

The nice thing about SLA (Sealed Lead Acid) batteries is you can lay them on their side if you like.  So if this little battery doesn't cut it, I can step up to the next battery size, lay it on the side and fit it in the middle platform.

5 Volts from 12 Volts


The reason for the 12 volt battery is the motors.  The motors included in the platform look pretty solid -and- they are, plus, they are 12 volts, hence .... Now, the Arduino which I plan to use can accept 12 volts, it has an on board voltage regulator to convert the 12 to the 5 volts it needs, but.... we are in the 2000 "teens" now, we can do better :).  Voltage regulators can get us down to 5, but burn wattage in heat to do it.  On the other hand, DC to DC converters are available now that are upwards of 90% efficient in converting one voltage to another.  So off to the internet......  This part wasn't too tough to find, I ended up at RobotShop.com and found a 25W DC to DC converter.  The key here is to cut the 12V down to 7V and feed that in to the Arduino, this gives the onboard regulator a little bit to do regulating the voltage down to 5 and also letting it create the 3.3V onboard as well.

Noise Isolation


Any time you mix motors and computers you are asking for trouble.  So, just to avoid trouble... off to Radio Shack to get some component parts to create a noise isolating circuit to give the Arduino its own path to power, and the motors a different path.  A simple power conditioning circuit put together with a Radio Shack prototyping square, caps and inductors (as of this writing, this isn't built, comments welcome)












I've added a double pole/double throw switch from the battery so that we can drain the capacitors through a 5K resistor when we turn the bot off, this speeds up the shutdown of our Arduino, otherwise, it will run off all of those capacitors for a while, something we don't really want.  You might think the motors will drain those caps pretty fast, but what if they aren't running....

I've also added a second switch, one for the motors.  This allows us to keep the motors off while we play with the Arduino, programming, checking the camera, training the camera, etc.  If I have the time, I may add led's to the motor outputs (or some kind of indication) so while motors are off, I know what the Arduino is outputting for the motors, forward, backward, spin, whatever.  I haven't thought that through yet.

NOTE: The drawing above, i used TinyCad, works pretty good!  It took me a tiny bit of time to figure out the nuances of it, but overall i'm quite happy with it.  Plus, it has a template for my Arduino Mega 2560!  I'll be able to document the pin hookups for posterity!

Pieces Parts

We need things like nylon standoffs (for the Arduino, those mounting holes are tiny), some brass standoffs, wire wraps, wire wrap tie downs, etc.  These I went to Home Depot, MicroCenter and Radio Shack to assemble some of these things.  You really don't know what works and doesn't until you get all your parts together, lay them out on your platform, and start figuring.  We'll get more into what I use when I actually mount.

Grove Mega Shield



Some things I did buy ahead of time are wire jumpers, grove cables, a grove shield for the mega.  All of these things from RobotShop and I expect this will help me try things out before wiring them up permanent.  I like the plug and play aspect of the Grove Shield.

Motor Controller







One more part I mentioned earlier, the Motor Controller.  This little circuit lets your Arduino switch 12v to the motors.  Based on your hookup, you can drive your motors forward and backward, and you can vary the speed by sending a PWM output from your Arduino to the Enable pin for the motor.  This little circuit (called an H bridge) came with the platform.



Also, one weakness of the motors on this particular mobile platform is that the motors don't have encoders.  You really are flying (driving) blind if you don't have any feedback, i.e. speed sensors for each motor.  If one motor is slightly different and moves slightly faster than the other, you won't be going in a straight line. The motors also don't have the ability to add an encoder, so instead of dealing with encoders on the wheels, i decided on a compass module instead.  Now, I can set a heading, and if i start swerving off of my chosen direction, I can adjust.

 I don't want my little creation here to run into walls, so a couple of 10cm-80cm infrared range detectors would come in handy.  A weekness of these sensors is that within the minimum distance, you don't know if if you are too close or too far away, but I think I can deal with that in software.

Also, I've decided to go for it when it comes to the Bluetooth adapter.  I found a really cool free android app on the google playstore here... This looks like it will fit the bill nicely.  I can see us driving the bot into an area with people to search, then setting it free.  I think we can do it with this app and a bit of programming.  I haven't found the bluetooth adapter yet, but they are plentiful, i'll find one soon and post it here.

Almost all of the parts are in now, by the end of this week I should have all the major expensive pieces.  Now for the construction :)

Next post: Drill/Tap/Mount




No comments:

Post a Comment