All Projects → wagiminator → ATtiny85-TinyFMRadio

wagiminator / ATtiny85-TinyFMRadio

Licence: other
FM Radio with RDS

Programming Languages

C++
36643 projects - #6 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to ATtiny85-TinyFMRadio

ATtiny85-TinyDFPlayer
MP3-Player
Stars: ✭ 22 (-56.86%)
Mutual labels:  avr, attiny, pcb, project, diy, oled, attiny85
ATtiny85-TinyLoad
Electronic Dummy Load
Stars: ✭ 32 (-37.25%)
Mutual labels:  avr, attiny, pcb, project, diy, oled, attiny85
ATtiny85-USB-C-Tester
Simple USB-C Power Delivery Tester
Stars: ✭ 20 (-60.78%)
Mutual labels:  avr, attiny, pcb, project, diy, oled, attiny85
ATtiny85-TinyCharger
Single-Cell Li-Ion Battery Charger with Monitoring
Stars: ✭ 20 (-60.78%)
Mutual labels:  avr, attiny, pcb, diy, oled, attiny85
ATtiny13-TinyRemoteXL
12-Button IR Remote Control
Stars: ✭ 33 (-35.29%)
Mutual labels:  avr, attiny, pcb, project, diy
ATtiny13-TinySolder
T12 Quick Heating Soldering Station
Stars: ✭ 45 (-11.76%)
Mutual labels:  avr, attiny, pcb, project, diy
ATtiny13-TinyTacho
Simple RPM-Meter
Stars: ✭ 36 (-29.41%)
Mutual labels:  avr, pcb, project, diy, oled
ATtiny13-TinyUPS
Uninterruptible Power Supply
Stars: ✭ 92 (+80.39%)
Mutual labels:  avr, attiny, pcb, project, diy
ATtiny84-TinyCalibrator
OSC Calibrator and High-Voltage Fuse Resetter for 8-Pin ATtinys
Stars: ✭ 39 (-23.53%)
Mutual labels:  avr, attiny, oled, attiny85
Atmega Soldering Station
T12 Quick Heating Soldering Station
Stars: ✭ 183 (+258.82%)
Mutual labels:  avr, pcb, project, diy
DigiOS
Mini OS emulator for Digispark (an Attiny85 based microcontroller).
Stars: ✭ 46 (-9.8%)
Mutual labels:  avr, attiny, attiny85
Xling
Xling, a pocket demon
Stars: ✭ 30 (-41.18%)
Mutual labels:  avr, oled
ustd
Micro-standard-library providing minimal and portable array, queue and map for attiny avr, arduinos, esp8266/32 and linux, mac
Stars: ✭ 14 (-72.55%)
Mutual labels:  avr, attiny
STM32-RFM95-PCB
STM32 and AVR128 Printed Circuit Board for creating IOT nodes with the RFM95 LORA chip
Stars: ✭ 14 (-72.55%)
Mutual labels:  avr, diy
Rumba Plus
A premium-quality 3D printer control board by Aus3D.
Stars: ✭ 34 (-33.33%)
Mutual labels:  avr, pcb
Arduino Deep Sleep
An example of proper and most advanced way to put ANY AVR Arduino boards in to sleep
Stars: ✭ 31 (-39.22%)
Mutual labels:  avr, attiny85
Reactorforge
High power induction heating platform
Stars: ✭ 90 (+76.47%)
Mutual labels:  avr, diy
Reflowduino
Arduino-compatible wireless reflow oven controller ecosystem of open-source hardware
Stars: ✭ 154 (+201.96%)
Mutual labels:  pcb, diy
AVR-Programmer
Collection of AVR Programmers and Accessories
Stars: ✭ 25 (-50.98%)
Mutual labels:  avr, attiny
samoklava
Generated keyboard
Stars: ✭ 241 (+372.55%)
Mutual labels:  pcb, diy

TinyFMRadio - FM Radio with RDS based on ATtiny45/85

