💬 Door, Window and Push-button Sensor
-
you are at the limit of the radio range I'd say so randomly it looses a message, so you need to either increase power or get a better antenna (I hope you aren't using any buck/boost converter as power supply)
@gohan how you know?
Id 21 from range 0..255. Are you sure that is limit?Same with any different IDs, I tried sending message 3 times, this guarantees delivery of payload, but it using too much power
Now I use power supply with 1117
But my other nodes powered by CR2032 with boost 0.8-3.3V dc/dc with inductor coil on the NRF24 supply pin without any troubles
-
@gohan how you know?
Id 21 from range 0..255. Are you sure that is limit?Same with any different IDs, I tried sending message 3 times, this guarantees delivery of payload, but it using too much power
Now I use power supply with 1117
But my other nodes powered by CR2032 with boost 0.8-3.3V dc/dc with inductor coil on the NRF24 supply pin without any troubles
@pavel-polititsky said in 💬 Door, Window and Push-button Sensor:
@gohan how you know?
Id 21 from range 0..255. Are you sure that is limit?He means radio range (distance) not ID of node ;)
-
@pavel-polititsky said in 💬 Door, Window and Push-button Sensor:
@gohan how you know?
Id 21 from range 0..255. Are you sure that is limit?He means radio range (distance) not ID of node ;)
@nca78 oke, undestood
Problem stiil not resolved. I want to send message again to the gateway if NACK but dont know how to do it.send(msg.set(value == HIGH), true);in this case i have additional ack log in the serial debug, nothing more
-
A quick ACK example:
static boolean tryAgainLater = false; // should we resend? if(send(msgDust.setSensor(CHILD_ID_DUST_PM25).set(sensorValue),1)){ Serial.println(F("Received ACK")); tryAgainLater = false; }else { Serial.println(F("Connection problem, try again")); tryAgainLater = true; } -
@mfalkvidd said in 💬 Door, Window and Push-button Sensor:
Ah, thanks. So ACK basically always happens?
in that case, do you have any better example code on how to check if the ACK is received?
-
@mfalkvidd said in 💬 Door, Window and Push-button Sensor:
Ah, thanks. So ACK basically always happens?
in that case, do you have any better example code on how to check if the ACK is received?
@alowhum on nrf24, "hardware" ack is always on. "Software" ack is controlled by the second parameter in the send() function. Read https://forum.mysensors.org/post/34267 for an attempt to sort out the details. It is still quite confusing for me.
-
What will happen if i cut the power OFF of the radio after each transmission? is it needed to be initialize again before next transmission?
-
Thanks for fast reply, actually 900nA is to big number and i prefer to use xxx_POWER_PIN to cut the power of the NRF module.
I am building switch powered with CR2032 battery and i want to extend battery live as much as possible, for a switch is not needed to keep radio alive, i need it ON only when transmit signal -
Thanks for fast reply, actually 900nA is to big number and i prefer to use xxx_POWER_PIN to cut the power of the NRF module.
I am building switch powered with CR2032 battery and i want to extend battery live as much as possible, for a switch is not needed to keep radio alive, i need it ON only when transmit signal@tiana 900nA on a cr2032 is 27.9 years battery life. The self discharge of a cr2032 is around 250nA.
But yes, use the power pin setting if you want to.Would be interesting to see how long sleep times are needed to make up for the extra time needed to wake up the radio from power off compared to sleep. The mcu and the radio will need to be awake for 100ms longer time when starting from power off than when starting from sleep.
-
Hi I notice that there is not sleep in this sketch. Is it not required for this build
-
Hi I notice that there is not sleep in this sketch. Is it not required for this build
-
Hi
Can i connect two sensor contact to this arduino ? First to pin 3 second to pin 4 ? But how modified this sketch to support two sensor contact ?@pepson If you need the node to sleep or want to use interrupts then only digital pins 2 and 3 will do this for uno/promini.
So otherwise 2 options really.
If you just need to know that one of the sensors triggered (but not which one) then you can add sensors in series (for normally 'closed' sensors) or parallel (for normally 'open' sensors).
To use interrupt and know which sensor triggered you'd have to connect both sensor to interrupt pin with blocking diodes to digital pins as well and then on interrupt you can check which digital pin activated the isr.
-
I need connect two contact sensor. And i want to know from two sensor his status...
I need use one to door but second to door garage.@pepson Then just add another sensor from ground to digital pin 2 and change the code you see in the example to accommodate the extra input.
You'll need to add another child id, another button, another bounce function, another presentation, another send and another bounce call.