Welcome to Robot Dialogs. This is a place where I will record my progress, mistakes, errors, failures, lessons learned and hopefully occasional success in my designs and implementations of robots and other technical endeavors. I will try to make it as educational, informative and entertaining as I can...

Tuesday, November 24, 2009

Best laid plans...

Well it seems that every attempt I make to reduce cost on this robot just comes back to bite me in the end. I think I've learned my lesson...buy new shit and don't try to cut corners. I'm referring to the motors and the motor controller... While investigations into the motor controller resulted in a good design (based on that of the Open Source Motor Controller) the cost and time needed is prohibitive at least for the motors I'm going to use. So I've ended up purchasing two 9A motor controllers (one for each drive motor).They work very well for these motors (they are way bigger than necessary). One issue came up when I mounted these to the chassis though... Two of the controller's mounting holes are attached to OUT A on the PCB as you can see in the picture. So when I bolted the things to the bot and started using them, a full 15V was applied to the chassis. This burnt out two cheap sensors (fortunately I had enough replacements on hand) and it wouldn't let the motors go in the same direction. I spent probably 6 hours looking for what was wrong with my test code. I finally asked the Sparkfun Forums again and went to sleep. The next day I checked the forums, but there were no helpful posts so I started testing from the beginning again and noticed the stupid way the board had been designed...ugh. A little hot glue to hold the two plastic standoffs in place (and electrically isolate the controller) and voilĂ  the bot could go forward/backward again!

When I first started writing this post (almost 10 days ago) I had intended to show more drawings from Google SketchUp. At the moment I only have the one below available. Much more is designed already, but because I'm keeping the weapon components a secret until d-day, I'm restricted to what components I can show... I'll have more detailed drawings in the next post, as I said this post is already 10 days in the making, there have been some updates.

Everything has exact dimensions by the way (long hours in SketchUp with a caliper).

There aren't any dimensions (shown) in this pic...It's about 7.75" wide and 9.5" long. I'm a bit concerned about controlling the bot at this point, mostly because of how wide it is. I wont have fine enough control (I think) to do a solely automated bot (this was never the intention, but it's definitely not happening now). I'm not even sure at this point whether I will allow it to line follow without guidance. I'm leaning towards remote controlling everything with a laptop (I don't subscribe to the standard RC controller/receiver paradigm). To this end I've purchased a set of XBee wireless transceivers and the breakout boards necessary to use them (XBee Explorer USB and XBee Explorer Regulated).
Once, in the past, I tried to use a different solution for wireless control on a different robot. I still have them but I've never been able to get them to work (which is sad, they should have a HUGE range and I'm out $100 for the pair). The XBee module's worked first try out of the box! I was floored. What these modules (both kinds) do is form a wireless serial link between the computer and and the robot. Its like having a serial cable without the cable. The XBee Explorer Regulated board allows my micro-controller running at 5V to work with the 3.3V XBee module. The XBee Explorer USB is a board that the XBee module plugs into and it serves as a USB to Serial converter (basically makes it so I can plug into the PC with USB, but the PC thinks it's using an old serial port and cable).

With these modules I can send data and text to the robot from up to 300 ft away! For now I'll be developing a simple (safe) command set to control the robot for the competition. I'll be developing a JAVA program w/ a simple GUI and serial solution to take keyboard/mouse input from the laptop, convert it to a serial commands and send it to the bot. More on this when I've documented it and cleaned up/commented the code that still gets changed every 5 minutes :). Some may wonder why I purchased the 1mW version instead of the newer 2mW or 900 series. The explanation is simple; these were cheaper and they are recommended by Nate (the SparkFun CEO) in a wireless boot-loading tutorial for an AVR micro-controller. I'm going to try to follow that tutorial after this competition, but modify it to work with my preferred micro-controller the ATMega32 (which I'm using for this robot by the way, and yes I know they're getting replaced by the ATMega32A). I wish I had time to do it now so I could get free from my current programming method (AVRISP mkII + AVR ISP Programming adapter).

Okay the post is officially way too long so I have only one more thing to say. If you ever question why I spew on about SparkFun, it's products, members, forums etc. I suggest you look at their news post here to get an idea of why.

Sunday, November 8, 2009

Motor Control Circuit

Update: This circuit doesn't work (thanks Sparkfun Forums folks) revised version will be in next post.

So I've worked out the motor controller circuit I'll be using. I've ordered the components too. Hopefully when I get them it will work as planned without too much modification.

Or the Google Doc

The major components:
NPN Switching Transistors

It's less complicated than the circuit makes it look... It's really 4 identical circuits (which I show in lower part of schematic) attached to the MOSFETs of an H bridge. The optoisolators (PS2501) are also a single package so wiring won't be as complicated either. Please feel free to comment or suggest changes... I've never built a circuit for high voltage/current motors like this before and could really use another set of eyes on this. (Especially if it looks correct, I need positive reinforcement as much as criticism :)

Change of Plans...

