Doorbell detection
-
Thanks @mfalkvidd for your quick response. I get a sense how pulse power meter example will be useful. The sketch is too complex for me to understand. Correct me if I am wrong, that the pulse powermeter sketch is an overkill for my application. Will be asking for too much, if you could guide me on how to adapt the sketch .
Thanks. -
Thanks @mfalkvidd for your quick response. I get a sense how pulse power meter example will be useful. The sketch is too complex for me to understand. Correct me if I am wrong, that the pulse powermeter sketch is an overkill for my application. Will be asking for too much, if you could guide me on how to adapt the sketch .
Thanks.@Puneit-Thukral something like this should be sufficient
// Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #include <MySensors.h> #define DOORBELL_RING_TIME 3000 // Assume the doorbell is ringing for 3 seconds #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your light sensor. (Only 2 and 3 generates interrupt!) #define CHILD_ID 1 // Id of the sensor child MyMessage msg(CHILD_ID, V_TRIPPED); bool ringing = false; void setup() { pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), onPulse, RISING); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Doorbell", "1.0"); present(CHILD_ID, S_DOOR); } void loop() { if (ringing) { // Let controller know the doorbell is ringing send(msg.set(true)); ringing = false; wait(DOORBELL_RING_TIME); // Turn off ringing at controller send(msg.set(false)); } sleep(0); // Sleep until there is a new interrupt } void onPulse() { ringing = true; } -
Thank you so much! :100: :+1:
-
Thank you so much! :100: :+1:
@Puneit-Thukral BUT..... Why NOT interfere.... I understand your desire to NOT physically interfere but it is illogical... LED=DC=Signal ? No ? A figure of 8 cable connection should not be impossible.... Once removed it is a two tiny holes...
-
@Puneit-Thukral BUT..... Why NOT interfere.... I understand your desire to NOT physically interfere but it is illogical... LED=DC=Signal ? No ? A figure of 8 cable connection should not be impossible.... Once removed it is a two tiny holes...
@zboblamont Hi, @zboblamont could you please guide me how you think the setup should be.
-
@Puneit-Thukral something like this should be sufficient
// Enable debug prints #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #include <MySensors.h> #define DOORBELL_RING_TIME 3000 // Assume the doorbell is ringing for 3 seconds #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your light sensor. (Only 2 and 3 generates interrupt!) #define CHILD_ID 1 // Id of the sensor child MyMessage msg(CHILD_ID, V_TRIPPED); bool ringing = false; void setup() { pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), onPulse, RISING); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Doorbell", "1.0"); present(CHILD_ID, S_DOOR); } void loop() { if (ringing) { // Let controller know the doorbell is ringing send(msg.set(true)); ringing = false; wait(DOORBELL_RING_TIME); // Turn off ringing at controller send(msg.set(false)); } sleep(0); // Sleep until there is a new interrupt } void onPulse() { ringing = true; }@mfalkvidd Hi, I got the setup running. However, as long as I am connected to the FTDI adapter, the sensor works fine. But when connected to 2 AA batteries through a buck up converter, the sensor does not communicate with domoticz.
I read that LM393 needs 3.3 V and I have measured the voltage across Vcc and Gnd on LM393, its 3.3 V -
@mfalkvidd Hi, I got the setup running. However, as long as I am connected to the FTDI adapter, the sensor works fine. But when connected to 2 AA batteries through a buck up converter, the sensor does not communicate with domoticz.
I read that LM393 needs 3.3 V and I have measured the voltage across Vcc and Gnd on LM393, its 3.3 V -
@zboblamont Hi, @zboblamont could you please guide me how you think the setup should be.
@Puneit-Thukral Perhaps an outline of your circuit and what is sensing what may help narrow down the issues. Were I looking at something which fires an LED, there is DC supplying it, which should be easy enough to tap (low voltage DC line) to initiate a response from your node. I would be inclined to test a signal input to light onboard LED on external LED lit, then refine the sketch to carry out the action so it narrows problems to a software issue.... Right now this is Stevie Wonder playing golf in the dark....
-
@Puneit-Thukral what does the debug output of the node and the gateway say?
@mfalkvidd Hi
On connecting the FTDI cable, the sensor works just fine. On disconnecting the FTDI it stops working. I figured its a power source issue. So, first tep to debug, I connected a 9v battery to RAW and GND - sensor node worked fine. I measured voltage across VCC and GND with the 9V battery - output across VCC and GND was 3.36 V and with 2 AA batteries connected through a buck boost converter, I measure 3.39 V across VCC and GND.With the AA batteries, the small LED next to pin 9 on the pro-mini glows fainter than on the 9 V (across RAW/GND) and also blinks every few seconds.
Is there any way, I can fix this?
-
@mfalkvidd Hi
On connecting the FTDI cable, the sensor works just fine. On disconnecting the FTDI it stops working. I figured its a power source issue. So, first tep to debug, I connected a 9v battery to RAW and GND - sensor node worked fine. I measured voltage across VCC and GND with the 9V battery - output across VCC and GND was 3.36 V and with 2 AA batteries connected through a buck boost converter, I measure 3.39 V across VCC and GND.With the AA batteries, the small LED next to pin 9 on the pro-mini glows fainter than on the 9 V (across RAW/GND) and also blinks every few seconds.
Is there any way, I can fix this?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login