Model Railway Forum banner
101 - 104 of 104 Posts

·
RudyB
Joined
·
219 Posts
Discussion Starter · #101 ·
Arduino DCC RGB LED Strip control with 6 PWM outputs.

The RGB LED strip that is mounted above my layout (see this post) can be controlled via the remote. I thought it would also be nice when it can be controlled via the Traincontroller PC user interface, or via the command station.

The Arduino came to the rescue. It has 6 PWM outputs via which we can control the LED strips using nMOSFET's to switch the 12V power.

With those 6 PWM outputs we can control either:
- 2 RGB LED strips
- 1 RGB and 3 one-color strips
- 6 one-color strips
Often a combination of a RGB strip with a (warm) white strip is used, this can perfectly be controlled with one Arduino.

The Arduino RGB_LED_Control software is available as a free download. It is included in the Arduino DCC / S88 software package which can be found on the blog Download page.

The software offers 3 modes of operation:
- Individual channel control. The intensity of each of the 6 channels can independently be increased or decreased.
- Selection of a preset. A preset is combination of 6 PWM outputs (0-255), a transition time (max 64 s) to gradually fade to the new preset color and a hold time (max 255 s) for use with the sequencer.
- Sequencer. Of the sequencer is switched on, it steps through the presets, using the per preset configured transition time and the hold times.

The software offers 3 options for control:
- The PC keyboard (via the Arduino Serial Interface)
- Digital inputs (connected e.g. to push buttons)
- DCC commands

A User Manual is included in the download. It explains the hardware needed and how to configure and to operate the software.

Link to the blog with a video and the software download.


..
 

·
RudyB
Joined
·
219 Posts
Discussion Starter · #102 ·
A DCC hand held throttle for €6,-

Thanks to the on board Ethernet of an ECoS it is possible to use iPhone or an Android phone as a handheld throttle. Always nice for precision shunting work. However ... most people prefer to have a physical knob on their remote throttle.

This was recognized by ESu / Piko, they launched their 'Mobile Control'. A nice throttle with lots of functionality. But it sets you back some 300,-.

There's also the well known Roco / Fleischmann 'Multimaus'. It has a wire, and needs to be connected to the ECos via the DCC sniffer input.

This DCC sniffer input put a thought in my mind ... would it be possible to use an Arduino to create a hand held throttle? The answer is ... yes it is. The result is a fully functional remote throttle for the price of €6,-.

https://rudysmodelrailway.wordpress.com/201...hrottle-for-e6/" target="_blank">More info and a video is available on the blog.</a>

 

·
Registered
Joined
·
1 Posts
Yes David, that rush in current indeed is quite a bit, and it adds up when all the servo's start up at the same instance. It made me have to change the power supply to a hefty ATX ex PC one. And the supply for the control electronics indeed is still separate, just to be sure.
Hi. I have exactly the same issue with 18 x 9g servos on my DC layout linked to points and semaphore signals. Control is by Arduino using 2 x 12 channel servo control modules from Hobbytronics, linked via I2C network. Servos are powered separately from a 5v 2Amp supply, and all GND are connected together. All works well, except at start-up when I turn on the power many of the servos react quite violently until they all settle down, I am sure this is due to too much current being drawn as they all re-centre themselves. Have tried capacitors across the +ve & -ve supply but with little success. I would be very interested to hear about your power supply, assume 5volt but what maximum amps? Thanks.
 
101 - 104 of 104 Posts
Top