AC Signal control output DC signal

Status
Not open for further replies.

Help

Advanced Member level 2
Joined
Feb 15, 2005
Messages
617
Helped
7
Reputation
14
Reaction score
3
Trophy points
1,298
Activity points
7,065
Hi,

Anyone can help me how to control a DC signal?

1) How can i use AC voltage as input signal to control the DC output signal?

When input 230VAC then DC output is High!
When input 0VAC then DC output is Low!
or
When input 230VAC then DC output is Low!
When input 0VAC then DC output is High!

Bellow is the simple design but since 230VAC is SINwave then the DC output will be alway Hi Lo signal. How can i control it?

2) If let say my JP24 pin2 connected AC Load. Is it posible? I try it on practical it doesn't work! Please help.


Thank You.
 

There are two ways you can try to solve this issue:

- use a rectifier diode (or bridge) after C26 and a small smoothing capacitor (≈10µF) on the AC side ..
or
- add a smoothing cap (something like 10µF or more) on the output of DC side between the collector of the optocoupler and GND ..

If it is necessary you may add a comparator or another transistor to the output to "sharpen" the rising and falling edges ..

Regards,
IanP
 

    Help

    Points: 2
    Helpful Answer Positive Rating
Hi,

The design that i post bellow is it what you mean?
 

Solution "with cap" is exactly what I meant ..
Solution "with bridge" will need a smoothing capacitor (perhaps 47µF) between bridge"+"(4) and bridge"-"(2) ..

In both cases you shuld have output = "L" when the AC is presen and output = "H" without AC ..

Regards,
IanP
 

    Help

    Points: 2
    Helpful Answer Positive Rating
Hi,

Is it posible i connect the LOAD on this way??

But my LOAD not functioning. Is it my Optocoupler can stand it the LOAD with more thn 2A??

Thank You.
 

JP's Pin 1 and 2 have to be connected in parallel with the load, so the optocoupler will sens voltage accross the load when it is present .. It is like measuring a voltage: you always connect a voltmeter in paralell with the load ..

In this way the top side of the load (and input pin 1) will receive the AC voltage from somewhere (ac power in), and the bottom side of the load (and input pin 2) will be connected to Neutral ..

Regards,
IanP
 

    Help

    Points: 2
    Helpful Answer Positive Rating
Hi,

I try the solution "with cap". Before i connect the cap it showing the square-wave mean functionning well but after i connected the 47uF/50V cap then the result always showing Hi after i disconnect the cap the output still showing Hi.

The optocoupler spoil already! (Try two times, 2 optocoupler spoiled)
Do you have any idea?

Thank You
 

In optocuplers connecting anything to the "secondary" does not affect the "primary" .. It is not a transformer, after all ..
However, ..
In theory the mains should look like a sine wave ..
In practice, it may not ..
Try to add a 270Ω resistor in series with the input ..
The 270Ω, ¼-watt resistor serves three purposes. The first is to act as a fuse should the capacitor fail. The second is to cater for harmonics and other imperfections of the mains waveform that are prevalent on modern-day mains supplies. The third is to buffer the LED against transients and the like. The value is chosen using the R=P/I² i.e. 0.25W/(30mA)² = 277.7Ω (closest available is 270Ω) ..

Regards,
IanP
 

    Help

    Points: 2
    Helpful Answer Positive Rating
IanP said:
In optocuplers connecting anything to the "secondary" does not affect the "primary" .. It is not a transformer, after all ..

Hi,

After i tested, put the resistor 270Ohm the DC-Output signal (Square-wave) more smooth and look nices. After 47uF/50V cap is connected the waveform look like swoortool at optocupler pin5, the DC001 show below.

1) This output signal as a control signal is it any problem? (eg. this signal control the TTL logic, uController and so on.)

2) How can we know the P=0.25W?

3) As we say "secondary" does not affect the "primary", i try to shot the 270Ohm again and 47uF/50V is connected (3thr time) the optocuplers spoil again! Without connect the cap it still ok and the waveform got noise because without the resistor :|

Thank You.
 

To control TTL (or other digital inputs) the V0L (LOW) voltage level should be below 0.4V .. see chart below ..
In your case it is flactuating between 0V and 1V .. One way of fixing this level issue is to increase value of the pull-up resistor from 1kΩ to, say, 10kΩ, or to increase the value of the capacitor between (5) and 0V .. I think the first method is better ..

I suggested P=0.25W as the physical size of this resistor is not to big, and as far as resistance is concerned (270Ω) it suficiently limits/reduces inrush currents ..

Regards,
IanP
 

    Help

    Points: 2
    Helpful Answer Positive Rating
hi,

Thank you for your help, the design is working fine after increase the resistor value but the voltage charging will be slow abit. Hopefully working fine if the Output DC Signal can carry long distance (i think the distance will be around 6-7meter).

Thank you very much!

Thank you!
 

If you need to make the signal rising/falling "sharper" you can add a Schmitt-Trigger gate (74HC14, CD4093) or build a Schmitt-Trigger circuit of discrete components, or if a logic level is required use just two inverters to produce TTL/CMOS compatibile output .. see pictures below ..

Regards,
IanP
 

    Help

    Points: 2
    Helpful Answer Positive Rating
Use Zero voltage switcher and invert..
 

Hi,

jjohn said:
Use Zero voltage switcher and invert..

Can you give more detial about your ideas?

Thank You
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…