Multivibrator circuit with tri colour LED - Page 1
Forum section: electronics / beginners

author: yada
author_rank: Frequent Contributor
timestamp: April 16, 2017, 08:22:06 pm
content: Hello all,I'm making a multi vibrator circuit to flash LEDS but the tri colour LEDS have a common +.Does this mean the circuit needs NPN transistors?-Y

author: rstofer
author_rank: Super Contributor
timestamp: April 16, 2017, 09:10:48 pm
content: Short answer: yesLonger answer: you will connect the common anode pin to +V, then you will add a resistor to each of the 3 cathodes and pull each resistor to ground with a separate transistor. The value of the resistors will not be identical due to differing Vfand the amount of current you need to pass to get the illumination you want.

author: Audioguru
author_rank: Super Contributor
timestamp: April 16, 2017, 10:44:11 pm
content: If the output of the multivibrator has enough current for all 3 LEDs and you want all 3 LEDs to light at the same time then you do not need any transistors, just a resistor to limit the current for each LED.

author: Zero999
author_rank: Super Contributor
timestamp: April 16, 2017, 10:50:54 pm
content: Quote from: Audioguru on April 16, 2017, 10:44:11 pmI presume the original poster is talking about two LEDs, in the same package, which is known as a tricolour LED because switching both LEDs on at the same time creates a third colour. I believe the idea is to make the LED flash two colours alternately.

author: yada
author_rank: Frequent Contributor
timestamp: April 17, 2017, 12:11:39 am
content: Quote from: Hero999 on April 16, 2017, 10:50:54 pmYes two colours and two LED.How can I modify this circuit or should I find a better example?

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2017, 12:35:17 am
content: So do have a bicolour LED? That's one with two leads, and a pair of LED dies inside it. Connect it one way round it glows red, the other way round it glows green.Or maybe a tricolour LED? That's one with three legs. One common, one leg for red and another for green. If you connect a single colour and common with the correct polarity it glows that colour, and if you connect both colours with seperate resistors, the colours mix to give yellow.If its a common cathode tricolour LED, its easy, just use the circuit you posted. Common anode is harder, either you have to rebuild it with PNP transistors so you can reverse the supply to the whole circuit, or you have to add two extra transistors in place of the LEDs above to drive a common anode tricolour LED.Bicolour LEDs also need the extra transistors, but the details of the wiring are slightly different, and the simple circuit wastes more power.We'll get to the circuits when you tell us how many legs your LED actually has, and if its got three legs, whether its common anode or common cathode.

author: ocw
author_rank: Regular Contributor
timestamp: April 17, 2017, 12:42:21 am
content: Tricolor LED's most commonly refers to RGB LED's rather than RG LED's which also produce yellow with both lit. Although multi-vibrator makes me first think of switching between two states.Rather than switching between colors I prefer what I built on a prior project. I had about a 1/20th Hz oscillator feeding the red LED, 1/19th Hz oscillator feeding the green LED and a 1/18th Hz oscillator feeding the blue LED all in a tricolor LED. That provided a slowly changing background color to 143 LED's arranged in a 13 x 11 display. These were the square Bivar R50RGB-F-0160 LED's ( see:http://www.bivar.com/Portals/0/Products/d.ashx?f=/Portals/0/products/R50RGB-F-0160.pdf) mounted right next to each other.Each of the LED's was fed the three oscillating voltages. The voltage and current to each color LED had to be set to produce the same luminous intensity. The red and more-so the green LED's obviously had to be "turned down" in intensity to match the blue intensity. Isolating diodes separated the voltage feeding each LED since another voltage would also feed each LED so that a changing color image/text display would also be visible with the changing color background.My goal in designing the project was not to figure out how to simplify construction, but rather to do it the hard way and be as wiring intensive as possible. Attached is a picture of the back of the display board. That is what it looks like when you have three wires to each of 143 LED's with two ground wires for each of the 13 LED rows. That means that there are 495 wires between the display and logic boards.Don't think that the logic board had a programmable microprocessor on it. Keeping with my wiring intensive theme I just used simple logic with specific wires for each segment of text and each segment of the simple pictures shown. I don't want to show the compromises used in that part of the construction. But, it has been producing its changing display for over a year without any problems.

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2017, 12:56:39 am
content: Perhaps I am out of date, but I can assure you that back in the '80s before cheap blue LEDs, three legged Red/Green LEDs were marketed as 'tricolour'. RGB is quite unambiguous. Bicolour and Tricolour less so.

author: yada
author_rank: Frequent Contributor
timestamp: April 17, 2017, 01:38:14 am
content: Thanks for all the help!!!They are RGB LED with four legs. You supply power to one leg and ground out which colour you want. Common anode I think?

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2017, 01:54:57 am
content: OK. Your description matches comman anode RGB. There's no way of flashing three colours with a single multi-vibrator. You either have to pair two colours (with a separate resistor for each colour), or you have to leave one out completely.What's your supply voltage? If its high enough for the differences in LED Vf to be unimportant, you may simplybe able to insert your chosen LEDs in the RGB package between the top end of the 1K resistors and Vcc.N.B. 1Meg resistors in the circuit above require the transistors to have a HFE>1000. 100K would be safer. Also the capacitors are the wrong way round - if you use electrolytics, the positive lead needs to go to the collector, not to the base.

author: ocw
author_rank: Regular Contributor
timestamp: April 17, 2017, 03:45:47 am
content: A simple circuit that would do what you are talking about is a three output ring counter.

