0
\$\begingroup\$

enter image description here

I am using PC817 opto coupler. I want a 3.3 output voltage. In its 1st pin I am giving 12volt and 2nd pin is gnd. I have connected a pull down resistor on 3rd pin. But i am confused because when I am giving 3.3volt on 4th pin, and I am checking output from 3rd pin which is 1.5volt. How can I get 3.0 - 3.3volt output on 3rd pin.

I have tested it with 5 volt, means when I was giving 5 volt on 4th pin and when I was checking voltage on 3rd pin it was 4.7-4.8v which is I think correct. But I dont know what is happening in case of 3.3volt. PLease help.

Thanks

EDIT : i have attached a screenshot of proteus simulation. I actually didnt find the PC817 opto coupler but I got the similar opto coupler. I am getting an output voltage of 3.22. Please tell me that is this connection good. I mean if I make this connection in real, will this work?

\$\endgroup\$
  • 1
    \$\begingroup\$ post the schematics. Do you have resistor between 12 V and Pin #1? What is the pull down value? Ideally you should have a pull up resistor. The Opto will drive the transistor output low when the Diode is driven. Pls post all resistor values along with the schematics to give a possibly useful answer. \$\endgroup\$ – Umar Jul 17 '15 at 8:16
  • \$\begingroup\$ I cannot post the schematics but i can tell you the resistor value. I am using 1k res on pin1 and a pull down resistor of 1k on 3rd pin. also from 3rd pin I am using 1k resistor and I am checking the output from this resistor which is 1.5v when I am applying 3.3v on 4th pin. If this is wrong can you suggest me another circuit? \$\endgroup\$ – anna carolina Jul 17 '15 at 8:45
  • 1
    \$\begingroup\$ You certainly can post schematics. If you can't take a screenshot of the relevant bit, use the built in schematic editor to redraw it. \$\endgroup\$ – Nick Johnson Jul 17 '15 at 9:44
  • \$\begingroup\$ @annacarolina For your next question, you can also use the Schematic Editor on the forum to supply more information. It's an icon above where you type the text. 7th from left. (Or hotkey Ctrl+M). If you supply a schematic with values as you use it, we will be able to offer much better answers much quicker. \$\endgroup\$ – Asmyldof Jul 17 '15 at 10:37
-1
\$\begingroup\$

Please try using the setup as shown in the figure. The 1 K value on pin one is fine, but increase the value of resistor to 100k between Pin 4 and 3.3 V. When there is no 12 V on pin 1, The output (Pin Number 4) will be high, and when there is 12 V on Pin 1, the transistor will turn on shorting the Pin 4 to ground (VCE will be less than 100-200 mV). please try this and reply if not possible.enter image description here

I am using the same setup, different kind of coupler and it is working.

\$\endgroup\$
  • \$\begingroup\$ you are saying that when input is low, output will be high and vice versa. But I dont want it like this. I want that when I give 12v supply on pin 1 my output should be 3.0-3.3volt \$\endgroup\$ – anna carolina Jul 17 '15 at 9:20
  • \$\begingroup\$ I would not opt for that option. i will use a transistor at the input of pin 1 as inverter if in case, the 12 V drive is impossible to invert. I feel that,when the collector (opto coupler)current flows, the drop developed across emitter will be comparable with collector voltage thus limiting the base current (negative feedback). I might be wrong too. ) \$\endgroup\$ – Umar Jul 17 '15 at 9:45
  • \$\begingroup\$ i have attached a screenshot of proteus simulation. I actually didnt find the PC817 opto coupler but I got the similar opto coupler. I am getting an output voltage of 2.93. Please tell me that is this connection good. I mean if I make this connection in real, will this work? \$\endgroup\$ – anna carolina Jul 18 '15 at 13:29
  • \$\begingroup\$ @anna If 3 V is acceptable (normally yes), then i see no issues. where r you connecting the 3 V output? \$\endgroup\$ – Umar Jul 19 '15 at 11:50
  • \$\begingroup\$ I am using PIC32MX795F512L microcontroller, and this controller can work only in case of 3.3v. So i am giving this voltage to controller.Is this thing correct.? \$\endgroup\$ – anna carolina Jul 19 '15 at 14:14
3
\$\begingroup\$

enter image description here

If you have 12V feeding the input diode via 1K you will be producing a forward current of about 10mA. If you have a 1k resistor on the output that you hope to have 3V3 across it means an output current (Ic) of 3.3mA.

It looks to me like you will probably achieve about 3.2 volts on the output but this is a typical example only. In my experience, a lot of opto devices are worse than this so try driving the input a little harder (maybe 20mA) and try increasing the output resistor from 1k to 10k.

\$\endgroup\$
0
\$\begingroup\$

If you connect your PC817 as shown below you should be able to achieve a "non inverting" output.

enter image description here

Here is an LTSpice simulation waveform that shows the output voltage level that should be achievable.

enter image description here

Note that the timing delay response through the optocoupler in the PC817A model may not represent an accurate picture of the real delays to be expected in a physical circuit implementation. On the otherhand the voltage and current transfer characteristics are modeled in a reasonable manner.

\$\endgroup\$
  • \$\begingroup\$ i have attached a screenshot of proteus simulation. I actually didnt find the PC817 opto coupler but I got the similar opto coupler. I am getting an output voltage of 2.93. Please tell me that is this connection good. I mean if I make this connection in real, will this work? \$\endgroup\$ – anna carolina Jul 18 '15 at 13:30
  • \$\begingroup\$ @annacarolina - It should work for you. Remember to keep your load on the output to very small current. Two things can be adjusted - increase current through input diode by reducing the value of the R1 in my diagram - or increase the value of the R2 in my diagram. \$\endgroup\$ – Michael Karas Jul 18 '15 at 15:47
-2
\$\begingroup\$
Use LM7805 to convert 12V into  5V 

enter image description here

Then use this voltage divider to create 3.3V supply

schematic

simulate this circuit – Schematic created using CircuitLab

Use the circuit below , and as datasheet suggests that the forward voltage is about 1.2V (led voltage) and maximum current should be 20mA so the resistor R1 can be calculated as

Voltage_R1 = 5.0-1.2  = 3.8V
I_R1 = 20mA 
R1 = 3.8 / 20mA = 190 ohm 

Use minimum resistor of value this , higher resistor will reduce current

enter image description here

\$\endgroup\$
  • \$\begingroup\$ electronics.stackexchange.com/questions/49141/… \$\endgroup\$ – Taimoor Ali Jul 17 '15 at 9:09
  • \$\begingroup\$ you are giving 3.3v input. but in my circuit i'll have to give 12volt supply and output should be 3.3v. How to do that? \$\endgroup\$ – anna carolina Jul 17 '15 at 9:21
  • \$\begingroup\$ Bring 12 V to 3.3 or 4 using voltage divider \$\endgroup\$ – Taimoor Ali Jul 17 '15 at 9:25
  • \$\begingroup\$ This isn't a "3.3v source", it's a voltage divider, and along with wasting 20mA constantly, it will also have extremely poor output regulation. \$\endgroup\$ – Nick Johnson Jul 17 '15 at 9:45
  • 1
    \$\begingroup\$ I've already said - because you're trying to use a voltage divider as a regulated power supply. \$\endgroup\$ – Nick Johnson Jul 17 '15 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.