Single-button combination lock project
Barry King email (remove spam text)
I agree with Harold that a Morse-Code detector would be a desirable
way to do this, it makes it easyto remember a non-trivial rhythm.
There is actually lots of good code around to do this, on the various
Ham Radio web sites, since many folks have done Morse code
reciever/sender programs, you should be able to find something to
My Dad and I did a home control system which is controlled via voice
output for prompts and data out (via PC based speech
synthesizer and several speakers in the house) and morse-code in (via
buttons near each thermostat). All the buttons were just parallelled
The algorithm is pretty simple, it assumes a dot length to start
with, and figures that any press shorter that twice the dot width is
a dot, anything longer than twice the dot width is a dash. The first
version set the dot width every time a dot was recognized. Later, we
switched to a running average of the last few dots.
Similarly, you have to recognize when a space between presses is long
enough that the sender means it to be the end of the symbol. Ideally
is one dash-time (three dot times), but it has to adapt too.
In practice, we found that with the push button you could only
send slowly anyhow, and most of the commands were single morse
letters ("T" for temperature report, e.g.) so the timing was not too
critical, it worked OK.
Now where in the electronic landfill did I put that surplus
solenoid door strike?
Barry King, KA1NLH
NRG Systems "Measuring the Wind's Energy"
Hinesburg, Vermont, USA
"The witty saying has been deleted due to limited EPROM space"
In reply to: <email@example.com>
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the