Part 15, Low Power, FM Stereo Transmitter on a Budget
I have two good AM transmitters – one I’d built using a single 6888 Tube plus an old KnightKit Broadcaster that I’d refurbished, as well as a high-quality solid state transmitter from SSTRAN that I use to play music over the several antique AM radios I’ve repaired or refurbished.
I wanted a high-quality FM Stereo transmitter to stream iPod / iTunes output around the house and to my FM-band radios.
FM Stereo, however, is a bit more difficult to home-brew. I wanted to avoid the poor frequency control of the Ramsey FM-10C (with the BA1404 chip), and the low modulation of the little iPod FM transmitters you find for use in the car – although frequency control is quite good on these, the audio on these is just terrible. I’ve had about 3 of these iPod transmitters and they were all completely unusable.
You can get really GOOD FM transmitter kits but you have to go on up to $140+ to find a kit with suitable audio quality and frequency stability (think: Ramsey FM-25B).
To home-brew, first you have to build a stable exciter, preferably PLL synthesized, but the ICs for doing so are simply no longer readily available (Motorola MC145170, Plessey NJ88C30). Secondly, you’ll need to encode the left and right channels into Left+Right, Left-Right and tack on the 19 khz pilot tone, the 38 khz sub-carrier (See: Wikipedia, FM Broadcasting, FM Stereo).
The NS73M FM Transmitter module from Niigata Seimitsu Co. is ideal for this task. Unfortunately,
it needs a controller to setup the pre-emphasis, modulation level, frequency and power level.
And, if you’re going to use a controller, you might as well include an LCD so you can know what
frequency you’re on. I named this the “FM Stereo Broadcaster” since it reminded me ofthe old
Knight-Kit Wireless Broadcaster of the 1950’s (I have one of those too!).
I selected a Bare-Bones Board (BBB) from Modern Device Company (that I had on hand) to provide an Arduino controller.
The Arduino is an open platform, the development tools are free, and can be programmed in a variant of “C”
language. The LCD is a 16 x 1 device from AllElectronics.com
made by Varitronix. Finally the NS73M is provided on a convenient breakout board from
I found some initial code built by Cai Maver (Arduino + NS73M = ARRRduino!)on the SparkFun forum. The original (ur-code?) sample BASIC code from Sparkfun / ZAPNSPARK (Jim G.) gave the original ‘protocol’ for interfacing with the NS73M.
The code was first built with 3-wire mechanism using 3 digital pins (after the sample code)..
After some back-and-forth collaboration, he changed the Arduino to NS73 communication it to use
the I2C protocol (Arduino Wire.h library).
I added the 4-bit LCD interface and did some fancy-schmancy handling of the up/down/set buttons so you can
take the transmitter offline, change frequencies, and put it back on the air, and I added some code to save
and restore the frequency in EEPROM so the last frequency is restored on power up. The Feature-List
- Power-up and recall the last-known frequency
- Provide access to the entire FM-broadcast band (USA; code is easily modified for other markets)
- Allow the FM Carrier to be taken ‘off-air’ or ‘on-air’ as needed
- Show the current frequency and carrier state on an LCD Display
The project becomes a matter of not assembling discrete components so much as putting together 3 highly integrated modules.
The LCD4bit library was altered in only two spots:
1. Disable the RW Pin – the LCD RW pin is tied to ground (LOW). We’re only ‘writing’.
2. Change the Enable Pin from ‘2’ to ’11’ (use the unused RW pin).
The Arduino pins are budgeted this way: Digital Pins - D12 = RS (from LCD) D11 = RW (NOT USED - The RW pin on the LCD is tied LOW) D11 = Enable (from LCD) D10, 9, 8, 7 = 4 data bits for LCD D6, 5, 4 = UP, DOWN, SET buttons Analog Pins: A4 = SDA, A5 = SCL There are a few pins remaining for future expansion.
Final code is in this
Arduino Sketch for An FM Stereo Broadcaster.
As currently configured, the NS73M transmits at 2 mw power output, with a 75 us pre-emphasis, and 100% modulation to occur at 200mV of input audio. The first time it powers up, it will start at 97.3 mhz.
Afterward, the start-up frequency is remembered from the last time.
Everything is reconfigurable for other countries, including the FM Broadcast band edges
(87.5 mhz to 107.9 mhz USA), and the channel spacing (200khz USA). The 4-Bit LCD interface is as follows:
LCD is being used as Write-only, so we can save a pin by tieing RW LOW and disabling RW in the LCD4bit library.
Also the LCD4bit library was slightly modified to move the ENABLE pin from Arduino Pin 2 to the (now unused)
The Two LCD4bit library changes are two lines:
int USING_RW = false; // make sure the USING_RW value is set to 'false'... ... and Change THIS Line: int Enable = 2; TO: int Enable = 11; // making use of the now unused RW pin...
- Frequency stability is tip-top – I connected a frequency counter and it NEVER drifted.
- Transmitted Audio quality is superb – I don’t hear much hiss at all and the audio has great dynamic range, so FM modulation is quite good.
- Range – I didn’t expect much, but with proper input volume (iPod nano, about 60% volume), and a short (read: legal!) antenna it reaches my living room about 50 feet away!
- Frequency Agility – I’ve tested it down to 87.5 and up to 107.9 and other than some very small ’rounding’ inaccuracies, it reaches all of the channels on the US FM broadcast band.
- Cost – compares favorably to the Ramsey FM-10C ($45): the Bare-Bones Arduino($15), the FM module ($15, Sparkfun.com),
an LCD module ($5, Allelectronics.com), and some parts on hand (buttons, a 3.3v regulator,
resistors, trimpot for LCD contrast), but has the features of a Ramsey FM-25B ($139.95).
- I still need to package it in a suitable enclosure.
Finishing: since this is an RF project, an enclosure should be metal. I’ve settled on a Hammond 1455N1201 extruded aluminum enclosure – they’re easy to work with and I like the style. The datasheet indicates the RF Output is 50 ohms impedance, so a BNC Connector would be suitable. Each of the separate ‘modules’ (LCD, Arduino, FM Transmitter) can be mounted to a perf board and interconnected. Breadboard power is from a 5-volt lab supply, so a 5-volt regulator (and filtering) will be added to power the Arduino and the LCD; the NS73M uses a separate 3.3-volt regulator.
I initially forgot to add a level-shifter between the Arduino and the NS73M. The Arduino will produce 5-volt swings and this needs to be buffered to 3.3-volt swings in the Clock and Data. A great guide for this is SparkFun’s Tutorial on 3.3v Sensor Interfacing.
However, I avoided the more complicated solution (BS170’s on each side) and simply used a pull-up resistor to +3.3V on both I2C
pins of the NS73M. Connecting these to the +5V Analog pins (4 and 5) now restricts the up-side voltage to +3.3V, but allows enough
of a swing to assure a good I2C signal.
Finally, connecting the buttons (or the rotary control) requires debouncing of the mechanical switches.
A good look at this great tutorial on debouncing: http://www.ganssle.com/debouncing.pdf
will turn up the RC method (on or about page 12-14). I chose this for it’s simplicity and it’s quite good at
cleaning up either pushbuttons or a mechanical encoder.
- Notes on the Schematic
- 1/18/2011 Discovered a MISSING connection on the Schematic: Note that for I2C operation, “LA” must be pulled ‘high’ or 3.3V. So: Change U1, Pin 7 (LA) to go to +3.3V
- This is by no means a pre-bottled solution; you’ll probably want to tinker with it a bit, depending on what components or
enclosures you have handy (switchs, power choices, LCD types).
- I used the simple, cheater-way of handling the I2C – just two 10k pullups … to 3.3V! This limits the up-swing since the
Arduino is at +5V.
- S1, S2 and S3 – can be switches (version 1 of the code), or a Rotary Encoder (with a set switch) (Version 2).
- LCD code is written with a 16×1 in mind; 16×2 LCDs are now more readily available and cheaper. This just gives you
more display real-estate to use; tinker with the LCD output lines
- Not shown on the schematic – I used the ‘TEB’ output on the NS73M to provide an ‘On-Air’ LED. Just use a current limiting
resistor (maybe 1000 ohms to start). The TEB goes HIGH (+3.3V) to signal a LOCK (Low for Unlock), so this is a good visible check for ‘On Air’.
- Some builders put a small electrolytic (10 or 22uf) between the LCD Contrast and Ground.
- Remember this is an RF application; shield audio inputs, bypass early / bypass often.
- This is my first EagleCad schematic and I’m too new at it to know any ‘best practices’; please email any suggestions or errors. Thanks.
Source Sketch Files
- Version 1 – works with Arduino-0011, uses buttons for UP, DOWN and SET.
- Version 2 – works with Arduino-0012, replaces add-in LCD4bit library with the new built-in LiquidCrystal library, uses a single Rotary Encoder for Frequency change and Set.
- Version 3 – works with Arduino-0017, works with new, improved LiquidCrystal library.
I used a Bourns rotary encoder with a built-in push-button to replace the 3 buttons with a single control.
Final arrangement with an LCD, ‘On Air’ or PLL-Lock LED (in blue), and a rotary encoder with push-to-set switch for tuning.
Initially used a 16 x 1 character LCD from AllElectronics.com — A Varitronix #MDL16166.
If I were making another unit, I’d use a 16 x 2 display.
Ground seems an optional item, as it works very well with just a short whip.
Here the FM Stereo Broadcaster is connected to a TM-100 Clone
for an antenna.
Screws are standard-head, socket-cap screws with a black-oxide finish (McMaster-Carr: 91251A148)
This is the essance of a ‘modular’ project: The FM Transmitter IC, the LCD, the Arduino that controls them all, along with a bit of inter-module glue: a 3-to-5 volt interface from the FM IC to Arcuino, 3.3 volt and 5 volt regulator ICs, and a RC-debounce circuit between the mechanical rotary encoder and the Arduino.
The 16 x 1 character LCD from AllElectronics appears very faint when looking directly on, or from above. Investigating other LCD options turned up some similarly sized LCDs that will probably work better; the final version (at left) uses an LED backlight and had the exact same measurements as the Varitronix MDL16166 (to fit the opening!).
Screws are flat-head, socket-cap screws with a black-oxide finish (McMaster-Carr: 91253A148). They work well and look great with these
extruded aluminum enclosures.
What’s it take to get the nice, square, straight LCD hole in the front panel? About 30 minutes with a Nipper tool.
- Mark the exact opening, making sure it’s square. I use a red Sharpie, but on the back side.
- Drill a hole large enough to admit the end of the nipper tool.
- Nip, Nip, Nip. Nip around the edges, always – ALWAYS – noting the position of your nipper against your red line.
This is for consistency more than accuracy in size.
- Nip slightly small; you can always use a file to ’embiggen’ the opening a bit. It’s less desirable to have
the exact-sized opening than an even, square one.
Any mistakes are probably my own. Thanks very much to Cai Maver for his original work on the Arrrduino FM – I’ve only extended his code a bit to include EEPROM store and some of the LCD behaviors. Many thanks to all the superb folks on the Arduino.cc website and their libraries, code samples and tips.
This project is not guaranteed for any specific outcome or purpose. I cannot be held responsible for illegal uses. This project is solely for educational, hobbyist, and experimental purposes.
Please check your local (and national) regulations regarding unlicensed transmissions. Do not interfere with other, licensed transmitted signals. FCC’s Part 15 Regulations are recommended reading, particularly
Bulletin 63 (October 1993)
“Understanding the FCC Part 15 Regulations for Low Power, Non-Licensed Transmitters”. This project describes an “Intentional Radiator” and as such (operating in the band 88 – 108 Mhz), according to Section 15.239 (b): “The field strength of any emissions within the permitted 200 kHz band shall not exceed 250 microvolts/meter at 3 meters.” Using their calculations, this works out to about P = 0.3 E2 watts, or 0.3 x (250 x 10-6V)2,
or 0.3 x 0.0002502, or: 0.00000001875 watt (.01875 μ-watt).
Updated May 13, 2009
Don’t know how I missed this one, but there’s a great rule-of-thumb allowance for AM and FM, unlicnesed, low power broadcast transmitters. The Document is from July 24, 1991:
Page one has the technical power rule: AM – .05 watts (or 100mw to the final RF), and FM – 0.01 microwatts. But since these are difficult to measure since calibrated RF meters are expensive, the general intent of the rule is defined as an ‘Approx. Maximum Coverage Radius’ or 200 feet (radius) for both AM and FM low power transmitting.
Updated May 13, 2009
Found a swell link that produces a list of unused FM Frequencies in your area. Searchable by City / State, or by Zipcode, it will return a graphic showing the signal strength of the stations in your area, plust a list of “best”, “better” and “good” frequencies. For example, in Dallas / Ft. Worth, Texas, there AREN’T any unused frequencies (!), but it gives a list clear of all but the weakest stations.
This made it to HackaDay.com. The project has an enclosure now, although I wish I’d used a back-lit and 2-line LCD. Too bad – the hole is already cut.