NNTP-Posting-Date: Sun, 17 Nov 2002 12:17:39 -0600
From: email@example.com (John Fields)
Subject: Re: Need help measuring pulses from Polaroid 6500
Date: Sun, 17 Nov 2002 17:29:38 GMT
Organization: Austin Instruments, Inc.
X-Newsreader: Forte Agent 1.5/32.451
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
On Wed, 13 Nov 2002 21:38:15 -0500, Mark Simpkins
>I recently got a Polaroid 6500 ultrasonic detector kit from acroname
>and am trying to work out a simple design with it. I have it set up
>on a JE25 breadboard, and I'm pulsing the INIT line with a 10Hz square
>wave, the maximum you can pulse it. When it detects an object, the
>ECHO line goes high and from what I can tell if I measure the time
>between the INIT going high and the ECHO going high, I'll have the
>roundtrip time and I can divide by 2 to get the time-distance to the
>object. Ok, so far so good.
>What I'm having problems with is the counter part of all this, and
>latching & resetting it with each successive pulse. I'm not well
>versed with PICs, so I'm just using digital logic parts, a 74LS590 to
>be exact. I'm clocking the 590 at 10kHz, on both the count clock and
>register clock lines, and then outputting that to two 7 segment LED
>display decoders that gives me a decimel interpretation of the count,
>or at least thats what I'd like to do.
>Unfortunately I can't get it to work properly and I think I may be
>going about it all wrong. I would just like the counter to start
>counting the 10kHz clock as soon as the INIT line goes high, and stop
>as soon as the ECHO line goes high. Then when INIT goes to its low
>state, the register resets and the process starts over again. Ideally
>the register would just put numbers out like 30, 45, etc etc that
>indicated the total number of pulses between INIT and ECHO, and do
>that 10 times/sec according to the INIT pulses. Am I crazy, or am I
>making this too complicated?
Let's start at the beginning.
First, sound travels through air at about 1100 feet per second,
which comes out to about 909µs per foot one way, or about 1.818ms
per foot, round trip. If your 10Hz INIT pulse is 50%, then it'll be
high for 50ms, so your maximum range will be 50/1.82 ~ 27.5 feet, so
that's well within Polaroid's 35' spec.
Next, your counter is a _binary_ counter, so the only time the
outputs from the BCD to 7-segment decoders will make sense is when
the output from the counter is less than 0000 1010. So, what you'll
need is some _decade_ counters to drive the decoders.
How many? since you're counting 10kHz clocks for 50ms, you could
accumulate 50ms/100µs = 500 clocks, so you'll need three counters,
BCD to seven-segment decoders, and seven-segment displays.
But wait... If you count 10kHz clocks, instead of displaying the
range the device will display how many 100µs chunks of time it took
for the transmitted pulse to leave the transducer, hit something,
and come back as the echo. If that's what you want, then all that's
left to do is figure out the circuitry. If you want to display
range that can easily be done by selecting the right clock
frequency. I'll post a circuit for you on
alt.binaries.schematics.electronic some time today, and in the
meantime you can be mulling over what the clock frequency will need
to be to display range in feet and tenths of feet, OK?-)