Monday, December 1, 2008

Dumbbot pt1


Dumbbot showing off it's motors

Dumbbot was designed to be my first Sumobot. Originally I had intended to construct a much more complex bot by decided that a simpler bot would be better as a first time sumobot. The project used various circuit "bits" that I had either used before or had seen.

Chassis

Not knowing how I was going to do the body construction I decided to make the base chassis the universal plate set from Tamiya. This plate is plastic, 6x?? cm and has been predrilled with 3mm holes. Being plastic it was easy to cut down to size (the magic Dremmel).

For wheels I chose the Tamiya tractor tires. Again being from the same range everything fits together. The 3mm hex axle was used. I did cut down the molding on the tire so it would sit closer to the body. This meant the width of the robot was now just under 10cm.

One of the hardest parts about a sumobot is meeting the restrictions on the size of the body (10x10cm - 500gm). To get two motors into a 10x10cm area is all but impossible with standard gearhead motors. The gearhead motors I used on Squarebot are 7cm long. So normally you need to be using motors with their drive shaft at 90 degrees to the motor body or some special gearhead motors where the gears are laid out to minimise the space used (like the Solarbotics motors).

I make a habit of pulling apart old cdrom drives for motors and gears. Luckily I had pulled apart two of the same model which meant I now had two motors of the same spec. These were approx 5cm long and rated to 9V. They weren't gearhead motors however. I needed a way to gear down the motors and connect them to the 3mm hex axles used to attach the wheels. Luckily Tamiya had something to help. They sell pulley set range consisting of various pulleys, gear wheels, etc. I used the 38mm pulley wheel on the tire axle and drove the other end of the system directly off the small (2mm) shaft of the motor. First I did some test to see if a pulley system would actually carry 500gm and also push 500gm. A few tins of mushrooms and tuna later and to my amazement the pulley system worked well pushing the 500gm tin with little issue. The only issue was the pulleys were too large for the axle and the base plate was in the way. So some more Dremmel work and I cut out some channels under the pulleys so they would run clear. I ran the motors at 3V as that produced a speed that seemed about right. The 3V power line came from 2 x AA batteries.

To attach the motors to the base plate I used some small scrap pieces of metal. I made a template of where the mounting holes were on the motor and used this to drill out the metal as required. One was good, the other needed a bit of filing to fit. Doing it again I would spend more time making the template. A bit of sheet metal work and I had custom engine mounts for my recycled motors.

On the opposite end of the chassis I had room for the 9V battery mount. This way the majority of the weight was as low as possible.

I intended to mount the circuit board above the engines and pulleys. So I used some 3mm screws and spacers to gain the height needed to mount the board.

Saturday, June 14, 2008

Crabbot


Crabbot

Crabbot is based on the same design as Rodbot. He was made for my six year old nephew who thought that robots were the coolest thing around and wanted one himself. So I wanted to make a simple and robust robot for him that could survive being handled by someone of that age. This meant no exposed componets and a solid body to survive a six year old grabbing it in a fit of exitement.

The LM386 chip was glued onto the body and a power switch was added to the front. All the wiring was kept as tight and clean as possible and I used heat shrink wrap to avoid any chance of little fingers touching bare wires. Finally I used a lid from a small gift box as the shell (hence the name Crabbot) to protect everything and to give my nephew something to grab hold of.


Crabbot exposed

The herbie design was great as the light tracking is simple and can be made more fun for a six year old by giving them a torch to "lead" the robot. I decided not to do the reverse sensor as the bump switch had a fair chance of being damaged.

The body used is a kit I purchased some time previously for use with Squareabout. However the interference from the engines to the rest of the circuit was so great I didn't use it. There are two 4.5V motors that drive three wheels each. The kit also came with legs that could be used instead of the wheels. I went with the wheels as they would work better on carpet.


Crabbot belly

Thursday, June 5, 2008

Trackbot part 5


Trailer for Trackbot

Once I had finished Trackbot I decided it would be good to have something to carry loads for Trackbot. Thus the Trackbot trailer was made.

The body was a body from a seven stacker CDROM drive. After a bit of trimming I had a nice flat tray to work with. The axle supports were plastic clips from some Cisco switch packing material. They looked like they could be useful and after a year of sitting on the shelf there were. The wheels/axle are Tamiya Truck tyres. I glued the axle supports to the body. I drilled a hole for the trailer to connect to Trackbot.

