Robot 1 (under $20 version)

I've been sitting on this one for far too long. I got busy with other projects and never got this robot quite where I wanted it. But I did get a functional bot that almost does what I want it to, so I'll share it with ye. 
Sometime last year I decided I want to incorporate my stuff making skills in my academic research(I'm an applied math grad student by the way), and since my field is collective behavior what better way to do so than with swarm robotics. Step 1: Try making a robot. Buying them is completely out of the question because that would defeat the whole purpose and I don't have money. So here we go. First I'll give you a picture.

All pictures here can be enlarged a lot by clicking once then right clicking and choosing "view image", or however you do it in your browser.
 
Fig.1 The most current version ready to run. 
Goals/requirements:
  • Must be cheap. Less than $10 would be nice, but certainly less than $20.
  • Simple enough to build in a reasonable time without fancy tools.
  • Be able to move in any direction at a fairly slow speed so as to remain controllable.
  • Be able to turn a specified angle and travel a specified distance.
  • Be able to interact with other robots at a small distance.
  • Be able to sense some aspect of the surrounding environment.
The prototype satisfies these, but is an only child so I can't say much about collective behavior. The cost was somewhere around 1100 yen which is a bit less than $15 I think.

Electronics - 
Version 1
It is based on an ATmega328P microcontroller running at 16MHz... Hey, that sounds familiar. Is it... No, it is not an Arduino and it does not use any kind of bootloader, but it does use some parts of the arduino libraries and it is programmed using an arduino because that's the most convenient way. To do so I made a custom boards.txt file for a 16Mhz 328P with no bootloader. This is the content of boards.txt in a folder named noboot:

#################################################
nobootuno.name=328 No bootloader 16MHz
nobootuno.upload.using=arduino:arduinoisp
nobootuno.upload.maximum_size=32768
nobootuno.upload.speed=57600

nobootuno.bootloader.low_fuses=0xff
nobootuno.bootloader.high_fuses=0xd9
nobootuno.bootloader.extended_fuses=0x06
nobootuno.bootloader.unlock_bits=0x3F
nobootuno.bootloader.lock_bits=0x3F

nobootuno.build.mcu=atmega328p
nobootuno.build.f_cpu=16000000L
nobootuno.build.core=noboot
#################################################


If you try this you may find that you are missing the noboot core. That's because I actually made my own core using bits of the arduino core, but cutting out a ton of unnecessary stuff and making things a bit faster. But you could change the last line to core=arduino and it may work fine. Maybe.

Here are the main electronics features:
  • In version 1 the motors only go one direction. The motor driving is handled by two N-channel mosfets. It's that simple. 
  • Communication is via 38kHz modulated IR(think remote control). This uses a pair of demodulating receivers placed back to back to cover almost 360 degrees. Transmission is by a trio of IR LEDs. 
  • There are photointerruptors on each wheel that can detect when the spokes of the wheels pass by, thus telling me how far the wheel turns. 
  •  Collision detection is done by two antennae that wrap around the bot and act as switches if they bump into something.
  •  It also has an IR phototransistor which was supposed to let it orient itself using IR beacons or to seek light sources, but I haven't done much with that yet. 
  • There are three indicator LEDs, red green and blue, for giving me some indication of what it's thinking or doing.
  •  Power comes from two AA batteries.
Version 2
I decided it was important to be able to move in reverse. This required the addition of a dual H-bridge, SN754410, which I happened to have on hand. You can't really see it in the pictures, but it is located on the bottom level below the ATmega chip and next to a 100uF capacitor. Unfortunately this wouldn't work with only 3V, so I increased the battery pack to 3 AA batteries to get the needed 4.5V.

Anyway, Here is an MSPaint schematic of version 2. You will probably need to click on this one to see it.


Hardware - 
Version 1 -

The motors are little pager motors, but are actually bigger than any motor you'll find in a phone. They are about 2cm long including shaft and about 7mm in diameter. I found a pack of 20 on ebay for cheap, but I don't have any data on them. They spin far too fast to connect a wheel directly, so I had to find some way to gear them down. My first attempt was simply to press them against the edge of the wheel. I've seen this done in another robot with good results, but mine was a complete failure. There was not enough friction between the shaft and the wheel. I even used a small spring to hold them together, but the needed force put too much load on the motor.
I then tried putting some wire insulation on the shaft to increse friction, but to no avail. Also, the gear reduction was not enough. It was the same as if I placed the shaft directly on the ground. 
Fig. 2 The simple, but nonfunctional, first version. Note the fuse clips holding the motors.


Version 2 - 
I suffered numerous failures in my attempt to make some kind of gearing without any nice machine tools or premade stuff. But in the end I found something that works reasonably well. And it required a block of wood. Rather  than rambling on trying to describe it, I'll just show you some pictures and hope you can figure it out. You may wonder where I got such convenient wheels, bearings, axles and such. The wheels and bearings are rollers for slot cars that I picked up at a hobby shop for about 200yen for the whole set of four. The rest was from a lucky day at the hardware store.
Also, this was all done with a crappy hand drill and a hacksaw.


 Fig. 3 The wood block with aluminum sleeve inserted.
 Fig. 4 The assembled drive unit. The motor shaft is the little red bit next to the green wheel. The green wheel is on an axle inside an aluminum sleeve. The sleeve is floating and a spring holds the green wheel against the motor and blue wheel. Red turns green, green turns blue. Blue contacts a sleeve behind green.
Fig. 5 The bottom showing the adjustable spring and a motor.

Assembled -
Here are some pics of it all put together and ready. Sorry I don't have interesting videos yet. It can be controlled and calibrated by an old TV remote or set loose to autonomously do... whatever it does.
  As always, you can ask questions in the comments.

2 comments:

Anonymous said...

Just stumbled across this page. Love your work. Its amazing what people would consider junk these days, eh.

Anonymous said...

Jasa Arsitek Medan menyediakan desain yang inovatif dan efektif untuk berbagai jenis proyek, mulai dari rumah pribadi hingga gedung komersial. Dengan pengalaman dan keahlian yang mendalam, arsitek di Medan dapat merancang solusi yang sesuai dengan kebutuhan, anggaran, dan preferensi klien. Mereka memperhatikan berbagai aspek, seperti pengaturan ruang, pencahayaan alami, dan pemilihan material yang tepat. Layanan arsitek ini juga berfokus pada pemaksimalan ruang serta penerapan desain yang fungsional dan estetis. Menggunakan jasa arsitek profesional memastikan bangunan yang tidak hanya memenuhi fungsinya, tetapi juga nyaman dan menarik secara visual.