1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Stuipd (Maybe) Circuit Question

  1. Mar 25, 2009 #1
    1. The problem statement, all variables and given/known data

    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.



    2. Relevant equations

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



    3. The attempt at a solution

    http://img253.imageshack.us/img253/8508/circuit.png" [Broken]

    (Takes a second to load, sorry.)
     
    Last edited by a moderator: May 4, 2017
  2. jcsd
  3. Mar 25, 2009 #2

    MATLABdude

    User Avatar
    Science Advisor

    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" [Broken], 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: May 4, 2017
  4. Mar 25, 2009 #3
    Sorry, forgot part numbers.

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

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

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

    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:

    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: May 4, 2017
  5. Mar 26, 2009 #4

    MATLABdude

    User Avatar
    Science Advisor

    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).

    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:)

    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: May 4, 2017
  6. Mar 27, 2009 #5
    (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.
     
  7. Mar 27, 2009 #6

    MATLABdude

    User Avatar
    Science Advisor

    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
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Stuipd (Maybe) Circuit Question
  1. Circuit Question (Replies: 15)

Loading...