Please pardon my elementary paint drawing. I am trying to use this optocoupler: http://www.newark.com/avago-technologies/hcpl-4731-300e/optocoupler-darlington-3750vrms/dp/36K5531 to provide an analog input to my arduino for a 0-1000V signal. I have hooked it up with an LED and verified that the LED gets brighter as I increase voltage up to 1KV. My understanding of NPN transistors is that they need a load connected between collector and +V in order to function. I was just going to connect the 5V from arduino to Terminal 8 (VCC, on optocoupler) and terminal 7 (V01, on optocoupler) to arduino analog input, and Terminal 5 (GND, on optocoupler) to arduino GND. I haven't tried it yet (left it at work) but will it work? because the "load" would be the arduino input, which would be between Emitter and GND? What would be the proper way to connect this to arduino input? See pic, I want to replace all in red with arduino analog input. Thanks!
Like this? (Except for arduino +5v going to base, rather than 12V. also, forgot to draw my gnd; should be connected to arduino gnd):
This was one of the drawings I made while trying to think up a solution. I was thinking that if the transistor is OFF, the entire +5V will go through the resistor; if transistor was saturated, none of the +5V would go through the resistor; and if it were somewhere in the middle, then around 2.5V would make it through the resistor.
The purpose is not to take a measurement per se, but to detect if 1000V is present, or if it has dropped below a threshold, say around 700V. it is for a leakage tester, and the 1kv will be going through a long length of wire before reaching the optocoupler. The dc/dc converter only puts out 1.5mA, after which the voltage drops to meet the current demand. so the idea is that if there is a short or a partial short (for example, a 100kohm resistor placed from 0V to 1KV pins - no math done here, just made up a resistance value-), the voltage will drop dramatically, arduino will detect this, and perform an action.
Those 20megs worth of current limiting resistors feeding the opto's led input will keep the LED current down to around 50 microamps. I don't think they can generate any light to be detected internally at that current level. But check the opto's datasheet, I may be wrong, I was once.
Lefty
No. The Pin. 7 output goes directly to an Arduino input pin (as I tried to say in my previous response)
Ah , ok. Sorry; I didn't read that as you wrote it first time around. Thank you for giving me the answer I was seeking.
Those 20megs worth of current limiting resistors feeding the opto's led input will keep the LED current down to around 50 microamps.
Your math is spot-on. I picked these optocouplers for their "Ultra low input current capability = 40 [ch956]A(up to 5mA)" - says is uses a "AlGaAs LED" (whatever that is). I took it all the way down to 50[ch956]A because as Richard Crowley stated, they are are not linear, and I seemed to notice more of a variation in the brightness of the LED per drop in the 1KV as opposed to other testing I did at 600[ch956]A. Also I will be adding a few more of these 1kv legs in parallel with the one drawn, so also very important to keep the amp draw low. I am trying to promote these optocouplers to the Arduino world (not financially connected to Avago lol) because I think they are really neat when I was searching for them (for days), everybody told me they didn't exist.