Let's Make Robots!

Igor, My first robot

navigate around with IR and avoid stuff

This is igor, my first robot.  His brains are a Make controller, a SAM7-based microcontroller which I gotta say was NOT the cheapest but for the most part is a joy to program.  The chassis is an octobot chassis from budget robotics, with an extra deck which is not attached in the photo..

Anyway, I just put him mostly together tonight, and wrote a real quick app to test the IR rangefinders.  I'm not really sure what his mission in life should be yet, but for now I'm just gonna try to make him able to roam around and avoid stuff.

I had been trying to solder up some simple (HAHA!) boards to host voltage regulators and some input voltage scaling circuits for the IR sensors, but despite having done about 3 learn-to-solder kits (2 never did work...the other just looks awful) I am still amazingly bad at soldering.  for the moment I will probably just try to get breakout boards for everything, but SOMEDAY, I will figure it out. (perhaps not)

 Anyway, I found this site inspiring, so I wanted to share :-)



OK, small update, due to my epic soldering fail, I ordered all new voltage regulators in 5,6,and 9 volt varieties from digi-key and 2 of those nifty regulator breakout boards from dimension engineering.  My intention is to run everything off one 12v 8xAA powerpack for now, with a 5v or 6v regulator providing servo power, and a 9v regulator providing electronics power.  If the regulators work as well as I hope, this should isolate the motors from the electronics without the added weight and complexity of a second battery pack.  All the regulators I got are 1.5A rated, which I hope is enough, and I have nice heatsinks to mount to them. sound workable to you guys?


Another update, Still waiting for the breakout boards from dimension, but I have my digi-key linear regulators.  I worked out a problem with my test setup, and now I have working navigation code!  It's not perfect or particularly clever, but it works and effectively avoids obstacles.  I will try to get another video up tonight.


Okie dokie, finally shot some video of igor navigating around my kitchen, and there it is for your amusement :-)  For the moment I am just having him do an extremely simple "turn away from the obstacle" kind of navigation, but since I have such a powerful (well relatively..) microcontroller with it's fancy 32-bits and all Im going to continue iterating on his code and see how smart I can make him.  I am trying to make some kind of neural network for him based on http://www.gamedev.net/reference/articles/article1988.asp and http://lwneuralnet.sourceforge.net/, but at the moment I think im overflowing the available memory.  WIll have to trim it if possible and see what I can make it do.  So far, Im having a lot of fun!  I think next time though, If I make another robot I will go with something cheaper like an arduino... we shall see :-)


due to the lack of an FPU, I'm not sure the neural net can ever be made to produce useful results or to even really function at all.  Even with a big memory hogging pre-generated table for sigmoid function I still need to be able to do floating point arithmetic and it ain't happening on a SAM7.  Im gonna see if I can get a similar effect with some other technique in fixed-point.  In other news, I ordered a new arduino and LCD and super cheapy wireless thinger from sparkfun, gonna try to get some visual feedback with the LCD and use the arduino to act as a sub-processor to handle additional sensors and serial devices in the future.  The wireless thing should be a way to have igor talk to other devices or my PC maybe.  Still not sure on that one but really wanted to play with it anyway heh.



My stuff from sparkfun arrived, and I mounted my new arduino deicimila on the 3rd deck, and for the moment just hooked up the LCD and have it sitting there.  Still considering how I want to mount it permanently.  The Arduino is programmed to listen on its real serial port for characters from the MAKE controller and echo them to software serial, which is what the LCD is hooked to.  The arduino basically will let me connect to any serial or I2C devices I want to without having to tie up ports on the make controller :-)  Also I scavenged an old reset switch from a PC case and made an erase switch for the make controller so I dont have to short the pins with a screwdriver every time I upload new firmware :-)


As suggested by jip in the comments, I looked into fuzzy logic, and after skimming a few tutorials came up with a quick little program that does a real cheap pseudo-form of it.  I have arrays that define rules, and possible actions, given 3 IR inputs, and 2 motors and a sleep time output, it checks which apply, accumulates the values, and then averages them.  The values themselves need tweaking, as igor gets closer to things than I'd like now before correcting his path, but it works, and somewhat better than the old method!  When he approaches a wall, he will now very smartly turn perpendicular to it, which looks real great.  And also, he used to get confused when he entered a dead-end, he would twitch back and forth until he slipped out, now instead he kind of smoothly follows the perimeter of it out.  I'll have to shoot some video of it, once I tweak the values a bit, its really neat.  Maybe once it's a bit cleaner I will post the C code too.  Gimme a few days and I should have it locked up :-)


iGor has been cannabalized for other projects, so long iGor!!

Comment viewing options

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

soldering you say? take a look at this it might help!

i like the compactness of your bot and also its name :) and all those cables don't look messy like they do in my bot. waiting to see it in action!

Nice to see an ARM7-based robot! It looks like a nice board you've got there!
Is this consired a micromouse.??? cuase it extremmely compact in there. Man i like to see more like these...

I don't thinks its a micromouse, the decks are each maybe 7.5 inches in diameter, vertically seperated by 1.25" spacers, and when I'm finished there will be  4 decks.  First deck is planned to be all batteries, and power electronics(voltage regulators, power switches, distribution).  Second deck is the controller, and IR sensors.  Deck 3 and 4 are not decided yet, but Im considering adding sonar, maybe some kind of manipulator arm, and maybe an arduino/stamp/who-knows as an IO co-processor for handling input from I2C and other serial devices.



Nice!!!!! Can't wait to see the finish product.
You want 5VDC for electronics, 9VDC may cause damage, and besides 5VDC is what nearly all IC's run at. 9VDC for motors maybe, or 6VDC even, but when the motors stall they may damage the voltage regulator depending on what the stall current is.

Well actually I found that the particular board im using has an on-board regulator set, for the 5v and 3.3v it uses and the input voltage it needs is 9v _minimum_, and actually a regular 9v battery does not have enough amperage to power it!  I've been using a 12v 8xAA pack for now until my regulator breakout boards arrive. The 9V regulators i have are rated to 1.5 amps, so I will feed them the 12V from that same pack and hope it still has enough left to go through the 6V regulator for the servos. 


That sounds like a good plan. Do you happen to know the current draw of your servos?
really cool robot!

That's a beautiful piece of work that you've got there. Re the soldering, it's mainly just a matter of practice but it is important to have a good quality temperature controlled soldering station, and the right kind of solder too. As far as neural networks are concerned, I think they're highly over-rated. Robots need neurones about as much as airplanes need feathers.

Instead, learn more about finite state machines and see how you can apply those principles to robot control. I've written a little bit about them on my website at http://asmith.id.au/state-machine.html and there's even an animation of one on the following page at http://asmith.id.au/robot-simulator.html

Have you considered adding wheel encoders so your processor can track the rotation of the wheels and keep them going at the same speed? When your robot is able to go straight reliably it opens up the navigational and mapping possibilities enormously.