I've visited about 15 local hardware/hobby/auto parts/tool stores in the last 3-4 day looking for ideas and ways to turn these drill motors into drive motors for the robot. I've also logged about 8 hours of research into gears, gear types, gear ratios, and speed/torque conversions. I've decided to scrap the idea of using these motors as drive motors. The two main reasons are cost and unknowns. It costs as much to buy geared motors as it does to buy the gears to get these working. These motors are terrible as far as documentation goes. There's no way to find out their intended voltages, current draw, stall current stall torque and on and on... Because of this I don't know how far they need to be geared down. It would take some trial and error at my cost. I don't have the time or funds to do it. The other reason is complexity...It would take a fair amount of machining to create mounts for all the hardware in a custom gearing solution. Don't believe me? Have a look:

Every shaft would need a mount with precise holes, bushings (because bearings would be over kill) and testing. This kind of work isn't outside my abilities, I just don't have the right equipment... If I were still at school I'd just head over to the machine shop and make this stuff...unfortunately real-life means buying mills and lathes to do the work...I don't have the capitol for that yet.

In response to this I located an alternate motor source.
The site has been on my list of "places to try out" for a while so I'm glad to get the opportunity. This motor has good documentation for its electrical and mechanical characteristics and accurate dimensions. Meaning: I can design the mounts and electrical circuitry for them while they are in the mail. I also ordered a couple of tire hubs for this size shaft...should save some time. I really hope these motors were a wise choice.

The next post should have the motor control circuit, possibly the sensor circuits (I already know them, but it's good to draw it out still) and maybe some code :) . Probably have CAD drawings of the bot too...I've spent about 8 hours in Google SketchUp...I think I'm finally getting used to the controls...in my opinion they are harder to learn than AutoCAD...but free :).

Wednesday, November 4, 2009

2 Days in and already Over Budget

I did some scouting at local pawn shops for suitable power tools w/ strong motors over the last two days. I ended up finding 2 14.4V Craftsman drills (each of which came with 2 batteries and a charger) and a 14.4 V Black and Decker circular saw (w/ 1 battery). Grand Total $140...Doh!

I shopped around with the intention of matching the two drill motors so that they would be balanced in torque/current/dimensions/etc. I made the assumption that being the same voltage and brand would be enough to get evenly matched motors. Unfortunately when I disassembled them later I found that the Larger (red) one had a motor much larger than the other (gray), and the transmission was very different... The circular saw has a motor similar to the larger drill. All three have different drive gears.

So the plan at this point is to ditch the transmission from the larger motor and the gear box of the circular saw and find gearing for these two to make them drive motors.

Next time I think I'll just buy identical motors...hopefully these last a while.

I've been scouting out all the other things I'm planning to use as well: steel base, wheels, axels, bearings, etc. I'm also working on a custom motor driver circuit which hopefully will be cheaper than buying a ready made one...yay shopping! I used a uC and the power MOSFET from one of the drills to rig a test circuit before I order the parts for the driver. Tests pretty much confirmed that I'm on the right track, but I'm going to formally design it to try and minimize screw ups. During the test the motor had enough torque to throw itself off the desk...I can't wait to get this thing on wheels :)

Sunday, November 1, 2009

2 Upcoming Competitions

Okay so the main reason for this new website/blog (for the time being) is to chronicle the build of a super sumo style robot for Sparkfun's RoboJoust competition on December 6, 2009. As I'm currently at my childhood home in nowhere's-ville Kansas I'm near enough to the competition site (Boulder, CO) to actually participate. I'm looking forward to touring Sparkfun's building and meet other robotics folks. Info on the competition is here.

The basic idea is to have two robots start at opposite ends of the track (below) , meet in the middle, undergo epic battle conditions and finally limp to the opponents starting point.
First prize for the event is $100 so I'm considering that to be my budget for materials. With that budget in mind I'll be trying to locate old cordless drill motors (for locomotion and weaponization).

For now I'm still sketching and brain storming, but due to the budget I'm going to be keeping things very simple:
  • heavy - (battery/motor) weight will likely be the only defensive* element (to keep it from being knocked off track)
  • power - drill motors should be easy enough to locate in pawn shops/auctions/craigslist and if they put me over budget they are likely to survive battle and be reusable.
  • sticky wheels - going to have to keep my eyes open for this...
  • the electronics (other than a motor drive IC) I already have in abundance.
  • The simplest approach I think will be a line-following juggernaut. Line following is something I've had to program/test/perfect many times, so it shouldn't be to much of an issue.
*I wont be revealing offensive elements until closer to the competition date. :)

Sparkfun is also hosting a second event later next year in April which is bound to have some steep competition. I'm hoping to enter into this competition as well, but it's too far out to actually purchase a spot (I may have moved away or closer by then).

This second competition has an active forum thread here.

The idea with this is an autonomous robot race around the Sparkfun premises. Teams closer to the location have already started to collect data on the building, gps readings, etc. Last year's winner (in the ground vehicle class) circumnavigated the building in just 92 seconds. Map and some gps data of the course courtesy of [macoklein/Viliam].

I would link to the original but it is likely to be inaccessible after November 15...

My initial thoughts on this are a nitro RC vehicle hacked to make it automated. Because of the competition I think that will be my best shot. I won't be attempting the UAV class (though I did have a notion to automate a model rocket...2 sec lap + diving for cover...) because I don't have the budget for crash testing a model plane.

Well that's long enough for a first post, next few will probably be filler on robots I've already built...