<- Back
Comments (28)
- mk_stjamesI want to point out that what keeps this 'OK' is that the little wire is so 'electrically short' compared to the actual wavelength at 1000khz (a real quarter wave antenna at that freq is like 75 meters)... and thus this limits the power of this 'transmitter' to probably nanowatts.If the PIO pin could drive a fair amount of current at 3.3v into a long enough wire at that frequency you'd start to get into milliwatts, and AM radio is NOT a band that even amateur license operators can broadcast over a a certain power on. FCC part 15 dictates no more than a 3 meter antenna for personal devices at AM frequencies which is what does the power limiting essentially.The harmonics fall off quick enough on such a setup that it wouldn't really be a problem - but the only way to really KNOW that is to have a real solid understanding of how this 'radio' you've just made is working, meaning how that square carrier wave is really being driven off the PIO pin, and thus you need the requisite EE knowledge and/or ham radio test equipment and experience.I've seen more and more of these 'ChatGPT coded up a radio transmitter' posts and it kinda rubs me the wrong way. I'd like to see more calculations and disclaimers for people showing some responsibility with radio, and if it drives people to studying and taking an amateur radio license test that would be for the better...
- STARGAThe Pico is doing AM modulation by toggling a GPIO pin at the carrier frequency and varying the duty cycle for amplitude. It works because at these frequencies the GPIO output plus a wire is essentially a square wave oscillator, and the fundamental frequency component is your carrier. The harmonics are what make this legally sketchy — a square wave at 1MHz radiates energy at 3MHz, 5MHz, 7MHz, etc., which lands in bands you definitely do not want to be transmitting on.The 30cm fade-out distance suggests the effective radiated power is well within Part 15 limits (FCC allows ~200 microvolts/meter at 30 meters for AM broadcast band). But the harmonic content is the real concern. A low-pass filter between the GPIO and the antenna wire would clean up the output significantly — even a simple RC filter with a cutoff around 1.5MHz would attenuate the third harmonic by 10+ dB.Fun project though. The RP2040's PIO state machines are genuinely interesting for signal generation — you get deterministic cycle-accurate timing without fighting an OS scheduler or interrupt latency.
- peterbmarksYou think that's fun, rpitx will blow your mind: https://github.com/F5OEO/rpitx
- genxyThe RP2350 can write at 175MB/s using the HSTX, https://github.com/steve-m/hsdaoh-rp2350 more than enough for SDR.https://www.digikey.com/en/maker/tutorials/2025/what-is-the-...
- fainpulFM radio with an ATTiny:https://spritesmods.com/?art=avrfmtx
- lormaynaPlease use an appropriate filter for the band that you are transmitting, otherwise you will pollute all the near frequencies with spurious.
- tl2doGiven GPIO frequency limits, reproducing a beautiful sine wave for a 1000 kHz carrier is a real challenge. He should borrow an oscilloscope and measure the output waveform.
- juancnI don't get why PWM wouldn't work? Would the harmonics make the tuner ignore the signal?Because the speaker is still slow, so if it got to it, there should be audio, but maybe the circuit filters out the PWM signal outright?
- bitwizeThis is the first use people cooked up for the MITS Altair computer, which at the time could only output to its blinkenlights without expansion. Before a tiny company called Micro-Soft released BASIC for the thing, some madlad at the Homebrew Computer Club found a way to spin the CPU in loops tight enough that the interference could be picked up as tones on an AM radio, allowing for music to be created. Good to see the old traditions are still alive.
- anthkIf you use GNU+Linux/BSD or anything with an X server, by tweaking the modelines you can broadcast a song over AM by using harmonics from your screen.Search for Tempest for Eliza.
- hulitu> Raspberry Pi Pico as AM Radio TransmitterThe fact that you are receiving it with an AM radio, doesn't mean that you are transmitting AM.