HOW DOES THIS WORK?? Bench light circuit has me stumped... - Page 1
Forum section: electronics / projects

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 26, 2020, 10:32:15 pm
content: Okay I took apart a simple bench light (the kind with tons of super bright LED's) and tried to reverse engineer the tiny little circuit board.First, all the tiny SMD components (diodes and transistors) have no markings so I used LTSpice defaults. No big whoop. I think.It's got two, paralleled 4V sealed lead acid pieces of crap, and they're charged directly via the 120v wall outlet thru a full bridge (8-10 hours to charge, and only5 hoursusage on HI; which means maybe 2-4 AHr batteries? No markings on anything). It has a switch to select HI, LOW, and OFF, and I think all those do is switch in some different biasing resistors for a couple of transistors to vary the current thru the LED array. BTW, I only show the HI configuration in the LTSpice circuit .I measured the actual and it's about 360mA thru the LED array when ON HI.If you look at the attached LTSpice I made, the simulation results do pretty much match what I measured on the real unit. But I'm trying to figure a couple things:- WTF is the D5, and why is the bridge output circuit hooked up like that? Maybe I goofed? Makes no sense, but seems to work and I triple checked the connections on the board. Makes my brain explode.- The RC frontend (200k) I suppose blocks DC and limits the battery charging current? I don't understand how the output of the 120V rectifier matches the required 4+volts to charge the battery. DOH!!!- And one other PITA about this piece of garbage is that you can't have the light ON when it's plugged into the wall (it doesn't charge the battery). But I don't see how that is reflected in the circuit.Anyway, thanks for any help.

author: thm_w
author_rank: Super Contributor
timestamp: March 26, 2020, 10:52:26 pm
content: D5 or D7 is not a zener?Watch some of BigClives videos, he does a good job of explaining capacitive dropper circuits. Although I don't know a specific one to match that circuit.Here is a solar/ac lead acid video:https://www.youtube.com/watch?v=IMYaWd_wuf8C1 is the key in the front that allows a limited amount of charge to pass into the rectifier, R1 is to discharge C1 for safety.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 26, 2020, 10:57:59 pm
content: Quote from: thm_w on March 26, 2020, 10:52:26 pmThanks. Yeah, D5 or D7 could be freakin' anything. No markings, and so tiny that all I can see is the "D" designation for both on the board.

author: Biduleohm
author_rank: Contributor
timestamp: March 26, 2020, 11:00:04 pm
content: I don't know about D5. At first I thought it was used to create a 0.6 V drop to do something with Q2, but nop, makes no sense.That's a capacitive dropper. You use a cap instead of a resistor to limit the current thanks to its impedance. The 200 k is just here to discharge the cap so you don't get zapped if you touch the plug just after unpluging it.My guess is it's Q2 who prevent the light to be on while charging but we don't know how the LEDs are connected so it's hard to tell. Can you add the LEDs on the schematic?

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 26, 2020, 11:05:40 pm
content: Quote from: Biduleohm on March 26, 2020, 11:00:04 pmThanks. Yeah I'll see if I can add the LED's.BTW, there's also an "SOS" position of the switch, and that connects a biasing resistor to the Q2, but I left that out because my brain already exploded. It's supposed to set up an SOS code flashing but of course doesn't work. Not that I care...

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 26, 2020, 11:20:04 pm
content: DOH !!! Here's an image of the LED array board. + and - coming in on the right, and I have no freakin' clue how to model any of that. Some cheap-ass cardboard with what looks like a layer of metal trace under the gray paint???

author: Biduleohm
author_rank: Contributor
timestamp: March 26, 2020, 11:23:41 pm
content: We don't really care about the LEDs themselves, but more where the LED+ and LED- are connected on your first schematic.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 26, 2020, 11:24:44 pm
content: Quote from: Biduleohm on March 26, 2020, 11:23:41 pmOn the far right, the 10 ohm resistor marked "LED OUTPUT".

author: Biduleohm
author_rank: Contributor
timestamp: March 26, 2020, 11:40:46 pm
content: You mean R2 is in fact the LEDs?

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 12:07:05 am
content: Quote from: Biduleohm on March 26, 2020, 11:40:46 pmYup. Like I said, I measured actual current feeding the LED's (via multimeter) and it came out to around 360mA, so I chose a 10 ohm resistor to represent the LED array. A little under 3.8 volts across 10 ohms = 380mA.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 12:37:51 am
content: Quote from: thm_w on March 26, 2020, 10:52:26 pmThanks, yeah you're right. Both the D5 and D7 are zeners, type 1N4007 (M7). So small that I missed it. I think 1 A, 1000volts or something.

author: Biduleohm
author_rank: Contributor
timestamp: March 27, 2020, 12:49:50 am
content: Ok1N4007 is a very common rectifier diode, not a zener. And yep, 1 A and 1 kV.And I think I know what D5 is for: allow to charge the battery but prevent D6 to be powered by the battery while not charging.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 01:19:56 am
content: Quote from: Biduleohm on March 27, 2020, 12:49:50 amOkay. I put in the correct 1N4007's. My sim with the charging AC source on shows about 4.6 volts across the big capacitor C2, and -0.6 across D5, which means it's forward biased I guess.Current is flowing "up" D5 towards C2, and current thru C2 is flowing down towards D5My brain officially exploded.

author: Biduleohm
author_rank: Contributor
timestamp: March 27, 2020, 01:30:06 am
content: That makes sense. If you redraw the schematic with the battery negative in the middle and the charger negative "-Neg" at the bottom it should make more sense to you of what's happening.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 09:39:04 am
content: Quote from: Biduleohm on March 27, 2020, 01:30:06 amThanks. But I'm still wrestling with the fact (?) that there should be a 120V full wave signal across the C2 at the output of the rectifier, right? But it's about 4v instead. So maybe the parallel RC at the bridge input on the AC side knocks down the 120VAC or something? And that damn D5 diode between the rectifier output and the battery negative just makes me insane.

author: JohnPen
author_rank: Regular Contributor
timestamp: March 27, 2020, 10:28:34 am
content: An approximate calculation suggests that 4 volts across C2 is correct for a 120 vac supply. The impedance of of the 0.7 ufd at 60 hz is about 3.8K plus a small adjustment for the parallel 200K.

author: Prehistoricman
author_rank: Regular Contributor
timestamp: March 27, 2020, 11:24:20 am
content: You have a ground connection on the negative side of your AC voltage source. You probably don't want that there. Even if you're calling that neutral and neutral is connected to earth, it still isn't ground in your light circuit.Quote from: engrguy42 on March 27, 2020, 09:39:04 amWe keep telling you! It's acapacitive dropper. That phrase means that it drops the current/voltage using a capacitor. Bigclive has shown this circuit many times, and he likes opening up exactly this kind of product, so you should take a look at some of his vids.D5 provides a return path for the current going into the LEDs when the unit is charging.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 11:54:47 am
content: Quote from: Prehistoricman on March 27, 2020, 11:24:20 amYeah, but the capacitive dropper is dropping relative to what?? I'm thinking it's a voltage divider, but I'm not seeing what it's dividing with...Yeah, I never watched bigclive, but noticed he's got 3,567 or more videos dealing solely with lights. Wow. When I get a couple of months free I'll scan themAs far as the ground, with LTSpice I'm never quite sure what it needs for grounds. Sometimes it complains.Anyway, apologies if I don't get this right away. I've been drawing and redrawing and trying to figure the details of this for a couple of days and I think I need to step away from it for a bit and come back at it fresh. I get to where I think I understand something, then simulate it, then grab the meter, then realize there's a tiny trace running under a resistor on the real board, etc.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 11:59:50 am
content: Prehistoricman sez: "D5 provides a return path for the current going into the LEDs when the unit is charging."BINGO !! Thanks so much. Makes perfect sense !!!!You get 10 thumbs up for this

author: g0fvt
author_rank: Newbie
timestamp: March 27, 2020, 12:06:24 pm
content: As others have already said C1 is used as a capacitive dropper, R1 is only in circuit to bleed charge from the capacitor. All pretty normal so far, as others have said the "common" connection is misleading, I believe that D5 and D7 should be zeners and not 1N4007s. FWIW I believe that you have the collector of Q2 identified as going to the wrong place, I believe it is supposed to go to the base of Q1. This would then ensure that whilst charging that the LEDs are off due to the base of Q1 being clamped low. TBH a few aspects of the circuit may be misdrawn. Sometimes a single connection in the wwrong place can make reverse engineering very difficult.

author: g0fvt
author_rank: Newbie
timestamp: March 27, 2020, 12:14:29 pm
content: Just FYI the capacitive dropper works simply, the capacitor will have a given impedance at 50/60Hz. For a given applied AC voltage you will get X amount of current flow (with phase shift). The reason capacitive droppers are used in AC circuits is that they are "wattless". IE a resistor with perhaps 100v rms applied and a current flow of 100mA would need to dissipate 10w, a substantial amount of heat to deal with in a tiny circuit. A suitable sized capacitor could have the 100mA current flow with no heating.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 12:21:05 pm
content: Ahhh...okay...I saw a website discussing capacitive droppers and I think what you guys are saying is that the capacitance is the major player, providing an almost constant current or current limited source to the LED's.So the LED's are almost like what the capacitor is "tuning" to. Since you're down at such low values of amps (in this case like 120VAC divided by the 3k or so impedance of the input capacitor), the voltage on the secondary of the rectifier is a bit irrelevant, since what's being delivered is low amps (in this case like 360mA) to the LED load.Okay, even if I'm wrong, that's good enough for me

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 12:29:28 pm
content: Quote from: g0fvt on March 27, 2020, 12:14:29 pmThanks. Yeah, the transistors have no markings whatsoever, so I'm kinda guessing on what they're doing. And also with regards to Q2, I'm not showing a resistor that gets inserted between + and the base of the resistor when the switch goes into LOW mode, like it is with Q1 (the circuit is shown in HI position). I assumed that's just a biasing resistor to allow you to turn on Q2, and when it's switched out then Q2 can't turn on. And when it does turn on in LO mode it pulls more current thru the LED's? Makes no sense, but it's all I could figure.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 01:01:05 pm
content: Okay, I greatly simplified my circuit to include only the AC source and rectifier, feeding a filter cap and a resistive LED load. And with the right choice of LED ohms (in this case 300), I get a very ripply 4 volts across the LED. Beauty.So I guess it's just a matter of selecting the right C for the load. Wow, what a piece of crap.And to think I was originally gonna not even include the RC input since I thought it was just a filter for the AC.

author: Prehistoricman
author_rank: Regular Contributor
timestamp: March 27, 2020, 01:04:10 pm
content: These kinds of products are built down to such a price that they need every sneaky transistor/diode trick they can use. And that can make them surprisingly hard to analyse for being simple.You say it doesn't charge the batteries if it's plugged in and the lights turned on, right? That would be an interesting thing to investigate.Why did you use a resistor in the schematic instead of the LED array? You can use a single diode and edit its properties to make it behave like the whole array.

author: Prehistoricman
author_rank: Regular Contributor
timestamp: March 27, 2020, 01:06:52 pm
content: Oh, and since the capacitor in the dropper is basically an AC resistor, a very common failure mode for mains LED lamps is for 1 LED to break (in a string of 30 or so LEDs) and then the filter capacitor explodes. Without the load, the output voltage rises greatly and the filter cap is often not rated for 300/400V.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 01:10:18 pm
content: Quote from: Prehistoricman on March 27, 2020, 01:04:10 pmYeah, as a matter of fact the other day I made the mistake of leaving the light on all night while charging and the next day the light was super dim and battery dead. The manual even says STEP 1: Turn off the light before charging.As far as modelling the LED array, I didn't think it was worth figuring out the LED characteristics in any detail. I inserted my ammeter, read the current value, and that's all I needed. Are you thinking the LED characteristics would make an appreciable difference in any of this?

author: Prehistoricman
author_rank: Regular Contributor
timestamp: March 27, 2020, 01:31:08 pm
content: Quote from: engrguy42 on March 27, 2020, 01:10:18 pmNot in the DC state. Yes for anything AC or transient.I think your most recent graph would look smoother with LEDs rather than a resistor.I don't know how LT-SPICE works but to get a single LED to behave as you wrote earlier (3.8V, 360mA), I set IS/Saturation current to 2e-19 and RS/Serial resistance to 1.7.Quote from: engrguy42 on March 27, 2020, 01:10:18 pmAh, now it's obvious (and it was from your original post). The charger supplies less current than the LEDs consume.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 27, 2020, 01:38:58 pm
content: Quote from: Prehistoricman on March 27, 2020, 01:31:08 pmDOH !!! I never connected the dots. I measured an LED consumption of 360mA, but the AC charger can only supply something like 120/3k or 40mA.

author: engrguy42
author_rank: Frequent Contributor
timestamp: March 29, 2020, 01:59:01 pm
content: Okay, so thanks again to everyone who helped on this. But I'm tenacious, and I've been trying to clean this all up and make sure I've got it correct and figured out.I think my LTSpice diagram (attached) is now 99.99% correct (after spending a lot of eye-straining time tracing the tiny board), and I only have a couple real issues/questions left:- I'm assuming the two unmarked SMD transistors (I'm assuming they're NPN) are both identical and marked as per the attached photograph. Is that a reasonable assumption that all SMD transistors have the same terminals (C is the single, and E & B are the double pins)?- I also realized that while charging the LED'swillcome on, but as was mentioned before by the great Prehistoricman it seems the LED's draw more (360mA) than the crappy capacitor dropper can provide (I measured 200mA into the battery while charging), so the charger won't charge while the lights are on.- I cleaned up the LTSpice diagram, and re-named components to match the markings on the board, and added the connections to the on/off switch (dashed box in LTSpice diagram). Based on that, it seems to me that when the switch is in HI mode (as shown in diagram) that D3, Q1, and all the Q1 biasing resistors can basically be erased, as they're only used in SOS mode. Does that make sense? And I have no clue what the SOS mode does...and don't really care. Doesn't seem to work anyway.- It seems like LOW mode merely inserts an additional 1k resistor to the Q2 biasing circuit, and presumably changes the LED current.Anyway, my LTSpice simulation pretty much matches my scope/meter measurements, so I'm think I'm pretty close.Thanks for any help.