Under water control data


Closed Thread
Results 1 to 7 of 7
  1. #1

    Question Under water control data

    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

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Under water control data

    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.
    Charles Linquist

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Under water control data

    20 x 20 x 10 ft max is what I am looking at. I am considering starting with 300bps.

  4. #4
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default Re: Under water control data

    Swimming pool submarine?

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Under water control data

    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.
    Charles Linquist

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: Under water control data

    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
    Last edited by BrianT; - 23rd September 2011 at 22:49. Reason: factual correction

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Under water control data

    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.

    Code:
           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
    Charles Linquist

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts