I was browsing around on Sparkfun at some stage, and happened upon a part that got me thinking a little. My wife has always wanted an FM radio in the kitchen in a bit of a retro tin. The part is the AR1010, a small FM radio receiver with an i2c/SPI interface. I plugged it into a breadboard, and started playing around with it. The documentation is a little vague, and to be honest, this chip has a lot of bugs that you have to work around, however, it does work, and it has some nice features. The ability to seek a radio station, is quite cool, and also it handles the volume digitally. There are various other options like RDS data, which I tried in vain to turn on, but the documentation supplied only accounts for a few of the registers. I suppose I’ll have to play with these other features more to get the information I want from it, but for the moment it works a treat.

Here is a picture of the finished result:

You can look at the top, it has an LCD embedded to keep with that retro feel (I think anyway). I sort of like the way the tin is rusted a little. This tea tin is fairly common in shops in South Africa. I cut the LCD plate out with my dremel, and I would say that my dremel skills leave a lot to be desired, tho I think it looks quite nice when it’s a little messy. hehe.

Here is a look at the top:

The red button on the left is for seeking, and the buttons on the right control the volume.

The setup is based on an Atmel Atmega8. It talks to the AR1010 via an i2c link. The code concept is a state machine for the input and display. I have an interrupt timer ticking over every second, that decreases a counter. When the counter reaches 0, it sets to a default state. Whenever a button is pressed, it sets a state, for instance SEEK, or VOLUME_UP, etc. Again, when the ticker decreases to 0, it drops to the default state, which is the frequency of the radio station. Additionally, there is a separate ticker, that when it reaches 0, it turns off the back light of the LCD, and puts the chip into idle mode. When the user presses a button, it wakes the chip up, and commences with the given command. There are various sleep modes avaiable, some more deep than others, however, when using a level interrupt, the level has to be maintained for a significant period of time for the chip to wake up AND have the interrupt fire, and I found buttons presses were too unreliable for this feature to work for the deeper sleep modes. To this end, I opted for an idle mode, which still saves a significant ammount of power. I think tho the back light on the LCD is the real winner, and saves the most. With the backlight on, and the radio on full volume, the whole thing uses a little < 100ma, before the regulator. I’m not really sure, but I think if it was running directly off batteries with no regulator, it would use quite a lot less, maybe in the region of 50ma or so (that is complete guess work).

Here is a picture of the logic board:

In the middle is of course the atmega8. Perfect chip for the job in my opinion. Easy to program, easy to write code for, and has a nice list of features. At the top right, you’ll notice the AR1010. The circuit is driven at 5v, to supply enough voltage to the LCD, however the AR1010 has a maximum tollerance of 4v, so I used two diodes in series to drop the supply voltage low enough to be within the tollerance of this AR1010. It works quite well. I think it’s running on about 3.6v after the diodes. At the bottom right is the amplifier IC (I know close to nothing about amplifiers) and it’s coupled with a relatively small ceramic cap (104), which seems to do a nice enough job for the given frequency. At thje top left is a 5v regulator (LM7805) that is exceptionally robust. It can handle voltages up to 40v and a throughput current of 1a. This radio doesn’t really need one, however you can plug just about any wall wart into it, and it’ll work. It also has a polarity correcting bridge, so it doesn’t matter which direction the current is running in. This makes it fairly user friendly, so you can just about throw anything at it, and it’ll work. You can also see a 6 pin ISP programing port. I hook this up to my AVR Dragon, and push the code on that way. It’s very useful to be able to program stuff in circuit, it saves your sanity and it also means you don’t have keep swapping the chip in and out of a programmer.

So, there you have it. One of my first published projects. A radio for my wife, who tells me she thinks it’s great, but I really know she says that just because it amuses me. God bless her.

If you fancy looking at the code, or if you would like to use the AR1010 or the AR1000, I think this code might help. I spent many a frustrating night
trying to decipher the engrish documentation, that was missing most of the register maps.

radio.tar

 

4 Responses to Tea Tin Hack Radio

  1. Binoy says:

    Would you please provide circuit diagram for the project.

    • scuzzy says:

      Errr, I would love to, but I didn’t really draw one. I just started adding components to breadboard and worked away until it was done. Do you specifically want one for an interface with the AR1010?

      Daine.

  2. Binoy says:

    Yes, I would like to know how you interfaced AR1010 module with mcu.

    • scuzzy says:

      Hi Binoy,
      The interface is a standard i2c interface. The module, as I understand it can work on SPI or i2c. I chose i2c because that’s what the jumper was set at when I received the module. The source code is on my page, you can download it and see how I communicated with the device over the i2c bus. I’m sorry this is such a late reply, but I’ll try draw a simple schematic for you of how I connected this module to the atmega8. One thing worth noting, is I didn’t use external pullups for the i2c bus, I used the atmega’s internal pullups to raise the bus voltage. Most traditional i2c buses have external pullups, so, it’s just connecting the Data line, and the Clock line up.

      I hope this helps.
      Daine.

Leave a Reply