Author Topic: Driving an optocoupler from 28V AC?  (Read 6577 times)

0 Members and 1 Guest are viewing this topic.

Offline Dave WaveTopic starter

  • Contributor
  • Posts: 42
Driving an optocoupler from 28V AC?
« on: August 29, 2012, 04:41:56 pm »
I want to drive an optocoupler from a 28V AC source that will output a signal to an Mega8 microcontroller so I can read if the source is off or on.

I am assuming the 28VAC will be noisy as it direct from a transformer and driver relays that are switching 120vac, hence the optocoupler.

My intital thoughts are use a full wave rectifier to convert to DC, then a small resistor to drop the current for the optocoupler. I assume this is going to be wasteful with the resistor radiating a couple watts or so.

Is there a more elegant solution to my issue?

Thanks for the help,

-Dave
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16362
  • Country: za
Re: Driving an optocoupler from 28V AC?
« Reply #1 on: August 29, 2012, 05:59:25 pm »
Single IN4148 diode in reverse across the IR diode in the optocoupler, then a resistor to allow 2-3mA to flow in the optocoupler. 10-12K rated at 0.25W resistor will do. You can also get an opto with AC input, it has 2 diodes in the device connected in anti parallel. To filter you take the output and use a RC filter to get the signal and remove the 50/60Hz hum on it.
 

Offline Dave WaveTopic starter

  • Contributor
  • Posts: 42
Re: Driving an optocoupler from 28V AC?
« Reply #2 on: August 29, 2012, 09:48:03 pm »
Single IN4148 diode in reverse across the IR diode in the optocoupler, then a resistor to allow 2-3mA to flow in the optocoupler. 10-12K rated at 0.25W resistor will do. You can also get an opto with AC input, it has 2 diodes in the device connected in anti parallel. To filter you take the output and use a RC filter to get the signal and remove the 50/60Hz hum on it.


Can you explain the RC filter a little more? Do I want a notch filter at 60hz?

Thanks!

Dave
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: Driving an optocoupler from 28V AC?
« Reply #3 on: August 29, 2012, 10:34:21 pm »
Quote
Do I want a notch filter at 60hz?
No, just a lowpass.

Try this circut.
The Output-Signal is inverted off course do to the open collector output of the optocoupler, but that shouldn't be a problem I think.
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2861
  • Country: au
Re: Driving an optocoupler from 28V AC?
« Reply #4 on: August 30, 2012, 12:07:58 am »
That circuit looks overly complicated.  All you need on the AC side is a series resistor and the reverse diode.  You can add a capacitor across the opto output to get rid of the ripple.  The value of the capacitor will depend on the pullup resistor value of course.  Maybe try 1uf and a 10K pullup to start with.
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: Driving an optocoupler from 28V AC?
« Reply #5 on: August 30, 2012, 06:24:55 am »
Quote
on the AC side is a series resistor and the reverse diode.
That's right, there is no need for D1.

Quote
You can add a capacitor across the opto output to get rid of the ripple.
Sure, but where is the difference to have the capacitor on the one or the other side?

Quote
Maybe try 1uf and a 10K pullup to start with.
LT Spice gives a 3V outputripple for this RC-combination. With 22µF and 10kOhm only 300mV.
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2861
  • Country: au
Re: Driving an optocoupler from 28V AC?
« Reply #6 on: August 30, 2012, 07:43:32 am »
Quote
You can add a capacitor across the opto output to get rid of the ripple.
Sure, but where is the difference to have the capacitor on the one or the other side?

There's more than one way to do this of course.  The capacitor on the output side can often be lower voltage.  The OP can try these circuits for real and adjust R/C to taste.   :)
 

Offline ttp

  • Regular Contributor
  • *
  • Posts: 151
  • Country: au
Re: Driving an optocoupler from 28V AC?
« Reply #7 on: August 31, 2012, 04:04:44 am »

My intital thoughts are use a full wave rectifier to convert to DC, then a small resistor to drop the current for the optocoupler. I assume this is going to be wasteful with the resistor radiating a couple watts or so.

If you rectify 28Vac it will give you about 40Vdc, set a current of 5mA for the optocoupler and the power is less than 0.2W. If you add a cap to filter the DC (doesn't have to filter very good, just enough to keep the LED in optocoupler going to the next peak) you get a steady signal at the optocoupler output.

I hope you realize that using just a diode and resistor you'll get a pulse train on the output when the AC is on.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2861
  • Country: au
Re: Driving an optocoupler from 28V AC?
« Reply #8 on: August 31, 2012, 05:06:13 am »
I've used 47K as the input resistor to the opto-coupler before.  A 1uF capacitor across the opto's output worked well in conjunction with the pull-up resistor on a PIC chip.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf