Live data from Hacker News

Raspberry Pi Pico as AM Radio Transmitter

pesfandiar.com

31–38 of 38 posts

Re: Raspberry Pi Pico as AM Radio Transmitter

#31
I don't mean to pick on the author... but there are some common LLM-isms in here which are really starting to annoy me:

    return (int64_t)(now_us - deadline_us) >= 0;
...is a very silly way of saying:

    return now_us >= deadline_us;
The function is named incorrectly, "deadline passed" would be:

    return now_us > deadline_us;
...although the calling function is correctly called "wait until", making it more confusing if you had to care about the difference.

The weirdly pedantic use of stdint.h types with unnecessary casting is another LLM-ism I see more and more. Passing int8_t to a function by value is really weird... and the second half of this conditional:

    if (midi_note  127) {
...can never be true, INT8_MAX is 127.

None of this is a huge problem on it's own. But the cognitive cost of a million odd little things like this adds up really quickly across a large codebase when you're trying to debug something.

Re: Raspberry Pi Pico as AM Radio Transmitter

#32
post #2

> Raspberry Pi Pico as AM Radio Transmitter The fact that you are receiving it with an AM radio, doesn't mean that you are transmitting AM.

On off keying at 1,000khz is AM transmitting though?

Emitting a square wave as RF blithers all over the RF spectrum. At least put a bandpass filter on the thing so it stays in-band.

Re: Raspberry Pi Pico as AM Radio Transmitter

#33
post #22
post #20

Earlier quoted context omitted.

I don’t know what the regulations are in your country (looks like you are maybe in Canada?), but in many countries it is straightforward to get an amateur radio license, and then you can have all sorts of fun (under the rules).

Transmitting on AM broadcast frequencies is generally prohibited unless it meets an extremely low-power exemption , even if you have amateur license(I have a Japanese amateur radio license). A practical way to reduce risk is to put a large resistor before the antenna so the radiated power stays within that exemption. You could start with 100 MΩ; if the receiver cannot pick it up, try 10 MΩ, and so on.

A slightly less practical but more fun way is to do it on a ship in international waters. (Bringing a whole new meaning to "pirate radio"...)

Re: Raspberry Pi Pico as AM Radio Transmitter

#34

I 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,…

[deleted]

Re: Raspberry Pi Pico as AM Radio Transmitter

#35
post #21

Given 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.

An oscilloscope is the wrong tool for that. You can tell the difference between kind-of-square and kind-of-sine wave using one, but hardly more. At least DSO often have a FFT option and on the new ones with 12bit ADC that might actually be more than just a gimmick.

You'd want to use a spectrum analyzer to verify that other frequencies are present only at very low levels. TinySA might be the cheapest option or an used Digilent Analog Discovery.

Re: Raspberry Pi Pico as AM Radio Transmitter

#36
post #22

Earlier quoted context omitted.

Transmitting on AM broadcast frequencies is generally prohibited unless it meets an extremely low-power exemption , even if you have amateur license(I have a Japanese amateur radio license). A practical way to reduce risk is to put a large resistor before the antenna so the radiated power stays within that exemption. You could start with 100 MΩ; if the receiver cannot pick it up, try 10 MΩ, and so on.

A slightly less practical but more fun way is to do it on a ship in international waters. (Bringing a whole new meaning to "pirate radio"...)

You think you jest: https://en.wikipedia.org/wiki/Radio_Veronica .

A literal pirate ship!

Re: Raspberry Pi Pico as AM Radio Transmitter

#37
post #2

> Raspberry Pi Pico as AM Radio Transmitter The fact that you are receiving it with an AM radio, doesn't mean that you are transmitting AM.

By the same token, if the AM radio is receiving something other than AM, it isn't an AM radio.

Or we could just use words that are useful for communicating things.

Re: Raspberry Pi Pico as AM Radio Transmitter

#38
post #22

Earlier quoted context omitted.

Transmitting on AM broadcast frequencies is generally prohibited unless it meets an extremely low-power exemption , even if you have amateur license(I have a Japanese amateur radio license). A practical way to reduce risk is to put a large resistor before the antenna so the radiated power stays within that exemption. You could start with 100 MΩ; if the receiver cannot pick it up, try 10 MΩ, and so on.

A slightly less practical but more fun way is to do it on a ship in international waters. (Bringing a whole new meaning to "pirate radio"...)

There's still one example of a working offshore radio ship, the Ross Revenge in southern England which you can go and visit. She's one of the former Radio Caroline ships, the studios are still fired up every month for a weekend of broadcasting and they run tours. Radio Caroline themselves are still alive and kicking as a legal station broadcasting 24/7 online and on 648 AM; ironically the latter transmission comes from a former BBC World Service site. She wasn't really a 'pirate radio' ship as she was a Panamanian-flagged vessel in international waters so not subject to the Wireless Telegraphy Act in theory, but British citizens specifically would have committed an offence working on her in her free radio days. What really did Radio Caroline in as an offshore broadcaster was the Anglo-Dutch action against the clandestine organisation which supplied the ship, that and the move from a 3-mile to a 12-mile limit which forced her into more exposed waters.

Other than the RNI ship she was probably the best-equipped radio ship that ever put to sea, and certainly the strongest. She was a long-range trawler built for Arctic conditions, and the engineering which went into the radio station was really impressive; Peter Chicago her engineer by all rights should be up there with the greats in hacker lore. Most radio ships were clapped-out old vessels at the end of their lives, they were essentially slapped with transmitters and sent to sea to die since you can never take a radio ship back into port once it's broadcast. The Ross Revenge on the other hand was a very strong ship who was left purposeless midway through her life due to the Cod Wars. The generating and transmitting facilities were really sophisticated for radio pirates, there were plenty of redundancies and the ship could radiate multiple medium and short wave services.

The broadcast studios and accommodation are still active but most of the machinery spaces and the hull itself aren't in good condition. They've raised half a million pounds for repairs, but that's not actually all that much in the maritime conservation game. Hopefully it will be enough to stabilise the immediate problems with the hull and open a door to lottery funding though. If you're in the area I'd go and see her while you've definitely got the chance!

Post reply on HN