Make your own FM Radio - Part 1

**DIY Radio Project: A Step-by-Step Guide**

In this project, I will be sharing my experience of building a DIY radio using an Arduino Uno, a rotary encoder, and other components.

I used the MCP 4151 8-bit, 10 kΩ digital potentiometer, which uses the SPI communication interface to set its wiper position. This means that it needs to connect to the predetermined SPI pins of the Arduino in order to work correctly, and we can easily use the SPI library to send out values between zero and 255.

I used a simple for loop to slowly increase the send value, which therefore increases the resistance between one side of the potentiometer and the wiper. By connecting the audio outputs of the FM radio to one side of the potentiometer, ground to the other side, and the wiper to the input of the audio amp, it acts like a voltage divider, which can decrease the peak-to-peak voltage of the audio signal and thus the volume.

Next, I wanted to choose those scent values easily, so I went with a rotary encoder. By connecting 5V power to it and hooking its data and clock line up to my oscilloscope, we can see that by turning the shaft clockwise, the data line falls down to ground for a short period of time before the clock line does. Opposed to this, if I turn the shaft counterclockwise, the clock line gets pulled to ground before the data line.

This behavior can be used in our favor by using the interrupt pins two and three of the Arduino. An interrupt basically monitors the state of the input pin constantly, and once it changes by falling or rising, it executes a function which, in my case, finds out whether we turn the up clockwise or counterclockwise.

This way, we can increase or decrease the volume value, which is shown here through the serial monitor. But as you might have already noticed, sometimes the value jumps up or down many times through one simple turn, which is not right. This occurrence is called bouncing and can easily be fixed the hardware Way by adding a capacitor between the pin and ground.

Lastly, we need an LC display in order to see what the current FM and volume settings are. I hooked it up the usual way but needed to use other pins than the recommended ones from the LiquidDisplay Library. Nevertheless, it worked like a charm after fine-tuning the contrast with a potentiometer at the end of this prototype assembly.

**Prototype Assembly Completion**

After completing the codes by implementing maximum and minimum values, the radio is complete if you want to use it on a breadboard. But since I don't want to do that, I got myself a lithium-ion cell hooked it up to a TP 4056 charging and protection circuit and connected its output to an MT3608 voltage booster.

Make sure to adjust its output voltage to around 5 volts through its potentiometer before powering the breadboard circuit with it. Now that everything works just as planned, I freed my breadboard from the wire and component chaos sorted all the parts for the build and completed my schematic to make the circuit permanent.

**Perf Board Assembly Completion**

I used the perf board with copper dots which I snapped to a size of around 8.2 X 7.6 CM then I attached male headers to my Uno Pro Mini and also soldered 10-pin and five-pin female headers onto the board. These will later be used for the LCD and rotary encoder, which both got wires fixed to the pins while the other side of the wires received M headers with shrinking tube to avoid shorts.

Afterwards, I sorted in the TA 5767 the remaining IC sockets and the Boost converter, and at this point, it was basically an act of connecting all the pins to each other according to the schematic through silvered copper wire or later on through thin flexible wire. Of course, you can find the schematic codes a parts list and better pictures in the video description to easily rebuild this project.

**Uploading Code**

After 4 hours of soldering the perfboard assembly was finally complete, and by hooking it up to 4V power I was capable of uploading the code to the Arduino through FTDI breakout, and surprisingly everything still worked even on the first try.

And with that being said, we also need to build an awesome case in the next part. Check back for Part Two in one week until then don't forget to like share and subscribe that would be awesome stay creative and I will see you next time.

