24VAC to drive PS2051 Opto-Isolator

Discussion in 'The Projects Forum' started by markH, Dec 5, 2009.

  1. markH

    markH Thread Starter New Member

    Joined:
    Dec 5, 2009
    Messages:
    14
    Location:
    New Jersey (GMT -5)
    I have a project to detect the presence of power on an HVAC zone valve (24VAC) by powering an existing PS2051 opto-isolator which is part of a 1-Wire data acquistion system. I have been assuming (always dangerous) that an AC power LED circuit would be appropriate for this task.

    I have found a number of 24VAC powered LED circuits on the Internet including one in this document the allaboutcircuits.com library (http://www.allaboutcircuits.com/vol_3/chpt_3/12.html)

    Where all of the circuits I have found become vague, at least to me, is the use of capacitors in these setups. In the circuit link above, the 24VAC does not have a capacitor, but the 240VAC does (but at least it explains that it exists to reduce the power dissipated by the resistor).

    In other, similar, circuits, the implications seem to be that the capacitor is needed due to the half wave rectification which is taking place. The sizing (0.47uF to 10uF) and capacitor type reasoning is not clear.

    So, if I want a high reliability circuit, will the 24VAC LED circuit from the library be satisfactory to drive an opto-isolator or does it need a capacitor? If it does need a capactor, what type and size? TIA.

    Best Regards,

    Mark
  2. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,071
    Location:
    In the vast midwest of the USA; CST
    Well, we have to ask if you want the optoisolator output to always be conducting if 24VAC is there, and always off if 24vac is not present.

    If just half-wave rectification is used, the optoisolator output will only conduct during 1/2 cycle, and will be off the other 1/2 cycle.
  3. markH

    markH Thread Starter New Member

    Joined:
    Dec 5, 2009
    Messages:
    14
    Location:
    New Jersey (GMT -5)
    Thanks for the prompt response.

    <<Well, we have to ask if you want the optoisolator output to always be conducting if 24VAC is there, and always off if 24vac is not present>>

    The opto-isolator output should always be on if 24VAC is present and always be off if 24VAC is not present.

    That is what I was wondering about in the 24VAC LED circuit in the library; without a capacitor I would think it would be blinking at 60Hz though I guess the brain would not be able to perceive it where the opto-isolator would.

    Mark
  4. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,071
    Location:
    In the vast midwest of the USA; CST
    Yep, that's it. If it's a human looking at it, they would not likely be able to tell if it were flashing at 60Hz or steady. If you're using it as a signal, it's different.
  5. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,071
    Location:
    In the vast midwest of the USA; CST
    Here are a couple of ways to do it, all thrown into one circuit. Click on the attachment. You may have to click on it once it comes up to see it full sized.

    T1 simply represents the secondary side of a 24VAC transformer.
    T1 outputs 24VAC, which is approximately 34V peak to peak.

    ZD1 and ZD2 are a pair of 39V Zener diodes wired back-to-back. This is to protect against voltage spikes from destroying the optoisolators' IR emitters.

    In the 1st half of the circuit, D1 provides half-wave rectification of the AC input.
    C1 acts as a filter capacitor. R1 limits current through the optoisolator's IR emitter to roughly 6mA-8mA R1 must be at least a 1/2 Watt resistor. R2 provides a discharge path when the 24VAC supply cuts off; without it the IR emitter may stay lit for some time It can be a 1/10W resistor.

    R3 limits current to the collector of the output's emitter. When the IR emitter is ON, Out1 will be 0v; when the IR emitter is off, Out1 will be 5v.

    If you want the logic reversed, see how U11's output is connected.

    In the 2nd half, D11 is a full-wave bridge rectifier. C2 is the filter capacitor. Notice that C11 is about half the value of C1; as it gets re-charged twice as often as C1 does.
    R11 and R12 perform similar functions as R1/D2 do.

    Attached Files:

    Last edited: Dec 5, 2009
  6. markH

    markH Thread Starter New Member

    Joined:
    Dec 5, 2009
    Messages:
    14
    Location:
    New Jersey (GMT -5)
    Perfect. A few additional questions.

    1. I reviewed the schematic of the 1-Wire IO card (Midon Design 1WIO). The opto-isolator already has an onboard 1.5K ohm resistor in the negative leg of the emitter. Presumably this will alter the external R1/R2 values.

    2. Does the bridge sectifier circuit require the back to back zeners? (I would guess no).

    3. Could a real LED be added on the 'ac' side of the opto-isolator to provide local indication as well? The transistor side of the opto-isolator is part of the 1WIO board and not accessible.

    4. Out of curiosity, with repect to R2, what kind of time constant is involved? The application timing is not critical, i.e. a turn off time of 3-5 seconds is fine.

    5. What is the appropriate voltage rating for electrolytic capacitors C1 and C2 have?

    6. For belt and braces protection of the HVAC system, would a fuse of some sort would be appropriate in case of a component failure?

    Sorry, I guess that is more than 'a few'.

    Mark
  7. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,071
    Location:
    In the vast midwest of the USA; CST
    Probably. I have no clue which optoisolator is being used in that card; you said PS2051, but that does not cross-reference to a known optoisolator. However, subtract that 1.5k from the 4.3k I showed, and you wind up with 2.8k left that you may need to add to the cathode leg of the IR emitter. That means R1 gets moved below R2 and reduced to 2.8k. Same with R11; it gets moved below R12. You'll need to find the average current limit for the IR emitter portion. I can't do much more without a specific part number.

    Yes. That's common to both circuits. It's merely a surge suppression protection. You can buy them as a unit as Tranzorbs.

    You could put an LED between R1/R11 and the IR emitter, yes. R2/R12 should be across both LEDs.

    I didn't bother to check. However, it'll turn off within a few seconds. Without it, the optoisolator might stay turned on for quite a while; 5 minutes or more.

    65v is OK. Nothing less.

    You could fuse it if you'd like. 1/4A slow blow should work fine.

    We're kinda used to that.
    Last edited: Dec 5, 2009
  8. markH

    markH Thread Starter New Member

    Joined:
    Dec 5, 2009
    Messages:
    14
    Location:
    New Jersey (GMT -5)
    << I have no clue which optoisolator is being used in that card; you said PS2051, but that does not cross-reference to a known optoisolator. >>

    Must learn to type one day. PS2501-4 input opto-isolator. The 1.5K resistor is part of of the Midon Design board, not part of the PS2501.
    PS2051-4
    --R(1.5KOhm)-- >|---- Attempt at Emitter

    <<That means R1 gets moved below R2>>

    I assume you mean in the circuit drawing?

    Mark

    Attached Files:

  9. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,071
    Location:
    In the vast midwest of the USA; CST
    Yep, that makes a difference.

    Yes, in my schematic.

    Here's a modified version.
    R1a and R1b represent the 1.5k resistor that's already on the board.

    Attached Files:

  10. markH

    markH Thread Starter New Member

    Joined:
    Dec 5, 2009
    Messages:
    14
    Location:
    New Jersey (GMT -5)
    Thanks for the update.

    I was not clear in my previous post, the 1.5K resistor is located on the other side of the opto-isolator emitter.

    Sorry for the confusion.

    Mark
  11. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,071
    Location:
    In the vast midwest of the USA; CST
    Oh, you mean it's on the output transistor's emitter, rather than the IR emitter?

    That does make a difference. In that case, ignore the last modification.

    If you are using the output as input to a logic board that has a 5v supply, the 1.5k resistor will limit current through the output transistor to 3.333...mA. That should be sufficient to keep the optoisolator output transistor from overheating, and provide a decent non-inverted output signal.

    See the attached. R3, R13 represent the existing 1.5k resistor. R1, R11 have been reduced slightly from the 1st schematic to provide just a bit more current for the IR emitter.

    Attached Files:

    Last edited: Dec 6, 2009
  12. markH

    markH Thread Starter New Member

    Joined:
    Dec 5, 2009
    Messages:
    14
    Location:
    New Jersey (GMT -5)
    SgtWookie,

    I must apologize (again), I have still not explained this properly. I have attached a JPG of the 1WIO board design with the opto-isolator highlighted showing the 1.5K resistor.

    This time for sure.

    Mark

    Attached Files:

  13. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,071
    Location:
    In the vast midwest of the USA; CST
    OK then, like the attached.

    R1a - R1d are the resistors already on the board.

    Attached Files:

  14. markH

    markH Thread Starter New Member

    Joined:
    Dec 5, 2009
    Messages:
    14
    Location:
    New Jersey (GMT -5)
    Great work!

    Time to order parts.

    Mark
  15. markH

    markH Thread Starter New Member

    Joined:
    Dec 5, 2009
    Messages:
    14
    Location:
    New Jersey (GMT -5)
    Just a quick thanks, built the circuit x 3 (for three different 24VAC inputs) and it's performing perfectly!

    Mark
Similar Threads
Forum Title Date
The Projects Forum looking for simple way to drive 24VAC contactor coil from 3.3VDC & 2mA Sep 12, 2012
The Projects Forum Building 24VAC to 12VDC power supply Jul 12, 2014
The Projects Forum How to monitor 24VAC furnace call for heat. Feb 27, 2014
The Projects Forum 24VDC to 24VAC? Dec 26, 2012
The Projects Forum Transformerless DC to AC inverter to 24VAC Mar 30, 2010

Share This Page