Meanwhile I got a working master and node. The master can send a package (one byte so far) to the node, the node responds and the master calculates the distance:
Keeping in mind that it is calibrated rather loosely the results are very good. The distance value is very stable and +-0.5cm accuracy should be archieveable.
What the data package looks like:
- two start bits (both high)
- four bits target address
- four bits command (The master transmits 1=DoEcho and the node responds 2=EchoReply)
- two parity bits
- one stop bit
I need to increase the number of parity bits, because two bits result in an easy 25% chance for the parity to be right anyways.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Hi,
Can You please add the schematics ( the one You used in the videos) in github. The circuit I used doesn't reach more then 4 meters :(.
Beste Grüße aus Bremen, Tom
Are you sure? yes | no
What distance do you think it can work in?
How about wind?
How about obstacles / multipath signal (same issues as GPS?)
Look very nice
/Kasper
Are you sure? yes | no
-> Distance: I'm not sure... There's plenty of room for improvements, these
problems are related to that:
___-> Using a max232 to amplify the signal to transmit works crap.. I might need
separate voltage booster and H-bridge
___-> The transmitter and receiver capsules are very limited in the angle they
transmit/listen. They don't behave like usual speakers/microphones at all, but
this is what I need
___-> As stated in the video a dynamic signal boost for the receiver is needed.
I haven't implemented this yet [busy with improvements on mowing system, update
very soon], so unclear how well this will work
___-> Noise will definitely increase along with amplification. Therefore some
additional bandpass filter might be necessary
-> Wind: I haven't had any problems with this so far, and with sound traveling
at 343m/s it shouldn't be too much of a problem I guess.
-> Obstacles: Since "receiver capsules are very limited in the angle they
transmit/listen" obstacles can be a problem. Of course multiple nodes would
overcome this issue, but with better/wide angle receivers and transmitters it
should be pretty much the same as we experience in our hearing range
-> multipath signal: This is where I like the system the way it works: The
receiver capsules have a small weight oscillating at 40KHz when receiving a
40KHz wave. The system uses this effect: oscillating means 0-bit, phase shifting
by 180° so that the weight must stop it's oscillation and build up again with
the shifted phase means 1-bit. Now when a reflected wave arrives at the receiver
it is not strong enough to disturb the ongoing oscillation (in most cases) -
awesome isn't it :D
Are you sure? yes | no
Are you sure? yes | no
Are you sure? yes | no