With a reciever that lets you tune to radio stations in the 76-100MHz range, power requirements of only 3.3V at 11mA, and an I2C control interface, the AR1010 FM radio module from Airoha is one cool chip. Intrigued by this little FM reciever, I picked up a Sparkfun AR1010 Breakout Board to give it a try. I plan on designing a small FM radio using this module and an AVR microcontroller. First, though, I decided to use my trusty Bus Pirate to get acquainted with the chip. The following are the steps I took to use the Bus Pirate and Sparkfun AR1010 Breakout Board to listen to a local rock station, 95.5 KLAQ, here in El Paso.
I built the testing circuit on a breadboard by connecting the Bus Pirate’s I2C interface, +3.3V, and ground to the AR1010 breakout board. Since the breakout board contains the required I2C pull-up resistors and decoupling capacitors, the Bus Pirate can be connected directly to it, no other components are required. I also connected the stereo output of the AR1010 to an audio jack. According to the AR1010 datasheet, the module’s output signal is around 100mV. A bit weak for my headphones, so I connected the audio jack to a simple headphone amplifier.
Initializing the AR1010′s registers
After the testing circuit was setup, the AR1010 registers needed to be initialized. I acquired the initial register values from different sources and through some experimentation. Those shown below worked well for my module. I went through the following commands in the Bus Pirate terminal to initialize the AR1010 registers:
Tuning to a station
Tuning the AR1010 is a three step process that involves some binary math. First I found the channel number for my desired frequency using the following formula:
Channel = (Frequency (MHz) * 10) – 690
Applied to 95.5MHz it gave me 265 or 0×109.
Next, I set the channel register of the AR1010. To get the appropriate value, I applied ‘OR’ to the channel value and 0xD000 (I got 0xD000 from some source code I found on the web):
0×109 | 0xD000 = 0xD109
Finally, in step three, I set the tune bit ‘ON’ by doing:
( 0xD109 | (1>>9) ) >> 8
This gave me 0xD309 which is the value I wrote to register 2 of the AR1010 and then I was able to hear some rock music on 95.5 FM.
You might be asking, “Why not set the channel register directly with the tune bit ‘ON’?”
I tried and it didn”t work. Tuning to a station involves writing to the channel register twice–once with the tune bit ‘OFF’ and once with the tune bit ‘ON’. This was a source of confusion in the beginning, but after following this rule I was able to tune to any station I wanted. In the end, controlling the AR1010 with the Bus Pirate was straightforward. Next, I plan on experimenting with the Bus Pirate’s binmode, Python, and the AR1010.