An FM Stereo Broadcaster

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!).

The Plan

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 Sparkfun Electronics.

The Code

I found some initial code built by Cai Maver (Arduino + NS73M = ARRRduino!)on the SparkFun forum. The original (ur-code?) sample 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 includes:

  • 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 descrete 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.
				

FM Stereo Broadcaster - Frequency Stability 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 whatever was previously set at the time it was powered down.

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) Pin 11. 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...
				
				

Results

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

FM Stereo Broadcaster - Breadboard Version 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. Added: I totally 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. The BSS138 N-mosfets can probably be substituted with BS170 or 2N7000. Collaborator Cai, produced this excellent interconnect diagram and used BS170's: .

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.

I used a Bourns rotary encoder with a built-in push-button to replace the 3 buttons with a single control.

FM Stereo Broadcaster - Enclosure Final arrangement with an LCD, 'On Air' or PLL-Lock LED (in blue), and a rotary encoder tuning, with push-to-set switch.

FM Stereo Broadcaster - Enclosure - Rear I decided on a single 3.5mm stereo jack for iPod ear-bud-level input. Ground seems an optional item, as it works very well with a short whip.

FM Stereo Broadcaster - Inside 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 enclder and the Arduino.

FM Stereo Broadcaster - Front Panel The LCD appears very faint when looking directly on, or from above. Investigating other LCD options turns up some similarly sized LCDs that will probably work better, perhaps with an EL-Backlight.

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.

Epologue

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, legal 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).