Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

optocoupler question

Status
Not open for further replies.

wejos

Member
guys is there a optocoupler that the transistor inside was PNP? i need a positive output from emitter to collector, not negative. can you tell me the part number...

thank you
 
Most optos don't require the output transistor base to be connected, so you can attach the opto "transistor" as either high side or low side, so YES it's like a PNP if you want it to be.
 
Most optos don't require the output transistor base to be connected, so you can attach the opto "transistor" as either high side or low side, so YES it's like a PNP if you want it to be.

ill run some tests on my 4N35 if positive would go through.

i know it doesn't work to moc3023 since its triac instead of transitsor. i dont know why but i guess it has to do with AC.

i found PN2905A for PNP transistor also.

i read it can be used for switching. if im going to add a PNP transistor you think this is good for 5v operation?

sorry the datasheet gave me headache lols.


thank you guys for the info, appreciate it very much.
 
ill run some tests on my 4N35 if positive would go through.

i know it doesn't work to moc3023 since its triac instead of transitsor. i dont know why but i guess it has to do with AC.

i found PN2905A for PNP transistor also.

i read it can be used for switching. if im going to add a PNP transistor you think this is good for 5v operation?

sorry the datasheet gave me headache lols.


thank you guys for the info, appreciate it very much.

hi,
A pnp transistor will require a negative collector voltage.??

If you post a sketch I am sure we can help.:)
 
Ric this is what i have in mind. so far the optos ive tested did not yet work
 

Attachments

  • opto.JPG
    opto.JPG
    9.1 KB · Views: 1,186
hi,
Is this what you are asking, positive pulse to the opto and a positive going pulse from the output of the transistor.?
 

Attachments

  • AAesp05.gif
    AAesp05.gif
    26.8 KB · Views: 1,431
hi,
Is this what you are asking, positive pulse to the opto and a positive going pulse from the output of the transistor.?

i think no but the trigger for the opto is a negative pulse and for output, a high to trigger the interrupt inside my pic
 
Last edited:
hi,
You could also do it this way.
 

Attachments

  • AAesp06.gif
    AAesp06.gif
    27.1 KB · Views: 985
Ric this is what i have in mind. so far the optos ive tested did not yet work
Connect the collector of the opto's transistor to the +5 and the emitter to the PIC. Also you'll need a pull down resistor, see attached.

EDIT: Ericgibbs beat me to it...
 

Attachments

  • opto.JPG
    opto.JPG
    10.4 KB · Views: 904
Last edited:
i think no but the trigger for the opto is a negative pulse and for output, a high to trigger the interrupt inside my pic

hi,
When you say 'a negative pulse' do you mean a pulse that goes from say 0 to -5V, or +5V to 0V

Just draw me the pulses you have in and out.:)
 
wow eric i think this is it!

thank you very much i'm heating up my solder ; )

thank you very much again. pnps are connected backwards
 
i have no way of measuring the pulse but i know the supply is 12v, and a additional wire color gray, says signal (this is a old coin mech i saw in the garage). there is also a selecting switch that says NO or NC, i set it to NO so the way i understand it should start from 0v not 12v.
 
i have no way of measuring the pulse but i know the supply is 12v, and a additional wire color gray, says signal (this is a old coin mech i saw in the garage). there is also a selecting switch that says NO or NC, i set it to NO so the way i understand it should start from 0v not 12v.

If you want the line to pull high, then slect N/O.

DONT forget to calculate the correct resistor value for the opto input.!!

There should be about 20mA thru the opto emitter when the 12V is connected to the limiting resistor.

Use a 520R or 560R.
 
Last edited:
ok eric ill select "NO" thank you. the closest resistor i have is 470 ohms, maybe that should do until tomorrow when i can buy 520.

big thanks also to kpatz, MR RB, and Nigel.

bit by bit im learning from all you guys

i owe you s*load of beer lols
 
Last edited:
470 ohms is close enough. Check the maximum mA rating on the LED section of the opto to make sure. 470 will give you somewhere between 20-25 mA at 12V depending on the voltage drop of the LED.

If you're going to err, go on the high side. 1K will allow 10-12 mA through the LED which should be enough.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top