On Trackbot I made a trailer hookup from two automotive crimp connectors. In all the whole setup worked rather well. Only issues was in a sustained full reverse the trailer would jack knife, but that was expected.

Tuesday, June 3, 2008

Trackbot part 4


Side shot of Trackbot

With everything together the first test drive took place. As with Squarebot much time was spent on getting the emitter circuit at 38kz (one day I'll buy a multimeter that does decent frequency measurement). However I was finding exactly the same issues as I did with Squarebot. Low range on the emitters and lots of noise, false detects everytime the motors changed direction, etc. Going back to the breadboard of the design I moved around some of the filtering capacitors on the power supply. Totally different (better) behaviour. Based on this I added a nice big 470uF capacitor to the main board on the power input plug from the power board. Totally got rid of all the electrical noise from the emitter circuit. So even short cables like those on Trackbot still result in large amounts of EMF. I really need to learn how to make my own printed boards.

Once the new filtering capacitor was in Trackbot worked beautifully. He avoided things, the bump switch worked fine and he could climb over anything. I did a bit more work on the programming to add the functionality that if both detectors detected something then that should be considered the same as if the bump switch triggered. Ie full reverse then turn to get out of trouble. With this simple response Trackbot has rarely gotten stuck on anything.

A few times I have mentioned size/weight issues of Trackbot and my attempts to reduce them. In the end Trackbot came in at 430gm. Most of that is engines and batteries. Rechargeable batteries I found weigh two to three times more than standard batteries too.

So what lessons did I learn from this design? That cables are bad and just add issues into a design is one. I am really impressed with the Tamiya education range. Precision plastic components all designed to fit together. Perfect for building bots out of and quite cheap too. Something else I learnt was that rechargeable batteries don't hold their charge over time. I few times I have given Trackbot a run after a month or so only to find the rechargeable batteries are dead but the standard 9V battery is fine. For the next design I need to consider moving to a more modern battery technology which is lighter. Also I should have put the bump switch on an interrupt pin of the microcontroller so that I could have seperate behaviours for the bump switch and when both detectors detected an object.

What do I want to do after Trackbot? Make a mini-sumobot. I have purchased some engines from Solarbotics and am current in deep thought mode of a design. What is taking up a fair bit of my time is how to design/make a chassis for such a small bot. A 10cm square isn't much room to get two engines and wheels into. Originally I considered using a small box and wedging everything into it. I had machined in the engines so that was looking good. However I found that getting the rest of the bot into a fixed container (PC boards, batteries) just wasn't going to work. No room to work with and a real pain to get at components (like batteries). So my thoughts now are to use multiple boards and stack them. Easy to design each board (one for motors, one for battery, etc) and they just screw together. All of this is on a bit of the back burner now since Sonja has arrived. But it's nice to have dreams.

Monday, June 2, 2008

Trackbot part 3


Trackbot top shot showing main board

For the main board I used the same IR emitter/detector circuit used for Squarebot. I also added a PIC microcontroller to be the brains as I wanted a bit more that just avoidance in the design. All my original design work was done on a breadboard that stayed setup until the design was finished. I find this makes if very easy to go back and test things (like the flyback diodes described later) and when wiring up the boards it helps also. Also to push myself a little I used a PC board a third the size
of the board used for Squarebot. It was tight but worth the effort. The output from the detector circut went to the microcontroller. I also had a bump switch on the front of Trackbot as an input. The bump switch was mounted quite low in case an object was missed by the detectors and run into. The outputs from the microcontroller couldn't directly power the relays. Instead they switched a transistor which turned on the relays. I had also missed putting in a flyback diode over the relay contacts. As a result everytime the relays turned off a huge spike went through the circuit causing the IR detectors to "flutter" and false detect. Some small signal diodes fixed that, plus they fitted in the rather tight board as I hadn't originally allowed space for them.

The reason I choose a PIC microcontroller was primarily based on the programmer board I could buy. The board I purchased (details) was only $50 AUS and included a $9 microcontroller. There were few other cheap programmer boards available and not know how much I would be using it I didn't want to spend $300+ on a professional programmer to only use it once. For this project the PIC16F84 was more than adequate for what I wanted. Plenty of memory space and IO pins for my simple design. I had done some assember programming at Uni but I found an excellent PIC16F84 tutorial which meant I could get the most out of the chip with the least trial and error. The only other doco I used was the datasheet from Motorolla. The actual program will be in a later post. I did consider a DIY progarmmer board but didn't want the frustration of getting it working as most of the designs were very specific to certain computer hardware setups.

I found out a few things with the programmer/design. The first was that the watchdog reset was enabled by default. The result was the program was reset every few milliseconds. Strangely it wasn't till I was testing the bump switch that I noticed. The bump switch would send both motors into reverse for a short time then turn (ie one motor reverse). This was to get Trackbot out of the situation of hitting something full on and avoiding the "both detectors sense something, full reverse, nothing detected, full forward, repeat" situation. With the watchdog reset occuring this wasn't happening. The other thing that took some tinkering was the time delays on turning on the relays to control the turning of Trackbot. Since there is always a delay when a motor changes direction I needed to wait long enough for the motor have time to reverse and long enough for some actual "turning" to take place. This took a bit of trial and error as expected.

Next time the first test run...

Sunday, May 4, 2008

Trackbot part 2


Power supply/Motor drivers

On the same board as the motor driver I put the power supply. A simple design based around a 78L05 regulator. Again a smaller, lighter version of the 7805, but only rated to 100mA. Various filtering capacitors were used. I used recycled capacitors as much as possible as part of my recycling design philosopy. Also I had a few small 6.3V rated capitors from computer mice. Tiny and light, just want I needed. Because I needed a 3V power supply for the motors I went for two battery packs. A 9V battery to supply the main 5V regulated circuit and a 3V (2 x 1.5V AAA) battery pack just for the motors. The 3V supply only had one filtering capacitor on it. But this did mean I had to have two battery connectors on the power board, so two plugs, etc. Small things like this slowly add up to more weight. Finally on the power board went the power switch, some jumper connectors so I could disable either the 3V or 9V power lines (for testing) and various molex connectors (power input, motor connections, power output to main board, relay control input).

With the power/motor board done I was ready for some testing. For the AAA batteries for the 3V supply I was using rechargable batteries (NiMH) so was only getting 2.4V. However Trackbot went well, the speed was good and the climbing ability was excellent. Trackbot would almost go up walls. Shorting the 5V output line to a relay contact would kick a motor into reverse and Trackbot would spin around quite nicely. One issue was the rubber tracks would sometimes come off as they would stick to the carpet a bit too much. Plus I have found over time the rubber has stretched a little.

Next time the main board...

Saturday, April 19, 2008

Trackbot part 1


Trackbot and trailer in action

Trackbot was an evolution on Squarebot but with a microcontroller added to the design (a PIC16F84). The engine controller circuit was based on the sumo bot design from "Junkbots, Bugbots and bots on wheels". However the real inspiration came from a visit to the local Dick Smith store.

One day while browsing in the local Dick Smith store I came across the Tamiya track set and Base plate set in the discount bin. Instantly ideas of a tank like bot came to mind and a purchase was made. However I then had a few months wait while I tried to work out a way to attach motors to the track set. Little did I know that Tamiya also had a range of engine kits designed to go with the track set (both single motor kits driving both tracks and dual motor kits). Once I had one of the dual motor kits (from Jaycar) the chassis was done. Since the track set boggies were bright orange I decided to spray paint them black. Big mistake as the paint just peeled straight off, even after I washed the plastic in detergent. So now they are orange with black highlights. Finally I used the cover from an old floppy disk drive as a plate to sit on top of the chassis for all the PC boards to be mounted on. This also had the advantage of providing some shielding from the motors.

The motors are 3V rated. The engine block has four gear ratios that can be setup. I choose the second slowest as I wanted trackbot time to react to objects and I wanted torque. No point having a tank that can't climb over things. Some of the robot sites suggested replacing the 3V motors with 4.5V motors (the motors are the standard "toy" size engines) but speed wasn't a concern on this design.

The next design issue I had was how to control the 3V motors. My existing motor controllers (SN754410, 4424) didn't support such low power motors. I could make dual H bridges out of transistors but that would make the engine controller quite big and space was an issue. In the end I went with the relay based motor controller described in the "Junkbots etc al" book as used in the sumobot design. A DPDT relay is used with the NC points putting the motor in forward. When the relay is triggered the motors go into reverse due to the cross wiring on the DPDT relay. This means that there is no idle. However not having an idle wasn't really an issue on an obstacle avoiding bot. Also as the normal (no power) position of the relay is for the motors to go forward the power consumption by the motor controller circuit would be zero. I even had some nice small 5V PCB telecom relays to use. The other issue was that I was going to have to have two power supplies. 5V regulated for all the ICs etc and 3V for the motors. I considered just using the 5V supply for the motors (and using some diodes to reduce the voltage) but decided against it.

One ideal I tried to stick to was reducing weight and size across the entire design. I wanted Trackbot to be as light as possible as my next bot would be a sumo bot. Given that there are weight restrictions for sumo bots I wanted to see how hard it was to keep weight down.

Next time more about the power board...

Wednesday, February 20, 2008

Rodbot


Rodbot - my first junkbot

My third robot came from the excellent book "Junkbots, Bugbots and Bots on Wheels" by Hrynkiw and Tilden. This book details seven projects utilising the BEAM (Biology, Electronics, Aesthetics, Mechanics) design ideals and recycled material. The projects include solar bots, Bicore bots and Beam bots. The authors explain each project in detail including the where the materials were sourced (eg old tape decks, modems, etc) the circuit diagram and construction techniques. In reality most of the IC chips used you are just going to have to buy but the ethos of recycling materials really struck something in me. The circuit designs are clear but I would have liked a little more explanation into the actual workings of some of the circuits. There was some explanation but at my low skill level I did have to do a few rereads on some of the projects.

Since reading this book I try and make sure all my projects use recycled/reclaimed materials. For example an old computer mouse (the roll ball variety) is a gold mine of parts (phototransistors, wiring, IR leds). Also a junkbot as a certain appeal and has more history attached to it.

Rodbot is based on the third project, a herbie photovore. A truly inspired design using an audio amp chip (LM386) and some photo detectors (I used phototransistors) to make a light following bot. A relay and bump switch is added so the bot can reverse if it hits an obstacle. The engine mounts are made out of hose clamps and chassis from cut offs from a cdrom case (the remains of the case from Squareabout). I loved the circuit. Simple but with a great deal of functionality and the junk construction was just fun to try. I did buy the 386 chip and the battery mount, but all the other components (including the wire) was recycled. The wheels came from an old battery car racer and give Rodbot great grip. I also reverse biased the phototransistors (ie put them in backwards to normal) to give a much greater response to light. With the phototransistors setup normal Rodbot turns within a 20cm arch. Reverse biased and he turns on the spot. I left the eye stalks attached with U-tack so that there were easier to direct. Also Rodbot pretty much flies along so crashes (and mild damage) are normal.

I plan to also make one of the Bicore designs from this book at a later stage. But even if you aren't going to make any of these projects the book itself is worth a read. Great ideas, well written and something I have reread a number of times.

Monday, February 11, 2008

smells like roundabout, looks like squareabout

My second robot was again based on a design by David Cook. This time from the "Intermediate Robot Building" book. This robot was called Roundabout (as it was rounded in design to help it brush past objects) and is an object avoidance design. It uses two IR detectors to determine if an object is in it's path and uses a motor control setup to steer out of the way. The design in the book is in two parts. The first only using logic chips, the second part adds a daughter board with a microcontroller to improve the avoidance abilities.

Again the book goes into a quite detailed analysis of the various components used including IR detectors, motors, motor driver chips, chassis manufacture, etc. Rather than just present one solution for most sections of the robot (power supply, motor control, sensors, control) various alternatives are presented and critiqued. This is superb as it allows you to not only build the robot but also understand the design decisions made. This is normally lack in most other robot building books I have read.

In the end I used a 7805 voltage regulator as the core of the power supply, an SN754410 motor controller chip and the presented IR signal generation and detection circuit. I had plans to do the daughter board but that ended up as a separate robot (Trackbot, details later). The motors were recycled off Sandwich who to this day still is without wheels. Power is 6x1.5V AAA batteries. Originally I used the same type of plastic lunch container as a body by then made a new body out of a casing of a CDROM drive. Hence Roundabout became Squareabout.

Squarebot in all it's glory

For the CDROM body I first gutting everything, just keeping the case itself. The case is quite good in design as there are four screws keeping the top of the case onto the body. Also the sheet metal is quite easy to machine (but less forgiving to mistakes than plastic). Disadvantages is the weight. Not an issue for the motors (as 9V they generate approx 1.5kg torque and the whole robot weights 650gm) but it does reduce the battery life. This was also a test of me being able to machine with some precision a body. However the chassis design isn't great for the task as the exposed wheels and square body means Squareabout gets caught on things. Also as the new case meant the various parts of the robot were closer together the cables are too long. I didn't bother to redo them as the chassis rebuild happened some time after the original robot was done.

The result? Squareabout goes ok, but the range on the IR emitters is quite under what is described in the book. Most of this is due to the fact I couldn't get the correct parts and the alternate parts worked, but not as well. But Squarebout still avoids objects, trundles along at a slow but steady pace and has so much torque it can climb up walls. The motor chip is quite good as it is dual voltage. 5V for the logic part of the chip and any voltage over 3.5-4V for the motors. So I ran a direct line from the 9V power supply to run the motors. All the logic chips are powered by a regulated 5V off the 7805. I found the cutting of motors from one direction to another generate a large amount of interference with the IR circuit. Originally the design used a single 9V battery but the motors drained that out two quick so I swapped to the 1.5V batteries (and started using rechargeable batteries to save money).

Since I never had time to sit down and do Squareabout in one hit I made it out of modules. Two ideas were behind this. One being that I could recycle the modules into other robots. The second being that I could compete a module in one day, this getting things done. There are three modules in the end. Power, motor control and finally detection circuit and logic brain. I used Molex connectors for all interconnections between modules. All wiring was point to point, ie by hand not using a PCB. It used predrilled blank prototype circuit boards.

The power module as stated previously is based around a 7805 voltage regulator with various capacitors to filter the output. There is a diode to provide reverse battery protection and a power switch. There are both unfiltered battery voltage outputs and 5V filtered connectors.

The power module with the 7805 in the center, connectors on the sides.

The motor control module is based around the SN754410 chip. Good dual H bridge chip capable of driving two motors in forward and reverse. Various power supply capacitors were added to the chip.

The motor chip.

The sensor/detection circuit/logic brain is straight out the book. Nothing that fancy.


Detector circuit with IR emitters and detectors out in front.

Finally a shot showing the motors and battery pack underneath the top board. This had the advantage of providing some shielding the IR circuit from the EMF off the motors which did cause some issues esp. when the motors are cutting from forward to reverse (or vice versa).

Battery pack bolted to the top plate, Sandwich motors below. Garage in the background :)

