Tuesday, June 10, 2014

Loconet interface for Arduino

After my last tests connecting an Arduino UNO to the loconet network, I did a better interface board using a new GCA50 board.

Just as a brief introduction:

GCA50 is an intelligent Loconet module from Peter Giling Applications. It can work both as an "outputs" or "inputs" module. Let's say it's the "brain" of a Loconet module, and connecting other boards it can drive motors, light signals, manage wheel counters or detect the presence of trains. This board contains a Microchip processor (16F874) receiving and/or sending the orders to and from Loconet. It's very easy to set up and really versatile.

But I want to create my own modules for Loconet, and be able to program them to add more intelligence and expand the possibilities to play sounds, or directly drive other Loconet modules without the need of a computer. And Arduino is a perfect platform really easy to program, and with a huge selection of compatible sensors and boards ready to "plug and program". The only missing "shield" is a Loconet board, and finally that's what I use a GCA50 board for.

I just mounted the few components in charge of converting the Loconet signal for the processor (the original Micropic), but then I connect the converted signal to the Arduino, and thanks to the MRRWA libraries for Arduino more than half of the work is done. The original board also has a current regulator taking the 12V from the Loconet and converting it to 5 volts to power the Microchip processor. But Arduino accepts a power supply of 12 volts, so all this components will neither be mounted.

Finally just the Loconet connectors, a comparator, a transistor and a few resistors are needed. I bridged the processor signals to have them available in a screw terminal block with the 12V power supply:

That's the GCA50 board turned in a simple Loconet interface and connected to an Arduino UNO with an MP3 Shield. It's able to play sounds when an output is activated or when a function key of a locomotive is pressed (each locomotive can have it's personalized sounds assigned to each function key). Also is able to "see" the locomotive that stopped in front of the station and play the correct announcement.

 Now the final step would be to develop this exact interface in an "Arduino shield" type board, and plug it to the arduino like normal shield boards.

1 comment: