Some people have managed to send simple AM signals with just a bare Arduino. An example is here. This works thanks to the fact that the PWM can reach high frequencies and, setting the divider properly, it is possible to broadcast a 1337 kHz carrier over a short distance with just a wire acting as an antenna. I know it's not that useful, but it's really nice as an educational tool.

I was wondering if it would be possible to apply the same concept, but for the receiver. For instance simply using a pulseIn() detection on a pin connected to an antenna. Would it be possible to detect the carrier, and, maybe, even demodulate a message, eg, in morse code?

If not, would just a adding an amplifier be sufficient? Any recommendations for the amplfier and the circuit?

Thanks very much for your suggestions.

2 Answers 2


Generating an AM signal is child's play compared to detecting one.

To generate a signal you just need to create an oscillation and vary the amplitude, which can very crudely be done with PWM.

That's simple.

To receive a signal you first need to isolate that signal. There's a huge number of signals and noise around all the time, and you need to tune in to the signal that you are interested in. That's what you are doing when you twiddle the dial on a radio. You're selecting which frequency to listen to.

And to do that requires a tuned circuit - a kind of band-pass filter which isolates and amplifies the frequency you are interested in.

Imagine you are in a large hall filled with people. Every single person there is just standing around talking out loud - everyone is saying something different. Some are even just screaming, or whimpering in the corner. It's just a cacophony of noise. Impossible to know what is going on. That's what the air waves are like. You need some way of "tuning in" to one person's voice so you can understand what they are saying. As humans we often do that using sight, to watch a person's lips and our clever brains link the movement to the sound and help us pick out their voice. Coupled with our ability to select on the tonal qualities of a voice as well, we can pick out a single voice in the noise. That's what the tuned circuit does. It picks out one voice from the mayhem.

The Arduino can't do that. It would need to use some fairly sophisticated filtering algorithms, and it just doesn't have the power for that. Firstly you'd need to sample the raw RF noise at a minimum of twice the frequency you are interested in (so multi-mega-samples per second), and then you'd need to do digital filtering to isolate that one frequency. From then you'd need to do more filtering to demodulate the original signal from the modulated signal.

It's all possible to do in software, but not with an Arduino. It takes a good ADC and a DSP to do all the hard work.

Easier to just build a small tuned circuit from a few passive components.

  • thanks. Would it be possible to use Arduino PWM as oscillator for tuning the circuit? That would save some components maybe.
    – dariosalvi
    Nov 25, 2016 at 15:43
  • No. Maybe for FM as a reference clock for a PLL, but not AM. A tuned circuit is very very simple. About 3 components. All passive.
    – Majenko
    Nov 25, 2016 at 15:45
  • do you have an example circuit? it would be good for my educational purpose!
    – dariosalvi
    Nov 25, 2016 at 15:50
  • Ask Google. I am away from my desk at the moment.
    – Majenko
    Nov 25, 2016 at 15:51

AM (Amplitude Modulation) varies the amplitude of the carrier based on the input signal. So, assuming you had some circuitry (LC circuit) to receive a particular carrier frequency and managed to boost the voltage so that it was in the range 0-5v then you would able to feed this to an analog input on the Arduino.

AnalogRead requires around 100uS per sample, so your max sampling rate would be 10K/s, which might just cut it for voice (up to 3.4Khz, sampling at least 2 * the highest freq).

However, you then need to do something with the sample value (in code) and depending on how long that 'something' takes, your actual sample rate will be reduced.

  • thanks for this explanation, my question was really related to if I could avoid the LC circuitry and just read the antenna directly (maybe with some amplification first)
    – dariosalvi
    Nov 24, 2016 at 11:09
  • Not possible. You'd be able to read the carrier frequency sure (depending on actual freq.) but the frequency never varies, it's the amplitude of the frequency that contains the coded signal. Nov 24, 2016 at 11:28

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.