Wednesday, January 15, 2014

Station Announcer final project

Finally I have a stable version of the station announcer running in Arduino and suitable for both analog (through a remote controller) and digital systems (with Loconet bus). I'll try to explain everything in an easy way, but be careful, I won't be responsible for any damage or any mistake in explanations!!!

First of all, the list of materials:

  • Arduino UNO R3: About 15$ or less in ebay
  • Elechouse MP3 shield with built in amplifier: 21.5$
  • Remote controller and IR receiver: 6$
  • pc speaker from an old PC (or new, did you ever used it???): 0$
  • To make the Loconet interface, components are 5$ more or less, and you can mount it in a protoboard shield or use directly a GCA50 board from Giling Computer Aplications (5€). I'm working designing my own Loconet interface shield, but meanwhile Giling GCA50 does the job perfectly. Giling Boards

And now the pre-requisites:

How to upload a program to Arduino board:
  1. Connect Arduino board with the USB wire to the PC
  2. Open the Arduino IDE and from there, open the source code downloaded from sourceforge (hanasuLNet_ino.ino)
  3. In Arduino IDE, select the serial port that has been installed (usually is the last one) in Tools -> Serial port
  4. Also select your arduino board (UNO) in Tools -> Board
  5. If you have the MP3 shield plugged: as the MP3 shield uses the same serial port as the PC connection, you have to put MP3 shield in sleep mode or the PC link will not work. There is a push button in MP3 shield named "Sleep", just push it 3 seconds.
  6. Now click the download button (round button with an arrow) in the IDE and wait the progress bar
  7. It's done!!!! If you have any problem, review Arduino help:

IR Receiver connection:
The IR receiver has three legs. One goes to the +5V pin, other to the GND pin, and the third one to the I/O number 11. Here you have a very good tutorial about IR:

Now plug an USB or SD card to the MP3 shield and it's ready to work. Following the MP3 Shield instructions, you will see it's possible to copy files in the internal memory, so there's no real need of having a memory stick or SD card always connected.

The remote controller has various functions:
  • MODE key selects the sound source (internal memory, memory stick or SD card)
  • Volume controls
  • Power button stores the current volume and mode values in the non volatile memory (it's like a "save config" button)
  • With the number keys you can select a file number (in the order they were copied to the memory) and pressing the play button it will play the file.
  • It's also possible to use the NEXT and PREVIOUS buttons to play directly the next or previous MP3 file

Here there is a video of the station announcer in action:

I'll continue in a new post for the Loconet part. Enjoy it!!!