Here is a fun project: hook my wireless doorbell to the Internet and get SMS when someone rings it. Useful when I am not at home or am in the backyard and can’t hear it, but I carry my mobile phone with me.
My wireless doorbell is some cheap model that Google doesn’t even find, but it is powered by two 1.5V AA batteries. It is also quite bulky and I could easily fit a Funky sensor in it. It has a green LED that flashes when the doorbell is ringing, so I decided to use it to pull a digital pin high when someone is ringing. I also did setup that digital pin for pin-change interrupts, so that the Funky sleeps constantly and is only wakened when necessary i.e. that pin is pulled high:
sbi(GIMSK,PCIE0); // Turn on Pin Change interrupt
sbi(PCMSK0,PCINT1); // Which pins are affected by the interrupt
Here are some pictures of the setup
So the sketch
just sleeps and awaits until a pin-change interrupt kicks in, then reads the state of pin 1 and sends it. Another power-down follows for this to repeat forever..
See my update on getting this to work here
will then pick up the transmission and register it. I tried to set up email notifications when I get value “1”, but I couldn’t. I will follow up once this is ready. The idea is that I forward these to a email2sms service that my mobile operator has and therefore receive a SMS message. Until then I can view the event in Emoncms’s logs.
This same approach may be used in many other scenarios, for example in interfacing wireless PIR sensors, flood sensors, door magnetic sensors. The benefit is that the system sleeps all the time and only wakes to do work.