Years ago I learned about a type of AM transmitter (more like RF stage) called Class D that is really efficient and flexible. The regular way of transmitting AM involves generating a carrier sine wave at the desired frequency and changing its amplitude with the audio, but that requires (1) a good/clean/stable sine wave source and (2) a device that can change the output voltage based on an audio signal. The simplest way to do part 2 is with an amplifier like a vacuum tube or transistor, but the problem is that those are linear devices so they're inefficient. What you actually want is a switching device.
As a kid, I always wondered why power supplies couldn't just be some series resistors. I also experimented with linear regulators (a chip-controlled variable resistor that maintains a constant voltage at the output) and wondered why they got so hot and assumed that I must be using them wrong. What I didn't realize was that they're the same thing and that that doesn't work because of Ohm's law.
The problem is that lowering a voltage with resistance wastes all the energy that the resistor is reducing by. For example, if you use a linear voltage regulator to convert 120 volts DC to 5 volts 1 amp to charge a phone, the input would also use 1 amp which would be 120 watts but since the output is only 5 watts, that's 115 watts of waste that is going to be released as heat which is incredibly wasteful. The way to fix that is with a switching power supply. Those work by switching the high voltage on and off really fast but (usually) leaving it on for way less time than off so the output only gets tiny slices of the higher voltage which gets averaged to a lower voltage. This is how good dimmers work and why some LED's flicker and look annoying.
This square-wave switching can also be used to generate AM radio. A square wave is a sine wave at the fundamental frequency plus all of the odd harmonics. You obviously wouldn't want to transmit that because it would pollute other frequencies like an arc transmitter, but if you add a low-pass filter (removes everything above its frequency), you get just the original sine wave at the desired frequency. This is your carrier. You can use whatever good square-wave source you want, such as an FPGA or a dedicated DDS (direct digital synthesis) chip. Some people even do it with microcontrollers like a Raspberry Pi or Arduino/ESP32. I prefer precise and exact timing so I've been using an FPGA. It sounds like the output would be unstable but dividing a higher square-wave clock from a crystal and using that either directly or in a DDS design can produce an extremely clean and stable carrier for an AM station.
Once you have a square wave at the frequency you want, you use it at the gate of a MOSFET or GAN FET to switch it perfectly on and off really fast like a power supply. This gets filtered and sent to the antenna. Because FET's are really efficient, they hardly get hot if you do it right even with several watts of output power but you have to use a gate driver because logic pins are fast (like megabits/second or faster) for other logic circuits but power circuits require something heavy-duty that can take a weak but fast information signal and turn it into amps of power in nanoseconds to charge and discharge a FET gate. If you use an audio signal or a logic signal that is slowed down by trying to drive something heavy-duty, the FET will spend a while between perfectly on and perfectly off and operate in its linear region and become a variable resistor like a linear regulator and get really hot and self-destruct in seconds. You can buy a gate driver like the TC4426A or build your own totem pole driver with regular transistors to drive a MOSFET fast enough but you need a different type if you use a GAN FET.
A solid carrier isn't really useful so how do you get the audio into it? Normally you would want to get as close as possible to a 50% duty cycle for the RF PWM but you could modulate the duty cycle with the audio. This works and makes recognizable audio but you would need a REALLY fast FET to switch fast enough for it to make sense because the PWM needs to be able to cover your audio waveform levels (the same as the bit depth on the computer). For example, if you have a 12 MHz FPGA board like mine and divide the clock to 600 kHz, you only get 20 total clock cycles for every RF PWM cycle (ideally 10 on and 10 off). If you lower the carrier frequency to 300 kHz (longwave) then you get 40 (ideally 20 on and 20 off). With 40 clock cycles per RF PWM output cycle, you could do 5-bit audio with a bit of overhead but that sounds horrible and you would need to be able to switch your FET at close to 12 MHz which is hard even with good recent devices because you have to watch out for parasitic stuff on the PCB traces.
A much better solution is to maintain a 50% RF PWM duty cycle on the RF stage and modulate the power going to it. To do that, you should convert your audio signal to PWM at a lower frequency and use that to drive a FET, filter the output to remove the switching frequency, and use the smooth amplified audio output as the input voltage for the RF stage. Here is a comparison.
There's a guy in the UK called John Stretch A.K.A. Stretchyman who builds custom transmitters like this for AM and lower shortwave frequencies. I bought one from him once (totally for a ham AM net 😉) and I can confirm his build quality and the clean output signal. With his transmitter, I was able to reach across much of the eastern US at only about 45 watts PEP with a longwire antenna in a tree and I didn't even need a fan for the transmitter. Here is a link to his YouTube channel. https://www.youtube.com/channel/UCnDdvpAi7FcSrETGwc6dT0Q. There are also a lot of similar options on eBay with more frequency coverage if you search for terms like "DDS".
I lost my "Stretchy" transmitter in an accident so I was wondering if I could build one that's good enough for now. To test that method before building one, I wrote a C++ program to modulate the square wave and generate a WAV file that I could play in HDSDR. I tried the modulated PWM duty cycle method first but it looked and sounded terrible so I asked Google's new search AI for advice and it told me about the modulated input voltage method. I updated the code to do that and then it looked and sounded amazing. Here are some things I noticed.
This is how the raw output looks in Audacity (that's as much as I could zoom in because the sample rate is 12 MHz).
We can clean that up with "sox" and a bandpass filter. The high-pass filter at 550 kHz takes care of the lower interference and also the DC offset.
sox --ignore-length 12mhztest.wav 12mhztest_bpf_550k-650k.wav sinc -L 550k-650k
The harmonics and other mess are gone but it's still not completely clean. This is mostly because this is the only signal in the file and it's very strong so it's overpowering the virtual receiver. We can add some noise in Audacity so it's a bit weaker to make it more like a real-world signal. I mixed the signal with white noise with an amplitude of 0.03 for the next picture.
That looks a lot more like something you'd pick up over the air. Let's zoom in.
I included the audio waterfall so you could see the hard cutoff that I added at 15 kHz when I was doing the broadcast audio processing in Audacity. I think the remaining wider parts are from clipping.
You really don't want to just transmit stuff over the radio without processing it with something like an expander or Thimeo StereoTool. These make it sound better over the radio and help to maximize the modulation and amplify the higher frequencies so the signal is easier to hear when the band conditions are bad. As I currently understand it, a good audio processing toolchain should keep the sound close to clipping the whole time so the signal is rectangular like in the picture. Here is a quality example on Odysee just to make sure it doesn't get a copyright strike. For this file, I downmixed to mono, used Thimeo StereoTool's AM processor with pre-emphasis including the NRSC modified 75 µS one and 3 dB AM Brilliance, manually amplified the musical notes at the beginning, and used a 15 kHz low-pass filter.
https://odysee.com/softwarepwmamtransmittertest:dceb3749b76458e81ea61c6d0a7ca30721104556























