OUTPUTS (J3): These outputs are programmed as active low output. They are held at 13V and fall to 0Vwhen active, it can source or sink 10mA.These outputs would normally be connected directly to the input channels of wire in type communicators.Alternatively each output can be used to drive a relay (coil resistance > 1200 Ohms) connected between theoutput terminal and the 13V supply terminal. The relay will energise when the output port operates. It isrecommended that a back EMF protection diode is used in parallel with the relay coil.

I have some MOCD207M optocouplers handy, so I was going to connect the diodes to the 13V and the outputs so when the outputs went low, current would flow through the diodes and activate them.

Looking at the optocouplers datasheet http://www.fairchildsemi.com/ds/MO/MOCD207M.pdf a forward voltage of around 1.4v @ 30mA is suggested. Should I use a 390R resistor to drop from 13v? The alarm manual says the outputs can source or sink 10mA so would 30mA flowing into them overload them? Or should I try and limit the current to 10mA and hope it is enough for the optocouplers - I can't see the minimum current in the MOCD207M datasheet?

Looking at the optocouplers datasheet http://www.fairchildsemi.com/ds/MO/MOCD207M.pdf a forward voltage of around 1.4v @ 30mA is suggested. Should I use a 390R resistor to drop from 13v? The alarm manual says the outputs can source or sink 10mA so would 30mA flowing into them overload them? Or should I try and limit the current to 10mA and hope it is enough for the optocouplers - I can't see the minimum current in the MOCD207M datasheet?

Thanks!

Yes you need to limit the current to the 10ma limit capacity of the alarm output pin. So wire the output pin to a cathode of one of the opto's input led, wire the anode to a 1200 ohm resistor and the other end of the resistor to the +13vdc voltage source on the alarm module.

The 'CTR' spec in the datasheet tells you the response ratio for a given input current. Assuming you will just be driving arduino digital input pins you don't require a lot of current in the opto's output circuit, 10ma input led current will be more then enough. Just ground the emitter, enable the internal pull-up resistor for the digital input pin and wire it to the opto's collector terminal. you should be able to detect the state of the alarm output. The arduino will read a LOW when the alarm module activates the signal and a HIGH when it deactivates the signal.

Thanks for the detailed advice Lefty! I will try that Should I use resistors on the arduino digital pins also? If it is written HIGH via the internal pull ups and I ground the pins, how much current would flow? I know the pins supply about 30mA but how much would it sink?

Apparently the 13V output from the alarm can supply up to 200mA so I plan to run the arduino & ethernet shield from that. Would you simply run 13V into the Vin or step it down first?

Thanks for the detailed advice Lefty! I will try that Should I use resistors on the arduino digital pins also? If it is written HIGH via the internal pull ups and I ground the pins, how much current would flow? I know the pins supply about 30mA but how much would it sink?

No need for any external resistors for the digital input pins. The internal pullups are like 40K to 50K ohms, so very little current flows when the output transistor of the opto conducts to ground.

Output pins can sink current to an external circuit when they are commanded to a LOW state and can source current to an external circuit when commanded to a HIGH state. But an input pin is just a very high (many megohm) input sensing pin that draws no current to speak of from what ever is supplying voltage to the pin.

So lesson here is that output pins and input pins are two totally different animals on a arduino board. Most of the rules and limits for output pins are different then the rules for input pins, but both do have rules and limits of course.

Apparently the 13V output from the alarm can supply up to 200mA so I plan to run the arduino & ethernet shield from that. Would you simply run 13V into the Vin or step it down first?

I suspect not as ethernet boards are somewhat current hungry as I recall, but don't know directly. The basic Uno type arduino board draws about 50ma, so add that to whatever the ethernet shield requires plus anything else you are wiring to the arduino board like leds, etc and see what the total works out to.

Again, thanks all for the input! And thanks to larryD for drawing it out.

Got it built on a protoshield and all seems to be working I used 1300R resistors in the end to be on the safe side and through them I am measuring 9mA and picking it up on the digital pins so it should be fine.

You are right about the Arduino regulator. Its mildy warm with the arduino only, but gets too hot with the ethernet shied on, I measure 230mA with the shield attached . Is there a way to reduce this? This circuit will be running 247 so would be nice to get it down a little.

Obviously I won't be able to power the arduino from the alarm now, for heat and over current reasons. Guess I will just get a 9v wall adapter or similar.

Thanks

Edit: Obvious things I can think of is to disable all the LED's, I notice the shield takes 5V from the arduino then drops it to 3.3V, I don't suppose the 3.3V on the arduino is enough to power the shield is it?