To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 26489
26488  |  26490
Subject: 
Re: Ultrasonic Distance measurement
Newsgroups: 
lugnet.robotics
Date: 
Sat, 14 Oct 2006 20:53:00 GMT
Original-From: 
PeterBalch <peterbalch@&StopSpam&compuserve.com>
Viewed: 
2914 times
  
Ultrasound wrote:
I have a 40 Khz ultrasonice transmitter reciever pair. I am using the
transmitter on a 40Khz oscillator circuit. I do not recieve anything on • the
reciever. Can anybody please help???? The transmitter am using is SQ40T • and
the reciever is SQ40R.

I've used the following circuit with 40SQR (which, I presume, is the same
thing).

                    5V   ,----R------,
                   |     |    1M     |
                   |     |           |
                   R 47k |  |\       |
,-----,            |     |  | \      |
|     *------------÷-----*--*- \     |
|     |            |        |   >----*---
|40SQR|            *--------*+ /
|     |            |        | /  U1
|     *------------*        |/   LM392
'-----'            |
                   R 47k
                   |
                   0V

(View with a monospaced font.)

Note the lack of input resistor on the op-amp. I was treating the 40SQR as
a current source rather than a voltage source. You would think that a Piezo
device should be thought of as a high-impedance voltage source but the
circuit worked very well. It's hard to say what the voltage gain is. 1uA of
input gives 1V of output (is that a transconductance of 1000000?) I can't
remember how big the output was - probably more than 100mV.

(I also decided that the traditional cap to ground on the + input was
unnecessary.)

An LM392 is, of course, a combined op-amp and comparator. I fed the output
from the op-amp into the comparator and the output from comparator into a
PIC. (If you use an LM392, remember that the comparator output is
open-collector.)

I drove the 40SQT directly from two PIC pins working in antiphase. My chirp
was 12 cycles of 40kHz. I used a fourth PIC pin to control the voltage to
the other input to the comparator so that the sensitivity increased with
time (later echos are quieter).

Two more PIC pins did the comms to the main processor. That's 6 IO pins in
total so the whole thing fitted in a PIC12F629.

If you can, it's better to drive the 40SQT with two pairs of PIC pins to
get twice the current into the transmitter. You can see 50% further. But I
was wanting to keep the cost down so I was constrained to an 8-pin PIC, an
8 pin amp and a handful of res and caps. If you're prepared to spend more
time and money, you can build a better amplifier and a more clever way of
adjusting the sensitivity. With my ultra-cheap circuit, I could easily see
my hand at 50cm.

One PIC pin can give 30mA so two pairs of PIC pins in antiphase is
equivalent to a 60mA 10Vpp square wave. That's quite a hefty signal.
Ultrasonic transmitter require a surprising amount of drive. If you're just
using a bench waveform generator, it's probably not beefy enough.

Peter



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
5 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR