uk
Offline
Sr. Member
Karma: 0
Posts: 310
|
 |
« on: January 25, 2013, 01:22:31 pm » |
hi, i m trying to connect to an alarm, when alarm is activated i get a 24v, using this as an input to my pin, so im going to use a voltage devider to drop down voltage to 5v (should i aim for 4.7v ish? dont want to damage my pin), then a current limiting r into the pin
just wondering if this was the best method for doing? or maby there a better way i could do this?
thank you
|
|
|
|
« Last Edit: January 25, 2013, 01:32:14 pm by jonisonvespa »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 23
Posts: 1377
Now, More Than Ever
|
 |
« Reply #1 on: January 25, 2013, 01:38:41 pm » |
opto-interrupter / opto-isolator / etc.
|
|
|
|
|
Logged
|
Don't Be Upset By The Results You Didn't Get With The Work You Didn't Do
|
|
|
|
uk
Offline
Sr. Member
Karma: 0
Posts: 310
|
 |
« Reply #2 on: January 25, 2013, 01:48:03 pm » |
yes i did think of opto-isolator, but i still have to drop the voltage down on tee input, max v in on a 4n25 is 6v, i still have the problem of dropping the v down
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #3 on: January 25, 2013, 01:50:30 pm » |
when alarm is activated i get a 24v AC or DC? Lefty
|
|
|
|
|
Logged
|
|
|
|
|
uk
Offline
Sr. Member
Karma: 0
Posts: 310
|
 |
« Reply #4 on: January 25, 2013, 01:52:32 pm » |
sorry dc
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Sr. Member
Karma: 3
Posts: 388
|
 |
« Reply #5 on: January 25, 2013, 03:05:32 pm » |
Simple opto-isolator with voltage divider giving the correct entry voltage and if required current limiting resistor then take 5v from the arduino into one side of the output and the other side will be your 5v to go to the input pin of the arduino with no worries about over voltage or current. 
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25501
Solder is electric glue
|
 |
« Reply #6 on: January 25, 2013, 03:18:55 pm » |
i did think of opto-isolator, but i still have to drop the voltage down on tee input, max v in on a 4n25 is 6v, Where does it say that in the data sheet then? It is not in the absolute maximum ratings table where I would expect it to be. The input is an LED so there is no maximum input voltage, you just have to limit the current with a resistor.
|
|
|
|
|
Logged
|
|
|
|
|
uk
Offline
Sr. Member
Karma: 0
Posts: 310
|
 |
« Reply #7 on: January 25, 2013, 03:58:28 pm » |
hi mike
what is the absolute maximum voltage of a 4n25? im a bit confused, if thats the case that there is no max voltage on the input side then i dont need to drop the voltage (24v) just limit the current to the led?
would this be ok
thank you
|
|
|
|
« Last Edit: January 25, 2013, 04:12:38 pm by jonisonvespa »
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25501
Solder is electric glue
|
 |
« Reply #8 on: January 25, 2013, 04:44:42 pm » |
Yes although I would make the resistor 2K4 or even 2K7 to keep the current just under 10mA
|
|
|
|
« Last Edit: January 25, 2013, 05:47:56 pm by Grumpy_Mike »
|
Logged
|
|
|
|
|
uk
Offline
Sr. Member
Karma: 0
Posts: 310
|
 |
« Reply #9 on: January 25, 2013, 05:14:09 pm » |
24k or 27k?
im confused, surely using a 2k r would limit the led's current to 12ma why so high? you mean 2.4k, 2.7k?
|
|
|
|
« Last Edit: January 25, 2013, 05:31:40 pm by jonisonvespa »
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25501
Solder is electric glue
|
 |
« Reply #10 on: January 25, 2013, 05:48:42 pm » |
you mean 2.4k, 2.7k? Yes I do sorry. Original post edited. I am glad you are playing attention. 
|
|
|
|
|
Logged
|
|
|
|
|
uk
Offline
Sr. Member
Karma: 0
Posts: 310
|
 |
« Reply #11 on: January 25, 2013, 05:52:16 pm » |
many thanks for the help much appreciated.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #12 on: January 25, 2013, 07:06:39 pm » |
hi mike
what is the absolute maximum voltage of a 4n25? im a bit confused, if thats the case that there is no max voltage on the input side then i dont need to drop the voltage (24v) just limit the current to the led?
would this be ok
thank you
The input side does however have a maximum reverse voltage rating as all diodes do, and leds tend to have small reverse voltage ratings of around 5vdc or so. So if one is driving the led input of a opto with a AC voltage then it can be damaged even though you have a properly sized current limiting resistors. The common fix to this is to just wire an external reversed biased diode across the input led pins. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
|