author: yada
author_rank: Frequent Contributor
timestamp: April 17, 2017, 05:23:40 am
content: My supply goes up to 30V at 2A, so not a problem, I also have some big transistors can use in strange block shapes with a hole in them but not the standard with the tab on the top. Handle up to an amp or something high. I was just planning on flashing one color at a time but with two LED alternating colours.Three output ring?

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2017, 06:34:47 am
content: If you go over about 9V supply you have to modify the standard multivibrator circuit and add diodes in series with the transistor bases.Try the circuit above, modified to remove the LEDs below the transistors, connecting both emitters directly to ground, and connect the top ends of the 1K resistors to two of the RGB LED cathodes, with the supply to the common anode (and, of course, to the base pull-up resistors), You may need to decrease the base resistors to 100K and increase the two capacitors: try 10uF Aluminum electrolytics, rated at 16V or greater, with the - lead towards the base and the + lead towards a cathode.

author: yada
author_rank: Frequent Contributor
timestamp: April 17, 2017, 07:08:29 am
content: So like this but with the multiple LED leads?

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2017, 07:18:28 am
content: No. The LEDs need to go in series with the collector resistors, not the base ones.

author: yada
author_rank: Frequent Contributor
timestamp: April 17, 2017, 07:58:18 am
content: We have 0 amps being pulled according to the supply at 9V.

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2017, 08:23:05 am
content: Well it looks like you've mixed up the resistor connections. The lower value resistors *MUST* go to the collectors, not the bases.However that doesn't explain why its drawing no current as, with the LEDs in series with the resistors connected to the bases, both colours should be lit continuously. Maybe you've messed up the LED connections as well, or got PNP transistors or mixed up their pinouts?Also using power transistors may cause further problems. Their gain needs to be over 200, but many power transistors have lower gains. Have you got any NPN small signal transistors in TO-92, E-line or TO-18 packages instead of whatever TO-126 package devices you've got there.

author: yada
author_rank: Frequent Contributor
timestamp: April 17, 2017, 10:47:26 am
content: Quote from: Ian.M on April 17, 2017, 08:23:05 amThose are ECB 100k is in the middle: Collector and 470 ohm is all the way to the right which is the base. They are BD140 which is PNP.I connected two red LED in place of RGB. I then connected a 1k ohm outside the circuit to the positive rail and took a wire probe to the collectors; applying + to each collector lead and the LED would light up that was attached to the OTHER transistor. I tried this with both collectors at once and both lit up, but no switching. So its doing something. Double checked the connections again. Ill try two BC557, instead...

author: yada
author_rank: Frequent Contributor
timestamp: April 17, 2017, 11:22:48 am
content: So I tried:557327Caps are 4.7ufI have built this before with that size cap and I think the same resistors blinks at 1hz. Normally when this circuit doesn't work just one LED stays on. Or they both go dim. When I put the + to the collectors it draws 4ma.What is the math or the theory behind this circuit? Maybe we can figure it out from that angle. The resistors must be too high or not different enough in value to make the transistors turn on.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: April 17, 2017, 01:29:23 pm
content: Er.... you do realize that your schematic is for NPN transistors right? And the BC557 and BC327 and BD140 are PNP transistors....Try using a PNP multivibrator circuit, like this one:

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2017, 01:33:37 pm
content: @Yada,WHY, OH WHY are you using PNP transistors, when all the schematics you have shown us require NPN ones?Use small signal NPN transistors, with HFE>100 @Ic=10mA, identify their leads correctly and make sure the positive supply is connected to the top rail of the schematic and the proposed circuit will work.I've drawn up the schematic for you to reduce misunderstandings. The 2N2222 transistors are just for examples, you can substitute any general purpose small signal NPN transistors with enough gain.@Alsetalokin4017: He cant use your proposed schematic with acommon anodeRGB LED.He could put the LEDs in series with the PNP emitters, but the difference in Vf between Red and Blue is going to cause it to be rather asymmetric.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: April 17, 2017, 01:41:08 pm
content: Ah, true, I didn't consider the Common Anode part.Well, I guess it is time for him to get some NPN transistors then.(Isn't anyone going to suggest that he use a simple microcontroller like ATTiny?)

author: ocw
author_rank: Regular Contributor
timestamp: April 17, 2017, 02:26:43 pm
content: You are limiting yourself to just two colors with a multivibrator. Google ring counter. The most frequently shown circuit has four flip flops. Eliminate one flip flop and you can feed the separate RGD LED leads (possibly needing a transistor interface if your LED current is over the IC's limit). Or stay with four flip flops, add diode isolation and cycle through red, green, blue and then yellow.A simpler way is to use a decade counter. I have used the CD4017B version recently. It effectively has ten flip flops in series in one IC. You could sequence through 10 different colors with just this one IC and a clock (with diode isolation and resistors to set the individual LED intensities). However, you can limit the IC to count up to anything between 2 and 10 by connecting its reset pin to the proper output. So, if you just want the three basic colors, fine, the same counter will work perfectly.

author: Zero999
author_rank: Super Contributor
timestamp: April 17, 2017, 10:15:02 pm
content: Quote from: alsetalokin4017 on April 17, 2017, 01:29:23 pmOr put the LEDs in the emitter side, as was shown with the NPN transistors above?Quote from: ocw on April 17, 2017, 02:26:43 pmOr your could use a ring oscillator, consisting of three logic gates.

author: Ian.M
author_rank: Super Contributor
timestamp: April 17, 2017, 10:45:56 pm
content: ... Or even three transistors. Transistor ring oscillators can be rather fussy as the odd number of inverting stages can allow the negative feedback round the circuit to damp the oscillation. They only work if the transistors can saturate, breaking the negative feedback loop.