Hi All,
I was wondering if someone could confirm if the behaviour I'm seeing on my inputs is normal or due to my less than adequate soldering.
I have connected my house alarm bell output to a 12v relay and wired this via cat5 cabling to an input on the HAH. A script then sends a twitter message (and hence a pop up on my mobile) when the house alarm is triggered. This all works but I am getting the odd false alarm.
I immediately blamed my wiring and have since checked and double checked connection integrity.
Member for
17 yearsStronger pullup
Hi Garry,
As you know, each input is implemented by a connector pair. One pin is tied to Gnd, the other goes to an input pin on the micro. The code on the micro enables a pullup resistor that is internal to the micro itself. If you are seeing 'glitches' or 'contact bounce' then the most obvious (hardware) thing to do is to use a stronger pullup resistor.
If you locate the pin on the connector that runs to the micro input pin and then use a 4.7K resistor to connect that to 5V, that may well help.
You can go all the way & use a circuit such as http://ikalogic.com/debouncing.php
That said, some software debounce is probably easier.
Hope this helps,
Derek
p.s. Excellent application!
Member for
16 years 10 monthsDebounce
The AVR firmware has a 25ms debounce on the input state change already.
Member for
15 years 7 monthsMuch better
Thanks Derek. Pull up resistor has stopped the inputs being triggered by just touching the high pin alone. Have now reconnected and so far so good. Excellent support as always :) Garry
Member for
17 yearsWill add these resistors
Current batch of HAH PCBs are running low, so I'll add the option to fit these pullups to the next run of the boards.
Please, do consider posting up the Lua script that you've written to achieve the notification.
Cheers,
Derek.