[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!


    Log in to reply
     

  • 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
 

3 out of 3

Suggested Topics


  • Announcements   29 Mar 2014, 17:08

    1

  • Development   15 Nov 2024, 10:59

    3

  • Development   14 Dec 2024, 20:23

    3

  • Development   14 Jan 2025, 22:07

    3

  • Development   12 Mar 2025, 23:39

    11

  • Development   21 Mar 2025, 19:51

    1

0
Online

11.5k
Users

11.1k
Topics

112.8k
Posts