May 27, 2009
One of the most important parts of a robot is it's sensors. If it cannot sense it's surroundings then it cannot respond. Unfortunately good sensors are usually expensive. For this reason I am always experimenting with cheaper home made alternatives such as my light up antenna, conductive foam touch sensor, IR obstacle detector and my not so successful laser range finder.
I have found that IR sensors are not the most reliable as they are affected too much by daylight. Sonar is more reliable but still has problems with soft objects such as curtains.
When Dagu added their asuro sonar to the components it got some attention because of it's low price. Dagu had already sent me 2 to experiment with but the design had extremly limited range and was not easy to interface with picaxe processors.
Dagu has asked me to design a cheap sonar that will address these problems especially as the cost of currently available sonars makes them poor choices for mass producing LMR robots.
I have succeeded in creating a sonar based on the LM324 quad op-amp which is a relatively cheap IC ($0.25 US from futurlec), a few capacitors and a handfull of resistors.
So far it can detect a broom handle at up to a meter and a dvd case at about 2 meters. A wall at over 3 meters. The schematic below is my design so far. Only the reciever has been tested as I was using a transmitter from a previous version.
For those wishing to build their own I am using prices from Futurlec as a guide since they are cheap and deliver world wide. A pair of long range ultrasonic transducers will set you back $3.90 US. The rest of the components including the IC less than $3 US (use metal film resistor and polyester film capacitors as they are more accurate). A circuit board is the only other thing you'll need. Prototype boards cost about $1.50 to $2 US but can be cut down to make several sonars. If your really on a tight budget then use cardboard.
I was expecting to have this all finished today after everything was going so well with the reciever. But Fate is a fickle mistress and today she stuck her foot out as I went by and laughed as I fell :(
Part of the problem was I didn't have the timing capacitor I needed and I tried working with different values. I also suspect that having components pushed into a breadboard is not as reliable as components soldered into a PCB. I'll sleep on it and try again tomorrow.
Sorry CTC, you'll have to wait a little longer. Perhaps Fate will be in a better mood tomorrow.
After much trial end error I succeded in getting my fourth amplifier to drive the output transducer at 40Khz but due to limitations of the LM324 I could not get the output past 3Vp-p so I have now used a slightly improved versions of my original transducer driver at the cost of an extra IC (also 25c US from Futurlec). This now gives me almost the full 5V of the supply peak to peak and the frequency is less dependant on the supply voltage for better reliability.
I will test this new design tomorrow when I get a 74HC00.
Well my car had a bad leak in the power steering and is only just back on the road. I've just got the 74HC00 and haven't had a chance to test it yet. Some may prefer to use a 555 timer instead. It doesn't really matter. You could even drive the transducer directly via PWM from the processor.
I only added the oscillator because for picaxe users, the PWM commands use the same timer used for servo commands and because only certain pins can be used for PWM. I figure if it is easy to use with picaxe and it's slow basic language then it is easy to use with any processor and any language.
When I have it working with a picaxe then I will post video and code.
I am still finding ways of improving the design so be patient. I am happy with the range overall and am focusing on eliminating noise for a more reliable reading.
The 120pF capacitors in parallel with the feedback resistors help filter out the noise. I am still experimenting with the design at this point. The first video shows this circuit working but with only one of the three filter capacitors. I'll have to get more caps.