How can I evaluate a pulsed signal in Arduino? The signal comes from an car alarm system and is called (-) output 200 mA. Arduino and the car have the same GND. Can I attach the output through a resistor to PB0 (D8) or PD5 (D5)? Alarm system is called Ampire. Probably the same as Viper. I just wanted to read these pulses, but I do not know exactly how I connect this output correctly with Arduino. This is the description for this Output:
HN1/9 BROWN/WHITE – 200mA (-) Horn honk output: This wire supplies a 200mA (-) output that can be used to honk the vehicle’s horn. It provides a pulsed output when the security system is armed/disarmed and in trigger sequence or in panic mode. In most vehicles with (-) horn circuits this wire can control the vehicle’s horn without adding a relay. If the vehicle has a (+) horn circuit, an optional relay must be used to interface with the vehicle’s horn circuit.
1 Answer 1
I found a user manual at AMPIRE Car Alarm System for High-Speed CAN-Bus.
N1/9 BROWN/WHITE – 200mA (-) Horn honk output:
This wire supplies a 200mA (-) output that can be used to honk the vehicle’s horn. It provides a pulsed output when the security system is armed/disarmed and in trigger sequence or in panic mode. In most vehicles with (-) horn circuits this wire can control the vehicle’s horn without adding a relay. If the vehicle has a (+) horn circuit, an optional relay must be used to interface with the vehicle’s horn circuit.
IMPORTANT! Never use this wire to drive anything but a relay or a low-current input! This transistorized output can only supply (-) 200mA and connecting directly to a solenoid, motor or other high current device will cause the module to fall
Judging by that this output will sink up to 200 mA. You could conceivably set an Arduino pin to INPUT_PULLUP and let this output drive it low to indicate it is active.
Personally I think I would use an optocoupler, in case there were unexpected voltages on that pin. You would need a series resistor to limit current through the LED in the optocoupler, say 1 k would be about right if you were connecting it to the 12V car system.
Vf = 1.2V (say)
Voltage over resistor = 12 - 1.2 = 10.8 volts
Current through LED = 10 mA
Limiting resistor = 10.8 / 0.01 = 1080 ohms
Now the output of the optocoupler can sink your Arduino pin, which you have configured as input pullup.
Write a test sketch to see what you are getting through it, but a multimeter should probably tell you, if it just flashes it slowly.
Suggested schematic:
-
Many thanks, Nick! I'll try to implement your suggestions in a circuit diagram.Viktor Scherf– Viktor Scherf09/14/2015 23:36:42Commented Sep 14, 2015 at 23:36
-
See amended post with schematic.09/15/2015 03:54:35Commented Sep 15, 2015 at 3:54
(-) output
does that mean it is negative? This is a hard question to answer with so little information.