Radio Arduino Simple
Intro: Radio Arduino Simple
Hello,
Ok, before to introduce this project, i want to apologize for my English, my native language is French...
Secondly, this is my first Instructable, and it's the first part of a biggest project (a MP3/SD card/USB/radio/bluetooth/clock/alarmclock/temperature/humidity on TFT touchscreen 3.5")
So, I was searching for a tutorial to create a simple Radio with Arduino... And all what I found was very complex sketches for a very simple result, and I didn't find any tutorials to use it with a TFT and UTFT library.
I decide to create a tutorial for noobs like me which are searching for it.
First , The goods :
- Arduino MEGA2560 compatible (ready for the next steps of the project)
- 2.2" TFT ILI9225 controller
- TEA5767 breakout board
- 1 button
- 1 resistor 10k
- 1 step up module (from battery 3.7v to 5v)
- 1 battery (here i took a battery from an old tablet 3.7v, 6000mAh)
- Speakers (i used old computer speaker with integrated amplifier for the test)
- Wires and breadboard
- Arduino IDE for the sketch
STEP 1: Let's Go for Wiring
Please be cautious, and wire the battery only when everything is finished !
TFT 2.2"
VCC : +5v
GND : GND
SDI : D51
CLK : D52
CS : D22
RST : D30
RS : D24
TEA5767
VCC : +5v
GND : GND
SCL : 21(SCL)
SDA : 20(SDA)
Button
Resistor 10k on ground
Don't forget to link the GND wires from TFT and TEA5767 with Arduino GND
STEP 2: How Does It Work ?
Remember I said a simple radio !
I should say VERY simple !
I'm using only the same 10 stations, then, I'm not interrested in a radio which scans all the frequencies, is very complicated to use,...
Here, in the sketch you write the different frequencies you want, and the button just changes the stations.
I think I can't make more simple :-)
The libraries :
You'll need 4 libraries :
Wire.h (included in IDE)
TEA5767Radio.h (http://playground.arduino.cc/Main/TEA5767Radio)
EEPROM.h (included in IDE)
UTFT.h (http://www.rinkydinkelectronics.com/library.php?id...
Change the frequencies for the different stations, and the names of the stations.
When your sketch is uploaded, connect the battery by VIN, don't forget to check output voltage on the stepup module.
To charge the battery, you can use this : http://fr.aliexpress.com/item/Free-Shipping-5V-1A-...
I hope you will enjoy it !
And I'll make other instructables with the different parts of the projet (waiting for goods)
Regards
Aegnor
16 Comments
imagesperfecttouch 3 years ago
jayfmn 7 years ago
Hi AxelP6! I have tried IDE, here is the error message I am getting.
var/folders/1_/26sdktq539g8p1zdgwwmvkfh0000gn/T/build51d30eb09bbe7cc41ad360acb4b32d52.tmp/libraries/UTFT/DefaultFonts.c.o:(.progmem.data.SevenSegNumFont+0x0): multiple definition of `SevenSegNumFont'
/var/folders/1_/26sdktq539g8p1zdgwwmvkfh0000gn/T/build51d30eb09bbe7cc41ad360acb4b32d52.tmp/sketch/DefaultFonts.c.o:(.progmem.data.SevenSegNumFont+0x0): first defined here
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld: Disabling relaxation: it will not work with multiple definitions
/var/folders/1_/26sdktq539g8p1zdgwwmvkfh0000gn/T/build51d30eb09bbe7cc41ad360acb4b32d52.tmp/libraries/UTFT/DefaultFonts.c.o:(.progmem.data.BigFont+0x0): multiple definition of `BigFont'
/var/folders/1_/26sdktq539g8p1zdgwwmvkfh0000gn/T/build51d30eb09bbe7cc41ad360acb4b32d52.tmp/sketch/DefaultFonts.c.o:(.progmem.data.BigFont+0x0): first defined here
/var/folders/1_/26sdktq539g8p1zdgwwmvkfh0000gn/T/build51d30eb09bbe7cc41ad360acb4b32d52.tmp/libraries/UTFT/DefaultFonts.c.o:(.progmem.data.SmallFont+0x0): multiple definition of `SmallFont'
/var/folders/1_/26sdktq539g8p1zdgwwmvkfh0000gn/T/build51d30eb09bbe7cc41ad360acb4b32d52.tmp/sketch/DefaultFonts.c.o:(.progmem.data.SmallFont+0x0): first defined here
/var/folders/1_/26sdktq539g8p1zdgwwmvkfh0000gn/T/build51d30eb09bbe7cc41ad360acb4b32d52.tmp/sketch/F24LFWBIRTQJ5XR.ino.cpp.o: In function `loop':
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:65: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:65: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:72: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:72: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:75: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:75: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:80: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:80: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:83: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:83: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:88: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:88: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:91: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:91: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:96: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:96: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:99: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:99: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:104: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:104: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:107: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:107: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:112: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:112: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:115: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:115: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:120: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:120: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:123: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:123: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:128: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:128: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:131: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:131: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:136: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:136: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:139: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:139: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:144: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:144: undefined reference to `GroteskBold24x48'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:147: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:147: undefined reference to `nadianne'
/var/folders/1_/26sdktq539g8p1zdgwwmvkfh0000gn/T/build51d30eb09bbe7cc41ad360acb4b32d52.tmp/sketch/F24LFWBIRTQJ5XR.ino.cpp.o: In function `setup':
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:41: undefined reference to `nadianne'
/Users/jayfuller/Downloads/F24LFWBIRTQJ5XR/F24LFWBIRTQJ5XR.ino:41: undefined reference to `nadianne'
collect2: error: ld returned 1 exit status
Using library UTFT in folder: /Users/jayfuller/Documents/Arduino/libraries/UTFT (legacy)
Using library Wire at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire
Using library TEA5767Radio in folder: /Users/jayfuller/Documents/Arduino/libraries/TEA5767Radio (legacy)
Using library EEPROM at version 2.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/EEPROM
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
jayfmn 7 years ago
AxelP6 7 years ago
Hi Jay,
Sorry i was fully at work these last days, send me your email address by PM, i'll send you the files for fonts.
If you make a search in google on "rinkydinky font" you should find the site.
Greetins,
Axel
jayfmn 7 years ago
I found the fonts! The link you gave me now works! It now loads to my Mega2560 just fine!!
AxelP6 7 years ago
Oupsssss sorry "rinkydink" instead of "rinkydinky"
AxelP6 7 years ago
Or you change the the fonts i included with the library 's fonts
And verify if you libraries are up to date
Regards
wim39 7 years ago
wim39 7 years ago
Hi AxelP6,
Nice project, indeed simple. Only one question. What tot do with the button (connect to what)??
Thanks.
AxelP6 7 years ago
You just connect it to a digital pin with 10k resistor, and you change the stations which are loaded on the sketch, you can use the internal pullup, but i always prefer external one ?
Greetings
wim39 7 years ago
AxelP6 7 years ago
Greetings
jayfmn 7 years ago
The code will not load.
I had to use Codebeder.cc to get the info.
I am getting a failure in the code here:
void loop(){
float s = EEPROM.read(EEPROM_Memory);
String Frequ;
Frequ = (s);
(sketch file) Arduino Radio.ino:64:9: error: no viable overloaded '='
Frequ = (s);
~~~~~ ^ ~~~
(arduino core file) hardware/arduino/cores/arduino/WString.h:83:11: note: candidate function not viable: no known conversion from 'float' to 'const String' for 1st argument
String & operator = (const String &rhs);
^
(arduino core file) hardware/arduino/cores/arduino/WString.h:84:11: note: candidate function not viable: no known conversion from 'float' to 'const char *' for 1st argument
String & operator = (const char *cstr);
^
1 error generated.
AxelP6 7 years ago
Could you try with ide instead of codebender ? Or you can try with "Frequ = String(s)"
Let me know if it works
Greetings
AxelP6 7 years ago
With pleasure Seamster ;-)
I'm just waiting for the goods ! when you want some very good prices, you need to be very very patient lol :-D i think in the next 2 weeks all should arrives and the challenge will starts, to use the touch screen for all the functions, and different pages ;-)
seamster 7 years ago
Very nice, can't wait to see the full project this is a part of.
I hope you'll share it here as a full instructable too! :)