ultrasound morse code

Thread Starter

besir660

Joined Aug 21, 2012
4
Hi All,
Absolute beginner here, I need an advice on the following project:

I am trying to encode messages using ultrasound. I have wired three 555 circuits in astable mode as in this link (http://www.markallen.com/teaching/ucsd/147a/lectures/lecture4/7.php). Each of the IC's are producing a different high frequency sound centered around 20 khz. So it is not audible but also not too high freq (because down the line I want to be able to decode these by recording it in an ipod or iphone.

I then switch these according to the morse code using digitalWrite on 3 pins of an arduino circuit (i dont want to manually click the the code, but rather but it in arduino's memory and i want it to quickly cycle through this message (each pulse being around 30 to 50 miliseconds). I have the follwoing questions:

1) is this a clever way ?, i dont know if I can use a single 555 circuit and somehow change freqeuncy of this based on dots dashes and spaces (each represented by a unique frequency) rather than using three ic's. If this is possible it would maybe also help with the other problem below
2)There is this terrible clicking noise between pulses as I switch from one 555 to another (all output pins are wired to the same speaker). I tried to build a voltage ramp on supply voltage to the ic's using a diode and a capacitor, it helps a bit but not much (and believe me i tried every cap value from 1pf to 1000mf). I put a low pass rc filter to output, this reduces clicks but also attenuates a lot, so when i amplify again the clciks are back

Can you please help< i've read everything i could find. In the end i either want to create an envelope around the signal so it ramps up and down smoothly between frequency changes, or switch frequencies at exactly zero level voltage during the oscillation. I have tried to read everything I could understand, I am going nuts, please help.

Thanks
 

tracecom

Joined Apr 16, 2010
3,944
Is there some reason you are set on Morse code? If your objective is digital communications via sound at inaudible frequencies, then there are better ways, such as FSK.
 

Papabravo

Joined Feb 24, 2006
12,514
There is also RTTY and PSK31 which can be easily implemented with a computer sound card. The sound card can also do the decoding. Oh and BTW using an RF carrier for digital is most certainly "not audible", and not new, and has the potential for worldwide communication.
 

Thread Starter

besir660

Joined Aug 21, 2012
4
yes you are right morse was just how the idea came up, but binary is also acceptable. I checked what PSK means, and ok, it should work, but I would still have the same problem right? The problem is during frequency change (by swithcing off one 555 circuit and swithcing on the other). For more clarification, they are fed from 3 different output pins of the arduino, and the code switched them on and off depending on the message, and the output pin 3 of all the 555 circuits are connected to the speaker> now I dont want to use RF, i dont have specialized equipment. I want to stay in the frequency range where this is not audible but can be detected by an ipad (as I am using spectrumview app to see what I am doing:)
 

Papabravo

Joined Feb 24, 2006
12,514
You might be able to generate the signals with 555s but how are you going to decode them. I'm not sure the Arduino, an 8bit processor, is up to the task. You might be happier with the results if you go to a DAC output and an ADC input. I don't think you are going to be happy with the 555 results since they don't help with the decoding.
 

tracecom

Joined Apr 16, 2010
3,944
I am reading between the lines, but I guess that you are planning to transmit the signals via the telecom network. If that is the case, I don't think it will work because the network doesn't carry audio much above 3 kHz.
 

THE_RB

Joined Feb 11, 2008
5,438
Underwater comms? ;)

The arduino is quite capable of generating the ultrasonic pulses directly without needing a 555 timer.

Something like this;
Rich (BB code):
// make a 40kHz ultrasonic pulse of X cycles duration;
while(x)
{
  outputpin = 1;
  Delay_uS(12); 
  outputpin = 0;
  Delay_uS(12);   
  x--;
}
 

Papabravo

Joined Feb 24, 2006
12,514
The sharp edges will of course be rich in harmonic content which was why I suggested using a DAC. A cleaner signal will be much easier to decode.
 

rogs

Joined Aug 28, 2009
279
I want to stay in the frequency range where this is not audible but can be detected by an ipad
I would be amazed if an ipad can reliably detect ultrasonic frequencies.
I suggest you transmit one of your untrasonic carrier frequencies, and be sure your ipad can receive and record it reliably, before your worry about actual encoding and attenuating any switching 'spikes'...
 

Kermit2

Joined Feb 5, 2010
4,163
One change might be to switch freq on a single 555 by adding and removing a parallel cap on the timing. This would do away with any switching glitch caused by the 'or'ed outputs of multiple 555's
 

Thread Starter

besir660

Joined Aug 21, 2012
4
hi all, thank you for the feedback so far. Ipad can see and record what i do i have tested that already, the problem as i said is the clicking noise heard in frequency transitions, i assume that is because the switching is not done at zero crossing.

Kermit2, i think what you say is a great idea, i will try that. I will use a transistor to switch on and off a parallel capacitor (or perhaps a resistor parallel to R2). I will try that and will report. I kept thinking whether a component exists for controllable resistance/capacitance, but you gave me the parallel idea, i think that will do the trick.
 

Thread Starter

besir660

Joined Aug 21, 2012
4
Thank you so far for the comments. Yes iPad can see and record what I do as the sampling rate goes up to 44khz.the problem as I said is the noise during frequency switching

@Kermit2, thanks a lot for the great idea. I think that should work. I will try a parallel cap (or a resistor parallel to R2) using a transistor switch. I will report back.
 
Top