Introduction: 555 RGB Rainbow LED Driver (NOT Using a 4029)

About: It's not important who I am or what I know. What is important is what I can teach you.

| A_Teacher |

Ok, so as far as I can tell, this is a unique brand NEW design.

Calling all Space Cadets: As a way of motivating folks to make the project, I am currently giving away a 3 month Instructables Pro Membership to the first person that makes it (on a PCB) and posts their photographs by clicking I Made It!.

Congratulations to alxandre.alzate for being the first person to make the project.

What does it do ?

The project makes a red/green/blue led flash in pretty coloured patterns, adjustable by switches and twiddling the dials on the end.

How Does it Work ?

Please see Step 1: Schematic


Background

I have been a fan of the Rainbow LED circuit using a 4029 binary counter for a very long time. I wanted an old school (non programmable - non arduino/pic) design using a 555 Timer that would drive an RGB LED, using just the swing between pin 3 and the high and low power rails by sinking/sourcing and combining outputs with switches in parallel. I hummed and harred, and thought I could do it with just diodes, bridge rectifier style.

I got it working as long as there wasn't a single common anode (positive) / cathode (negative), which unfortunately most low power RGB LEDs have. You could in fact get this design working with just diodes and a triple five (without the inverter chip), if you used just three individual LEDs. If there is enough interest I will release those designs as well.

I ended up going with a

A unique feature of this design is the ability to turn individual colours on/off, for either the space time or mark time of the 555 Duty Cycle.


Switches

I have used a six way DIL Switch for the colour selection, in reality you have to have a pen in your hand to flick the switches. They are way too small, however using individual switches increases the cost of the project by about a factor of ten (in switches alone). So I am still undecided if it should have individual switches, or just go with the DIL. Six larger individidual 'on board' switches for colour selection would also require a redesign of the ergonomics of the project, and hence the pcb routing would also need to be redesigned.


555 Timer

My resistor selection for the triple five is way off. There are certainly sweet spots when twisting the dials, however they take a bit of twiddling to find. I am open to suggestions on recommended/favourite resistor values. Of course you could achieve a good project by replacing VR2 with a fixed resistor, but perhaps it would lobotomise some of the patterns available in this design (with variable resistors for both R1 and R2). There is probably enough space to add biasing resistors on the pcb, so R1 doesn't go above R2 in value. Most triple five astable circuits that I have researched have R2 at about ten to a hundred times R1. So if R2 (variable resistor) is set at 100k, a good value for R1 is anything between 1k and 10k.

The following information is from the Electronics Club website:
http://electronicsclub.info/555timer.htm#astable

  • Choose R1 to be about a tenth of R2 (1k min.) unless you want the mark time Tm to be significantly longer than the space time Ts.
  • If you wish to use a variable resistor it is best to make it R2.
  • If R1 is variable it must have a fixed resistor of at least 1k in series
    (this is not required for R2 if it is variable).