WEBVTTKind: captionsLanguage: enin a previous video I showed you how to build a crude FM receiver circuit in order to replace my old boky radio but needless to say it was more like an experiment than an actual functional radio I would use every day so in this video Let's combine a super hrod dine receiver the TA 5767 with a couple of complimentary parts to build a rather nice looking small radio with decent audio quality the FM frequency and volume can be controlled with the help of a rotary encoder and through the integrated lithium ion cell with charging circuits this radio can Tunes up to 10 hours continuously let's get started for the Prototype of the radio I will use an albino Nano as the brains of the organ ization but later on I will switch to Nino Pro Mini to save a bit of space the first part I then added to the setup was the TA 5767 and such a superh rodine receiver uses a local oscillator mixed with the radio frequency signal to create an intermediate frequency signal which is then filtered Amplified and demodulated it all sounds complicated but the IC is fairly easy to control make sure to watch my ice qu C video if you don't don't know how to do that or how to connect the IC to the Arduino the only thing I changed in the code to simplify programming later on was adding a function that converts the frequency value into the hexadecimal values and sending the rest of the necessary btes as well then I hooked up a long wire as an antenna which will later be replaced by a retractable antenna and since I don't want to and also can't use earbuds directly with the IC I had to use an appropriate 5vt Audio amp I went with this TDA 1905 5w amp which offers a recommended application schematic in its data sheet only downside is that the circuit requires a couple of external passive components which caused a space problem in the layout of my final circuit I also experienced Distortion problems while building up the schematic on my breadboards so in retrospective it would have been way easier and even more power efficient to just use a small pre-made 5vt classd or Audio amp but nevertheless after the amp assembly was complete I had to choose a speaker from my collection of salvaged ones those small 4 ohm speakers were still in good shape and after connecting a capacitor to one of them hooking up to the audio amp and uploading the codes it did its job just fine now in order to control the volume I used the mCP 4151 8bit 10 kohm digital poomer it uses the SPI communication interface to set its wiper position which means two things firstly it needs to connect to the predetermined SPI pins of the alino in order to work correctly and secondly we can easily use the SPI library to send out values between zero and 255 here I'm using a simple for Loop to slowly increase the send value which therefore increases the resistance between one side of the potentiometer and the wiper by connecting the audio outputs of the FMI C to one side of the potentiometer ground to the other sides and the wiper to the input of the audio amp it acts like a voltage divider which can decrease the peak-to peak voltage of the audio signal and thus the volume next I wanted to choose those scent values easily so I went with a rotary encoder by connecting 5V power to it and hooking its data and clock line up to my oscilloscope we can see that by turning the shaft clockwise the data line falls down to ground for a short period of time before the clock line does opposed to this if I turn the shaft counterclockwise the clock line gets pulled to ground before the data line This Behavior can be used in our favor by the interrupt pins two and three of the alino an interrupt basically monitors the state of the input pin constantly and once it changes by Falling or Rising it executes a function which in my case finds out whether we turn the up clockwise or counterclockwise this way way we can increase or decrease the volume value which is shown here through the serial monitor but as you might have already noticed sometimes the value jumps up or down many times through one simple turn which is not right this occurrence is called bouncing and can easily be fixed the hardware Way by adding a capacitor between the pin and ground lastly we need an LC display in order to see what the current FM and volume settings are I hooked it up the usual way but needed to use other pinss than the recommended ones from the liquid display Library nevertheless it worked like a charm after fine tuning the contrast with a potentiometer at the end of this prototype assembly I connected the build-in switch of my rotary encoder to pin D4 with a pull-up resistor and a debounce capacitor to switch between the FM and volume range after completing the codes by implementing maximum and minimum values the radio is complete if you want to use it on a breadboard but since I don't want to do that I got myself a lithium ion cell hooked it up to a TP 4056 charging and protection circuit and connected its output to Mt 3608 voltage booster make sure to adjust its output voltage to around 5 volts through its potentiometer before powering the breadboard circuit with it now that everything works just as planned I freed my breadboard from The Wire and component chaos sorted all the parts for the build and completed my schematic to make the circuit permanent I used the perf board with copper dots which I snapped to a size of around 8.2 X 7.6 CM then I attached male headers to my uino Pro Mini and also solder 10 pin and five pin female headers onto the board these will later be used for the LCD and rotary encoder which both got wires fixed to the pins while the other side of the wires which receive M headers with shrinking tube to avoid shorts afterwards I sorted in the TA 5767 the remaining IC sockets and the Boost converter and at this point it was basically an act of connecting all the pins to each other according to the schematic through silvered copper wire or later on through thin flexible wire of course you can find the schematic codes a parts list and better pictures in the video description to easily rebuild this project after 4 hours of soldering the perfboard assembly was finally complete and by hooking it up to 4vt power I was capable of uploading the code to the Arduino through ftdi breakout and surprisingly everything still worked even on the first try and with that being said we also need to build an awesome case in the next part check back for part two in one week until then don't forget to like share and subscribe that would be awesome stay creative and I will see you next timein a previous video I showed you how to build a crude FM receiver circuit in order to replace my old boky radio but needless to say it was more like an experiment than an actual functional radio I would use every day so in this video Let's combine a super hrod dine receiver the TA 5767 with a couple of complimentary parts to build a rather nice looking small radio with decent audio quality the FM frequency and volume can be controlled with the help of a rotary encoder and through the integrated lithium ion cell with charging circuits this radio can Tunes up to 10 hours continuously let's get started for the Prototype of the radio I will use an albino Nano as the brains of the organ ization but later on I will switch to Nino Pro Mini to save a bit of space the first part I then added to the setup was the TA 5767 and such a superh rodine receiver uses a local oscillator mixed with the radio frequency signal to create an intermediate frequency signal which is then filtered Amplified and demodulated it all sounds complicated but the IC is fairly easy to control make sure to watch my ice qu C video if you don't don't know how to do that or how to connect the IC to the Arduino the only thing I changed in the code to simplify programming later on was adding a function that converts the frequency value into the hexadecimal values and sending the rest of the necessary btes as well then I hooked up a long wire as an antenna which will later be replaced by a retractable antenna and since I don't want to and also can't use earbuds directly with the IC I had to use an appropriate 5vt Audio amp I went with this TDA 1905 5w amp which offers a recommended application schematic in its data sheet only downside is that the circuit requires a couple of external passive components which caused a space problem in the layout of my final circuit I also experienced Distortion problems while building up the schematic on my breadboards so in retrospective it would have been way easier and even more power efficient to just use a small pre-made 5vt classd or Audio amp but nevertheless after the amp assembly was complete I had to choose a speaker from my collection of salvaged ones those small 4 ohm speakers were still in good shape and after connecting a capacitor to one of them hooking up to the audio amp and uploading the codes it did its job just fine now in order to control the volume I used the mCP 4151 8bit 10 kohm digital poomer it uses the SPI communication interface to set its wiper position which means two things firstly it needs to connect to the predetermined SPI pins of the alino in order to work correctly and secondly we can easily use the SPI library to send out values between zero and 255 here I'm using a simple for Loop to slowly increase the send value which therefore increases the resistance between one side of the potentiometer and the wiper by connecting the audio outputs of the FMI C to one side of the potentiometer ground to the other sides and the wiper to the input of the audio amp it acts like a voltage divider which can decrease the peak-to peak voltage of the audio signal and thus the volume next I wanted to choose those scent values easily so I went with a rotary encoder by connecting 5V power to it and hooking its data and clock line up to my oscilloscope we can see that by turning the shaft clockwise the data line falls down to ground for a short period of time before the clock line does opposed to this if I turn the shaft counterclockwise the clock line gets pulled to ground before the data line This Behavior can be used in our favor by the interrupt pins two and three of the alino an interrupt basically monitors the state of the input pin constantly and once it changes by Falling or Rising it executes a function which in my case finds out whether we turn the up clockwise or counterclockwise this way way we can increase or decrease the volume value which is shown here through the serial monitor but as you might have already noticed sometimes the value jumps up or down many times through one simple turn which is not right this occurrence is called bouncing and can easily be fixed the hardware Way by adding a capacitor between the pin and ground lastly we need an LC display in order to see what the current FM and volume settings are I hooked it up the usual way but needed to use other pinss than the recommended ones from the liquid display Library nevertheless it worked like a charm after fine tuning the contrast with a potentiometer at the end of this prototype assembly I connected the build-in switch of my rotary encoder to pin D4 with a pull-up resistor and a debounce capacitor to switch between the FM and volume range after completing the codes by implementing maximum and minimum values the radio is complete if you want to use it on a breadboard but since I don't want to do that I got myself a lithium ion cell hooked it up to a TP 4056 charging and protection circuit and connected its output to Mt 3608 voltage booster make sure to adjust its output voltage to around 5 volts through its potentiometer before powering the breadboard circuit with it now that everything works just as planned I freed my breadboard from The Wire and component chaos sorted all the parts for the build and completed my schematic to make the circuit permanent I used the perf board with copper dots which I snapped to a size of around 8.2 X 7.6 CM then I attached male headers to my uino Pro Mini and also solder 10 pin and five pin female headers onto the board these will later be used for the LCD and rotary encoder which both got wires fixed to the pins while the other side of the wires which receive M headers with shrinking tube to avoid shorts afterwards I sorted in the TA 5767 the remaining IC sockets and the Boost converter and at this point it was basically an act of connecting all the pins to each other according to the schematic through silvered copper wire or later on through thin flexible wire of course you can find the schematic codes a parts list and better pictures in the video description to easily rebuild this project after 4 hours of soldering the perfboard assembly was finally complete and by hooking it up to 4vt power I was capable of uploading the code to the Arduino through ftdi breakout and surprisingly everything still worked even on the first try and with that being said we also need to build an awesome case in the next part check back for part two in one week until then don't forget to like share and subscribe that would be awesome stay creative and I will see you next time