circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 148 November 2002
Ultrasonic Homing Device


by Tom Baraniak

Start ReveiverEar Mounting The TransmitterSoftwareOptionsSources and PDF

THE TRANSMITTER

The transmitter circuit is shown in Figure 4. The PIC micro generates a ping consisting of five 40-kHz pulses every 8 ms. When operating at 5 V, the PIC’s I/O output bit can directly drive the ultrasonic transducer. For higher transmission power, the PIC output can be buffered by an FET and run at a higher voltage.

Figure 4—The transmitter generates a ping every 8 ms. The version shown here uses a buffer FET to drive the ultrasonic transducer at a higher power.

When using the FET, a resistor is connected in parallel to the transducer. This is because the transducer is essentially a capacitor, and it’s necessary to discharge the voltage that is applied to it when the FET is on.

The resistor has to be small enough to quickly discharge the capacitor to maintain fast fall times, but not so small that it shorts the power supply. The duty cycle is short and a large capacitor from the resistor to ground keeps switching transients to a minimum. Fancy active drivers can be designed to mimic the PIC output at voltages higher than 5 V. Step-up transformers also can be employed; however, the slight performance gain does not warrant the added complexity and cost they would bring to this application.

When driven directly by the PIC I/O output bit, as shown in Figure 5, a resistor isn’t necessary because the output actively drives both high and low. What this means is that the current is supplied to charge the ultrasonic sender capacitance and then a path is provided to discharge it. Notice that the sender connects between GP0 and ground, eliminating C2, Q1, and R1. Because the PIC is limited to 5 V, that’s the most the transducer will see.

Figure 5—This transmitter functions in the same way as the one shown in Figure 4, but does so with the ultrasonic transducer driven directly by a PIC microcontroller output port.

Your robot may also use ultrasonics for other purposes such as a non-contact bumper or range finding. Therefore, it’s necessary to limit when the homing transmitter is operating. If your application has the robot following you around, range finding and ultrasonic bumpers may not be an issue. If the transmitter is part of a base station locator, the robot might communicate with the base station via a radio link to command the transmitter to ping when the robot is ready to take a bearing. During that time, the robot would disable its other on-board ultrasonics. There would have to be some delay between each system’s operations to allow previously transmitted pings to damp out so one doesn’t interfere with another.