1

I'm looking at controlling Arduino by reading audio commands sent from a raspberry pi (through javascript). I've found the SoftModem code and wonder how it works. It claims that "It uses the phone's audio jack and Bell 202 modem-like FSK encoding", but I wonder how it's done. Doesn't it need to sample the ADC and apply some filtering like FFT? I can't seem to find where all this is done.

Any thought appreciated.

  • Which Arduino do you have? – Nick Gammon Oct 3 '16 at 6:19
  • @NickGammon It's a Nano. I could a Uno though. – John M. Oct 3 '16 at 6:29
1

Judging by the blog from the post you linked, he is calculating the frequency received by using the analog comparator built into the processor. That lets you detect a signal rising, falling or both, compared to a reference voltage.

With some interrupts and some timing, you could work out what frequency signal you were receiving, and thus deduce if you got a 0 or 1 bit incoming.

I have a page about the analog comparator if that helps.

  • Do you think there should be an opamp in that circuit? Shouldn't there be some kind of "signal conditioning" going on there? – John M. Oct 3 '16 at 14:12
  • Possibly. It depends on the voltage levels. The analog comparator is a high impedance input. Maybe a capacitor and/or diode should clamp the input to 0 to 5V. – Nick Gammon Oct 3 '16 at 19:47

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.