Connect with us

Optocoupler stays on

Discussion in 'General Electronics Discussion' started by HowlingGoatBoy, Oct 2, 2014.

Scroll to continue with content
  1. HowlingGoatBoy

    HowlingGoatBoy

    5
    0
    Jul 10, 2014
    Hi there, I am desperate for some help

    I'll try to explain as best as I can, let me know if i'm unclear anywhere
    I also try and put my train of thought down on paper

    For a Btech project I have built a irrigation controller that interfaces with a PC
    So you can set the different times on the PC and save it on the controller

    Now the circuit and code are working perfectly. I can set a time on the PC and the selected output goes on and off at the right times

    EXCEPT if I connect an solenoid to it.
    then it turns on fine, but does not turn off again.

    I'm using an optocoupler to turn on and off the solenoid (MOC3041)
    It does this directly, I was told by someone in the electronics industry that this would be okay; usually an optocoupler switches an TRIAC on and off, but apparently 24VAC does not require this as the current/Voltage is too low.

    The Optocoupler has an zero-crossing circuit built in, this turns it on or off when the voltage and current are zero (I'm assuming both should be zero)

    This would explain why it doesn't turn off
    The solenoid would induce a lagging current as far as I know
    and I'm assuming this would be the reason it is not switching off.

    However this lagging current can be counteracted by putting in a capacitort
    his would cancel out the reactance.

    So I used this as my calculation, the two reactances should cancel each other out

    0 =XL-XC

    0 = 2πfL- 1/2πfC

    0 = 2π(50)(200×10^(-6) ) - 1/(2π(50)C)

    100πC = 1/20π

    C=50,6 uF

    Seems good, but I can only find a 33uF and a 150uF capacitor from my closest supplier, so I test those two and the 33uF gives me the best Power factor according to B2 Spice. ( I thumb sucked the small resistor, but the Solenoid values are from research and measurements)

    33uF PF.png

    Please note that the battery and switch is just a simplification, it's actually a microcontroller triggering a transistor that switches the optocoupler on and off


    After soldering that on it's still doing the exact same, however it seems to be switching on way easier (Sometimes when the Microcontroller resets it triggers the solenoid)

    What is happening here?
    Should the capacitor be 50,6uF exactly by adding together different caps?
    Do I add a bigger resistor?

    Do I switch something different, like a 24VAC light in order to prove that it works and add the triac in the second revision?

    I am running out of time to finish this build (2 days according to my schedule), so I would REALLY appreciate any help.
     
  2. Arouse1973

    Arouse1973 Adam

    5,165
    1,087
    Dec 18, 2013
    You really should draw your circuit with the correct components. You had be staring at that for a while thinking well what's wrong with that? Then I looked again and noticed you had put the part number for the device. It turns out to be a Triac driver output. This is your problem, the driver will latch on while it still has power supplied once triggered. You can't turn it off by removing the drive from the internal LED.
    Thanks
    Adam
     
  3. Fish4Fun

    Fish4Fun So long, and Thanks for all the Fish!

    464
    105
    Aug 27, 2013
    HowlingGoatBoy.....

    You used a TIRAC optocoupler... TRIACs are only good for "turning things on" not so much for turning things off.....the way TRIACs//SCRs (Thyristors) work is that a relatively small signal "turns them on" then they stay on until the current drops below a particular threshold, then they "turn off".....This works fine with TRIACs used to control resistive AC devices because in a Resistive AC circuit the current drops to 0 for some period every cycle; however, in a DC circuit a TRIAC will remain on until the power is interrupted....since you don't have a device in your circuit to "interrupt" the current flow, the TRIAC will remain on until the power is disconnected....

    Good Luck!

    Fish
     
  4. HowlingGoatBoy

    HowlingGoatBoy

    5
    0
    Jul 10, 2014
    Sorry for the confusion Arouse1973, I'm very new to electronics, so I appologize

    Thank you guys for the replies.

    I figured that seeing that the Optocoupler was controlling an AC current that it would reach that zero point as it oscilates,
    Obviously I was wrong.

    So if I understand you correctly Fish4Fun, an optocoupler TRIAC combination will only be able to control something with an purely resistive load, yes?

    Is there nothing that I could turn on using that optocoupler as a "proof of concept" ?
    a light of some sort perhaps?
    Can't I Maybe change the Optocoupler to one without a zero-crossing circuit? a random phase one?

    Sorry if I seem stubborn, but this (along with research and coding) is about a year's worth of late nights when i could find the time in between exams etc.

    Thanks again

    P.S. As a sidenote, and I know I might have made it unclear, the optocoupler is an bidirectional one, controlling an 24VAC supply, V1 is an SIN generator in the image, and the optocoupler should be an bidirectional one.
     
    Last edited: Oct 2, 2014
  5. Arouse1973

    Arouse1973 Adam

    5,165
    1,087
    Dec 18, 2013
    I don't think Fish was saying you can't drive inductive loads, he wouldn't have meant that. The problem with large AC inductive loads is the phase difference between current and voltage. They don't cross zero at the same time, this can gives issues with the Triac turning off. To counter act this you sometimes see a snubber circuit connected across the Triac. Triacs are certainly used for driving many different types of inductive loads like motors and solenoids. For your circuit are you now saying the supply is A.C is that correct?

    Adam
     
  6. HowlingGoatBoy

    HowlingGoatBoy

    5
    0
    Jul 10, 2014
    Yes, The supply is 24VAC.

    I'm controlling 24VAC solenoid valves using an optocoupler only.
    On that diagram the voltage supply is an AC Supply
    The Optocoupler is the only one Spice gives me, so sorry for that confusion

    That's what I assumed was happening with the optocoupler seeing that it has that built in zero crossing circuit.
    So to compensate I added a 33uF cap in parallel (My calculations said use 50,6uF )

    I'm not sure if:

    a) I can control a 24VAC Solenoid using that bidirectional Optocoupler (seems to be fine though)

    b) How close should the phases be? if my calculations say 50,6uF, How close do I have to be to 50,6uF

    c) What affect the resistor that is in series with the capacitor has


    I think i'm going to use a random phase optocoupler to see if that works
     
  7. Arouse1973

    Arouse1973 Adam

    5,165
    1,087
    Dec 18, 2013
    You say it's fine but earlier on you say it stays on? You can't simulate a different circuit it won't give you the same results. You need the resistor to protect the Triac from high dI/dt when the Triac switches back on and also to decrease the dV/dt turn off time (commutation) to prevent false triggering. Typical values are around 10R to 100R with a capacitor values of 100nF. But this is for mains electricity. There are a few formulas for working it out but I would have to find them. I am away this weekend so I won't have much time.
    Adam
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-