I don't think you understand what "max" means.
It means the ABSOLUTE MAXIMUM current it can tolerate before frying.
Obviously, it is not common practice to operate at maximum ratings.
Just the opposite. You only need 20 or so mA to turn on the led.
A 220 ohm resistor will work just fine. The very lowest value resistor
you should use for the led current limiting resistor is 180 ohms but don't
try that until you've tried 220 ohms.
I can't tell if you understood what I said.
I specifically said to connect a 4.7k resistor from reed switch pad1 to the collector.
Then connect the emitter to pad2.
Current will flow from pad1 to resistor to collector through the transistor and out the emitter to pad2.
I do not know how much current the circuit needs through the reed switch circuit so it may be
necessary to reduce the 4.7k resistor to 3.3k or 2.2k or 1k.
The voltage drop across the 4.7k resistor devided by 4700 is the current flowing through the transistor(in A).
0.001A = 1mA
A 1k resistor would increase that current to 5mA.
We don't know how much current that circuit needs so you should start at 1 mA and increase it
incrementally until it detects the closed switch.
You shouldn't need to go below 1k.
You need to find out the polarity across the reed switch before you remove it.
This can be done by removing it from the magnet, causing it to open up.
Then put a meter across it to find out WHICH end is POSITIVE.
You can't do this if both pads are shorted by the relay, so either remove the magnet or remove
the relay and find out which pad is more positive.
Call that PAD1.
Call the less positive pad PAD2.
Then the wiring we discussed should work.
If you fail to ascertain polarity first and connect the transistor backwards it won't work.
Another solution would be a small 5V relay but then you would need to run the relay input wires to
the arduino and the relay would need 5V power so that might be more work.
The collector on that opto can take 70v 50mA
Where does it say that ?
There is absolutely NO connection between the 70V and the 50mA, because the 70V is when it is
OFF and the 50mA is when it is ON. Your statement makes as much sense as saying "sunglasses
work best at night "
You need to learn more about electronics before you start making assumptions based on what you
see on a datasheet.
If you looked at the collector power dissipation it is 150mw , or 0.150W.
If you divide that by the collector max current of 50mA(0.050A) you get 3V, NOT 70v !.
The 70V is the max collector-emitter voltage, which is the voltage when the transistor is OFF.
Obviously, when the transistor turns ON, the collector and emitter are SHORTED so there is no
way there is going to be 70V across the collector emitter with 50mA going through it.
(because that would be 4.9W not 150mW !)
It could be 70V when there is NO current going through it.(but that would only occur if you
were operating at maximum operating voltage, which, simply put , would be stupid)
P = IV
0.150W = 0.050AV => V = 0.150W/0.050A
V = 3V (max collector-emitter voltage drop when On)
The dead giveaway that you have no electronics training is that you suggested operating the
optocoupler at maximum operating current using an 82 ohm resistor.
You might as well scream "I HAVE NO F*CKING IDEA WHAT I'M DOING !"
Start by studying Ohm's Law, then learn to read ALL of the datasheet, instead of just one or
two things in it.