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:
- Download and install Arduino IDE software from here
- Take my source code from http://sourceforge.net/projects/hanasueki/files/. It's the .ino file. Store it in your PC, and open it from Arduino IDE
How to upload a program to Arduino board:
- Connect Arduino board with the USB wire to the PC
- Open the Arduino IDE and from there, open the source code downloaded from sourceforge (hanasuLNet_ino.ino)
- In Arduino IDE, select the serial port that has been installed (usually is the last one) in Tools -> Serial port
- Also select your arduino board (UNO) in Tools -> Board
- 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.
- Now click the download button (round button with an arrow) in the IDE and wait the progress bar
- It's done!!!! If you have any problem, review Arduino help: http://arduino.cc/en/Guide/Windows
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: http://arduino-info.wikispaces.com/IR-RemoteControl
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!!!
Post a Comment