[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!
-
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.
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 12 Mar 2025, 23:39 -
PJON and Minicore not working
Development • 21 Mar 2025, 19:51 • Trand 21 Mar 2025, 19:51