3
\$\begingroup\$

I'm searching for ways to simplify prototypes, specially the requirements to create an II (input Interface) or UI (user interface). No need to drill holes for buttons or create a button array because it's not easy to experiment with this, espescially when you want to change or extend it. Yes, you can use a touchscreen (with or without display) for this but it is more difficult to change or maintain because it depends on the firmware and it needs additional hardware that pushes product costs. So, why don't use existing (obsolete) devices that got it all already to reduce costs but is also environment friendly.

Got a couple of phones lying around with great capabilities though but unusable for advanced tasks (like Nokia's for example) and want to reuse those to be a part of projects. All of them got a touchscreen, a browser that can display (offcourse) HTML and an audio/mic socket. Came up with the idea to create an extendible HTML interface with buttons that produce sounds (frequency instead of measure button resistance) to measure input/selection.

The solution is also very cheap because you can use any existing device that is able to play a soundwave and you only need an audio cable to process commands. You can even use dumb phones to do the 'trick'. Another nice thing is that you can 'record' commands, play a sequence of commands, for example with a MP3 player. Could be very nice.

Also experiment with remote controls, to reuse old remote controls. Problem with these is detection, different brands use another 'frequency' and it requires allot more work to get it working. So an 'App' is easier to develop, an App that produces just soundwaves (like DTMF) - see also: http://onlinetonegenerator.com/dtmf.html

If you can use the microphone, you can develop an bi-directonal i/o system, you can interact with the UI on the cheap. But okay, first things first.

I like to build an audio socket (with help of an Arduino) to measure frequencies. Found this - https://www.arduino.cc/en/Tutorial/SimpleAudioFrequencyMeter - but is very limited in handle frequenties. I really like to see the frequenties are above hearing limits, above 18.000 hz for example so you are able to make it a sort of wireless in the future (speaker -> microphone)? When playing music or other sound it doesn't disturb 'button' detection.

Is it possible to measure high audio frequenties anyway? What is the best way (without or less external components) to do this? Any idea's or links?


UPDATE:

Just found this: http://www.instructables.com/id/Arduino-Audio-Input/

And: Have experiment done with this device, a DTMF decoder: https://nl.aliexpress.com/item/wholesale-1pcs-MT8870-DTMF-Voice-decoding-module-phone-module/32643931980.html and converted the header into a dual line resistor network, works pretty well but you still need this device to decode the tones/frequenties.

\$\endgroup\$
4
\$\begingroup\$

If you want to use the audio jack output of a phone, you can't use frequencies above the hearing limit. Because the phones all contain a DAC followed by a low-pass filter that attenuates everything above 20kHz or so. So the phone output will never be able to produce ultrasounds.

As a consequence, the simplest is to use old-fashioned DTMF, as you suggested yourself. There are a bunch of chips able to do that, for example the Microsemi MT8870. The figure 9 in the datasheet shows a typical configuration that should fit your needs, and you'll see there are very few external components. And this way, the software arduino part does not need to do the actual DTMF decoding, and you get 16 possible output states (if it's not enough, you could use sequences of multiple tones).

By the way, nice idea, overall. Very simple and effective.

\$\endgroup\$
  • \$\begingroup\$ I wouldn't trust a phone to allow frequencies even close to 20kHz through its DAC and low pass filter. 10kHz maybe. Which amounts to another vote for DTMF. \$\endgroup\$ – Brian Drummond Sep 7 '16 at 9:17
  • \$\begingroup\$ @BrianDrummond You're probably right. 20kHz is certainly very optimistic. \$\endgroup\$ – dim Sep 7 '16 at 9:42
  • \$\begingroup\$ Hi, thanks for the answer! You mean something like this: nl.aliexpress.com/item/… Realy nice but limited and you need long duration tones. You put me to the test and test several devices (cheap and expensive) to find out if it is really that bad. They all in a range that can produce sounds between 18khz and 21khz, pretty good. Also one of the cheapest can produce a maximum tone of 23Khz, really! Studied some other things too, hearing range of humans, in theorie and in practice. ..................... \$\endgroup\$ – Codebeat Sep 9 '16 at 0:48
  • \$\begingroup\$ ....... (next comment was gone, here a retype): In fact you could use something between the 18khz and 21khz range because most people can't hear this or a phone speaker is not able to produce it. In a wav graphic of recorded output of the phone, I'm unable to hear something like 19Khz (mine hearing range is till 16khz) but it shows up in the graph. Next problem is how to detect it. I wonder if it is possible to detect these frequenties and because my 'Arduino' runs on 8 to 16 Mhz, I think it must be possible. Just build a high freq filter (two resistors and a cap) to chop off the lower freq \$\endgroup\$ – Codebeat Sep 9 '16 at 23:54
  • \$\begingroup\$ .... to get a cleaner signal. Now thinking about amplifying it. \$\endgroup\$ – Codebeat Sep 9 '16 at 23:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.