On the transmitter side, you need to provide a signal at 40kHz. Preferably at a voltage higher than 5V for maximum range. (The 400ST120 is rated for 20Vrms, (56.6Vp-p).)
On the receiving side you need an amplifier and band-pass filter or tone decoder etc. as you say.
Using these transducers is not trivial, but a Google search will reveal plenty of potential circuits.
I can't help further. I have no idea how well that circuit will perform. Ideally you need to build it as a test circuit, maybe on a breadboard, and see how it performs.
Regarding driving the TX transducer with 5V, again, I don't have the answer. You probably won't get much range.
Ideally, you should make a driver stage powered by a higher voltage, then use a timer or PWM on the Arduino to generate the 40kHz waveform.
I mean use two of them and make the transmeitter from the first one communicate with de receiver of the second one?
Thanks!
j'aime l'idee de projet , mais je n'admire pas la methode avec laquelle tu veut le faire , qu'est ce que tu veux apprendre a travers ca ? . en+ je croie qu'on peut mieu te comprendre si tu publie dans la section francaise de forum arduino .
In this thread (Using HCSR 04 for communications) I posted some comments about my experiments in communications via ultrasound that you might find of interest. The issue I see with what you've proposed is that there will be echos from any transmit device that will greatly confuse the interpretation of the received signal at any site.
At least two approaches come to mind. First would be to perform signal processing on the received signal prior to detection to determine and remove the channel characteristics (the echos). This would require far more processing power than a typical microcontroller and non-trivial mathematics.
A second approach that might be workable is to have a known station-dependent delay on each of your receivers that allows the echos from any previous transmission to die out prior to responding. For example R1 might, upon hearing a pulse, disable listening for 100 milliseconds and respond after 10 milliseconds. R2 would do the same except it responds after 20 milliseconds and so forth. T1 then calculates the round trip time to R1 as the time the first pulse is received in the window 10 to 20 milliseconds after its transmission minus 10 milliseconds, and so forth . . .
Why not do the whole thing with ultrasound? You' need a transmitter/receiver for each of your units, so a premade shield may be appropriate. Code the central transmitter to send an address such that each outstaton only responds to it's own address . Then time that return.... then on to the next.... ie polling...
The coding could be as simple as morse - made of short/long pulses. Say every transmission signal consists of (eg) 8 pulses of short or long - that allow you to address each of the outstations .
The gap between pulses is big enough for echoes to die away.
Say that the master station always always starts with ( say ) 3 longs and never uses 3 successive longs elsewhere in the signal, and the outstations always respond with a signal starting with 3 shorts and never use 3 successive longs or shorts elsewhere . That means that outstations don't respond to other outstations and the start of the signal can't be confused with a part of a signal . Leave a decent gap between signals to avoid confusion.
The other 5 pulses contain the station addresses.
The outstations don't respond until they have heard all 8 pulses. The master station knows that the end of the 8 pulses is when to start timing. The start of each pulse is the timing reference - the end may be confused by echoes.
allanhurst:
The coding could be as simple as Morse - made of short/long pulses. Say every transmission signal consists of (eg) 8 pulses of short or long - that allow you to address each of the outstations.
The general outline you've presented makes sense, but I think using pulse width ala Morse code is going to be problematic for several reasons.
One is that multipath echoes may overlap the direct path signal making it appear longer than the intended transmission. Second, if one uses the HC-SR04 electronics, it only detects the leading edge of the pulse and ignores what follows. Finally, the piezo transducers are resonant at the transmit frequency (~40 kHz for HC-SR04) so they have an exponentially decaying tail after the driving signal is stopped, thus there's not a clean transmission termination, even if one were operating in an anechoic environment.
Some variant of pulse position modulation is probably dictated by the physical constraints of the problem. My conclusion in the thread linked in the earlier post was that one could get something on the order of 100 bits per second out of an HC-SR04 based ultrasonic communication system so the position updates for the original poster's scenario are likely to be some small fraction of that.
That's ok - all echoes arrive AFTER the direct path pulse, so if you time on the leading edge you're OK. Also works for slow decay at the end. Note I also suggested waiting enough time between pulses for echoes to die away.
regards
Allan
ps the same problems would apply using a radio backlink.
Exellent, i wasn't expecting so much answer around here since i switch to the french forum. Thanks guys i will try what you told me if one day my components arrived! (it's been 3weeks since i ordered i'm becoming crasy and i am running out of time! )
I checked the other post, very helpful, i'am just scared that i won't h