(P)Imp my Doorbell

I’m working on Imp’ing my doorbell such that I get a Pushover notification when the doorbell is rung. The doorbell consists of a button and a wireless battery-operated receiver. It’s the Friedland Libra+. I’ve opened up the receiver and everything is SMD. One of the chips is covered in black epoxy and the other is an RF FSK chip. However, whenever the doorbell is pushed it can be programmed to light up one of 6 LEDs. I thought this would be a convenient place to tap Pin1 of my Imp onto.

The idea was to put the Imp to sleep and then have it woken up when the LED is activated and then send me a Pushover notification. I also thought that Pin 1 was a ‘rising edge’ notification, but it just seems sensitive to +ve level. As a consequence the Imp cycles through waking up, going to sleep, waking up, …

Trying to reverse engineer the doorbell circuitry I think what I’ve tapped onto is the collector of an open-collector output. The collector is linked to the SMD LED and then through an SMD Resistor and up to +3.3V. So, in the (doorbell) dormant state, Pin1/Collector is reading +3.3V (up through the LED/Resistor), but when the doorbell is pushed, it temporarily drops to 0v and lights the LED.

My code looks like this (nothing startling):
function logDeviceOnline()
local reasonString = “Unknown”;
reasonString = “The power was turned on”;

        reasonString = "A software reset took place";
        reasonString = "An event timer fired";
        reasonString = "Pulse detected on Wakeup Pin";
        agent.send ("Doorbell Status", "DingDong")
        reasonString = "New Squirrel code downloaded";

server.log("Reason for waking/reboot: " + reasonString);


function DoorbellWakeup ()
server.log (“Doorbell Wakeup”)


hardware.pin1.configure(DIGITAL_IN_WAKEUP, DoorbellWakeup)

// wakeup every hour, on the hour

imp.onidle(function() {
server.log (“Hourly Wakeup”)
server.sleepfor(3600 - (time() % 3600));

How could I modify the connection from Pin1 to the Open Collector to get the inverse effect to what I have now? Thanks in advance.


You might check out this recent thread which also addressed ‘how to wake the imp with a high --> low state transition on pin 1’ …


In essence, the simplest solution would likely be to be add some sort of logic inverter between your OC and pin 1 (either a gate or simple fet-based circuit) to effect the signal inversion.

Larry, thanks for the pointer… will investigate and report back…