Stuipd (Maybe) Circuit Question

  • Context: Engineering 
  • Thread starter Thread starter Pseudo Zing
  • Start date Start date
  • Tags Tags
    Circuit
Click For Summary

Discussion Overview

The discussion revolves around a circuit design issue involving a microcontroller used to PWM a 100-watt incandescent bulb. Participants explore potential reasons for the failure of the microcontroller and the tripping of a circuit breaker when the light was powered. The scope includes technical explanations, troubleshooting, and design considerations related to working with high voltage AC circuits.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant notes that the circuit may have exceeded the Collector-Emitter breakdown voltage of the transistor and optoisolator, potentially leading to their failure.
  • Concerns are raised about the possibility of the optoisolator failing and bridging the two sides of the circuit, which could expose the microcontroller to high voltage.
  • Another participant suggests testing the circuit with a current-limited DC power supply to verify the rectifier's functionality.
  • Participants discuss the limitations of optocouplers, noting that while they provide some protection, catastrophic failures can occur.
  • There is mention of using a Silicon Controlled Rectifier (SCR) or triac for better control in dimmer applications, as opposed to PWM.
  • One participant expresses uncertainty about the relevance of the cold resistance of the light bulb and the operation of a potentiometer with a microcontroller.
  • Suggestions are made to consider a zero-crossing detector for better synchronization in controlling AC loads.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the exact cause of the failure, and multiple competing views regarding circuit design and component selection are present throughout the discussion.

Contextual Notes

There are unresolved questions about the specific construction of the circuit, the adequacy of the components used, and the safety measures taken during testing. The discussion highlights the complexity of working with high voltage and the importance of careful design and testing.

Who May Find This Useful

This discussion may be useful for hobbyists and engineers interested in circuit design, particularly those working with microcontrollers and high voltage applications.

Pseudo Zing
Messages
4
Reaction score
0

Homework Statement



I made a circuit with a microcontroller to PWM a 100-watt incandescent bulb, and it fried my microcontroller and tripped my circuit breaker the moment I plugged the light in. Maybe there is something REALLY obvious that I'm missing, but I thought there was total isolation between the two circuits, because of the transformer and the optocoupler.

Can anyone offer me ideas about what could have gone wrong??1) They were plugged in at the same outlet, but that seems irrelevant if the XFMR was providing isolation.
2) The wiring is a little crude: to power the lightbulb, I just cut an extension cord, and soldered/taped the leads to the rectifier--but EVEN if there was a short on the extension cord, I don't get how it could have propagated the whole way to the XBee/Arduino (microcontroller).
3) If there are other issues you would like me to specify, please just ask, and I'll describe anything the best I can.

Homework Equations



[attached below, but I'm not sure they're that relevant]

The Attempt at a Solution



http://img253.imageshack.us/img253/8508/circuit.png"

(Takes a second to load, sorry.)
 
Last edited by a moderator:
Physics news on Phys.org
First and foremost, you're dealing with something that's 170 Vpk (as you note in your work). Assuming your circuit was constructed properly (i.e. you built your rectifier portion properly, and aren't shorting 170 V across your diodes), you probably fried your transistor and the optoisolator by exceeding (and without part numbers, I'd assume that you're greatly exceeding) the Collector-Emitter breakdown voltage (this is a spec in the datasheet) of one and probably both parts.

The failure mechanism is always touchy, but given that you tripped a breaker, I'd assume they failed short circuit (you can measure across the CE terminals with an ohmeter to confirm this--you won't even need to apply a base voltage--assuming you still have anything to measure). When your optoisolator failed, it probably bridged the two sides, thus exposing your nice and expensive Arduino to 170V. Yes, it can propagate up through one of your outputs.

What you *should* be using is something called an http://en.wikipedia.org/wiki/Silicon-controlled_rectifier" , for instance.

Moral of the story: When working with mains power, ALWAYS, ALWAYS know what the heck you're doing!
 
Last edited by a moderator:
First and foremost, you're dealing with something that's 170 Vpk (as you note in your work). Assuming your circuit was constructed properly (i.e. you built your rectifier portion properly, and aren't shorting 170 V across your diodes), you probably fried your transistor and the optoisolator by exceeding (and without part numbers, I'd assume that you're greatly exceeding) the Collector-Emitter breakdown voltage (this is a spec in the datasheet) of one and probably both parts.
Sorry, forgot part numbers.

Optocoupler:
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=751-1279-5-ND"

Transistor:
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ZTX956-ND"

Both seem (to me) to be 200V, so I gave a 30V buffer.

When your optoisolator failed, it probably bridged the two sides, thus exposing your nice and expensive Arduino to 170V. Yes, it can propagate up through one of your outputs.
Well, am I missing something here? Why do optocouplers exist if they short-circuit and propagate back to the input? I thought the whole point was to provide protection in case of short-circuits like this. :confused:

What you *should* be using is something called an SCR (silicon controlled rectifier), or a triac (half an SCR). You control the firing angle and pass through only a portion of each cycle of your 60 Hz AC waveform. This is what is used in a light dimmer, for instance.
I'm not good with electronic design, and have to rely primarily off of Google. I was never able to Google a way to operate a potentiometer with a microcontroller.I just discovered that the cold resistance of a light bulb is about 10 ohms, but I don't know if that is relevant.EDIT: I'm getting a beta of 200 for the transistor, so I think it's okay, and I don't really see a problem with the optocoupler, though I'm no optocoupler expert. (No 0 ohm readings.)
 
Last edited by a moderator:
Pseudo Zing said:
Sorry, forgot part numbers.

Optocoupler:
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=751-1279-5-ND"

Transistor:
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ZTX956-ND"

Both seem (to me) to be 200V, so I gave a 30V buffer.

In that case, are you sure that you hooked up your circuit properly? You can always test with a current-limited DC power supply (set to a few volts, and a few mA) and swapping the positive and negative leads around to check that the rectifier is, in fact, rectifying, and giving you a constantly positive output. It might not be 170 V, but it'll still tell you whether or not it's working properly. The biggest mistake I see a lot of people make is to do everything at once, instead of building and testing a small part of the circuit at a time.

The other test you should do is to put an ohmmeter between the ground of the light side and the ground of the digital side, and see whether or not a connection exists between the two (non-infinite resistance).

Pseudo Zing said:
Well, am I missing something here? Why do optocouplers exist if they short-circuit and propagate back to the input? I thought the whole point was to provide protection in case of short-circuits like this. :confused:

They do provide a modicum of protection under normal usage conditions, but catastrophic failure isn't covered (and is called catastrophic failure for a reason :smile:)

Pseudo Zing said:
I'm not good with electronic design, and have to rely primarily off of Google. I was never able to Google a way to operate a potentiometer with a microcontroller.

I just discovered that the cold resistance of a light bulb is about 10 ohms, but I don't know if that is relevant.

EDIT: I'm getting a beta of 200 for the transistor, so I think it's okay, and I don't really see a problem with the optocoupler, though I'm no optocoupler expert. (No 0 ohm readings.)

You can use a digital potentiometer, but you won't find anything capable of ballasting any sort of heavy load (your 100W lightbulb, for instance).

Everybody has to start from somewhere, you just have to have a healthy paranoia / respect for mains power. In any case, you might want to take a look at the following page (Light Dimmer Circuits):
http://www.epanorama.net/documents/lights/lightdimmer.html

There's a nice circuit there that operates with a potentiometer--basically what you have in most commercially-available dimmers. To fully isolate the two sides, you can build something called a zero-crossing detector (just google for it) and feed the output of that through an optoisolator to let your micro know when the mains power is crossing zero, and to let you synchronize your firing (this part is somewhat important because otherwise, you wouldn't have a consistent firing angle). If you did this, you wouldn't need the potentiometer since you can control the firing angle using the micro.

The reason you wouldn't use PWM is because you'd have to waste power (as you discharge the output AC, or rectified waveform, to 0) chopping the waveform more than once a cycle, and usually doesn't yield you any (qualitatively, in terms of your application) better results.
 
Last edited by a moderator:
(Sorry for the late response.)

Well, thank you for the help... I guess I'll just try to rebuild the circuit even more slowly and carefully than I did the first time, and continue taking measurements along the way.

I appreciate the suggestion with the zero-crossing detector stuff, and I'll definitely look into that in the future, but I just don't have enough time to redesign everything from scratch.

Also, to clarify the point on the grid power--I was wearing safety glasses and earplugs, had the circuitry a few feet away from me before powering up, and have so much electrical tape covering every part that they were difficult to get out afterward when I was troubleshooting. :smile: I definitely do have respect/fear for electricity, and I guess my initial post was too quick and may have left you with the impression that I just soldered a few things together and started jamming wires into outlets. Not so.

Thanks again for the assistance. Hopefully my fan circuit will work a little better than this one did.
 
Pseudo Zing said:
(Sorry for the late response.)

Well, thank you for the help... I guess I'll just try to rebuild the circuit even more slowly and carefully than I did the first time, and continue taking measurements along the way.

I appreciate the suggestion with the zero-crossing detector stuff, and I'll definitely look into that in the future, but I just don't have enough time to redesign everything from scratch.

Also, to clarify the point on the grid power--I was wearing safety glasses and earplugs, had the circuitry a few feet away from me before powering up, and have so much electrical tape covering every part that they were difficult to get out afterward when I was troubleshooting. :smile: I definitely do have respect/fear for electricity, and I guess my initial post was too quick and may have left you with the impression that I just soldered a few things together and started jamming wires into outlets. Not so.

Thanks again for the assistance. Hopefully my fan circuit will work a little better than this one did.

Good luck! But while safety glasses and earplugs are great in case your circuit explodes, and safety glasses are good to wear while soldering, grinding, or powering on your circuit for the first time, they won't do a whole lot to keep you from being electrocuted. Try not to work on your circuit while live (that 120V can drive enough current through you to kill you, under the right conditions) and make sure connections are secure. If you're a first timer on mains power, you might want to read through the following:
http://en.wikipedia.org/wiki/Electrical_safety
 

Similar threads

  • · Replies 79 ·
3
Replies
79
Views
8K
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 13 ·
Replies
13
Views
7K