24v input to pc, via 5v usb game-pad. (IL250 Optocoupler question)

Status
Not open for further replies.

peres

New Member
Hello there, I have a project going on in visual studio 2008. Who needs some inputs from the outside world. It's a 24Volt dc pulse signal to be correct, at max 10hz.


The input adapter is just a simple usb gamepad from Ebay.
And this is up an running with 10 inputs to Visual Studio.
**broken link removed**

**broken link removed**

To isolate the 24volt signal I would like to add a Optocoupler.
Im having trouble with calculating the resistor values for the optocoupler.
I have a IL250, and hope that would do. Its for ac, but dc will do also? or what?
Datasheet
**broken link removed**
**broken link removed**
**broken link removed**
Hope some of you could help me with the resistor calculation for the optocoupler, and that this information then can be helpfull to other people to.
I've searhched the net, but could not find how to calculate the resistor values from the information in the Datasheet.

Regards Peres
Norway
 
The forward voltage is 1.2 volts and the max continuous current is 60 mA. I would look to limit the current to about 10 mA. You have 24 volts so 24 - 1.2 = 22.8 volts / .010 Amp = about 2,280 Ohms. I would start with a 2.2 K Ohm resistor. See if that works.

Ron
 
Last edited:

Thank you Ron.
This resistor on 2.2K Ohm then protects the photo diode.
But what about RL that's on the output on the optocoupler. Is the purpose to limit the current there to? And to what level? I imagine it should be dimensioned to the Load? (from the name R load)
I dont know the usb controller chip input current, but I imagine it's wery low.

Peres
 
The value of R Load will depend on the voltage. What voltage will you be using on the detector side?

Ron
 
The value of R Load will depend on the voltage. What voltage will you be using on the detector side?

Ron

It will be 5v from the usb gamepad like from the picture. The output goes back to the chip inside the gamepad.
**broken link removed**
 
OK, I would start with a 10 K Ohm resistor on the collector as shown in the data sheet for R Load.

Ron
 
usb pinout

hi, i have a usb gamepad like that but my usb conector is broken and i lost it so i don't know the pinout of the usb with the 4 color cables.

could you please tell me which cable goes with every pin of the usb connector.


sorry for my english i'm spanish

thanks
 
d

hi, i think you didn't understand me. i don't want a generic usb pinout. i would like the exact pin for the usb and the wire of the gamepad. i.e. red wire to pin 1 of usb, blue wire to pin 2 of usb... etc.


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