Skip to the content
2 layers320 × 81.3 mmDisplay and controls board, the printed circuit board in 3D

Display and controls board

411568/Atmega8_FM_radio3

Simple FM radio based on Atmega8 and TEA5767 module

Size
320 × 81.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
103
Nets
103
Pads
266
Tracks, vias
0, 0
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
18 Jan 2023
Updated
30 Jan 2025

Overview

Display and controls board is an open-source printed circuit board by 411568, from the 411568/Atmega8_FM_radio repository on GitHub, published under the MIT licence. It is a 2-layer board of 320 × 81.3 mm with 103 parts on 103 nets.

It is built around the TLC5916IN, LTV-847 and BC547. Its parts include 80 diodes, 6 switches, 4 resistors, 3 transistors and 2 ICs. It belongs with the lEDs and displays boards of this library.

Main components

3

README

README.md

Atmega8_FM_radio

🧐 Features

This project is a revision of one of my old designs, created a long long time ago when atmel atmega chips where still dirty cheap.

It contains two seperate boards:

  • main_radio_board - this one contains an Atmega8 microcontroller, TEA5767 FM radio module, PAM8302 amplifier module and power connector.
  • display_and_controls_board - this one is specificly designed to fit in an old Unitra radio case, it has LEDs used as radio frequency indicators, rotary encoder for changing the frequency, potentiometer for volume and some additional buttons.

📱 Electronics design

My FM radio is based on the TEA7567 module, that is connected to an Atmega8A-PU microconotroller via I2C. Then it's output goes to the connector, then on the main panel passes through a logarithmic potentiometer for volume control and comes back to the PAM8302 D-class amplifier module. I chose it because it works well with my speaker, which is the one used in the original Unitra radio (it is probably over 40 years old and still works very well).

The schematic and PCB were both designed using KiCAD 6.0

schematic kicad

PCB kicad

3d view

💈 Connector pinouts

pcb view with pinout

In the image above you can see the 9V DC input jack location, the speaker output connector and two pin headers (IDC connectors).

J4 connector pinout (all of these are generic GPIO pins of the Atmega8):

  • 1 - switch 3
  • 2 - switch 1
  • 3 - NC
  • 4 - LE(ED1)
  • 5 - SDI
  • 6 - switch 4
  • 7 - switch 2
  • 8 - switch 0
  • 9 - OE(ED2)
  • 10 - CLK

J3 connector pinout:

  • 1 - TEA5767 output (to potentiometer)
  • 2 - transistor 0
  • 3 - transistor 2
  • 4 - encoder B
  • 5 - 5V DC
  • 6 - 9V DC
  • 7 - PAM8302 input (from potentiometer)
  • 8 - GND
  • 9 - transistor 1
  • 10 - encoder A

📧 Atmega code

The code is split into several files, you can find them all on my github.

  • encoder.c - containing functions for interfacing with the rotary encoder
  • i2c_lib.c - bit banging i2c library
  • led_screen.c - functions for interfacing with led driver
  • tea5767.c - functions for the TEA5767 FM radio module
  • main.c - main program

Main function for the tea5767 is the send_freq function that tells the module to set a certain frequency:

c
void send_freq()
{
	unsigned char frequencyH;
	unsigned char frequencyL;
	unsigned int frequencyB;

	frequencyB = 4 * (frequency * 1000000 + 225000) / 32768;
	frequencyH = frequencyB >> 8;
	frequencyL = frequencyB & 0xFF;

    //data transmition 
    I2C_Start();
	I2C_Write(TEA5767_ADDRESS_W);
	I2C_Write(frequencyH);
	I2C_Write(frequencyL);
	I2C_Write(0xB0);
	I2C_Write(0x10);
	I2C_Write(0x00);
    I2C_Stop();

    _delay_ms(10);
}

and the search function:

c
void search(uint8_t direction)
{
	unsigned char frequencyH;
	unsigned char frequencyL;
	unsigned int frequencyB;
    double temp = 88.0;

    if(direction == 1)
    {
        temp = frequency + 0.1; 
    }
    else
    {
        temp = frequency - 0.1; 
    }

	frequencyB = 4 * (temp * 1000000 + 225000) / 32768;
	frequencyH = frequencyB >> 8;
	frequencyL = frequencyB & 0xFF;

    I2C_Start();
	I2C_Write(TEA5767_ADDRESS_W); //send address for writing
	I2C_Write(frequencyH |= 0b01000000); //search mode
	I2C_Write(frequencyL);

You can find what the specific bytes being sent to the module mean in its datasheet.

In the main program loop we check the encoder status:

c
if(val != val_tmp)
{
    if( (val == 3 && val_tmp == 1) || (val == 0 && val_tmp == 2) )
    {
        if(frequency < 108.0)
        {
            frequency += 1.0;
            send_freq(); 
            display(frequency); //display the current frequency
            search(1); //search up from the set freq
        }
    }
    else if( (val == 2 && val_tmp == 0) || (val == 1 && val_tmp == 3) )
    {
        if(frequency > 88.0)
        {
            frequency -= 1.0;
            send_freq();
            display(frequency); //display the current frequency
            search(0); //search down from the set freq
        }
    }
}

and change the frequency by 1Hz, then search up from that frequency to fine tune the radio automatically.

In addition to that there are also button inputs:

c
if(bit_is_clear(button_1_port, button_1_pin)) 
{
    _delay_ms(15); //debounce
    if(bit_is_clear(button_1_port, button_1_pin))
    {
        search(1);
        _delay_ms(500);
        read_freq();
        display(frequency); //display the current frequency
    }
}

after pressing the button, the module starts an up search from the current frequency. Same aplies to the search down. You can also change the frequency to one from the predefined tabel by pressing button number 4 or 5.

💻 Parts list

As it was just a revision of an older schematic, I did not bother to try and redesign it with newer uC etc. I just used the parts from the previous version (soldered onto a prototype board) or those I had lying around. Because of that the design may look a bit peculiar and I decided not to make a BOM file for it. Let me just list them in here for you:

  • Atmega8A-PU microcontroller
  • TEA5767 module
  • PAM8302 amplifier module
  • 2x IDC connector for the front panel
  • LM317 for power step-down
  • 9V DC jack input
  • 3x ceramic 100nF capacitor
  • 10uF and 4.7uF electrolytic capacitors
  • 3x 10k resistor

📺 Front panel board

This board is used as my front panel for controls and displaying the current frequency etc.

schematic kicad

3d view

3d view

💻 Parts list

  • LTV847 optocoupler
  • TLC5916IN LED driver
  • 3x 1kOhm resistor
  • 1.5kOhm resistor
  • 5x tact switch
  • logarithmic potentiometer for audio control
  • rotary encoder
  • 2x IDC connector
  • a lot of LEDs (red)

🛡️ License:

This project is licensed under the MIT License.

🙋‍♂️Authors

  • Krzysztof Sikora

💖Like my work?

If you have any questions about the project feel free to contact us via email: krzysieksikora717@gmail.com

Parts

103
QtyValueFootprintReferences
80LEDLED_THT:LED_D5.0mmD1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D23 +64
5SW_MEC_5GButton_Switch_THT:SW_PUSH-12mmSW1, SW2, SW3, SW4, SW5
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
31kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2, R3, R4
3BC547Package_TO_SOT_THT:TO-92_InlineQ1, Q2, Q3
2Conn_02x05_Counter_ClockwiseConnector_IDC:IDC-Header_2x05_P2.54mm_VerticalJ1, J2
11.5kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
1LTV-847Package_DIP:DIP-16_W7.62mmU2
1R_PotentiometerRotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmRV1
1RotaryEncoderPotentiometer_THT:Potentiometer_Alps_RK09K_Single_VerticalSW6
1TLC5916INPackage_DIP:DIP-16_W7.62mmU1

The 102 most common of 103 parts.

More from 411568/Atmega8_FM_radio

1
  • 2 layers77.5 × 52.1 mmFM radio atmega 8, the printed circuit board in 3D

    FM radio atmega 8

    411568/Atmega8_FM_radio

    Simple FM radio based on Atmega8 and TEA5767 module

    19 parts3MIT

Similar boards

  • 2 layers62 × 92 mmLedhexdisp, the printed circuit board in 3D

    Ledhexdisp

    anachrocomputer/LedHex

    Programs and CAD files for the LED hex display PCB.

    39 partsGPL-3.0
  • 4 layers100 × 100 mmPdb, the printed circuit board in 3D

    Pdb

    javierveras/projectav-telemetry-pdb-2026

    Our power distribution and telemetry system's hardware, firmware, and technical documentation.

    104 parts
  • 2 layers150 × 100 mmPcb big clock, the printed circuit board in 3D

    Pcb big clock

    kuon/pcb-big-clock

    Big clock PCB

    47 parts
  • 2 layers160 × 149 mmButton vu, the printed circuit board in 3D

    Button vu

    maxsterl666/MLSMK1

    Moonlit Surface MK1

    76 parts
  • 2 layers133.3 × 39 mmNumitron clock, the printed circuit board in 3D

    Numitron clock

    mtlevine0/numitron-clock

    IV-9 & ESP32 based clock firmware and EDA

    64 parts
  • 2 layers81.3 × 48.3 mmSw63 mk4 displaytestboard, the printed circuit board in 3D

    Sw63 mk4 displaytestboard

    xx0x/sw63

    Sci-fi inspired electronic watch. MK4 currently in the development (out in 2026).

    51 parts2MIT
  • 2 layers123.8 × 45.2 mmLed board, the printed circuit board in 3D

    Led board

    chrisgian05/Digital_LED_clock

    A 6-digit 7-segment clock (HH:MM:SS) built around an ATmega328P, an external RTC, and a constant-current LED driver — split across two custom PCBs I designed in KiCad.

    11 parts
  • 2 layers88.9 × 92.5 mmAntenna board, the printed circuit board in 3D

    Antenna board

    Olin-Rocketry/sensing

    Sensing hardware and software

    31 parts

Questions

How big is the Display and controls board PCB?

It measures 320 × 81.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Display and controls board use?

103 parts, built around the TLC5916IN, LTV-847 and BC547. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Display and controls board KiCad files?

From the 411568/Atmega8_FM_radio repository on GitHub, at the commit this page was made from: the board is display_and_controls_board/backup.kicad_pcb and its schematic display_and_controls_board/fm_radio_panel.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Display and controls board design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).