Wiring 3 output

Thread Starter

FroceMaster

Joined Jan 28, 2012
632
Hi,
Have this setup and it seem to not function like i would have it

When high on 1. the T1 should be on.
When high on 2 the T1 and T2 is on.
When high on 3 the T1 T2 and T3 is on.
Works ok when testing with 5v, constantly.,
But now i am sending a pulse at 1 ms, on and 2 ms off, and that gives me a steady 5 v on on T1
Cant the Diodes not handle it ?

Use of a scope,

Rgds
3 out.png
 

Irving

Joined Jan 30, 2016
1,019
On the face of it that should work. Can you show how T1, T2 & T3 are onward connected,; where do their C and E go? Also values of R1 - R3.
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
632
here is some more.
Have only connected some of the LED to T1, there are 12 IRL.
T2 and T3 are using 8 and 5 LED withe corresponding Resistor.
3 out-2.png
 

Irving

Joined Jan 30, 2016
1,019
ok. 12 LED @ 1.5v = 18v, therefore with R4 = 1200, Ic = (24 - 18)/1200 = 5mA.
On input from MCU: Voh MCU ~ 4.5v - Vf D7 - Vbe T1 = 4.5 - .7 - .7 = 3.1v Ib = 3.1/2700 = 1.1mA, required Hfe T1 = 5/1.1 = 4.5 << typical hfe of 100, so OK. T1 should saturate. Its a 300MHz device and no other capacitances of note therefore 1mS pulse should work. Can you see it on collector of T1?

Were you expecting to see LED come on at 1/3 brightness? A 1mS on/2mS off pulse is too short to be seen by eye on LED. Your pulses need to be around 30Hz, so 10mS on, 20mS off
 

Audioguru again

Joined Oct 21, 2019
1,931
1ms on and 2ms off is a cycle of 3ms which is a frequency of 333Hz. Your vision sees frequencies higher than about 30Hz as being on continuously. Can you see the 50Hz or 60Hz flicker from cheap LED Christmas tree nights?
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
632
Yes i can also see an old tv flicker, that's why i need 100 hz.
But is the speed any problem ?
Lights are on,
Have been doing some testing with my scope.
And also postet the total scematicks.
Think maybe the problem is the MCU, cause the OUT RB2 from MCU is allways high,
Pulsing on RB0, so the MCU is running,
No flicker in lights.
Have been asking for connecting the Transsistors as i have in scematics, and that have i been told should work,
2 in "series", the lights is on, so i should work :)


big total.png
 

Irving

Joined Jan 30, 2016
1,019
Well ok, but you have it running at 333Hz. If its 100HZ cycle time is 10mS, 1/3rd brightness Ton= 3.3mS, Toff 6.6mS

The second level transistor, e.g. TS01 - TS14, how many of these will be on at one time? Because, if all, then that's nearly 300mA through TSMAIN, which would then need a lower value of base resistor to turn it on fully, 1kohm.
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
632
as can see on the scope, 2 ms on 4 off = 6 ms, = 116 hz,
Yes it flicker, but that could be to the fact i have 2 transistor in series ???
20200726_175035.jpgStill need to figure out why the output is allways high.,

There is only 1 set's of LED on at a time, 3*20mA = max 60 mA, for 2 ms.
Ex.
T00 = on. T01 >> T15= off. and TSMAIN "pulls" 60mA,
2 ms after
T00>>T14 = off, T15= on and TSMAIN "pulls" 60mA.

'Hard to explain, but the MCU only let one set on at a time, then all off, and then next sets on, ect.ect.
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
632
TT15 and TTMAIN are as far as i know in series,.
The "ground" Emitter from TT15 is connected to Collector on TTMAIN.

But they are turned on at the same time in MCU.
 

Irving

Joined Jan 30, 2016
1,019
That's fine and should work OK.If your MCU outputs are correct, this should work. Here's a quick LTSpice simulation.
R1,R2,R3 represent 20mA loads. V2,V3,V4 are effectively a 3-bit 'binary counter' at 50Hz. V1 is a 100Hz square wave (PWM).

1595795180049.png
 

Attachments

WBahn

Joined Mar 31, 2012
26,156
Since the control signals to all three switching transistors come from the MCU, it would seem like the simplest and best solution would be to simply modify the code to implement the logic you mentioned in your original post and have the MCU output the three signals specific for each switching transistor. That eliminates all of the diode logic you are using.
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
632
Since the control signals to all three switching transistors come from the MCU, it would seem like the simplest and best solution would be to simply modify the code to implement the logic you mentioned in your original post and have the MCU output the three signals specific for each switching transistor. That eliminates all of the diode logic you are using.
Yes, i use the diode cause in design due to i think it would flicker , due to speed of mcu, but know i know it will run fast enough, Back to work again
 

Irving

Joined Jan 30, 2016
1,019
Further, while the series NPN configuration works, it is more conventional to implement an X-Y matrix like this using both NPN and PNP transistors or N- and P-channel MOSFETs. As you have it, you'd have 14 X-switches, NPN to ground, and 3 Y-switches consisting of an NPN/PNP pair switching the 24v rail to each set of LEDs. You can easily implement this by connecting the TTxx, TMxx and TSxx emitters to ground., adding 3 10k resistors from +24v to the collectors of the three yyMAIN transistors, and adding 3 PNP transistors, emitters to +24v, collectors to the resistors of the LT, LM and LS LED strings and bases via 10k resistors to the collectors of TTMAIN, TMMAIN and TSMAIN respectively. This way you don't have any concerns about how the switching point of the upper transistor in the NPN series arrangement, which is effectively operating as an emitter-follower, is affected by the Vce of the yyMAIN switching transistors over current and temperature variations.
 

Tonyr1084

Joined Sep 24, 2015
5,091
You cannot see flickering at your 333Hz. You see flickering at 30Hz and lower.
Most video cameras operate at 30 frames per second. Cheaper ones run at 27 frames per second. The cheaper ones produce video that begins to look choppy. So, yes, I agree, 30Hz (or 30 frames per second) lend to a smooth and continuous output.
 
Top