Maker Pro
Maker Pro

Optocoupler & mcu

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Hello everyone !

My latest project involves a micro controller and a solenoid that works with 220VAC. Once the solenoid gets the 220VAC on its coil, it opens for a few seconds. My goal is to count how many times the solenoid opens. I Think that i can use a bridge rectifier and an optocoupler to interface with the MCU.
Googling around, i found this picture which cant quite understand. What is the purpose of D2 ?

The way i see it, just the bridge with a small value cap in parallel to its + and - outputs would be okay to be fed directly to the optocoupler's A and K respectively. that would give me 0 on the mcu's input pin for as long as the solenoid is engaged. i guess there are optocouplers that can handle 300V right ? Or maybe adding a large resistor value in series with the optocoupler's anode pin.

Suggestions ?
 

Attachments

  • opto circuit.png
    opto circuit.png
    20.1 KB · Views: 18

bertus

Moderator
Nov 8, 2019
3,347
Joined
Nov 8, 2019
Messages
3,347
Hello,

You do not need D2. It also would be in the wring direction.

Bertus
 

davenn

Moderator
Sep 5, 2009
14,271
Joined
Sep 5, 2009
Messages
14,271
Hello everyone !

The way i see it, just the bridge with a small value cap in parallel to its + and - outputs would be okay to be fed directly to the optocoupler's A and K respectively.

Suggestions ?

But your cap isnt in paeallel to the + and - of the bridge, it's in series with the +, so the LED isnt going to see a DC voltage
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Yes you are both correct. Looks like polarities are messed up and the cap is no good placed like that. So the diagram i found online is wrong.

Could you suggest me some optocoupler and resistor value for it's Anode pin ?
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Do you think that a et1103 would be suitable with a 150K resistor in the anode of the IR led ?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,756
Joined
Nov 17, 2011
Messages
13,756
Got the spec (datasheet) for the ET1103?
Here you go.

A simple circuit that should work with almost any photocoupler is here (unfortunately the text is in German):

You need to ensure the photocoupler is safe for operation across a >= 230 V differential between LED and photodiode/phototransistor and you also need to ensure proper creepage and clearance in your construction. The TCLT1103 has a pin spacing of 7-62 mm and is rated for 600 V (RMS) isolation voltage and thus is o.k. for this application.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Actually the IR led's forward voltage is not mentioned. Only the reverse voltage. The datasheet only states the forward current which is 60ma for the ET1103 so i suppose any reasonable voltage on the LED with a suitable series resistor to limit the current to no more than 60ma should be okay.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,756
Joined
Nov 17, 2011
Messages
13,756
i suppose any reasonable voltage on the LED with a suitable series resistor to limit the current to no more than 60ma should be okay.
Quite so. Assume a typical forward voltage of 1.25 V for your calculations.
This is what the datasheet for the TCLT1103 shows:
1706076051924.png
The IR LEDs in this kind of photocoupler are very similar in that respect.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Okay, got it.
In my case im thinking to use some opto with low forward bias current led so that i will not need a diode of large wattage.
The circuit of the above post is interesting indeed though i think that the zener could be skipped by increasing the value of r3 and replacing C2 with a 4.7uf 400V capacitor and D1 with a bridge rectifier.
 
Last edited:
Top