Search the Community
Showing results for tags 'arduino announcer'.
-
Hello, I've been some time disconnected from the forum and my layout, but I have started again with some experiments with Arduino, and I would like to share the results with all you. I took a simple Arduino UNO kit (from Sainsmart) to make a simple project to play announces in my station. I also bought an MP3 Shield from Elechouse. That was easily mounted and running, so I was able to play music files with a simple remote. Next step was to connect Arduino to my Loconet bus, and receive commands or identify trains to play sounds. For that I took a lot of information from SPCoast (http://www.scuba.net/wiki/index.php/LocoShield) and MRRWA (Modell railroading with arduino, http://sourceforge.net/projects/mrrwa). For the physical interface with Loconet I'm using a GCA50 board, mounting only the components that convert the Loconet signal to serial. Connecting this to the Arduino and using the MRRWA libraries, it's possible to receive and send any kind of loconet message. With the interface running, finally I have a complete station announcer that can recognize trains and play its announce when they stop in front of the station. It can be configured also assigning a sound to a function key of a locomotive (customized for each locomotive) or any number of output (like a switch). I keep also in the same program the remote IR functionality. Basically, the way to recognize trains without having any kind of "identification system", is as follows: When an output is activated from your throttle, a message is sent through the bus to all modules saying "Output number X activate". This is received by all devices listening the bus, but of course just the module in charge of output X executes the command. The same happens when a signaling module detects consumption in a segment, it sends a message saying "My section number X has been activated". The software controlling the layout also receives it, and it can react stopping a locomotive or changing a light. And finally, in the bus you also receive all instructions sent to the trains, like changes of speed, activation or deactivation of functions, ... So, when Arduino receives a message informing the activation of one of the configured sections, pays attention to the first locomotive setting it's speed to zero. In this last message the number of locomotive is informed, so it assumes that locomotive is the one that has stopped in this section and therefore plays it's configured announcement or sound. I created also an "easy setup" procedure using the serial console of the Arduino IDE. It's not necessary to modify the program to set up all the detecting sections, locomotives and sounds. Source code will be ready soon, I just have to clean it a little bit.... For more information, I've been posting all the advances in my blog (http://www.clubncaldes.com). If someone has more ideas, feel free to participate!! Now a lot of ideas are coming to my mind... reading and controlling all messages of the network... being able to connect all kind of sensors and drive motors, lights, ..... I think this is really the best loconect modules you can do just with a cheap Arduino!!!!! Cheers, Dani