Saturday, February 2, 2008

when sandwich containers attack

My first robot was from the excellent robot book by David Cook, "Robot building for beginners". It is a line following robot based on the LM393 chip, housed inside a plastic sandwich container called "Sandwich". Unlike many 'make your own robot' books this book covered just one robot in detail. The author goes into great detail not just on the electronics but also the construction techniques. The electronics level starts from a very basic level but always assumes you have a brain and you are happy to us it. Each chapter builds up the various sections necessary to make the robot. The author also covers other details such as DC motor operation, making wheel couplings, soldering, body construction, etc. In all an excellent intro to robot centric electronics, robot construction techniques and all the fundamental base skills needed for future robot building.

The main problem I had with Sandwich was getting the parts. All parts needed are detailed put being in Australia I had to find the Australian equivalent. For some parts this was easy (transistors, leds). Others were harder due to the lack of range in Australia (gear head motors, LDRs). Ordering from the USA wasn't an option due to the huge postage costs. The worst was a flat rate of $30US, regardless of the parts ordered. Of the Australian stores Jaycar was by far the best (in terms of range and staff help).

Due to the simple nature of the circuit there is no need to make a printed circuit board. Point to point wiring is fine, although but the end of the design my wiring was getting a bit messy.


When wiring gets messy. Also showing off the LDRs that track the line.

I used a plastic sandwich container as it was cheap (less than $1), easy to work with (read chop apart) and light but strong esp. with the lid on. I couldn't find any wheels so originally I used some old Mecanno pulleys with rubber band wheels. These were later replaced with some Tamiya wheels. The photo is of the first set of wheels.

Sandwich in all his plastic lunchbox Mecanno wheel glory, with a close up of the motherboard.

Tuesday, January 29, 2008

lamer bloggers destroy web experiences

Hmm, been awhile. Wife and I are having a baby real soon. With the month off perhaps the digit will be removed and some pictures will actually appear. Also the purchase of my new eeepc may help as the cool toy factor is still high at the moment so any excuse to use it (ie blogging). I'm still really a HTTP 1.0 kind of guy so unstructured posts without some kind of hierarchy is difficult to embrace.