| Author |
Message |
Guest
|
Posted:
Wed Dec 29, 2004 5:10 am Post subject:
8051 and sonar (depth finder) |
|
|
Hi all,
Recently I am stuck on my first microcontroller project. I think I have
everything nailed down to the absolute last detail, but have not yet
been able to find a solution to this - after about 6 weeks of looking.
My 8051 microcontroller is trying to determine the ocean floor depth.
To do this, it sends out a ping, enables a timer, and counts how long
until the echo is returned. Simple enough - right?
My problem is not in the sending of the ping - or in counting the echo
return (I use timer0 and expect no overflows), it is simply in getting
back a consistant echo. Echos that I do recieve range in time from 500
ticks to 60000. When I turn off my labview echo simulator - I still get
the wildly varying and inconsistent results! Help!
I can provide schematics if necessery. For now I will keep it simple by
saying I detect echo signals generated from the comparator1 interrupt.
An active low indicates a echo.
Any help would be greatly greatly appreciated.
-David |
|
| Back to top |
|
 |
Tim Wescott
Guest
|
Posted:
Wed Dec 29, 2004 6:33 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
jentzd@gmail.com wrote:
| Quote: | Hi all,
Recently I am stuck on my first microcontroller project. I think I have
everything nailed down to the absolute last detail, but have not yet
been able to find a solution to this - after about 6 weeks of looking.
My 8051 microcontroller is trying to determine the ocean floor depth.
To do this, it sends out a ping, enables a timer, and counts how long
until the echo is returned. Simple enough - right?
My problem is not in the sending of the ping - or in counting the echo
return (I use timer0 and expect no overflows), it is simply in getting
back a consistant echo. Echos that I do recieve range in time from 500
ticks to 60000. When I turn off my labview echo simulator - I still get
the wildly varying and inconsistent results! Help!
I can provide schematics if necessery. For now I will keep it simple by
saying I detect echo signals generated from the comparator1 interrupt.
An active low indicates a echo.
Any help would be greatly greatly appreciated.
-David
Labview echo simulator? |
Does the input signal look good on an oscilloscope? Are you _sure_
you're not getting overflows? If you're getting up to 60000 ticks on a
16 bit timer then you're darn close. Perhaps you have a prescaler set
incorrectly and you're just getting the remainder?
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Wed Dec 29, 2004 6:37 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
Hi David,
Posting a schematic link on your web server or on a.b.s.e. would help.
Normally you need some kind of preamp and filter. The filter would be
matched to the length of the pulse train you are sending. Since I don't
know what kind of transducer you are using I suggest you inspect the
echoes with a scope. I suspect it won't look pretty unless the ocean
floor is very smooth and flat and no fish are holding a meeting under
the boat. Even then the finite beam width will disperse the echo a bit.
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
Mike F
Guest
|
Posted:
Wed Dec 29, 2004 7:58 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
"Joerg" <notthisjoergsch@removethispacbell.net> wrote in message
news:kTnAd.3564$wZ2.2248@newssvr13.news.prodigy.com...
| Quote: | Hi David,
Posting a schematic link on your web server or on a.b.s.e. would help.
Normally you need some kind of preamp and filter. The filter would be
matched to the length of the pulse train you are sending. Since I don't
know what kind of transducer you are using I suggest you inspect the
echoes with a scope. I suspect it won't look pretty unless the ocean
floor is very smooth and flat and no fish are holding a meeting under
the boat. Even then the finite beam width will disperse the echo a bit.
Regards, Joerg
http://www.analogconsultants.com
|
Most of the depth sounder circuits I have seen had a variable gain
on the front end .. starts out low for near by echoes and increases
over time to compensate for the weaker echoes from distant objects.
One big problem with digital (and why I prefer analog "chart type"
is a fish, thermocline, change in salinity or any of a number of other
"thingies" will give you a false reading shallower than the actual
bottom.
mikey |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Thu Dec 30, 2004 1:10 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
Hi Mike,
| Quote: | Most of the depth sounder circuits I have seen had a variable gain
on the front end .. starts out low for near by echoes and increases
over time to compensate for the weaker echoes from distant objects.
|
Yes, a time gain control is essential. Nowadays the AD603 is a good chip
to do that with. I designed many ultrasound front end circuits for
medical and it's the same there, except that we have to be able to see
really close up to the transducer. Probably it would be the same in a
boat if entering shallow waters without banging up the hull.
| Quote: | One big problem with digital (and why I prefer analog "chart type"
is a fish, thermocline, change in salinity or any of a number of other
"thingies" will give you a false reading shallower than the actual
bottom.
|
Yes, I'd want the same. It is amazing what lays at the bottom of a body
of water that is near roads. Whole cars, fridges, piles of discarded
concrete and so on. With a really nifty algorithm it should still be
possible to calculate where the bottom is but not as good as a true
'M-Mode' readout on a screen. Probably an old laptop would do just fine
for that but the question is how long that'll last in a salty environment.
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
Noel Henson
Guest
|
Posted:
Thu Dec 30, 2004 1:53 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
jentzd@gmail.com wrote:
| Quote: | Hi all,
Recently I am stuck on my first microcontroller project. I think I have
everything nailed down to the absolute last detail, but have not yet
been able to find a solution to this - after about 6 weeks of looking.
My 8051 microcontroller is trying to determine the ocean floor depth.
To do this, it sends out a ping, enables a timer, and counts how long
until the echo is returned. Simple enough - right?
My problem is not in the sending of the ping - or in counting the echo
return (I use timer0 and expect no overflows), it is simply in getting
back a consistant echo. Echos that I do recieve range in time from 500
ticks to 60000. When I turn off my labview echo simulator - I still get
the wildly varying and inconsistent results! Help!
I can provide schematics if necessery. For now I will keep it simple by
saying I detect echo signals generated from the comparator1 interrupt.
An active low indicates a echo.
Any help would be greatly greatly appreciated.
-David
|
David,
One big question is, "what kind of transducer are you using?" I designed
a system about 10 years ago that worked at 400KHz using a tuned
piezoelectric crystal. Believe it or not, the transducer itself was
fundamental in filtering the echos. By today's fish-finder standards, it
was not a very sophisticated device. However it did a great job of
determining depth.
Noel |
|
| Back to top |
|
 |
Joop
Guest
|
Posted:
Thu Dec 30, 2004 4:22 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
"Mike F" <spam_me_not_mr.gadget2@comcast.net> wrote:
| Quote: |
"Joerg" <notthisjoergsch@removethispacbell.net> wrote in message
news:kTnAd.3564$wZ2.2248@newssvr13.news.prodigy.com...
Hi David,
Posting a schematic link on your web server or on a.b.s.e. would help.
Normally you need some kind of preamp and filter. The filter would be
matched to the length of the pulse train you are sending. Since I don't
know what kind of transducer you are using I suggest you inspect the
echoes with a scope. I suspect it won't look pretty unless the ocean
floor is very smooth and flat and no fish are holding a meeting under
the boat. Even then the finite beam width will disperse the echo a bit.
Regards, Joerg
http://www.analogconsultants.com
Most of the depth sounder circuits I have seen had a variable gain
on the front end .. starts out low for near by echoes and increases
over time to compensate for the weaker echoes from distant objects.
One big problem with digital (and why I prefer analog "chart type"
is a fish, thermocline, change in salinity or any of a number of other
"thingies" will give you a false reading shallower than the actual
bottom.
mikey
The last boat I was on had a depth meter with some rotating device |
inside. Probably a rotating mirror. The round scale showed various
echos at different depths of which the 'real one' was usually of
maximum light output.
Knobs were present for depth range (probably different rotation speed)
and gain (to set a threshold for the scale to start illuminating)
I guess as a human you know how to read this instrument and ignore
'false' echos. For a uC to do this might be difficult.
Joop |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Thu Dec 30, 2004 5:09 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
Hi Joop,
| Quote: | The last boat I was on had a depth meter with some rotating device
inside. Probably a rotating mirror. The round scale showed various
echos at different depths of which the 'real one' was usually of
maximum light output.
|
That was a real classic. I believe it is a little neon bulb on a
rotating disk. Echoes are amplified and the bulb hangs on the output of
the amp. I vaguely remember that Heathkit offered on of these. But I
didn't have a boat...
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
MetalHead
Guest
|
Posted:
Thu Dec 30, 2004 7:57 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
Joerg wrote:
| Quote: | Hi Joop,
The last boat I was on had a depth meter with some rotating device
inside. Probably a rotating mirror. The round scale showed various
echos at different depths of which the 'real one' was usually of
maximum light output.
That was a real classic. I believe it is a little neon bulb on a
rotating disk. Echoes are amplified and the bulb hangs on the output of
the amp. I vaguely remember that Heathkit offered on of these. But I
didn't have a boat...
Regards, Joerg
http://www.analogconsultants.com
|
The Neon light and rotating disk was a pretty nice solution to the
problem in simple digital depth sounders of which echo do you call the
bottom? With the disk rotating at a constant speed, it would "time" the
echoes for you and show all of them.
Years ago I built a similar system for scuba diving, but it used a set
of counters selecting LED's out of a matrix, with the detections,
illuminating the selected LED. I started testing this thing in a pool
and found that the pool surfaces were so reflective that the entire pool
(olympic size) saturated with sound. I put a scope on the receiver and
it showed continuous output. First I thought that the receiver was
oscillating, so I took another transducer to the far end of the pool and
the amplitude on the second transducer showed the same continuous
signal. The amplitude change from the transmit pulses was not visible at
all. The same piece of equipment worked fine in a local quarry.
Bob |
|
| Back to top |
|
 |
Mark Borgerson
Guest
|
Posted:
Fri Dec 31, 2004 12:02 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
In article <pHHAd.3895$wZ2.3296@newssvr13.news.prodigy.com>,
notthisjoergsch@removethispacbell.net says...
| Quote: | Hi Joop,
The last boat I was on had a depth meter with some rotating device
inside. Probably a rotating mirror. The round scale showed various
echos at different depths of which the 'real one' was usually of
maximum light output.
That was a real classic. I believe it is a little neon bulb on a
rotating disk. Echoes are amplified and the bulb hangs on the output of
the amp. I vaguely remember that Heathkit offered on of these. But I
didn't have a boat...
|
Yep, it was Heathkit. I put one together for my first sailboat in
1974. It did, indeed, use a neon bulb on the rotating disk. The
rotation speed of the disk translated to the time for the round
trip of the sonar pulse. IIRC, it was calibrated by adjusting
the disk rotation speed, and the disk triggered the output pulse
at the index position. There was also a receiver gain control that
you could adjust to limit multipath echoes and noise.
Mark Borgerson |
|
| Back to top |
|
 |
Guest
|
Posted:
Fri Dec 31, 2004 12:09 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
| That's why sonar devices are tested in anechoic pools... |
|
| Back to top |
|
 |
Joop
Guest
|
Posted:
Fri Dec 31, 2004 4:02 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
Joerg <notthisjoergsch@removethispacbell.net> wrote:
| Quote: | Hi Joop,
The last boat I was on had a depth meter with some rotating device
inside. Probably a rotating mirror. The round scale showed various
echos at different depths of which the 'real one' was usually of
maximum light output.
That was a real classic. I believe it is a little neon bulb on a
rotating disk. Echoes are amplified and the bulb hangs on the output of
the amp. I vaguely remember that Heathkit offered on of these. But I
didn't have a boat...
Regards, Joerg
http://www.analogconsultants.com
|
It could very well have been an oldy. The light did seem a rectangular
red LED though, not a neon bulb. I do seem to recall some spinning
noises so I a rotating disk could have been involved.
That would make powering the device simpler (12V board power on
boats?). Perhaps I should have said ship. The whole vessel was quite
big, 3 masts with sails
(http://212.204.218.222/hanzestad/schepen/schip.php?id=42)
If I would have forseen this discussion I would have paid more
attention ;-) |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Sat Jan 01, 2005 3:11 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
Hi Joop,
| Quote: | It could very well have been an oldy. The light did seem a rectangular
red LED though, not a neon bulb. I do seem to recall some spinning
noises so I a rotating disk could have been involved.
That would make powering the device simpler (12V board power on
boats?). Perhaps I should have said ship. The whole vessel was quite
big, 3 masts with sails
(http://212.204.218.222/hanzestad/schepen/schip.php?id=42)
|
Wow, that is a big ship. Dance floor and all. But 160 passengers and
only eight restroom stalls? What if half the people on board got
seasick....?
I'd think this ship deserves a much better echo system. You could use an
old scope as a display to make it look somewhat antique. Unless, of
course, you have to comply with the devices from a certain era. An LED
on a disk sound like half-hearted retro design though. But in the time
of three-masters they did not use echo. Well, it hadn't been invented
yet. They had a rope with regular knots that was let down once in a
while and, after the rope handling sailor had spit his chew tobacco into
the sea, the depth was hollered to the bridge in 'fathoms'.
Groetjes, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Sat Jan 01, 2005 3:17 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
Hi Bob,
| Quote: | Years ago I built a similar system for scuba diving, but it used a set
of counters selecting LED's out of a matrix, with the detections,
illuminating the selected LED. I started testing this thing in a pool
and found that the pool surfaces were so reflective that the entire
pool (olympic size) saturated with sound. I put a scope on the
receiver and it showed continuous output. First I thought that the
receiver was oscillating, so I took another transducer to the far end
of the pool and the amplitude on the second transducer showed the same
continuous signal. The amplitude change from the transmit pulses was
not visible at all. The same piece of equipment worked fine in a local
quarry.
|
Hard reflectors are the enemy of every sound system. In my field of work
it's situations like calcified blood vessels, bones or metal objects
such as an artificial heart valve that make things difficult. But we
always try our best to provide the largest possible dynamic range and
good gain control. That, and matched filtering, would also help in depth
sounding. On a ship this can become crucial when navigating a shallow
area where the sea bottom consists of hardened lava or rock.
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
MetalHead
Guest
|
Posted:
Sat Jan 01, 2005 3:43 am Post subject:
Re: 8051 and sonar (depth finder) |
|
|
Joerg wrote:
| Quote: | Hi Bob,
Years ago I built a similar system for scuba diving, but it used a set
of counters selecting LED's out of a matrix, with the detections,
illuminating the selected LED. I started testing this thing in a pool
and found that the pool surfaces were so reflective that the entire
pool (olympic size) saturated with sound. I put a scope on the
receiver and it showed continuous output. First I thought that the
receiver was oscillating, so I took another transducer to the far end
of the pool and the amplitude on the second transducer showed the same
continuous signal. The amplitude change from the transmit pulses was
not visible at all. The same piece of equipment worked fine in a local
quarry.
Hard reflectors are the enemy of every sound system. In my field of work
it's situations like calcified blood vessels, bones or metal objects
such as an artificial heart valve that make things difficult. But we
always try our best to provide the largest possible dynamic range and
good gain control. That, and matched filtering, would also help in depth
sounding. On a ship this can become crucial when navigating a shallow
area where the sea bottom consists of hardened lava or rock.
|
Hi Joerg,
It was 25 years ago (A long time ago, in a Galaxy far far away) that I
built that hand held sonar system. Today, with many years of experience
as an engineer, I understand about dynamic range. As a kid fresh out of
high school, it was a fair surprise. Then again, that's where experience
comes from! I am still a little surprised that with the 1% duty cycle of
the transmitter, the amplitude in the pool did not decay measurably
between pulses.
Regards,
Bob |
|
| Back to top |
|
 |
|
|
|
|