---

Showing posts with label fm radio. Show all posts
Showing posts with label fm radio. Show all posts

Friday, April 11, 2025

Accessible FM Radio Case Study - Part 1

In this series of blog posts, I am going to document my journey (which I am about to start) in designing a FM Radio receiver for which I have the very specific requirement of being usable by my brother, who suffered a stroke a few years ago. This has left him with cognitive impairment and use of just his left arm.

This blog will effectively form my notes, and follow my usual design process which is:
  1. Investigate technologies
  2. Create 'spike' examples to de-risk various aspects of the design
  3. Breadboard or strip-board prototype
  4. Testing
  5. Prototype PCB creation
  6. Enclosure and user testing
As I hope this will end up in a design that will help others, I am going to release all the CAD and firmware files under an open license. 


User interface

  • Volume control - rotary, a pot, therefore with absolute positioning and no turning down to silent.
  • On/Off switch - probably a stylish toggle switch, but low physical resistance and ok for one handed operation without having to hold the radio.
  • Three preset buttons. Real switches with an indicator to see which is selected. Obvious icons (probably on paper) to select the channel. Talk (BBC Radio 4), Classical (BBC Radio 3), Pop (BBC Radio 2).
  • A separate interface (behind a panel - or using a BLE phone app) to configure stations

Other requirements

  • Large capacity LiPo battery power
  • USB charge and pass through
  • Decent power amplifier and speaker
  • FM broadcast receiver (*)
  • Bluetooth audio for wireless headphones
  • No eye-pokey antenna
  • Stable enclosure (one-hand friendly)
* Why FM rather than DAB or Internet Radio. Well DAB is power hungry and offers no real advantage (except perhaps future-proofing) over FM. 

As for internet radio? Well, this was my first thought as it solves the antenna problem. However, when I have looked at this before, it's quite difficult to get stable URIs for station streams, especially for BBC stations, which is likely all my brother will listen to.

Looking at what was commercially available, I found this


Which is actually pretty close to what I was planning. And if all else fails, I could easily see myself getting one for my brother. However, although you can't see it here, it has an eye-poker antenna and is powered by D-cells. Neither of which I am keen on.


Technologies

At the moment, my initial list of technologies to experiment with includes:
  • A PCB antenna (as used in 'shark-fin' car antenna) -- this is the big risk, and subject of my next blog post.
  • The  RDA5807M radio receiver IC (I might also try TEA5767 to see which is more sensitive)
  • An ATTiny1614 microcontroller 
  • A power amp probably D-class. Ideally 10W or more
I've ordered some RDA5807M modules from Aliexpress and started designing a PCB FM broadcast antenna using the research paper I found. I will need both the radio module and the PCB antenna for my first experiments.

Tuesday, April 10, 2012

Steampunk FM Radio - Part 2

In my last post I looked at the finished project.

Update: Monkmakes.com now selling a breakout board for the TEA5767 that simplify things a bit: http://www.monkmakes.com/#!/~/product/category=0&id=36087884


I don't think I would recommend building it the way I describe here. There are a few unsatisfactory things about it. Mainly its difficult to tune - the pot tends to drift a little. Perhaps a vernier dial, or better a rotary encoder. It could also do with a pre-amplifier - the output from the TEA5767 just isn't that high. As a receiver, its also not that sensitive and needs a better antenna than the 2ft of solid core wire dangling out the back that I gave it. Although to be fair I live on the wrong side of a hill for good FM reception,

Anyway, because I don't like to see projects without any details given of how they work, here it is, help your selves and may it inspire you to do it better.

It uses the amp and speaker from a scavenged PC USB powered speaker (right hand side) the TEA5767 module and breakout, described in an earlier post, and a small ATTiny45 board, that has ICSP connector and a 7805 voltage regulator - from another project.

Tuning is accomplished by turning the pot read by an ADC on the ATTiny. This then maps to a frequency that is sent to the TEA5767 by I2C.

The ATTiny is programmed using the Arduino IDE as described here http://hlt.media.mit.edu/?p=1229

It uses the TinyWireM library to the I2C communications. Note you will need to change the header TinyWireM.h to 8MHz instead of 1. See the instructions on the link above.

Here is the script:


#include <TinyWireM.h>

const int potPin = 3;

unsigned char frequencyH = 0;
unsigned char frequencyL = 0;

unsigned int frequencyB;
double frequency;

void setup()
{
  TinyWireM.begin();
  frequency = 97.4; //starting frequency
  setFrequency();
}

void loop()
{
  int reading = analogRead(potPin);
  frequency = map((float)reading, 0.0, 1024.0, 87.5, 108.0);
  frequency = ((double)reading * (108.0 - 87.5)) / 1024.0 + 87.5;
  frequency = ((int)(frequency * 10)) / 10.0;
  setFrequency();
}

void setFrequency()
{
  frequencyB = 4 * (frequency * 1000000 + 225000) / 32768; 
  frequencyH = frequencyB >> 8;
  frequencyL = frequencyB & 0XFF;
  delay(100);
  TinyWireM.beginTransmission(0x60);   //writing TEA5767
  TinyWireM.send(frequencyH);
  TinyWireM.send(frequencyL);
  TinyWireM.send(0xB0);
  TinyWireM.send(0x10);
  TinyWireM.send((byte)0x00);
  TinyWireM.endTransmission();
  delay(100);  
}



