PDA

View Full Version : Under water control data



Macgman2000
- 20th September 2011, 18:36
Hello All,

I am starting up a new project dealing with control through water. I chose ultrasonic sound tones for simple control data. I was wondering if anyone here has used the Serout mixed with an audio tone to send data bits and receive via Serin? I am looking for the quickest way to prototype this to determine feasibility.

Thanks!
Nick

Charles Linquis
- 20th September 2011, 19:47
Are you saying that you intend to take an ultrasonic carrier and AND it with SEROUT? And for the receiver use some sort of ultrasonic sensor to to generate "0" and "1" levels based on whether or not there is a tone?

If you are planning on ranges greater than 10 or 20 feet, I think you are probably going to have a lot of trouble because of echoes unless you use very low data rates.

Macgman2000
- 20th September 2011, 20:48
20 x 20 x 10 ft max is what I am looking at. I am considering starting with 300bps.

Byte_Butcher
- 20th September 2011, 21:26
Swimming pool submarine?

Charles Linquis
- 20th September 2011, 21:31
Then I would do what I suggested. Use an AND gate to combine your 40Khz (or whatever freq) and SEROUT2 (idle low).
On the receive end, use a rail-rail output op-amp to filter and amplify the signal to past the clipping level. Use a 12F675
sitting in a tight loop that does nothing else but watches for an input pin to be high for half the period and then low for half the period of the ultrasonic signal.
It then sets an output pin high and goes back to sampling. When it fails the test, it sets the output bit low. Use SERIN2 to decode the output of the 12F675.

BrianT
- 23rd September 2011, 22:47
Hello Nick,
I had good success at up to 50 metres in fresh water with frequency shift keying. My transducers were smoke alarm piezo benders which were air backed and had a resonant frequency around 3000 Hz. Frequency separation was about 200 Hz. The transmitter driver was a MAX232 which gave +/- 8.5 volts of drive from a 5 volt rail. A PIC16F877 generated the two tones. A 4046 phase locked loop detected the two tones. Data rates were up to about 25 bps but typically under 5 bps depending on echoes, background noise, etc. Real world lakes gave much better range than hard walled pools. Hard wall swimming pools have standing waves and give strong signal or zero signal as the sensor is moved only a few hundred millimetres. Sea water has about 10 times the attenuation of fresh water. This is due to magnesium sulphate and boron salts. Add epsom salts and borax to a freshwater tank to simulate sea water. The sodium chloride appears to hardly matter and just causes corrosion.

HTH
BrianT

Charles Linquis
- 24th September 2011, 01:07
That is reallly neat! Did you have to protect the smoke alarm peizos with any coating?

I have used 4046's to multiply up the frequency from a shaft encoder so that I could get good more resolution. I always found them a bit difficult to work with.

I just wrote a little routine for a PIC that does a good job of detecting frequecies around 3Khz. It can be changed for other freqs. It should be able to detect the change in 2 cycles or less.

It is running in a 40Mhz PIC, so the values would have to be changed if you ran it slower.



define PULSIN_MAX 400
Top:
pulsin PORTD.1,0,LowVal
Pulsin PortD.1,1,HighVal

Period = LowVal+HighVal ; just in case the duty cycle isn't 50% ; period in uSec

Select case Period
Case is > 350
Hserout [CR,LF,"Too Low"]
case is > 310
hserout[CR,LF,"Just Right"]
case 0
hserout[CR,LF,"No Signal"]
case else
hserout [CR,LF,"Too High"]
end select
goto top