There are a couple of ways of making a circuit like this that I know of. There may very well be dozens but for now I know of two basic methods.
1) Use a PIC microcontroller. A PIC is like a little processor that you can load a program to and have it do certain things and one of those functions includes PWM to light LEDs.
2) Use a couple of Integrated circuits and a number of passive components to do it manually and logically.
I chose the second option partly because I don't have a PIC programmer but also because I wanted to learn a bit more about normal electronics.
The route I took was to use a 4017 decade IC (on the right), this 16 pin beauty basically can receive a timing signal and output it's own signal to one of it's 10 outputs. It's basically a counter. Multiple 4017 chips can be used to count tens, hundreds, thousands.
I used a 555 timer IC (on the left) to send the 4017 the clock pulse. The 555 timer chip has been around for years and basically works by using an external capacitor and a resistor to control how long the pulse takes. A large value resistor and a large value capacitor will take longer than a smaller value resistor and smaller value capacitor.
This is the schematic I came up with. This circuit is basically cobbled together from a few different circuits, it's not fully home made.
The 555 is controlled by a static capacitor and a variable resistor and outputs to an AND gate (2 x 1N914 and the 15000 ohm resistor) which will normally send the pulse to the right side chip, once that has pulsed through it's outputs it activates the second AND gate and starts sending the pulse to the left side chip. Each output on the 4017 chips goes to a second little circuit like is shown on LED1. I couldn't be bothered to draw it 17 moer times.
So the first thing I needed to do was just to check the way that the circuit works and put it on breadboard with just the one 4017 chip.
The circuit is a lot simpler but shows the effect of the dimming circuit at the far right LED. Notice how the first 9 LEDs basically flash quite dimly but the end one looks much nicer. This dimming effect is what I want to bring to this circuit.
Here are a number of the components and parts I have sourced over the last few weeks off eBay for this and future projects.
A basic prototype board. The components are mounted on the other side but circuits are made by the copper tracks. I use a drill to remove bits of copper where I wish a line to end.
Capacitors hold energy and are useful to smooth power delivery to items. Diodes are used to stop electron flow in one direction.
Resistors slow down the electron flow in a circuit so act as current limiters for devices. Pictured here above some electrolytic capacitors are a 2.2kohm and a 56ohm resistor, which are identified by the banding colours.
LEDs are semi conductors that emit light when electrons flow across them. Potentiometers are variable resistors where a turn of the little knob increases or decreases the resistance to electron flow.
These little sockets are useful if you want to switch ICs at any time. I blew one 555 chip so without this little holder it would have been tricky to unsolder all the pins and get it out.
And most importantly a basic multimeter which everyone should own.
I found a useful little program called VeroDES which allowed me to plan my circuit directly onto a virtual PCB. This is the circuit I came up with. I was able to check this against my Multisim schematic, which was proven to work through simulation.
Here are a few images taken as I was building the circuit on the veroboard. I could have saved so much space if I'd taken the time. I left so much room for the outputs when I needn't have worried about them.
Here is the main circuit all complete, apart from the potentiometer which I added a little later. At this stage I have no output wiring. The main bulk of the circuit is taken up with the dimming sub-circuits which include two transistors, two resistors and one capacitor per LED. What was I thinking? Just for a fan? This is total madness.
More to come...