The maths involved in calculating the timing of charging and discharging a capacitor are rather particular. Remember that batteries are designed to discharge slow, capacitors (and super-capacitors) are designed to dump their charge quick. Hence their use in products like a camera flash, drones and rc helicopters (http://electronicsclub.info/capacitance.htm#charging). You can certainly feel the 'lag' as the triple five capacitor fills and empties when twiddling the dial/s, the maths of which are described in the link above.

More information on 555 Timers can be found here:
http://www.555-timer-circuits.com/


Hex Inverter (NOT Gate)

The 74LS04 gate voltage is a bit high, which could be addressed by placing a resistor on either side of the switch and lowering the positive rail voltage. The current draw on the 74LS04 is also probably a bit high, this could be resolved by driving the LEDs with transistors, but for the moment the 74LS04 in my prototype seems to be holding out ok.

I tried a 4000 series chip in simulation, but found that there were problems with current delivery in the simulations using Circuit Wizard. As soon as I switched to the 74 series every thing was cool. You could replace the 74LS04 with a 4069B (as they have the same pin assignments), but I am unsure of how well it would work in real life. Note that there are only three out of six not gates being used in this design.

Update: I have just seen a description of a transistor used as an inverter, an implementation of this design would do away with the 74LS04 IC altogether.


Power Supply

Oh, and before I forget, the triple five timer has a minimum power supply of five volts. So whatever configuration of power supply must have at least five volts, three volts won't work. It's actually very ergonomic to hold in the hand with the nine volt battery where it is.


Output

Which brings me to the end of the line, and the smoothing capacitors sitting right on the LEDs. The value of 220 microFarads is arbitrary at this stage. The smoothing from the capacitors certainly 'smooth' out some patterns that you would see if they weren't there. (Hint: Yes, the board can be even smaller again, if you remove the smoothing capacitors).

Update: I have just worked out that the smoothing capacitor locations are great mounting points for additional LEDs, the capacitors could be replaced by individual LEDs - Bonus 3X individual LEDs. Of course the 390 ohm resistors would need to be recalculated depending on how you configure your output from pin 3 of the triple five timer (See Step 7: Calculating LEDs in Series).


Design and Production

The circuit certainly extends itself to heaps of RGB LEDs in parallel using a bigger power supply AND transistors. Feel free to hack the design and come up with your own variants.

A Breadboard Layout has been added to Step 2. I am not 100% happy with the layout but it does work.

PCB Specifications

  • The tracks are 1.02 mm wide.
  • Round pads are mostly set to 2.54 mm.
  • Squashed pads are 3.05 mm X 2.03 mm.
  • The grid used in the design was mostly set at 0.10 in, with a bit of fine tuning using 0.05 in.
  • The PCB was machined with a 60 degree conical tool, set to 0.2 mm depth of cut. This resulted in a cutting tool diameter of 0.24mm (Calculated by CopperCam).
  • When manufacturing the board, I recommend a 0.9 mm drill, as the 1N4001 diodes have a 0.85 mm shank.

I am currently working on a zener diode regulated nine volt charger, with bridge rectifier PCB design. Which hopefully will end up the size of nine volt battery clip. More details on that one soon.

Update 1:
Since the photograph was taken, I had problems with the component legs piercing the battery, and shorting the circuit. I recommend cutting a piece of card the size of the pcb, and placing it between the pcb and battery as an insulator.

Update 2:
I have modded my design, swapping VR2 for a fixed 1k resistor, and replaced the smoothing capacitors with individual Red Green and Blue LEDs. The 1k resistor seems to work better than higher values, and the extra LEDs make it much more dynamic on the eye (they also help explain what is going on inside the single RGB LED). These mods were done on the original board design presented here.

Oh, and for the more observant of you, yes the main power switch in the profile pic is in the wrong position for the led to be shining green. I forgot to turn the kit on when I took the photograph, so I doctored it in photoshop :P

Resources Used in Production:

Circuit Wizard http://www.new-wave-concepts.com/ed/circuit.html
Was used to create the simulation, schematic diagram, PCB layout (and Gerber files) and parts list.

CopperCam http://www.galaad.net/coppercam-eng.html
Was used to mill the PCB on the Roland MDX-40A.

Roland MDX-40 http://www.rolanddga.com/products/milling/mdx40/
Was used to mill the PCB.


A Note on Combinative Mathematics:

Thanks to hanelyp for help with the following information:

There are 64 states possible between 6 binary switches. Each switch is independent and order does not matter, 2^6. If you want to eliminate all off, black, 63 combinations of interest.

This of course does not take into account the additional variations in space/mark time by using different component values for the triple five timer and/or smoothing capacitor values.

Furthermore if anyone wants to make up some sweet component values and map them through a supercomputer for wave form graphings across R, G, and B, they are more than welcome ;)

Favourite Switch Settings:

  • 1 off, 2 on, 3 on, 4 on, 5 on, 6 off (011110)
  • (100110)


Hack
:

4511/7447 4029 4026

The 4511/7447 hack is an interesting one and deserves comment. The circuit provides a 3 bit binary output. The 4511/7447 decodes a maximum of 4 binary bits, to display a number on a seven segment display (a-g). For more information see 4026. You could use the 3 bits on the inputs of the 4511/7447 and then use the outputs (a-g) to get very different combinations across 2 X RGB LEDs (six of seven outputs).

Offboard Switches. It would be good to replace the six way DIL switches with momentary on/off switches hooked up to different joints in the body, and go out dancing :

A console with sliders for the variable resistors (the PCB lends itself to a console design) with ten or more hooked up with variable resistors for each 'channel'. Live Light VJ's. Just make sure you use a power supply with sufficient amperage delivery.

Faders.

Diode in parallel with R2 (including a switch), on the triple five timer.

Use transistors instead of a triple five timer for the multi-vibrator, removing all ICs (if transistors are also used for the three NOT gates).

VR1 or VR2 on the triple five timer could be replaced by Light Dependant Resistors or Thermistors, which would create different patterns depending on light/temperature. Maybe even use a microphone instead.

Colour freeze function.

Replace VR1 and VR2 with another triple five timer and the smoothing function seen in the Rainbow LED with 4029. Which would give automatic changes in the speed of the patterns.

Add another switched capacitor to the triple five timer, as per this instructable:
https://www.instructables.com/id/Flashing-LED-Railroad-Lights-made-with-555-timer/

Taking slow aperature photographs and light writing words and shapes(sparkler style).

Circus Toys such as Poi, Juggling Items and NON-Fire Twirling Sticks. Secure it well, please don't smack anyone in the head with a nine volt battery.

For sub-modules see below:
ECT in Schools

(http://www.ectinschools.org/page.php?m=3&ps=2)


Easter Egg:

Hidden in the pcb design layout is a pretty neat triple five astable timer module (16 mm X 22 mm before outputs are added). If you replicate it in your designs please credit where you got it from -

A_Teacher

Health and Safety

If you are prone to epilepsy, please don't make or expose yourself to this project.

Step 1: Schematic

How Does it Work?

The triple five timer creates a pulse (high and low), depending on the values of VR1, VR2 and C1. This pulse is output on pin 3 of the triple five timer. For each of red, green and blue, the signal is fed via a diode to a switch. The same signal out of pin 3 is also fed to red, green and blue via a not gate, which makes the signal opposite (eg; if pin 3 is low the output of the not gate is high). The signals going through the three not gates are then fed through diodes and connected to another three switches. The diodes prevent the signals from feeding back into outputs.

Looking at the switches in the example above, Green would be on all the time (both high and low). Blue would be on when pin 3 of the triple five timer is high, and Red would be on when the output of the triple five time is low. Resulting in (Green + Blue) and (Green + Red) for the two output states (high and low) of pin 3 on the triple five timer (111001).

The output signals of the switches then have resistors, so the led is driven at the correct voltage. Capacitors then add a small amount of smoothing. The final output is a signal connected to a RGB Led.

Errata

Hrmm, I just noticed that VR1/VR2 are in reverse naming order,
to what are commonly called R1 and R2 in triple five timing formula.

It is because I replaced R1 after the name VR1 had been set for R2.

Step 2: Breadboard Layout

IC Pinouts

Note that the smoothing capacitors are BEFORE the resistors in this design. If adding more LED's, do so after the resistors. Also see Step 7: Calculating Resistor Values for LEDs.

Step 3: PCB Layout

Board Size: 71.12mm X 25.4mm.

The PCB layout demonstrates how 'space saving ' routing under components can be, you can see examples of it under the triple five timer and the diodes.

Another point of interest is the routing of the pin 3 out (555 timer) through an unused pin on the 74LS04 (pin 3). I needed a pathway through to the diodes, so I simply mapped it through an unused pin (input A) on the 74LS04.

Note that the pcb artwork is not to scale. You will need to recalibrate it's size. I did this to allow the highest resolution on the provided imaged pcb artwork. Remember to flip x on the artwork when making the pcb.

Step 4: File Downloads

Gerber Files (https://en.wikipedia.org/wiki/Gerber_File)
Linked are the Gerber files that were opened in CopperCam prior to machining (gb1 and drl1). Remember to flip x on the files when machining and drilling the pcb.

Circuit Wizard File (http://www.new-wave-concepts.com/ed/circuit.html)

Linked is the Circuit Wizard File, containing the simulation, schematic diagram, PCB layout and parts list.

Livewire 7 Segment Display Driver

This file is here for those that have Circuit Wizard and wish to implement the 4511 Hack.

source: ECT in Schools
(http://www.ectinschools.org/page.php?m=3&ps=2)

I do not use Eagle, if any one cares to upload Eagle files (or variations) of my designs, they are more than welcome.

Step 5: Parts List

Step 6: Make It!

If you make the Rainbow LED Driver, please share your experience
by clicking "I Made It!", "Add Images", "Post" or "Make Comment".

Prototype manufacturing time (including PCB machining), was under three hours.

If you are using off board LEDs, please see my instructable on soldering LEDs to wires using a simple jig.
https://www.instructables.com/id/How-to-Solder-LEDs-using-a-Simple-Jig/

Get yourself a de-soldering tool, and start playing around with different VR1/VR2/C1 values for the triple five timer.

Step 7: Calculating LEDs in Series (Appendix)


R = ( VS - ( VL x n )) / I

The calculation of how a resistor reduces Voltage (pressure), is very important in electronics. The value of the correct Resistor for LEDs in Series is the Supply Voltage (pressure) minus the total pressure consumed by all off the LEDs (Voltage Drop Across a Single LED times by the total Number of LEDs), that answer is then divided by the LED Current (electron flow) required by the circuit.

R = ( VS - ( VL x n )) / I

Calculated Limiting Resistor Ohms

Resistors do not come in every value of ohms, the answer you get from the formula may not be available in real life. You will need to select the next nearest higher value resistor based on the number calculated above (Real Resistor Values).

Nearest Higher Rated Limiting Resistor

Supply Voltage ( VS )
This is the Voltage of the power supply. Volts

Voltage Drop Across a Single LED - Load ( VL )
For most low power LEDs this is 1.7 Volts. Volts

Desired LED Current ( I )
For most low power LEDs this is 20mA. Amps
(Quantities and Units)

Number of LEDs ( n )
How many leds connected?

Image Credit/Online Calculator:
http://www.hebeiltd.com.cn/?p=zz.led.resistor.calculator
Teach It! Contest Sponsored by Dremel

Participated in the
Teach It! Contest Sponsored by Dremel

Tech Contest

Participated in the
Tech Contest

Epilog Challenge VI

Participated in the
Epilog Challenge VI