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

RECEIVER

The receiver circuit is shown in Figure 2. The ultrasonic receiver’s transducers have a narrow reception bandwidth around their operating frequency of 40 kHz. After receiving the transmitted acoustical energy, the receiver generates an AC signal tens of millivolts in amplitude depending on the transmitted signal strength and distance from the transmitter to receiver. This small signal level is amplified and converted to logic-level pulses by two op-amps.

The input signal is capacitively coupled through resistor R14 to the inverting input of the first op-amp. Together, resistors R15 and R14 determine the gain by which the millivolt-level signal is amplified using the following equation:

[1]

Because the gain is high, the DC voltage must be blocked from the input signal or it will be amplified, causing the output to run up against the negative rail. This is accomplished with capacitor C11. However, because C11 is a reactive component, it has an associated impedance that must be added to resistor R14’s value in the gain equation. The equation for capacitive impedance is:

[2]

In Equation 2, f is the ultrasonic frequency of 40 kHz, and ZC is measured in ohms.

Using a value of 0.1 µF for C11 shown in Figure 2, ZC = 40 W, which is much less than R14 = 10 kW, so it can be ignored. The gain is set at 75, which is less than the maximum allowable gain at 40 kHz shown in the datasheet for the OPA2340 op-amp. Note that you can’t use just any op-amp; it must be fast enough to provide the necessary gain at the desired operating frequency. According to the OPA2340’s datasheet, the typical maximum gain at 40 kHz is 100, which exceeds the desired operating gain of 75, so this op-amp will work.

Because a single-supply op-amp is used, it’s necessary to create a virtual ground at a level approximately half-way between power ground and 5 VCC. Remembering that the voltage difference between the inverting and non-inverting inputs to the op-amp must be zero, the voltage applied to the non-inverting input, in this case 2.5 V, is reflected at the inverting input.

The DC output from the op-amp will also be 2.5 V because C11 blocks the effect of R14, effectively removing it from the circuit so that the op-amp behaves as a simple voltage follower. The AC signal is amplified, however, so the output of the op-amp will then be the inverted and amplified 40-kHz signal oscillating about virtual ground of 2.5 VDC. The fact that the signal is inverted does not matter because this is true for both ears’ signals, and they’re only relative to each other.

The second op-amp after the gain stage acts as a comparator. When the signal on the non-inverting input exceeds the threshold level established on the inverting input, the output goes to the positive rail: 5 V. When the input signal is less than the threshold, the output goes to the negative rail: DC ground.

The threshold and virtual ground are set with a common resistor divider network. [1] From above, the DC output level of the gain stage is set to virtual ground. The threshold level of the comparator should be slightly higher than this. Then, when the amplified AC signal level exceeds the threshold, the comparator’s output goes high.

Equations 3 and 4 determine the virtual ground (VGND) and threshold (VTH) relative to the virtual ground.

[3]

[4]

Note that R11 determines the threshold, with increasing values raising the threshold level. Values that are too small will make the comparator susceptible to noise. If they are too large, sensitivity will decrease to an unusable level. Typical values range from 100 to 2200 W.

The logic-level pulses from each ear are monitored by two of the PIC microcontroller’s general-purpose (GP) I/O bits. Two more I/O bits provide output indicating which ear hears the ping first, if both ears hear the ping at essentially the same time, or if the signal fails to meet valid input conditions. These can be used to control the wheel drive motor logic directly or through another controller.