Maker Pro
Maker Pro

LED Flasher help.

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I just discovered an error in the schematic (I was trying to be clever, and failed) and made some wanted changes. Here's the updated schematic.

attachment.php
 

Attachments

  • WATERWALKER.002.GIF
    WATERWALKER.002.GIF
    33 KB · Views: 275
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Despite the lack of interest, I will continue my description of this circuit.

Please use the following schematic. I've added a few more markings since the previous version, and renamed some reference point letters.

attachment.php


SCHMITT TRIGGER OSCILLATOR

Here's where a Schmitt trigger really shows its versatility. An oscillator can be made from one inverting Schmitt trigger, one resistor, and one capacitor. In this circuit, ENW enables the oscillator when high; in this condition, U3A becomes a simple inverter with a Schmitt trigger input, as described in the last two paragraphs under "THE CD4093B SCHMITT NAND GATE IC" in the earlier post.

This Schmitt trigger is an inverting gate. It operates exactly like the comparator-based circuit described under the heading HYSTERESIS, but with the addition of an inversion stage between the comparator's output and the output (pin 3). Here's how the oscillator works.

Assume ENW is high so U3A acts as an inverting Schmitt trigger, and assume the voltage at point E is 0V, as it would be on power-up when CW is fully discharged.

The Schmitt inverter sees a low input state, so it drives its output high (because it's an inverter.) This feeds a high level into the RC circuit formed by RW and CW. This RC circuit is just like RD and CD, but with a longer time constant because CW is a higher value. Point F is the input to this RC circuit, and point E is the output.

Point F is high, so current flows (leftwards) through RW, and CW starts to charge up, so the voltage at point E starts to increase. The Schmitt trigger is using its upper threshold voltage. So CW charges up until point E reaches the upper threshold voltage of the Schmitt trigger, which is, according to the Fairchild CD4093B data sheet, about 7.3V. When point E reaches 7.3V, the Schmitt trigger flips to the other state, so (a) the threshold voltage changes to the lower threshold (5V), and (b) the output (point F) goes low. CW now discharges through RW until the lower threshold is reached; at this time, point F goes high again, and the cycle repeats indefinitely.

So U3 forms a gated oscillator. While ENW is high, it oscillates, producing a rectangular waveform at point F. (A "rectangular" waveform is just a regular repeating signal that alternates between two voltages - in this case, high and low.)

When ENW is low, point F is forced high because of the NAND gate behaviour of U3A (see the truth table earlier) and the oscillator stops.

Because point F goes high when the oscillator is disabled (by ENW being low), it makes sense to define the output at point F as an active-low signal. If we do this, then when the oscillator is disabled, point F goes to the inacive state (high).

So point F is an active-low output from the oscillator. In modes where the white LEDs do not blink, point F will be high (inactive), and in modes where the white LED blinking is enabled, point F oscillates at a frequency determined by RW and CW. (The frequency is also affected by the threshold and power supply voltages, but these can't be changed the way RW and CW can be changed.)

The oscillator's operating frequency can be calculated from the time constant of the RC circuit (RW × CW) if the supply voltage and the upper and lower threshold voltages are known. I won't give you the formulas here, but using the typical threshold voltages from the Fairchild CD4093B data sheet with a 12V supply, which are 7.3V and 5V, the total cycle time (ON period plus OFF period) is about 0.77 RC.

That means that for CW = 4.7 µF and RW = 270k, t (the time constant of the RC circuit) is about 1.27 seconds; multiplying this value by 0.77 gives an oscillator period of about one second - that is, about 0.5 seconds high, and about 0.5 seconds low. The duty cycle is not exactly 50% but it is fairly close. You can speed up the oscillator by reducing the resistance (RW) or the capacitance (CW), and slow it down by increasing the resistance or the capacitance.

INVERTING GATE AND FRONT PANEL LEDS

Point F is also fed into U3B, where it is again gated with ENW to produce an inverted, active-low signal at pin 4 (called -W2) which drives the white LED(s) in the front panel directly. While ENW is low (white oscillator disabled), -W2 is high, and while ENW is high, -W2 oscillates in time with point F, but opposite: when point F is low, -W2 is high, and vice versa.

The LED and its current limiting resistor are connected between VDD and -W2. With this connection, current will flow in the LED when -W2 is low. In that state, there is +12V on the anode of the white LED, and (roughly) 0V on the left end of the series resistor, so current will flow from VDD, through the LED in the direction of the arrow, through the resistor, and into the gate output and to 0V, making the LED glow. So this active-low signal -W2 is now driving a front panel LED.

The other two oscillators, for the red and blue LEDs, work in exactly the same way, although they are enabled for different modes, according to the mode definitions listed underneath U2 and as determined by the diode OR gates.

CALCULATING LED CURRENT-LIMITING RESISTORS

When -W2 (or -R2 or -B2) goes low, current flows from VDD, through the connected LED(s) in the forward direction (in the direction of the arrow, from anode to cathode), through the series resistor, into the output of the driving gate, and through the gate's output circuitry to 0V. This is a series circuit, so the current at all points in the circuit is the same.

The amount of current determines the brightness of the LED(s) - more current gives a brighter indication, as you would expect. The current is determined by the voltages and resistances in the circuit. LEDs that are used for indication applications are generally operated at currents up to 20 mA; LEDs used for illumination are operated at much higher currents.

Recall that when current is flowing through a normal diode in the forward direction, a voltage appears across the diode. This voltage is called the forward voltage, Vf, of the diode, and it depends on the type of diode and the amount of current flowing through it.

An LED is a type of diode (LED stands for light-emitting diode). The forward voltage of an LED depends mostly on the LED colour. Here are some typical forward voltages for indicator LEDs of various colours: Infra-red: 1.2V; Red: 1.9V; Orange: 2.0V; Amber: 2.1V; Green: 2.1V; Blue: 3.3V; White: 3.3V. These are typical, and there are exceptions; always check the data sheet for the part you are using.

The forward voltage is also affected by the amount of current flowing through the LED. LED data sheets usually have a graph showing the relationship for a typical unit. For a typical red LED, forward voltage is 1.7V at 2 mA, rising to 1.87V at 8 mA, and 2.0V at 20 mA. When calculating operating points for LEDs, you should first decide on the operating current, so you can estimate the forward voltage.

The first group of LEDs in this design is driven directly from the outputs of CMOS NAND gates. These devices have limited drive capability; data sheets say typically 8 mA. At this current though, the NAND gate output does not pull fully down to 0V - there may be as much as 1.5V on the output. This is due to the internal resistance in the output circuitry of the gate. In the DTS model, a resistor is a spring; the output tries to pull down to 0V, but tension (current) causes the spring to stretch, and the output only pulls _near_ to 0V.

I've chosen an operating current of about 8 mA for the first block of LEDs which are driven from the gate outputs. (The second block is driven by MOSFETs Q5~7 and is covered later.)

Taking the white LED circuit, there is a total of 12V applied across a series circuit consisting of one white LED, one resistor, and the output resistance of the NAND gate U3B. With 8 mA flowing, the voltage across the white LED will be about 3.2V (for a typical white LED), and there will be about 1.5V between the gate output and 0V. This leaves a voltage across the resistor of about (12 - 3.2 - 1.5) volts, which is 7.3V. You can think of the resistor as another spring whose purpose is to set the tension (current) through the LED. It will have 7.3V across it; we need to select its stretchiness (resistance) so that when it is stretched to 7.3V, its tension will be 8 mA.

These three quantities are related through an extremely important, funamental law called Ohm's Law, which I'm surprised I haven't already covered earlier in this explanation. Ohm's Law says:

I = V / R

where I is current, in amps;
V is voltage, in volts, and
R is resistance, in ohms.

Ohm's Law can also be rearranged into R = V / I, which is the form we need to use here.

Our resistor will have 7.3V across it, and we want a current of 8 mA, which is 0.008 amps. Therefore the required resistance can be calculated as R = V / I = 7.3 / 0.008 which is 912.5 ohms. Resistors are only available in certain values, called the preferred value series; the closest preferred value to 912.5 is 910, so that's the resistance I specified on the schematic.

The other two circuits are similar but have two LEDs in series, not just one LED. Voltages in series add - if you imagine a voltage as a distance, and you put two of them end-to-end, you can see that they will add together, to give a combined distance equal to the sum of them.

If a red LED has a typical forward voltage of about 1.9V, two in series will drop 3.8V. The gate output will pull down to about 1.5V above 0V, so the voltage across the series resistor will be (12 - 3.8 - 1.5) which is 6.7V. To choose the resistor value to get a current of 8 mA we use R = V / I = 6.7 / 0.008 which is 837.5 ohms. I have specified an 820 ohm resistor for the red front panel LEDs.

Calculations for the blue LEDs are: resistor voltage drop is 12 - 6.6 - 1.5 = 3.9V; R = 3.9 / 0.008 = 487.5; chosen value 470 ohms.

CHASER CIRCUIT (U5)

Now I'm going to move on to the chaser circuit involving U5. I will come back to the circuitry involving the diodes and Q5~7 later.

RC, CC and U4A form a permanently enabled Schmitt trigger oscillator as described earlier, which clocks U5, another CD4017B decade counter with separate active-high outputs. Its Q3 output, on pin 7, is connected directly to its reset input, so the only outputs that will go high (apart from a tiny blip on Q3 as it resets U5) are Q0, Q1 and Q2, and they go high in sequence, at intervals determined by the oscillator.

(Actually the other outputs, Q4~9, could activate after power-up, because U5 doesn't have a power-up reset circuit, so it could start up with Q4, Q5, Q6, Q7, Q8 or Q9 high; if that happens, those outputs will go high in sequence until the next clock pulse after Q9, at which time Q0 will go high and the normal sequence of 0,1,2,0,1,2,0... will kick in.)

I've named the three phases of the chaser CH0, CH1 and CH2 and labelled the three active-high control signals accordingly.

UNCONNECTED CMOS INPUTS

I forgot to mention this before. Gates U4B and U1C are not used. Their inputs MUST be connected to something; usually they're tied to either VDD or 0V, whichever is most convenient. This is ESSENTIAL for all unused CMOS inputs, because they have an extremely high input resistance, and if they're not connected to something, they will float and pick up noise, which causes all sorts of problems.

This also means that, for example, if you connect a switch or pushbutton directly to a CMOS input, you need a pullup or pulldown resistor, because without one, when the switch is open-circuit, the CMOS input will not be connected to anything, and will float.

Most digital logic nowadays is CMOS-based, so this is a general rule. All types of logic ICs should have all of their unused inputs tied or pulled (with a resistor) to a defined logic level.

MOSFETS

Now I need to introduce a new subject: MOSFETs. Q1, Q2, Q3 and Q4 are three-terminal semiconductor devices called N-channel MOSFETs. In the context of digital circuits, a MOSFET is a voltage-controlled switch. A voltage on its gate terminal (relative to the source terminal) controls current flow through the drain-source path of the MOSFET.

At this point you should read some articles about MOSFETs. The Wikipedia page (http://en.wikipedia.org/wiki/MOSFET) is helpful but unless you're familiar with semiconductor physics, you should only read the introduction and the sections that include circuit symbols and schematic diagrams.

Also Google what does a MOSFET do? and read the articles that describe how they are used, rather than the physics involved; you don't need to understand how they work internally for simple applications like this one.

Bear in mind that these descriptions usually only cover N-channel enhancement-mode MOSFETs (which is what Q1~4 are), and they may not make this distinction. P-channel MOSFETs also exist and are used in this design as Q5~7. I will get to those later.

MOSFETs are the active component in CMOS logic ICs; they are the reason for the "MOS" part of "CMOS" (the C stands for "complementary"). (BTW, CMOS is pronounced "SEE-moss" and MOSFET is pronounced "MOSS-fett" or "MOZZ-fett".)

So an N-channel enhancement-mode MOSFET (Q1~4) responds to a positive voltage on its gate (relative to its source) by allowing current to flow from its drain to its source. The gate-to-source voltage required to make it conduct is called its gate-source threshold voltage, Vgs(th), and is typically a few volts.

With no gate-source voltage, the MOSFET is OFF, i.e. non-conducting; no current can flow into the drain. With sufficient gate-source voltage present, the MOSFET is ON, i.e. conducting, and current can flow into the drain and out the source.

The gate of a MOSFET is totally isolated from the other terminals, so it can be driven to any voltage, but the gate voltage must be kept to within about ±15V of the source (even less for very small MOSFETs) otherwise the MOSFET will be permanently damaged. These MOSFETs are safe because this circuit has no voltages higher than 12V.

MOSFETs also contain a parasitic diode (parasitic because it's not put there on purpose; it's a by-product of how the device is made) between the source and drain. This diode is shown in the circuit symbol that I use, but it's not always shown on schematics. As long as the drain is positive relative to the source (for an N-channel MOSFET), the diode is reverse-biased and doesn't have any effect.

There's a lot more to know about MOSFETs but that's all you need to know to understand this circuit, until we get to the P-channel MOSFETs (Q5~7) that drive the LEDs.

GATE FORMED BY Q1~4

Q1~4 form a kind of active-low AND gate which will take a bit of explaining.

Follow the wires from the drains of Q1, Q2 and Q3. They go through diodes and into the -W, -R and -B nodes, which feed the MOSFETs, Q5~7, that drive the second block of LEDs. There is a 10k pullup resistor on each node.

These three nodes are active-low, as you can tell from their names, and they have pullup resistors on them. Therefore anything that pulls a node low will make the signal active, and will make the appropriate group(s) of LEDs light up.

The function of Q1~4 is to provide three active-low signals, on the drains of Q1~3, which pull down to 0V and activate the large blocks of LEDs, when the CH0, CH1 and CH2 signals go active (high), but only if the chaser is enabled.

First, look at Q4. Its gate is driven from M8, which is only high in mode 8, when the chaser is enabled. Therefore, in mode 8, Q4 will be ON, and it will conduct current from its drain to its source, which is connected to 0V. Another way to say this is that it pulls its drain, point K, down to 0V (low).

Q4's drain is connected to the sources of Q1, Q2 and Q3, so in mode M8 when Q4 is ON, the sources of Q1~3 are at 0V. In this state, a positive voltage on the gates of Q1~3 (from the CH0~2 signals) will turn them ON and allow them to pull their drains low. This will pull the -W, -R and -B signals low via the diodes.

Another way to summarise this circuit is:
While M8 is active, Q4 is ON and pulls point K low.
While point K is low, when CH0 is high, Q2 turns ON and pulls -R low via the diode.
While point K is low, when CH1 is high, Q3 turns ON and pulls -B low via the diode.
While point K is low, when CH2 is high, Q1 turns ON and pulls -W low via the diode.
When M8 is not active, point K floats and Q1~3 are not able to pull -W, -R or -B low because they have no path from their sources to 0V.

DIODE GATING ON -W, -R AND -B SIGNALS

The -W, -R and -B signals are all active-low, as indicated by the "-" at the start of their names. When these signals are low, the corresponding large bank of LEDs lights up; this is due to the action of Q5~7 which are described shortly.

These three signals have 10k pullup resistors on them (located beside Q5~7) so they default to the high (inactive) state and must be pulled low by other circuitry to illuminate the corresponding LEDs. I will use the white LED circuitry as an example.

When point F is pulled low (by the output of U3A), current flows from VDD, through the pullup resistor, through the diode (in the direction of the arrow), into U3A's output and to 0V. This current is limited to about 1.2 mA by the pullup resistor (I = V / R) and with this relatively low current, U3A is able to pull its output close to 0V.

In this state, the -W signal will be about 0.7V above 0V, because of the forward voltage of the diode. This is well within the voltage range for a logical low signal. Therefore, when point F is pulled low by U3A, this pulls -W low.

The same behaviour occurs with the other diode, which connects to point H. When Q4 is ON (enabled by the M8 mode signal) and Q1 is ON (enabled by the CH2 output from the three-way chaser circuit), Q1 pulls point H low, and the diode pulls -W low.

So the two diodes and the pullup resistor form an "active-low-logic OR gate". The output (the -W signal) is pulled high by the pullup resistor, but when either of the inputs (point F or point H) is low, the output (the -W signal) is pulled low by the appropriate diode.

The one-way action of the diodes means that the inputs do not interfere with each other. When one input is pulled low, the other input is free to be either high or low; it doesn't affect the output.

Strictly speaking this circuit is an AND gate, because if you consider the inputs and the output to be positive logic (active-high) signals, the output will be high only if the first input AND the second input are high. In this case it is used with active-low input and output signals and is more usefully thought of as a negative logic OR gate.

P-CHANNEL MOSFETS Q5~7

MOSFETs Q5~7 are P-channel, the opposite of Q1~4. They are also chosen to pass significant current, so the LED banks can be fairly bright. The details of MOSFET choice are covered shortly.

P-channel MOSFETs operate identically to N-channel MOSFETs but the polarities of all voltages and currents are reversed. The source, gate and drain do NOT change function. So the basic definition of behaviour of a P-channel MOSFET is that when the gate is brought negative relative to the source by more than the Vgs threshold voltage, the MOSFET starts to conduct current in its drain-source path. Using conventional current, which flows from positive to negative, this current flows into the source and out of the drain.

P-channel MOSFETs also have a parasitic diode between drain and source. This diode has no effect as long as the drain is negative relative to the source.

For an N-channel MOSFET, the arrow on the middle line points inwards; for a P-channel MOSFET, it points outwards. This is the opposite of the arrow on a bipolar junction transistor (this design does not use any BJTs). For both N-channel and P-channel MOSFETs, the source terminal is the one that connects to this middle line.

P-channel MOSFETs are typically (but not necessarily) drawn upside-down compared to N-channel MOSFETs; that is, with the source at the top. This is because conventional current flows from positive to negative and circuits are generally drawn with a positive rail at the top and a negative rail at the bottom, so conventional current flows downwards. For current to flow downwards through a P-channel MOSFET, the MOSFET must be drawn with its source at the top.

It is best to use this convention in schematic diagrams as it makes it easier for experienced folks to follow the diagram intuitively.

Remember though, the MOSFET still responds to voltage (negative voltage, in this case) on the gate relative to the source.

Q5~7 have their source terminals connected to VDD. Therefore to turn one of them ON, you need to bring its gate at least a few volts lower than (i.e. negative relative to) VDD. This is why the -W, -R and -B signals are defined as active-low. When the output of the negative logic diode OR gate pulls low, the corresponding MOSFET sees its gate voltage go about 11V negative relative to its source, and conducts current from its source (which is connected to VDD) to its drain, which supplies current to the connected LED banks.

LED BANKS

The main LED banks on the right of the diagram are activated by positive voltage from the drain of Q5, Q6 or Q7. They consist of strings of two or three LEDs in series, with a current limiting resistor in each string, with the strings themselves connected in parallel.

Taking the white LED circuit as an example, when Q5 is turned ON by a low voltage on -W, it pulls its drain (point J) up to VDD. (There is a very small voltage drop across the MOSFET, but we can ignore it.) Therefore, 12V appears across both of the strings.

Taking just the first string, there is 12V applied to a series circuit of a 360 ohm resistor and two white LEDs. White LEDs drop around 3.3V each at typical operating currents, so they drop 6.6V in total, leaving 5.4V across the resistor. From Ohm's Law, I = V / R = 5.4 / 360 which is 0.015 amps or 15 mA. This is the current that will flow in the string.

The second string operates the same as the first, and the blue LED strings are the same (blue LEDs also drop around 3.3V each so the calculations are the same).

Red LEDs drop about 1.9V each, and these are connected in strings of three. Total LED voltage drop is 3 x 1.9 = 5.7V leaving 6.3V across the 430 ohm resistors; I = V / R = 6.3 / 430 = 0.01465A or about 15 mA.

MOSFET ON-RESISTANCE AND POWER DISSIPATION

Q1~4 are only used at low currents - their function is to pull -R, -B and -W low, and they're only working against a 10k pullup resistor, which will draw no more than 1.2 mA (from Ohm's Law, I = V / R where V = 12V and R = 10,000 ohms). The choice of device for Q1~4 is not critical.

But Q5~7 need to switch more current - Q6 and Q7 are each supplying six strings of LEDs, each one of which draws 15 mA, for a total of 90 mA. This current is still not particularly high but I will use this example to explain ON-resistance (Rds(on)) and power dissipation in MOSFETs.

As I explained earlier, a MOSFET begins to conduct when its gate-source voltage exceeds its Vgs threshold voltage. (For N-channel MOSFETs, the gate must be positive relative to the source; for P-channel MOSFETs, the gate must be negative relative to the source, and the Vgs voltage may be referred to as -Vgs, the negative gate-source voltage.) But at the Vgs threshold voltage, the MOSFET only conducts weakly. It will not pass much current. If you try to load it heavily, it will drop voltage; it is not fully switched ON.

Switching a MOSFET fully ON is called "saturating" it, and this requires significantly more gate-source voltage. When a MOSFET is saturated, its gate-source path becomes like a low-value resistor, with a resistance known as Rds(on), i.e. the drain-to-source resistance when the MOSFET is ON (saturated).

Common Rds(on) values are between 0.01 ohms and a few ohms, and they are specified in the data sheets for most MOSFETs along with the gate-source voltage that you need to apply in order to saturate the MOSFET enough to get that drain-source resistance figure.

MOSFETs are generally fully saturated with around 10V gate-source voltage, which fits nicely with this circuit that uses a 12V supply rail. Many modern MOSFETs, especially the tiny ones designed for use in portable electronics, have Rds(on) specified at lower Vgs voltages, such as 4.5V and even lower.

Some small modern MOSFETs even specify Rds(on) at Vgs voltages as low as 1.8V! At such low Vgs voltages, even these MOSFETs do not saturate as strongly as they do at, say, 5V Vgs, and their Rds(on) specifications at Vgs=1.8V are somewhat higher than at Vgs=5V but they are still useful.

In this design there's no problem with saturating Q5~7. The types I've suggested, Fairchild FQU11P06, are actually rated for 9.4A maximum drain current - 100 times more than the current they will actually run at - but they have a relatively low Rds(on) of 0.185 ohms (at -Vgs=10V) which minimises losses and heating in the MOSFET. In a commercial design where every cent matters, you would use a cheaper part, but they're only USD 0.76 from Digikey in 1-up quantity, so for this project they're a good fit.

More importantly, when you're buying small quantities from Digikey, it's often more economical to buy a few extras on the assumption that you will use them in other designs; these MOSFETs are more likely to be suitable for other higher current designs.

With an Rds(on) of 0.185 ohms and a load current of 90 mA (for Q6 and Q7 when the LEDs are ON), voltage drop across the MOSFET can be calculated using another rearrangement of Ohm's Law: V = I R, where I is current in amps and R is resistance in ohms. So V = 0.09A x 0.185 ohms which is 0.017 volts or 17 mV (millivolts), only 0.14% of the total supply voltage.

Power dissipation in the MOSFET is calculated from voltage multiplied by current, which is 0.017 x 0.09 which is only 1.5 mW (milliwatts). This won't produce any detectable heating in the MOSFET; typically you don't need to worry about heating in a small component until the power dissipation exceeds around 100 mW for small surface-mounted components and around 300 mW for larger components.

This description only applies when the MOSFETs are being switched at relatively low frequencies - up to the kilohertz range, and with simple resistive loads. At higher frequencies, and with inductive loads, other circuit parameters become important in ensuring quick and clean switching and minimising power dissipation in MOSFETs.

POWER DISSIPATION IN LED RESISTORS

Speaking of power dissipation, it's worth checking the power dissipation in the resistors in the LED strings. The worst case is the 430 ohm resistors in the red LED strings, which have 6.3V across them and 15 mA current through them. Again, power dissipation is the product of voltage and current, which is 6.3 x 0.015 which is about 0.1 watts. This means the resistors need to be specified for at least 0.2 watts dissipation; standard resistors are rated for 0.25 watts or more. 100 mW will produce a slight heating effect in the resistors but nothing to worry about.


I think that's a pretty thorough explanation of the circuit and coverage of relevant subjects. I welcome feedback.
 

Attachments

  • WATERWALKER.003.GIF
    WATERWALKER.003.GIF
    34.2 KB · Views: 238

WaterWalker

Sep 21, 2013
15
Joined
Sep 21, 2013
Messages
15
Hi Kris

Terribly sorry about the long wait for a reply. Work is keeping me busy 12 to 19 hours a day. It kinda sucks.

Anyways, I wanna thank you so much for the schematic and all the available info as well. A lot of it is a bit over my head, but I will do web searches to help me better understand it all. I will also post pics of the final result when I do get to building. (Still waiting for the IC's. Didn't have them available)

Again, thank you.
 

WaterWalker

Sep 21, 2013
15
Joined
Sep 21, 2013
Messages
15
Hi Kris

I'm back with an update, and a problem. I have finally gotten a working prototype of the circuit, after about 5 builds, a few blown IC's and various other problems. Now, I need help with a final hurdle.

The problem is as follows. Whenever the 'Blue' circuit activates (3, 5 and 6 button presses), the 'Red' and 'White' circuits activate with it. But this only happens with the LED strings that will be inside the PC. The LED's that are in the front works 100%. If I remove Q3, then it all works perfectly, except of course for the chaser circuit. I've looked for shorts but couldn't find any. I've changed Q3 and Q7, still no joy. Changed all of the IC's, suspecting bad ones, also didn't do anything. If I do a continuaty check when the 'Blue' circuit is active, I find that all outputs on IC 'U2' is on or is shorting. But when power is removed, there is no connection.

I know I've made a mistake somewhere, but all my checks, testing and connections have brought me no closer to a solution. Please help.

Any ideas or comments would be welcome.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Whenever the 'Blue' circuit activates (3, 5 and 6 button presses), the 'Red' and 'White' circuits activate with it. But this only happens with the LED strings that will be inside the PC. The LED's that are in the front works 100%.
OK...
If I remove Q3, then it all works perfectly, except of course for the chaser circuit.
OK! That's probably an important bit of information. Nice work Sherlock :)

Did you work from version 002 of the circuit? The version in post #21, that has the diodes in series with the drain paths from Q1, Q2 and Q3? If not, you'll need to add them.

If that doesn't help, you could try adding a 10k resistor from point J (the drain of Q4, and the sources of Q1~3) to VDD.

If that doesn't help, I'll have to think a bit harder!
If I do a continuaty check when the 'Blue' circuit is active, I find that all outputs on IC 'U2' is on or is shorting.
I'm not sure what you mean. When power is ON, you should measure continuity between all the outputs and 0V, apart from the output that's currently ON. Those are voltage outputs, so you should measure them on the voltage range.
I know I've made a mistake somewhere, but all my checks, testing and connections have brought me no closer to a solution.
It could be a design error. Might not be your fault at all.
 

WaterWalker

Sep 21, 2013
15
Joined
Sep 21, 2013
Messages
15
Ash.png
Did you work from version 002 of the circuit? The version in post #21, that has the diodes in series with the drain paths from Q1, Q2 and Q3? If not, you'll need to add them.

If that doesn't help, you could try adding a 10k resistor from point J (the drain of Q4, and the sources of Q1~3) to VDD.

If that doesn't help, I'll have to think a bit harder!

Yup. Well, actually, I used version 003. So, the series diodes were in. I also did try the 10K resistor, and a 12K just to be sure. That didn't do anything. :'(

I'm not sure what you mean. When power is ON, you should measure continuity between all the outputs and 0V, apart from the output that's currently ON. Those are voltage outputs, so you should measure them on the voltage range.

I guess I'll have to clarify this. Basically, what I did was to put the positive test probe of the multimeter on pin 7 (M3 - which is the 'Blue' circuit) of U2. I then put the negative test probe sequentially on the other outputs of U2 while the circuit was active. I found that there was a dead-short between all of the outputs (M1 - M9). Is this still correct?

Now, I have attached a (very) primitive sketch of the circuit as it is on the veroboard. Please don't laugh. I tried my best to make it to be understood. :oops:
Since I couldn't use proper IEEE symbols (it got cluttered and confusing after U3), I changed some symbols for ease of drawing and I have included a legend with the drawing.
Just some notes on the drawing -

All components are drawn in red.
All wires are drawn in pink/magenta.
All wires connected directly to VDD are drawn in green.
All wires connected directly to GND are drawn in black.
All components are on the real board as they are laid out on the drawing.

Should you have any questions, please ask.
And, thanks again for the help.
 

WaterWalker

Sep 21, 2013
15
Joined
Sep 21, 2013
Messages
15
Ok. So I have done some more testing. Now, only the chaser circuit isn't working properly. I only changed one component. I changed Q3 which is a 2N7000 transistor for a BS107A transistor. Outputs M0 to M7 is working 100%. The chaser circuit however, isn't behaving. The 'Blue' circuit stays on the whole time. Again, it's only for the LED's that will be inside the PC. The LED's that will be driven by Q3 and Q7. The 'Blue' circuit on IC U4 pin 10 works 100%.

I hope this, coupled with all the other data might point to my mistake. It has to be my mistake, considering that a change of a component almost made a world of difference.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
That sounds like Q3 is faulty, or installed backwards, or there's a problem with the signal on its gate.

You can check some things. Check the voltage on the gate of Q3, from pin 2 of U5. It should go high when the blue period of the chaser is due, and low when the red and green periods of the chaser are due. This should be true no matter which mode is selected.

The voltage on Q3's source (also Q4's drain, and point J on revision 002) should be low when chaser mode is selected, and should increase to around a few volts when it isn't.

Actually, I'm going to make an improvement in that part of the circuit, because the voltage on point J is not properly defined: delete Q4 altogether, and use U4B to invert M8 to point J. I'll attached a version showing what I mean.

But if Q3's gate voltage is doing the right thing, it's probably Q3 - either faulty, or installed wrong - source and drain reversed, maybe.

Here's the updated schematic. If you haven't found the problem with the suggestions I've made above, you could try making the changes. Although that bottom left corner looks a bit different, that's just because I had to move the chaser oscillator around to make it fit. The only difference is U4B, which was previously unused with both inputs tied high. Now, one input is still tied high, and the other input goes to the M8 signal, and the output goes to the sources of Q1~3 (previously point J, now point K), with Q4 deleted. This gives a clean, properly defined logic level at point J/K. Using Q4 to invert M8 did not do that.

263649.004.GIF
 
Top