TEA5767 FM Radio with IR control and OLED Display

TEA5767 with IR and OLED

The sketch for this project can be found on my GitHub page here.

My last blog used the little FM radio, TEA5767, with a two line LCD and keypad display. I felt that it was a little clumsy and so decided to use an Infra Red controller and display the radio data on an OLED Display. I have gone for a number of preset stations and not to use the scan function. As it stands the sketch has six preset stations and the infra red remote is used to switch between them. There is also a favourite station button, press this and the radio tunes straight to your favourite. Two other buttons on the IR controller allow fine tuning up or down, this increases or decreases the frequency by 0.1 mHz.

The display:

TEA5767 OLED 1.

The radio wil automatically switch from Stereo to Mono if the signal strength drops to a level that affects sound quality. The display shows the audio mode, in this case it has switched to mono. The radio reports the signal strength and this is shown as a figure from 1 to 10. The third row shows the frequency the radio is tuned to, this is the value reported by the radio, for example a value of 102.0 mHz had been sent to the radio, but the radio had tuned to 101.99 mHz. The next row down is the station name and the last row is the tuning scale from 80 mHz to 110 mHz, a cursor shows the frequency.

Connections:

The TEA5767 and the OLED Display are I2C, connect Vcc and Gnd to the Arduino 5volts and Gnd. Connect SDA to Arduino pin A4 and SCL to Arduino pin A5. The infra red receiver has three connections, Vcc, Gnd and signal. Connect the signal, or data out, to Arduino data pin 3 and Vcc and Gnd to Arduino 5 volts and Gnd. Connect a flying lead to Arduino digital pin 3, this will be used to switch the display to the IR decode display. Almost any IR controller can be used and the sketch allows a setup mode to be entered, and this displays the decimal value of the key press. Decide which keys you are going to use for Preset Up, PresetDown, Favourite, fineTuneUp, finetuneDown and Radio On/Off. Put the sketch into setup mode by connecting the flying lead from pin 3 to Gnd, point the controller at the IR receiver and press a key (the onboard LED will light) and its value will be displayed as shown below. Press the key a few times to confirm the value and once you have all the key values needed put them into the sketch.

TEA5767 OLED 2

Adding the station names and frequencies:

Make a list of up to six stations you want to listen to (this can be increased or decreased by changing the values of stationMHZ[n]  and stations[n] where n is the number of preset stations + 1. Station names and frequencies are stored in these arrays, for example:

stationsMHZ[1] = 88.58;
stations[1] = “BBC Radio 2”;
stationsMHZ[2] = 96.10;
stations[2] = “Radio Solent”;

the maximum number of preset stations and the favourite are set as follows:

maxPresets = 6; // number of stations in list, change this as required
favourite = 6; // select your own favourite

The favourite station will play when power is first applied.

TEA5767 libraries:

I found a number of libraries on the internet, but settled on this one by Marcos R. Oliveira and this is the library I have used here. I have included a copy of this library on my GitHub page as shown at the top of this blog.

 

Advertisements

4 thoughts on “TEA5767 FM Radio with IR control and OLED Display”

  1. The OLED display for the radio is showing “101.99 mhz” – this looks very “school project” to me. I would prefer the frequency units to be shown as “MHz” which is the correct way to display MegaHertz. The lower case “m” really means “milli” and Hertz should be shortened to “Hz”.
    If perfection is attainable, why stop short?

    Like

  2. Chris,

    I have just put this together on breadboard, with an Apple remote, which has an ideal number of keys, and it worked first time. No thanks to me, monkey see – monkey do, but rather to your hard work and blogging style. As an aside, I had forgotten how noisy the old FM radios can be. Even with every thing switched off in the lab, except the Arduino, there was still the old electrical noises in the background when the radio was muted. I will make it portable and get out into the country to test it. I am going to try a range of decoupling caps on the power lines to quieten down the processor noise if that turns out to be the issue. This is such fun and takes me back to the days when I did this stuff for a living. Many thanks Chris, my next project is the joystick/logger/sensor thingy. I will build it as described then change the RTC for a DS3231 just to see if I can get it to work.
    Regards Alan

    Like

    1. Working with the Arduino certainly reignited my interest in electronics. The Weather Clock has been running for 18 months non stop now, recording data every hour. It has been one of my favourite projects.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s