About the Author
These are my books. Click on the image below to find out more about them.




Sunday, April 8, 2012

Steampunk FM Radio - Part 1

I have been working on a Steampunk FM Radio receiver for a while now. It works and looks pretty good, but there are a few things I would like to improve.



This first post just concentrates on the enclosure. In the next post I will explain the electronics which involve an ATTiny and the subject of my last blog. http://srmonk.blogspot.co.uk/2012/03/tea5767-fm-radio-breakout-board-for.html


Sorry the video is not very good quality. Key features are the illuminated knob, which is made from a copper plumbing fitting that has a hole in the top and is filled with hot-glue-gun glue. There is an LED underneath the knob that lights it up with the glue acting as a diffuser.

The sound does come out of the trumpet like copper thing. This came from an old copper jug that I cut with a rotary tool. This is glued into a hole in the lid, with the speaker mounted directly underneath it.

The box came from eBay and the coil of wire was made by wrapping very small bore copper pipe around a rolling pin.

I consider this a first prototype. Its actually very over engineered internally, and I would like to simplify it, probably by disassembling an off-the-shelf radio.

About the Author
These are my books. Click on the image below to find out more about them.





Friday, March 23, 2012

TEA5767 FM Radio Breakout Board for Arduino

Update: Monkmakes.com now selling a breakout board for this: http://www.monkmakes.com/#!/~/product/category=0&id=36087884



I recently failed to resist buying two TEA5767 FM Radio modules from eBay for almost nothing. These little modules use the I2C serial protocol and so are ideal for connecting to an Arduino.

These things are tiny. This image is much larger than the real thing. In fact, the connectors on the side are at a smaller pitch than the 0.1 inch found on the Arduino connectors.

So, the first just was to make a little breakout connector using a bit of stripboard.





First cut the tracks on the back like this:

Then solder short lengths of solid core wire in place, either side of the breaks in the strips. 
 Bend the cut ends inwards so that they will meet the connectors on the module. Trim the ends of so they just reach the module. I actually cut mine a bit short (see below) which made thins more difficult.
Before trying to solder the leads to the module, fit a crocodile clip over the leads to act as a heat sink, otherwise the leads are likely to become detached from the strips beneath.
When all the pins are soldered, solder in a link wire between pins 3 and 6. This is also the ground connection.
I also attached 0.1inch header sockets for ease of experimentation.
Here is the pinout for the finished module. On the left we have the IC2 connections SDA and SCL that will go to pins A5 and A4 respectively on the Arduino Uno.

The right hand side has a connection ANT (antenna) left and right audio and ground.
Connect all the left hand connections to the Arduino as described above.

If you want to be able to control the tuning of your radio (you don't have to, you can just set the frequency in the sketch) then optionally use a solderless breadboard to hold a pot (I used 10K linear).

The pot should be connected with the center slider to Arduino pin A0 and one end to GND and the other to +5V. Turning this pot will change the frequency.

Note that I actually used a Freetronics USB Droid board, as that was what I had to hand, rather than an Uno, but an Uno will work fine.

On the right-hand side of the breakout board (top in the picture above) I attached a 3.5mm socket to one channel and GND and poked a length of wire into the ANT socket to act as an antenna.

The sketch is very simple, all the real action is in the function setFrequency(). 

In the 'loop' the analog reading from the pot is converted into the frequency range and then rounded to 1 decimal place, to make it easier to tune.

The output from the module requires amplification. An iPod dock with aux-in will work fine and I was surprised at the quality of the sound, given the price.

For a similar but more advanced project have a look at: http://www.electronicsblog.net/arduino-fm-receiver-with-tea5767/ I found this very useful when making this project.

#include <Wire.h>

unsigned char frequencyH = 0;
unsigned char frequencyL = 0;

unsigned int frequencyB;
double frequency = 0;

void setup()
{
  Wire.begin();
  frequency = 93.0; //starting frequency
  setFrequency();
  Serial.begin(9600);
}

void loop()
{
  int reading = analogRead(0);
  //frequency = map((float)reading, 0.0, 1024.0, 87.5, 108.0);
  
  frequency = ((double)reading * (108.0 - 87.5)) / 1024.0 + 87.5;
  frequency = ((int)(frequency * 10)) / 10.0;
  
  setFrequency();
  Serial.println(frequency);
}

void setFrequency()
{
  frequencyB = 4 * (frequency * 1000000 + 225000) / 32768;
  frequencyH = frequencyB >> 8;
  frequencyL = frequencyB & 0XFF;
  delay(100);
  Wire.beginTransmission(0x60);
  Wire.write(frequencyH);
  Wire.write(frequencyL);
  Wire.write(0xB0);
  Wire.write(0x10);
  Wire.write((byte)0x00);
  Wire.endTransmission();
  delay(100);  
}



About the Author
These are my books. Click on the image below to find out more about them.