Help me understand this circuit! - Page 1
Forum section: electronics / beginners

author: Cretel
author_rank: Contributor
timestamp: November 12, 2015, 06:44:55 am
content: Hi all, long time stalker of this forum, first time poster.I am trying to understand this particular component which detects if the motor of a fan is running and lights up an LED if it is. I have a rudimentary understanding of electronics covered in undergraduate physics modules but not much real world experience. Hoping that the kind folk on this forum can walk me through the workings of this circuit.Here are images of the component after removal of epoxy:Under the rectifier:My best attempt at mapping out the electrical diagram:Sadly the zener diode D3 or U2 was damaged during extraction from the epoxy and I couldn't test its breakdown voltage.Transistor Q1 also had its code etched off, and I don't know where to begin with testing a transistor to find out whether it is a BJT/FET/etc...The single phase motor also confuses me, on top of the live and neutral inputs, it has brown, black and white outputs that go into this circuit as some sort of feedback signal. But I have never seen such a motor, are those leads from an internal alternator or something?Here is the motor:

author: Cretel
author_rank: Contributor
timestamp: November 12, 2015, 07:11:14 am
content: Yes, the zener regulator portion is okay for me.I'm still confused about the motor output...Black from the motor provides ground reference with the common of the circuit board, and white is the pulse signal.Then what purpose does brown serve? And why is it connected as such?I also do not fully understand the purpose of zener U2 in that configuration (i might have the polarity mapped out wrongly though)

author: RobertHolcombe
author_rank: Frequent Contributor
timestamp: November 12, 2015, 08:20:35 am
content: Brown and black are the DC supply for the pulse generator output, without them connected the white wire will not output anythingI might be mistaken - do D2 and Q1 regulate voltage to the LED?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 12, 2015, 01:58:14 pm
content: Is Q1 emitter not connected to U1 anode and etc.?The motor shows a "PG", which doesn't ring a bell, but it could be some sort of generator. It would only need two terminals, at least if it's magnetized or related to the main windings. A commutator of some sort would need the brown wire however. In any case, the white wire is expecting some kind of AC signal; as long as it's alternating faster than the RC time constant (even line frequency will do), the LED will light usefully.Tim

author: noidea
author_rank: Unknown
timestamp: November 12, 2015, 04:15:13 pm
content: What is this fan motor out of, It looks a lot like a fan motor out of an air conditioner.I'm not an electronics engineer only a HVAC tech that enjoys messing around with electronics but the PG marking on the motor vcc, vout and gnd would relate to a hall effect rpm sensor in the motor which is normally used in conjunction with a triac chopping the mains waveform to vary the motor speed. I guess in your case this rpm feedback circuit is just flashing the led instead (but the mechanics of that are beyond me)

author: onlooker
author_rank: Frequent Contributor
timestamp: November 13, 2015, 02:19:50 am
content: By Google: When related to a electric motor, "PG" = pulse generator, it is a speed feedback for speed control as many already mentioned in different ways.

author: Cretel
author_rank: Contributor
timestamp: November 13, 2015, 09:18:47 am
content: Quote from: blueskull on November 12, 2015, 01:51:45 pmMakes sense, but my continuity tester is showing that U2 is indeed across R4 and R5...In this case it only protects the base of Q1(?)

author: LukeW
author_rank: Frequent Contributor
timestamp: November 13, 2015, 11:43:19 am
content: OK, we know how the transformerless power supply part works, that's pretty standard.The pulse generator (presumably some sort of optical or magnetic tachometer) requires power, which is supplied from the transformerless power supply via the brown and black wires.That voltage will be set by U1, so it's 32 volts.Now, for the sake of simplicity, let's re-draw the rest of the circuit.Input tacho pulses come in on the white wire, and they're AC coupled in series through C3, and then you've got R4 connected to "ground" and R5 in series with the signal.Q1 is a simple sort of open-collector circuit that drives the LED, and U2 is connected from the base to ground to protect it.Can you disconnect the motor from the board, connect some sort of 30V bench power supply to the tachometer power wires, put a scope on the output and give the motor a crank to see if the pulse generator is working? (And what polarity or magnitude are its pulses?)Or remove the bridge rectifier and inject 30V DC power into the PCB (use an isolated bench power supply for test purposes since it will be safer - not the original transformerless power supply) and try injecting pulses yourself, on the white wire.

author: onlooker
author_rank: Frequent Contributor
timestamp: November 13, 2015, 09:28:48 pm
content: I think U2 may be just a regular diode (not a zener). It is there to protect BE of Q1 from possible excessive reverse biasing at the falling edge of the pulse (from white) (or from other cause).In a way, it may be slightly better if the diode is placed cross R4, since this will also speed up the discharging of C3 at the falling edge of the pulse.As for Q1 a 3904 may be good enough(?).The drawing below is a little easier to follow:

author: Cretel
author_rank: Contributor
timestamp: November 17, 2015, 02:19:42 am
content: Hi guys, I have made a mock up on the breadboard with the proposed changes, used 2n2222 for Q1.The blue LED does not receive a constant voltage, no oscilloscope, but my multimeter measured a range of 17V to 5V.Which explains why these fans had LEDs that kept failing...I'm guessing this fluctuation is due to the transistor switching.Currently I can see the brightness of the LED pulsing.Question:If I increase R6 or decrease the 32V DC to limit voltage across the LED, I suspect that the LED would start flashing on/off as the voltage may fluctuate below it's minimum forward voltage.Would increasing capacitance C3 help?OR should I just drop R6 and put in a LM7805?Also, I don't really understand the purpose of C1, R1, R2 and R0. I would have just stuck L and N right into the bridge rectifier.

author: onlooker
author_rank: Frequent Contributor
timestamp: November 17, 2015, 12:35:54 pm
content: QuoteYou need they. C1 is a current limiter (that does not consume power, so is better than using a resister). R1+R2 are bleeding resister to discharge C1 when the board is switched off from the mains. R0 can limit the initial peak current when the mains power is switched on. Or else w/o them, you will burn the zener 1st, then likely the rest downstream and possibly something upstreams too.Pulsing led may give you a visual cue for the RPM. If you prefer steady light, the changes needed highly depends on the capacity and nature the signal source (white).You may try to add a big cap crossing CE of Q1, then make sure the RC (R6) constant is much bigger than the pulse period. R6 needs to be increased to limit the current to the led.If that is not practical and the signal source can supply enough power, you may also simply replace C3 with a diode, and R4 with a cap, and then adjust R6,R5 accordingly. The diode on BE of Q1 is no longer needed now.If the source is weak, you may use a Darlington for Q1 with a smaller cap and larger R5 in the settings above or else add a power amp stage or other IC solutions(?)...

author: Cretel
author_rank: Contributor
timestamp: November 19, 2015, 01:08:52 am
content: Quote from: onlooker on November 17, 2015, 12:35:54 pmI will play with different values for a cap across CE and increasing R6.Sounds like I just need to find the right capacitance to ease off the ripple and then increase R6 till the now constant-ish voltage is acceptable for the LED.

author: Cretel
author_rank: Contributor
timestamp: November 20, 2015, 01:39:04 am
content: Let's say I wanted the motor's sense wire to trigger a neon bulb instead.I don't think a single transistor would be able to switch AC on/off, it would only allow one polarity to pass? Not sure about this, but I kind of recall learning about this...

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 20, 2015, 02:03:21 am
content: A neon bulb works fine on (pulsed or steady) DC...Tim

author: Cretel
author_rank: Contributor
timestamp: November 20, 2015, 07:49:20 am
content: Quote from: T3sl4co1l on November 20, 2015, 02:03:21 amExcuse my stupidity but don't neon bulbs come in upwards of 100 volts only?In that case, I would just run a 100V zener in place of the 32V.Capacitor C3 can remain rated at 50V as it is not across the positive and common rails?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 20, 2015, 07:54:42 am
content: Yes. Well, usually more like ~60V glowing, 80V (or more) striking, to be more precise, but they can go over 100V sometimes.But don't transistors come in upwards of 100V, too?Tim

author: Cretel
author_rank: Contributor
timestamp: November 20, 2015, 08:08:06 am
content: Quote from: T3sl4co1l on November 20, 2015, 07:54:42 amAh right, I would have to use a NPN rated for 100V too.I'm hoping swapping the LED for a neon would work better, fixing the pulsed DC with a voltage regulator circuit on the LED side works but it is costly (space and money wise)I've read that neon bulbs can take more abuse, is there any truth to that?Also, thanks to everyone for all the advice so far, this is proving to be a really great forum

author: Cretel
author_rank: Contributor
timestamp: November 20, 2015, 08:56:16 am
content: How's this?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 20, 2015, 08:02:37 pm
content: Ahh! Now you've blown out the thing on the brown wire!Also, you'd have to adjust the component values on the AC side -- for a high voltage output (nearly full rectified AC, which is 160VDC, from 120VAC), you'd need a pretty large C1 and small R0. Although, the current will be lower as well, so the change might not need to be very large. And therefore C2 can be much smaller, maybe a few uF at most.But yeah, guessing the sensor thingy can't handle much over 30V. So, the circuit largely has to be the same, up to the transistor being a HV type.Nice thing is, even with the low voltage supply part hanging around, you don't need to have the neon drawing current from that supply. You could tie it back to the AC line (L) instead, through a diode, so it only draws forward current, and only when the AC line is positive and high voltage, and while D1 is conducting (so that the transistor is pulling towards "-V" which is connected to N at that point in time).Extra filtering between R5 and Q1 is probably a good idea (maybe a 0.47uF across D3?), otherwise the neon will blink at a rate determined by line frequency minus rotation frequency (usually a few Hz for typical induction motors; if it were a synchronous motor, it might not light at all because the phasing could be completely wrong!).Tim

author: Cretel
author_rank: Contributor
timestamp: November 21, 2015, 03:51:53 pm
content: Quote from: T3sl4co1l on November 20, 2015, 08:02:37 pmAh! Not the brown wire!Something like this?I've also had doubts about the original circuit, mains is 230V here and I can't believe a tiny zener can regulate sqrt(2)*230V all the way down to 32V

author: onlooker
author_rank: Frequent Contributor
timestamp: November 21, 2015, 06:37:34 pm
content: You may run LTspice simulation on the circuitry to find out what works and what's not. Otherwise you may try the simple changes,

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 21, 2015, 07:19:46 pm
content: Close, I'd like to see it this way instead:Note that the series current limiting parts are in the line side, only to the FWB. That way, the neon sees the maximum voltage possible. Also, the neon needs a current limiting resistor, maybe 100k. In this case, the transistor will have to be rated for about 400V, which is a bit beyond the range of an MPSA46 but still quite available. e.g.http://www.digikey.com/product-detail/en/PBHV2160ZX/568-12664-1-ND/5436128And for safety purposes, of course, a fuse should be present in the line side, and the entire circuit well insulated from any possibility of touch.The current limiting R + (R || C) reduces the maximum current available to the zener, hence biasing the zener at its rated voltage. Normally this would be a shunt regulator, from a higher DC voltage, through a current limiting resistor to the zener, but it works just the same when the current limiting is on the AC side. It also works when the current limiting is done largely by a capacitor -- so the capacitor is intended to drop most of the voltage, and the series resistor is present to reduce surge currents (during startup or inevitable line transients). The parallel resistor discharges the capacitor when it's turned off.Tim

author: onlooker
author_rank: Frequent Contributor
timestamp: November 21, 2015, 08:46:00 pm
content: This will provide more steady current to the neon assuming "WHITE" is able to charge the 0.47uF cap. If not, use/test a smaller cap. 13003s are cheap. They are used a lot in the CFLs.

author: Cretel
author_rank: Contributor
timestamp: November 22, 2015, 02:36:53 am
content: I'd rather avoid darlington pairs because I am still unfamiliar with themQuote from: T3sl4co1l on November 21, 2015, 07:19:46 pmRated for peak voltage of the 230VAC right?Here is what I think the component values should be:Unsure about the power rating for current limiting resistor on AC side.

author: onlooker
author_rank: Frequent Contributor
timestamp: November 22, 2015, 04:08:47 am
content: The 10uf cap on "L" should still be 0.47uF. 10uf would mean the 32V zener has to be able to unnecessarily dissipate 20+W power (0.7A * 32V).

author: Cretel
author_rank: Contributor
timestamp: November 22, 2015, 05:03:36 am
content: Quote from: onlooker on November 22, 2015, 04:08:47 amAh right, sorry...So when using capacitors as current limiters, we can find the allowed current by I=V*jwc?A few more questions:Does the capacitor also act as a voltage divider?If so, how do I calculate the voltage received by the bridge rectifier?What type of capacitors may be used for this purpose, I'm guessing electrolytics are out?Just noticed that there is no electrical isolation from the mains. In the original fan configuration, the LED was just hot-glued to the case. Have I been unknowingly flirting with danger?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 22, 2015, 06:41:51 am
content: An X2 rated film capacitor is needed.Filtering the neon supply is unnecessary and overkill; it'll reduce flicker I suppose, and that's about it.The bridge rectifier typically has an equivalent resistance around 1/4 the equivalent DC load. If the load is 30V / 1mA = 30kohms, then the AC side will look like about 7.5kohm. The impedance of the series components (the series R and the capacitor) act as a voltage divider. The FWB will have about 30V across it, leaving 210V from the line. This implies a maximum 52.5kohm series impedance. Because the capacitance will be dominant, |Z| will be about equal to Xc, and so a 0.05uF capacitor will be required. The series resistor should be a modest size is comparison: not so large that it costs efficiency, but not so small that the circuit is vulnerable. less than 1/10th should be fine, or < 5kohms.Scale everything proportionally if the current is higher, and such.An LED's package counts as insulation. By typical standards, you should have at least 1.5kV and preferably 2.5kV or more of insulation between line and anything that could be touched. Ideally, anything that can be touched should also be grounded (e.g., metal enclosures), and then you will have satisfied the application of "basic insulation".Tim

author: onlooker
author_rank: Frequent Contributor
timestamp: November 22, 2015, 01:05:20 pm
content: Quoteyes, it is largely not needed for the schematics I tried to propose.But, for the one OP selected, the filtering cap can prevent beating when the pulse frequency is getting close to any integer division of the mains frequency. This is also related to the fact that the RC network that couples the pulse to the emitter has a constant (=0.47u x 10k) much shorter than mains period.Somewhat related, I do not see the cap on BE should have meaningful effects. The transistor's BE (dynamic) resistance, like a diode, is no more than a few hundred ohms. This will discharge the cap too fast for it to have an effect. In fact, it could be worse. This cap is charged by short pulses. This effectively reduces the supply to BE. And in the worst case, it may never reach the threshold voltage to trigger the BE. A simple calculation or simulation should be able to prove or disprove this.Then, what about the serial resistor to the neon. 100k or 200k is just a place holder for now. To be presice, one needs to go by the neon spec in use. 200k is for a 1ma neon with steady light. 100k is either for a ~2mA neon with steady light (my sch) or for a 1ma neon with pulsed light(OP's sch). A unrelated note: The neon bulbs I have all have the resistor builtin. I do not know the value.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 22, 2015, 09:48:01 pm
content: An even smaller neon resistor might be worthwhile, if it ends up at a modest duty cycle. 100k is a good start though.The transistor only needs to carry mA, so a filter cap will do a fine job. I still don't know the nature of the detector thingy, if it's guaranteed to output AC or what. If so, I'd rather see a "half wave voltage doubler" type circuit, so that the input is AC coupled, the transistor is only turned on when AC is present (and not in pulses of AC), and the filtering is more effective.I'm not so concerned about the B-E cap filtering poorly, because like I said, it's only mA at the output. So ~50uA at the base (and delta Vbe of maybe 0.1-0.2V) -- it'll hold up just fine between pulses. But if the source is active output, it might not even be the right kind of filtering. Which is why I'd like to see the AC waveform converted to DC first, because DC is very easy to work with.Tim

author: Cretel
author_rank: Contributor
timestamp: November 23, 2015, 01:17:16 am
content: I'm looking at a 0.6mA neon bulb.http://sg.rs-online.com/web/p/products/6559407/I will measure the output of the pulse generator on the motor, problem is the black and brown must be fed 32V DC or the white wire outputs nothing. Waiting for a friend to lend me a benchtop power supply right now.Ben

author: Cretel
author_rank: Contributor
timestamp: November 23, 2015, 07:32:41 am
content: Okay, apparently the voltage regulating zener should be 12V.When 12V is applied to the black(0V) and brown(12V) lines, I measure a 12V across white and black.When the fan starts spinning, I record 6VAC across white and black.SO when the fan doesn't spin,12VDC is not able to pass through the capacitor, so NPN does not allow CE current to flow.When fan spins, AC passes through the capacitor to allow transistor to conduct.I have no idea what is going on inside the pulse generatorEDIT:Wait, if I rotate the fan motor just a notch when stationary, it presents either 12VDC or 0VDC across white and black.Blueskull mentioned this earlier:Quote from: blueskull on November 12, 2015, 07:01:51 amEDIT:The plot thickens. Got my hands on 2 more identical units of this fan hiding deep in my storeroom, one with the problem of fluctuating LED voltages and one without. I swapped the motor detector between units, but the problem persisted in the faulty unit and did not appear in the okay unit. (see video below)https://youtu.be/WrqvayIwkhkThe faulty unit has a slower sounding motor. That's all I could discern, both regulate 230VAC to 12V in the motor detector and both motors are identical in the way the pulse generator behaves.Could a slow or maybe irregular RPM be causing this fluctuation?If the DC voltage is regulated at 12V, how am I observing spikes of voltage up to 20VDC?Could such occasional short spikes be the reason why the LED dies all the time?Ben

author: Cretel
author_rank: Contributor
timestamp: November 25, 2015, 03:55:58 am
content: Still no luck trying to understand how a slower motor creates the voltage spikes observed...Could the >12V spikes come from the 25V filter capacitor?

author: onlooker
author_rank: Frequent Contributor
timestamp: November 26, 2015, 04:00:18 pm
content: QuoteA scope is the better tool for understanding what is going on. Then, if you have to use a DMM, set it to a proper manual range, instead of, auto.

author: Cretel
author_rank: Contributor
timestamp: December 17, 2015, 05:05:44 am
content: Quote from: onlooker on November 26, 2015, 04:00:18 pmStill waiting on my Rigol that I ordered online, I might be a victim of the X'mas gift jamMeanwhile.Here is an air ioniser that I opened up:Is D1 a zener? Can't test it because it doesn't work, conducts both ways.R3 is 10kohm