TinyFMRadio is an ATtiny45/85 controlled FM radio with RDS (RDA5807) with an integrated audio amplifier (XPT8871 or TC8871), an OLED display (SSD1306) and a rotary encoder. You can directly connect a protected li-ion battery, a 3W / 4Ω speaker and an FM antenna.

pic1.jpg

Hardware

The low-cost RDA5807MP is a single-chip broadcast FM stereo radio tuner with fully integrated synthesizer, IF selectivity, RDS/RBDS and MPX decoder. The tuner uses the CMOS process, support multi-interface and require the least external component. All these make it very suitable for portable devices.

pic2.jpg

Software

The firmware is just a demo sketch that implements basic functionality. By pressing the rotary encoder button the RDA5807 seeks the next radio station. Turning the rotary encoder increases/decreases the volume. Selected frequency and volume are stored in the EEPROM. Station name, frequency, signal strength, volume and battery state of charge are shown on an OLED display.

I²C Implementation

The I²C protocol implementation is based on a crude bitbanging method. It was specifically designed for the limited resources of ATtiny10 and ATtiny13, but should work with some other AVRs as well. Due to the low clock frequency of the CPU, it does not require any delays for correct timing. In order to save resources, only the basic functionalities which are needed for this application are implemented. For a detailed information on the working principle of the I²C implementation visit TinyOLEDdemo.

Controlling the RDA5807

The FM tuner IC RDA5807MP is controlled via I²C by the ATtiny. It has six writable 16-bit registers (addresses 0x02 - 0x07) and six readable 16-bit registers (addresses 0x0A - 0x0F). The RDA5807 has two methods of write access, a sequential one in which the registers are always written starting from address 0x02 and an indexed method in which the register address is transferred first and then the content. Both methods are determined by different I²C addresses. To transfer the 16-bit register content, the high byte is sent first. The RDA5807 is controlled by setting or clearing certain bits in the respective registers. The details of the meanings of the individual registers can be found in the data sheet. The current register contents are saved in the RDA_regs arrays. The RDA implementation is based on the work of Maarten Janssen.

Rotary Encoder Implementation

The implementation for the rotary encoder uses pin change interrupts on only one of the pins and is written in such a way that bouncing is automatically suppressed.

Compiling and Uploading the Software

If using the Arduino IDE

  • Make sure you have installed ATtinyCore.
  • Go to Tools -> Board -> ATtinyCore and select ATtiny25/45/85 (No bootloader).
  • Go to Tools and choose the following board options:
    • Chip: ATtiny45 or ATtiny85
    • Clock: 1 MHz (internal)
    • B.O.D.: disabled
    • Leave the rest at the default settings
  • Connect your programmer to your PC and to the ICSP header of the device.
  • Go to Tools -> Programmer and select your ISP programmer (e.g. USBasp).
  • Go to Tools -> Burn Bootloader to burn the fuses.
  • Open TinyFMRadio sketch and click Upload.

If using the precompiled hex-file

  • Make sure you have installed avrdude.
  • Connect your programmer to your PC and to the ICSP header of the device.
  • Open a terminal.
  • Navigate to the folder with the hex-file.
  • Execute the following command (if necessary replace "t85" with your chip and "usbasp" with the programmer you use):
    avrdude -c usbasp -p t85 -U lfuse:w:0x62:m -U hfuse:w:0xd7:m -U efuse:w:0xff:m -U flash:w:tinyfmradio.hex
    

If using the makefile (Linux/Mac)

  • Make sure you have installed avr-gcc toolchain and avrdude.
  • Connect your programmer to your PC and to the ICSP header of the device.
  • Open a terminal.
  • Navigate to the folder with the makefile and the Arduino sketch.
  • Run DEVICE=attiny85 PROGRMR=usbasp make install to compile, burn the fuses and upload the firmware (change DEVICE and PROGRMR accordingly).

References, Links and Notes

  1. ATtiny25/45/85 Datasheet
  2. RDA5807MP Datasheet
  3. SSD1306 Datasheet
  4. TC8871 Datasheet
  5. ATtiny13 TinyPocketRadio

pic3.jpg

License

license.png

This work is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License. (http://creativecommons.org/licenses/by-sa/3.0/)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].