Wednesday, November 4, 2015

Led signals control with Arduino

With the same LNCVSoundOutputs program for Arduino is possible to directly connect a led to each of the free output pins. Pin 0 and 1 are used for the serial communication with an optional MP3 shield, or to activate the Loconet Monitor mode and debug the Loconet communications. Pins 7 and 8 are used for the Loconet communications. So 16 pins are free to use as outputs.

The current limitations of Arduino UNO are:
  • 20mA for each Pin
  • 200mA in total, sum of all pins

That means we can connect one led to each of the pins with no problems, and have 10 of them illuminated at the same time.

I had the following signal bridge. It has 4 light signals of 3 aspect each one:

I connected each of the led (4 signals x 3 aspects = 12 led) to Arduino UNO. On top of Arduino there is the GCA185 Loconet Shield, and on the top of the shield a self development board where I soldered screw terminals to make the connections easy:

And that's all needed to control your light signals through Loconet: Arduino UNO (3€), Loconet Shield (15€), development shield (2€). Just 20€ and you can manage 16 outputs. If more load is needed in each pin, you can always use a MOSFET board and supply the needed current through an external power source.

In my case, the power to light leds comes directly from the Loconet connector.

I hope you liked it!!


  1. Have you considered; rocrail + arduino + loconet shield + 24-Channel 12-bit PWM LED Driver - SPI Interfaces - TLC5947 + 16-Channel 12-bit PWM/Servo Driver - I2C interfaces?

    This with the SIP/i2c interface, could drive a nearly unlimited number of signals and servos by sending the proper address.

    1. Thanks! I didn't know those boards.... for some case for sure are a perfect solution, despite I normally prefer to have more than one arduino with not a lot of outputs and distribute them over the layout. But I will try to get some and make some tests!!

    2. Because they use the i2c bus there is little or no overhead. If the address and command is sent to the arduino just to be passed through from RocRail this should be a very light load for the arduino.