This is only a preview of the September 2024 issue of Silicon Chip. You can view 42 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Compact OLED Clock/Timer":
Items relevant to "Pico Mixed-Signal Analyser (PicoMSA)":
Items relevant to "IR Helper":
Videos relevant to "No-IC Colour Shifter":
Articles in this series:
Articles in this series:
Items relevant to "Discrete Ideal Bridge Rectifiers":
Items relevant to "Electric Guitar Pickguards":
Purchase a printed copy of this issue for $12.50. |
SILICON CHIP
Mini Projects #011 – by Tim Blythman
This simple circuit causes an RGB LED
to constantly shift between various
colours using just three transistors
and a handful of passives.
No-IC
Colour Shifter
S
ometimes, ICs and microcontrollers make things too easy. If you
want to understand electronics better,
using simpler components can help
reveal how things work at a lower
level.
This circuit is one of the simplest
versions of an ‘astable multivibrator’.
That is a circuit that changes state
continuously. Similar circuits form
the basis of a bistable multivibrator,
also known as a flip-flop or latch, the
basis of many types of computer memory. So these types of circuits are all
very important, even to modern digital technology.
A ‘monostable multivibrator’ provides a single pulse of a known duration when it is activated. That is
another similar circuit used where a
timing feature is needed.
Variations of this principle using
valves or vacuum tubes date back to
1919, well before the invention of the
integrated circuit (IC). We published
a Circuit Notebook entry that uses the
same principle (December 1995 issue;
siliconchip.au/Article/6078).
Three transistors, six resistors and
three capacitors are all it takes to make
an RGB LED flash and change colour.
Fig.1 shows how we have laid it out
on a breadboard, while Fig.2 shows
the equivalent circuit diagram. You
can see the layout in the photos and
this video (siliconchip.au/link/abwi).
It would be pretty straightforward
to solder these components to a Jaycar
HP9570 protoboard since it has much
the same layout as the breadboard. We
supplied 5V power by running some
jumper wires from an Arduino board
plugged into our computer, but you
might have something else on hand
to use.
The circuit uses PNP transistors to
allow us to use the common-cathode
version of the RGB LED module
Figs.1 & 2: this shows how we laid out the components on a breadboard. If
you leave off the capacitors and yellow wires, you’ll have three identical
sections, each feeding one of the individual LEDs of the RGB LED module.
The capacitors between stages are what cause the colour to shift constantly.
You can see how it works a little more clearly in the circuit diagram. One
capacitor charges until it switches on a stage that is currently off, and in doing so, switches another stage off. That
causes it to cycle through three colours: cyan (blue + green), mauve (blue + red) and yellow (green + red).
68
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
(marked BRG−), which is what we got
from our local Jaycar store.
If you have a different version with
a common anode (perhaps marked
with something like BRG+ or BRGV),
you can use NPN transistors (such as
BC547s) instead. They have the same
pinout (but opposite polarity), so they
are placed the same way.
In that case, the capacitors need to
be reversed, as do the supply connections (the red and black wires) and
positive and negative breadboard connections. The alternative breadboard
layout is shown below in Fig.3 (note
the slightly different labelling on the
RGB LED module), while the resulting circuit is shown in Fig.4. In this
version, all currents will flow in the
opposite direction.
Circuit details
Imagine the circuit (Fig.2) without
the capacitors connecting between the
stages, which would have three identical but otherwise unconnected sections. You could simulate that on the
breadboard by removing the yellow
wires that link the stages.
The 10kW resistors allow current
to flow from the emitter of each transistor and out of the base to ground.
This biases on the transistors and
allows current to flow out of the collector, via the 220W resistors and one
of the LEDs in the RGB LED module to
ground, lighting it up. The RGB LED
would appear white, as all three elements would be lit.
Ensure the red wires go
to your 5V supply and the black
wires go to ground. We’ve used BC557 PNP
transistors to make the circuit work with the common-cathode
RGB LED module we purchased. You can build and test part of the circuit
by fitting all the components and wiring shown here except the yellow wires
and capacitors. Powering up the circuit at that stage lets you confirm that
the RGB LED is working and shows a solid white colour.
You can build the circuit like that,
leaving out the yellow links and confirming that is what happens. It’s a
good way to check that the wiring is
correct so far.
Now add the two shorter links and
all three capacitors, then power on the
circuit. The RGB LED might flicker but
will settle back to a solid white. Adding the longer link should cause the
RGB LED to cycle through the colours,
changing about once per second.
Before adding the link, all three
collectors are near 5V since all the
transistors are on. Adding the last link
pulls the base of the right-hand transistor (Q3) up to 5V too, switching it off.
The 10kW resistor slowly charges the
associated capacitor until Q3’s base
voltage drops far enough to allow it
to switch on. However, Q3’s collector
is connected to Q2’s base via another
capacitor. So Q3 switching on causes
Q2 to switch off.
Now the middle 10kW resistor
slowly charges up the next capacitor,
and the cycle continues around the
loop of three subcircuits. The colour
Figs.3 & 4: this layout is similar to Fig.1 but suits a common-anode RGB LED
module in case you come across one. The circuit at right is basically the same as
in Fig.2 but flipped upside-down, with the PNP transistors switched to NPN and
the polarised electrolytic capacitors reversed.
siliconchip.com.au
Australia's electronics magazine
September 2024 69
Silicon Chip
PDFs on USB
¯ A treasure trove of
Silicon Chip magazines on a
32GB custom-made USB.
¯ Each USB is filled with
a set of issues as PDFs –
fully searchable and with
a separate index – you just
need a PDF viewer.
¯ Ordering the USB also
provides you with download
access for the relevant
PDFs, once your order has
been processed
¯ 10% off your order (not
including postage cost) if
you are currently subscribed
to the magazine.
¯ Receive an extra
discount If you already
own digital copies of the
magazine (in the block you
are ordering).
A top-down view of the finished Colour Shifter. Note the capacitor orientations;
they are reversed on the version using NPN transistors (such as Jaycar ZT2152).
showing on the RGB LED changes as
it does.
The cycle will start even if the
circuit is powered on with all three
links in place. That’s because there is
enough variation in the component
values to ensure that one transistor
switches on before the others, which
will start the cycle.
You might have realised that the
electrolytic capacitors will sometimes
be reverse-biased, with the positive
end actually being more negative.
This will be at most around -0.7V
(limited by the 0.7V across the transistor base-emitter junction). Reverse
voltages below 1V are generally not a
problem for electrolytic capacitors as
the voltage is not high enough to affect
the insulating oxide layer.
Tweaks
EACH BLOCK OF ISSUES COSTS $100
NOVEMBER 1987 – DECEMBER 1994
JANUARY 1995 – DECEMBER 1999
JANUARY 2000 – DECEMBER 2004
JANUARY 2005 – DECEMBER 2009
You could replace the RGB LED with
three individual LEDs if you like, or
even a discrete RGB LED like Jaycar’s
ZD0270. If you do this, double-check
the pinout and make sure the cathode
or cathodes (for individual LEDs) all
go to the black wire in Fig.1.
You could even add some jumper
wires to place the LED module fur-
ther away from the main board. You
can modify the capacitor values if
you want to change the cycle speed.
Higher capacitor values will slow the
rate (as they take longer to charge and
discharge), while lower values will
speed it up.
Experimentation
You might be wondering if the circuit will work with more than three
stages. We tried it with four & five
stages and found that the cycle did not
start reliably. If it did start, two or more
impulses travelled around the loop!
However, it works well with two
stages. If you build the circuit without the third stage, you should see the
two lights alternate, making it useful
for something like a model railway
level crossing.
Earlier, we mentioned that devices
like timers are closely related to this
circuit, even though they have different functions. If you swap one of the
capacitors with a wire link, the cycle
will run until it stalls on one colour.
If you remove that link, the colours
will change a few times, then stop
again, making it a very basic countSC
down timer.
Parts List – Colour Shifter (JMP011)
WWW.SILICONCHIP.COM.
AU/SHOP/DIGITAL_PDFS
1 30-row breadboard [Jaycar PB8820]
1 RGB LED module [Jaycar XC4428]
3 BC557 45V 100mA PNP transistors (Q1-Q3) [Jaycar ZT2164]
3 100μF 16V electrolytic capacitors [Jaycar RE6130]
3 10kW ½W 1% axial resistors [Jaycar RR0596]
3 220W ½W 1% axial resistors [Jaycar RR0556]
1 5V DC power supply (eg, USB/serial adaptor plugged into USB supply)
assorted solid-core wire [Jaycar PB8850]
70
Australia's electronics magazine
JANUARY 2010 – DECEMBER 2014
JANUARY 2015 – DECEMBER 2019
OR PAY $500 FOR ALL SIX (+ POST)
Silicon Chip
siliconchip.com.au
|