Sender Circuit
The ultrasonic transmitter
circuit is quite simple. The astable
555 timer circuit oscillates at 40KHz which is the peak sensitivity of the
receiver. The frequency of the 555 is set
with the RC circuit connected to pins 2, 6 and 7. The equation is:
F = 1.44 / ((R1 + 2*R2) * C)
I used a 1.5 picofarad Cap,
a 10K R1 and a 1 - 100K pot for R2. The
easiest way to get a 40KHz signal is to use the scope and adjust the pot to get
the correct frequency. The only thing
you will need to add is a transistor to turn this circuit on and off using a
digital port on the BX-24.
Receiver Circuit
This is the hard part. After setting up at least 20 different
circuits on the Proto board, and talking to a EE colleague at HP (who had lots
of good information and lost me after the first 30 seconds), I decided to use
the easiest circuit that I could get to work.
My circuit uses an OP-AMP and an AM radio peak detector circuit. The inverting OP-AMP uses a single power
supply (+5V), if you have positive and negative voltage available, the circuit
is a bit easier to set up – I think most people will use the single supply
version. The OP-AMP has a pot in the
feedback loop so you can tune the amplification to fit the detection range you
need. I would use a dual OP-AMP chip or
two discrete chips and a 2-stage amplifier.
All of my chips were dying last night, so the demo version has a single
amplifier.
Receiver Tuning
Set up the transmitter
circuit and place the sender and receiver so they are pointed at each other and
only 1 or 2 mm apart. Start
transmitting, and connect a scope to the positive pin on the receiver. Adjust the pot on the transmitter until the
sine wave signal has the largest amplitude on the scope. The receiver has a piezo-electric crystal
that is resonant at 40KHz. Every part
is slightly different, so the pot lets you set the right frequency for your ultrasonic
set.
The peak detector is very
simple. The diode charges the capacitor
but blocks discharge when the signal goes low.
The resistor allows the cap to discharge to ground. The RC constant of the circuit determines
how fast the peak voltage dies away.
The discharge should be fairly fast, so if your detector turns past the
other robot, you will know to turn back.
The output runs a red LED for demonstration purposes, you can connect
this to your BX-24 analog or digital input.
References:
http://www.ece.concordia.ca/~dave/project/elec.html
(Dave’s Sumo Robot project page – Obstacle detection sensor circuits. I used his transmitter, but could not get
the receiver to work – even though it should.
http://ourworld.compuserve.com/homepages/Bill_bowden/555.htm. This page tells you everything you need to
know about 555 timers, including the frequency equation.
http://www.st-and.ac.uk/~www_pa/Scots_Guide/RadCom/part9/page2.html. Explains a lot more than you need to know
about the peak detector circuit.
RadioShack Engineers
MiniNotebook, IC Op Amp Projects, Forrest M. Mims III
These books are great –
lots of easy to wire circuits and good explanations at a ME level!
Alan Russell
Boise State University,
College of Engineering
April 24, 2002