Go Down

Topic: Using BCD 7 - segment decoder with PWM (Read 1 time) previous topic - next topic


Before I buy pieces/parts for this idea, I was wondering if someone could give some advice on feasibility of this:

Objective:  Extend the effective PWM channels available from the Aruidno UNO by using just one PWM out pin combined with four digital out pins and a 7-segment BCD decoder to actually get 7 PWM's off one PWM pin.

The idea is to drive two RGB high power LED's (3 LED's a piece, 350mA a piece, 3W total each) and get full range of color.  LED power will be supplied by a 12V 4 AMP supply, and TIP120 transistors will be used to interface with the BCD.

Extending this even further one could get 14 PWM's using 2 PWM pins and 8 digital pins with two BCD decoders.

Any thoughts, concerns, comments?  My biggest concern would be the possibility of flickering.



So what's the idea? Hard-wire all the input pins on the decoder to make sure all outputs are high, then PWM the blanking input to make the outputs do the same thing?

Hmm.... it might work. Try it :) Seems like the transistors will be manly enough to cope.


Yes, the Vcc input of the decoder would be connected to the PWM output of the Arduino.

Then the four channels A, B, C, D of the decoder input could be set high (in whatever desired binary form) using digital outs from Arduino to select any combination of the a, b, c, d, e, f, g channel outputs of the decoder, which would in turn be PWM'd based on the Vcc input.

The RGB LED's would be hooked up so that a = Red1, b = Green1, c = Blue1, d = Red2, e = Green2, f = Blue2....and g could be an extra channel for a plain color LED....maybe white


First of all, the 7 segment chips you're talking about decode with a font, for example if you input an 8, you get all 7 outputs high.  If you you output a 1, you'll get the a and b outputs high. 

The device you want is a decoder.  Look at the 74138 3 to 8 decoder or 74154 4 to 16 decoder.  Maybe it's fast enough that you can PWM the chip enable, check the datasheets.  I still don't think your idea will work, at best you only have one output enabled at a time, so you only have the PWM signal present for a fraction of the time depending how many outputs you want.

The correct way to add some PWMs is with a port expander, you might start with the MAX7313, but find one that meets your needs.  They are very easy to use and attach to the Arduino's I2C bus. 

Go Up