PING))) Firmware
JSWrightOC
Posts: 49
Is the PING))) firmware available to the public? I want to adjust the minimum distance sensitivity because I'm getting near reflections, and there's not much I can do about them. I'm trying to sense water level through a pipe based on the Parallax application note, but I keep getting responses about 5" from the sensor while the water is at least 3-5 feet from the sensor. If I use foam to line the pipe I can minimize the false reflections by dampening the near reflections, but that only works part of the time.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Both good thoughts, I found that by offsetting the Tx and Rx so that when one of them (I forget which) was in the center, I did seem to get more reliable results. I could also discard any measurements that are less than xx inches, but for some reason the erroneous measurements seem to come in a run. I need to be able to reliably measure the water level all of the time, not when everything is feeling good...
When it's not erroneous, the data I get is always good. there is very little fluctuation in multiple return pulses, so I probably won't even have to average the output.
In general, it's very difficult to "pipe" ultrasound, but here are some random thoughts regarding the pipe:
1. Can you make the pipe diameter bigger? This would help to keep the sidewalls out of range.
2. If you use foam, use the flimsiest, open-cell foam you can get your hands on. Dense or closed-cell foam will be much less effective.
3. Without foam, if the inside walls of the pipe were shiny smooth instead of rough, the echoes would be more likely to ricochet down the pipe than to bounce back.
4. Instead of foam, a series of baffles spaced to cancel the energy from near-field echoes might eliminate the problem entirely.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Or could a barrel or small tube be placed around the reciever of the PING))) so that only roughly perpendicular echos were recieved? See sketch of this idea below
Just a thought... Dumb idea? Or does this create other problems?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
Post Edited (Whit) : 10/28/2007 8:24:20 PM GMT
-The foam that I used was thin (about 1/4" thick) open cell foam, the kind you might see used for a window air conditioner filter. It actually came as padding in a motherboard box (not to be confused with the antistatic bubble wrap however).
-I might have to try the baffles. That could provide the isolation I need.
-The pipe I am using is 3" PVC, and the inside wall is smooth. Unfortuniately I cannot make the pipe any larger in diameter.
-Something that came to mind, related to the baffles - perhaps if I use one or two small pieces of pipe that fit snugly over the transmitter and/or receiver transducers, to help focus the energy, I might get more consistent results.
-The repetition rate is about 2-3 times a second. The upper end of the pipe where the PING))) module is at is open, so any remaining reflected sound would dissipate into the open air above the unit.
And in closing, it's too bad that the firmware is not available, as it would (theoretically) be a simple matter of reprogramming the SX28 with an SX-Key. I'm sure it's quite a simple routine generating ultrasonic pulses and listening for them to come back...the hardest part I imagine would be tracking down the traces on the PCB to see what I/O pins are in use. That, however, is an easy matter of reverse engineering. Again, I would often get a "run" of bad input data, as in many successive measurements that were not accurate. For some reason it also seemed that it would get "stuck" on reporting these false measurements, until I would shift or reposition the PING))) module at the top of the pipe. Obviously during this time period, even if I know that the measurement is invalid, I am unable to measure the actual water level in the tank which could result in a malfunction of the system. In any event, if there was a lack of monitoring ability, I would likely have to SCRAM the system and shut down all pumps connected to the tank in question.
Most single-transducer ultrasonnic sensors have a deadtime, before which they won't report an echo. This is to allow any ringing in the transducer from the transmit pulse to dissipate. Since the Ping))) has separate transmit and receive transducers, the deadtime is unnecessary, so echoes from nearby "targets" can be recorded. This behavior is beneficial in robotics, where the obstacles you need to detect may be closeby.
The idea behind the internal baffles is that, since you're getting reflected energy from the pipe interior anyway, why not make it interfere with itself destructively and cancel itself out? Getting the baffle spacing just right could be tricky, though.
A much simpler option might be to form a cone that extends from the Ping))) to the end of the pipe. The attached images are from an online simulation contrasting emissions from a straight pipe with those from a long cone. The confused-looking waves within the straight pipe are the result of internal reflections. The cone, on the other hand, shows little of this effect.
-Phil
Is the water level changing that fast, that checking it once a second or so is insufficient?