| Author |
Message |
|
|
Posted: Feb 29, 2012 - 07:47 PM |
|

Joined: May 10, 2007
Posts: 188
|
|
I've got a device that requires 24V and has an open collector output. I need to interface this to a 5V logic system and want to use an optoisolator to do so (such as the Vishay TCMT4100 - http://www.vishay.com/docs/83510/tcmt1100.pdf).
For the life of me, I can't figure out how to do this. I can place a pull-up resistor to 24V on the open collector and see the collector pin change states as it should (switch between 24V and approximately 0V). However, I obviously can't connect the open collector point to the input of the opto LED .
I considered putting the opto LED between the pullup resistor and the collector pin and even though it seems this will work, it just didn't seem like the right thing to do.
THoughts? |
|
|
| |
|
|
|
|
|
Posted: Feb 29, 2012 - 08:00 PM |
|

Joined: Aug 13, 2003
Posts: 134
Location: Romania
|
|
|
engrpetero wrote:
I considered putting the opto LED between the pullup resistor and the collector pin and even though it seems this will work, it just didn't seem like the right thing to do.
THoughts?
It's exactly the only right thing you could do. |
_________________ Dor
|
| |
|
|
|
|
|
Posted: Feb 29, 2012 - 09:17 PM |
|

Joined: May 02, 2007
Posts: 3007
Location: Nieuwegein, Netherlands
|
|
|
Quote:
For the life of me, I can't figure out how to do this. I can place a pull-up resistor to 24V on the open collector and see the collector pin change states as it should (switch between 24V and approximately 0V). However, I obviously can't connect the open collector point to the input of the opto LED .
as stated the right thing to do. but keep in mind. it is an open collector that means that it switched between 'conducting' and 'non conducting' so if it conducts to ground then the LED will be ON and if it is non conducting there cannot flow current through the LED and thus the LED will be of. It will not switch to 24V! |
_________________ 1)Datasheet and application notes checked?
2)tutorial forum
3)Newbie start here
|
| |
|
|
|
|
|
Posted: Feb 29, 2012 - 09:33 PM |
|

Joined: May 24, 2004
Posts: 5994
Location: Tampere, Finland
|
|
If you opto-isolate it, the opto-isolator also has open-collector output like your output device. Opto-isolator output needs a pull-up to +5V to interface 5V logic. The LED also needs current, but its cathode is driven with open-collector of your output device, so you can put the anode resistor to 24V or 5V.
But if your output device already has open collector output, why don't you just put a pull-up resistor of like 10k to 5V and it is compatible with 5V logic? Why it needs to be opto-isolated? Just don't put the pull-up resistor to 24V.
So what output device you have that works with 24V? |
|
|
| |
|
|
|
|
|
Posted: Mar 01, 2012 - 01:28 PM |
|

Joined: May 10, 2007
Posts: 188
|
|
Thanks for the comments, guys. It does work - not sure why I thought it wasn't a good idea but I guess in the end, the connected device is really acting like a switch.
The device here is an inductive proximity sensor and isn't always connected to the system. I wanted to provide some isolation between the device and the AVR pins in the event someone connects the device incorrectly.
Again, I really appreciate the help. |
|
|
| |
|
|
|
|
|
Posted: Mar 01, 2012 - 04:55 PM |
|


Joined: Nov 22, 2002
Posts: 12036
Location: Tangent, OR, USA
|
|
Put a current liming resistor in series with the LED at the input of the opto. For example, if the optoisolator takes 2ma, then 24V/2ma = 12K. I would use 10K.
Then just connect this as "the load" for the open collector output. Of course, use right polarity for the optoisolator input.
Done
Jim |
_________________ Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA
"The only thing standing between us and victory is defeat" P.G.Wodhouse in Wooster & Jeeves series
|
| |
|
|
|
|
|
Posted: Mar 01, 2012 - 09:28 PM |
|

Joined: Aug 04, 2002
Posts: 1704
Location: Brisbane, Australia
|
|
Unless You need the opto coupler as a galvanic barrier You can use open collector directly to drive input of a micro.
Using Your micro supply connect a resistor between micro supply and input pin on the micro and hang the open collector output onto the pin.
This assumes the 24 volt device and micro share a common ground. |
|
|
| |
|
|
|
|
|
Posted: Mar 07, 2012 - 10:09 AM |
|

Joined: May 10, 2007
Posts: 188
|
|
| Good idea, ignoramus. For this application, although the galvanic barrier is not specifically required, I do have an unused optocoupler from a 4 optocoupler package. |
|
|
| |
|
|
|
|
|