[SOLVED] How to detect power current with Arduino Pro Mini in a doorbell?



  • I have a very simple wireless doorbell in my house, and I was thinking of making it notify me when someone rings in Domoticz.

    I have minimal with electronic components, but I do have the basics with resistors, wires, NRF24 etc.

    What I found out, is that when the doorbell button is clicked, it sends a wireless signal to the other unit, containing the speaker. This unit has a LED that lights up when it receives a signal, aka when someone rings the bell.

    I was thinking of connecting the Arduino to this LED, detecting when the LED is turned on. I connected the cathode on the LED to ground on the Pro Mini, and the LED's anode to an analog pin on the Pro Mini. Now I can read values around ~740 in standby mode, and around ~860 when the LED lights up.

    Is this a basic and "fail safe" method to check for power? Or is it varying too much? I want to use the door magnet sensor example to detect the doorbell, but not sure if I should use the Bounce library with analog signals.

    Thanks in advance!


  • Mod

    You could use the analog input and measure the voltage going to the led: if it goes over a certain value within 0-5v you send the ring to domoticz. If voltage is sufficiently high you can use a digital pin too instead of analog.



  • Thanks @gohan it works perfectly using a digital pin and the door sensor example.


Log in to reply
 

Suggested Topics

  • 1
  • 6
  • 1
  • 3
  • 1
  • 2

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts