0
\$\begingroup\$

I am looking to make a simple (cheap, small spaced) circuit that will light 8 LEDs in a random order AND have a pulsing/fading in and out effect. I was originally going to program a randomized effect, but I found a schematic using a 4026 counter and display driver and 555 counter that will do the deed instead (saving time and hair pulling). The problem I am having is figuring out how to get the fading effect on each LED and how I would implement that with the randomized effect.

The circuit I found is here: http://rookieelectronics.com/sequential-random-led-flasher/.

I know that changing the capacitor value will slow/speed up the blinking speed, but won't add the fading effect I'm looking for. My best guess is either attach another capacitor between the LED and driver, or to implement a BJT into the circuit. I'm pretty stuck so any advice would be great!

I should also mention I plan on making this DC with a 6V battery. It can be higher voltage if needed, that was just the original plan.

Thanks and have a great day!

\$\endgroup\$
4
  • \$\begingroup\$ That's a pretty lousy approximation of "random". \$\endgroup\$ Commented Nov 8, 2014 at 1:27
  • \$\begingroup\$ @IgnacioVazquez-Abrams What do you mean? How should I have explained randomized? There are 8 LED's and of them any 1-8 can be turned on in any order. \$\endgroup\$
    – Trevor
    Commented Nov 8, 2014 at 1:33
  • \$\begingroup\$ Well, sure, but if you know what they're currently showing then you'll know what they'll be showing next. \$\endgroup\$ Commented Nov 8, 2014 at 1:34
  • \$\begingroup\$ @IgnacioVazquez-Abrams I believe that the 4026 driver allows it to be completely randomized- as in when LED 2-7-4- then 5 light up, the next time 2-7-4 light up, it won't be 5 again. Even if that were not the case, it does not matter for my project; and I should have specified that. I know how to create the randomness whether it is programmed or used from the driver. I am unsure about creating the circuit is what my question is about. \$\endgroup\$
    – Trevor
    Commented Nov 8, 2014 at 1:39

1 Answer 1

0
\$\begingroup\$

The CD4026 has a Display Enable pin that you can apply PWM to. The question is, how to make the PWM vary in time with the LEDs? One possibility is to use the triangle waveform that the NE555 is already producing as it clocks the CD4026.

In the circuit below, OA1 and OA2 form a classic Pulse Width Modulator. OA1 generates a high frequency triangle wave on C2. OA2 then compares this to the much slower ramp produced by the NE555, and outputs a PWM waveform with varying duty cycle. This should cause the brightness of each lit LED to go from 0 to 100% and back again during its time segment.

schematic

simulate this circuit – Schematic created using CircuitLab

If you want the LEDs to fade in and out at a different speed to the randomizer then use another 555 (or another opamp) to generate the brightness ramp. If you want the brightness of every LED to vary independently and/or randomly then you will need an even more complex circuit, in which case it might be easier to program an MCU to do the job.

\$\endgroup\$
5
  • \$\begingroup\$ This sounds as though it is exactly what i am trying to do! I am a bit confused because I am still an EE student and currently learning circuit diagrams, but where is the CD4026 on the schematic? Is it the dotted line containing the 555 counter? Also, would I place the 8 LEDs at the display enable point (in parallel); and if I do what would the current and voltage be at that point so I could calculate the resistors accordingly? \$\endgroup\$
    – Trevor
    Commented Nov 8, 2014 at 3:45
  • \$\begingroup\$ The CD4026 is on the other end of the outputs from U1 and OA2. The LEDs are connected to the CD4026. \$\endgroup\$ Commented Nov 8, 2014 at 3:54
  • \$\begingroup\$ @IgnacioVazquez-Abrams Ah OK that makes sense, thank you! So if I am understanding this correctly, I would take the display enable output and connect it to pin 3 on the CD 4026 driver, and connect the output of U1 (clock cycle) to pin 1 on the CD2046? \$\endgroup\$
    – Trevor
    Commented Nov 8, 2014 at 4:18
  • \$\begingroup\$ That is correct. \$\endgroup\$ Commented Nov 8, 2014 at 4:20
  • \$\begingroup\$ @IgnacioVazquez-Abrams Awesome, thank you for all the help and thank you Bruce for the schematic and all the info, have a great day! \$\endgroup\$
    – Trevor
    Commented Nov 8, 2014 at 4:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.