Bipolar LED's & Arduino
- Ty
- Nov 16, 2015
- 2 min read
Hi All, in attempt to get some signalling working on a Mates layout (Darren) I needed to look into Bi polar LED's on the Arduino and triggering them by detection blocks(digital inputs)
Well this afternoon, I have hooked in two LED's red and green with one reverse polarity to the other into D2 and D3, just to prove by driving one output low and the other high you can drive two led's from the pair of Digital Outs.
Once this was accomplished I moved onto installing a Bi polar 3 wire LED, common, Red, Green. Darren also wanted Yellow. I was lead down the path of having the two output states oscillate at a high rate, I wasn't entirely happy with this but found a delay of 5 worked almost flicker free, in a slip of code, when I combined the two I missed out the delay and by simply setting both Digital outs to high the bipolar produced yellow...perfect case closed.
So without taking up processing power to oscillate the bipolar LED's but just having them as simple outputs I have achieved what Darren requires. My simple circuit in my Arduino has two input block detection sections and drives the corresponding 4 outputs.
I will write this up for a nano later this week to have all 7 inputs drive all 7 outputs and common up pairs to produce a yellow and post it on the Arduino page...... so that makes signalling once again exceptionally cheap thanks to Arduino and no outside software required..... so long as you only want two monitor two blocks at most to produce a yellow and they are always the same two blocks. (per pair).
Confused... basically out of the 7 driven signals 3 can produce a yellow and one is either green or red.
Of course for those of us who love TC (train controller) I will write one up soon to be signalled by Loconet / TC





































Comments