Hi @ghiglie I'm still beginning in all this, but I think you need to call nodeManager.setSleepMinutes(minutes) otherwise the node will still awake.
bbastos
@bbastos
Best posts made by bbastos
-
RE: BME280 node not sleeping
-
RE: BME280 node not sleeping
Thank you! Ohh that's pretty complex for my super noob skills
I'm on the same vibe, using mysensors to start learning about electronics and automation. My first node is still on breadboard, but alive even after desoldering led and volt. reg. :
-
RE: BME280/BMP280 high consumption when sleeping
@TRS-80 said in BME280/BMP280 high comsumption when sleeping:
@bbastos said in BME280/BMP280 high comsumption when sleeping:
7uA during sleep
Sounds pretty good to me!
You calling it done then?
Yes, it`s pretty good! But I'd like to use nodemanager on my nodes, it's so much easier I'll open an issue on nodemanager's github.
Thank you so much for the help!
Latest posts made by bbastos
-
Battery Level
Hello,
I'm trying to get the battery level percentage reported but only get battery voltage. Here is my sketch:
// General settings #define SKETCH_NAME "TempSensorSuite" #define SKETCH_VERSION "2.0" #define MY_BAUD_RATE 9600 #define MY_NODE_ID 2 #define MY_RADIO_NRF24 #define MY_SIGNAL_REPORT_ENABLED #define MY_SPLASH_SCREEN_DISABLED //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED #define MY_TRANSPORT_WAIT_READY_MS 5000 #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS 2000 //#define MY_PARENT_NODE_ID 0 //#define MY_PARENT_NODE_IS_STATIC #define NODEMANAGER_DEBUG OFF // #define NODEMANAGER_DEBUG_VERBOSE OFF #define NODEMANAGER_SLEEP ON // #define NODEMANAGER_RECEIVE OFF #define NODEMANAGER_POWER_MANAGER OFF #define NODEMANAGER_CONDITIONAL_REPORT ON #define NODEMANAGER_INTERRUPTS OFF #define NODEMANAGER_EEPROM OFF #define NODEMANAGER_TIME OFF #define NODEMANAGER_RTC OFF #define NODEMANAGER_SD OFF #define NODEMANAGER_HOOKING OFF #define NODEMANAGER_OTA_CONFIGURATION OFF #define NODEMANAGER_SERIAL_INPUT OFF // disable Forecast on BME280 - not working with OTA conf Off! #define NODEMANAGER_SENSOR_BOSCH_LITE ON #include <MySensors_NodeManager.h> // BME280 #include <sensors/SensorBME280.h> #define BME280_ADDRESS (0x76) #define SEALEVELPRESSURE_HPA (1019.7) //#define CHILD_ID_AMBIENT 1 SensorBME280 ambient; // Battery Level (default child_id 201) #include <sensors/SensorBattery.h> SensorBattery battery; // Radio Signal Quality (default child_id 202) #include <sensors/SensorSignal.h> SensorSignal signal; // before void before() { // call NodeManager setup routine ambient.children.get(1)->setDescription("tssuite_temp"); ambient.children.get(2)->setDescription("tssuite_hum"); ambient.children.get(3)->setDescription("tssuite_press"); ambient.children.get(4)->setDescription("tssuite_fcast"); /*ambient.children.get(1)->setValueDelta(0.2); ambient.children.get(2)->setValueDelta(0.5); ambient.children.get(3)->setValueDelta(0.5);*/ // let controller know ambient pressure sensor reports in hPa ambient.children.get(3)->setUnitPrefix("hPa"); // send unit prefixes to controller (i.e. V, A, hPa, %, etc.) nodeManager.setSendUnitPrefix(true); // battery level - BOD set to 1.8V, 2xAA = 3V max battery.children.get(1)->setDescription("tssuite_bat"); battery.setSendBatteryLevel(true); battery.setMinVoltage(1.8); battery.setMaxVoltage(3.2); // sleep cycle nodeManager.setSleepMinutes(5); //nodeManager.setSleepMinutes(1); // 500ms to let the transport send all buffer before sleeping. //nodeManager.setSleepBetweenSend(500); // report freq for ambient measurements ambient.setReportIntervalMinutes(5); //ambient.setReportIntervalMinutes(1); // report freq for battery battery.setReportIntervalDays(1); //battery.setReportIntervalMinutes(1); // report freq for radio signal - pseudo SR_TX_RSSI and SR_UPLINK_QUALITY are available for NRF24 signal.children.get(1)->setDescription("tssuite_sin"); signal.setReportIntervalDays(1); //signal.setReportIntervalMinutes(1); signal.setSignalCommand(SR_UPLINK_QUALITY); //nodeManager.setPowerManager(power); // call NodeManager before routine nodeManager.before(); } // presentation void presentation() { // long int t1 = millis(); // call NodeManager presentation routine nodeManager.presentation(); // long int t2 = millis(); // Serial.print("Presentation: "); Serial.print(t2-t1); Serial.println(" milliseconds"); } // setup void setup() { // long int t1 = millis(); nodeManager.setup(); ambient.setSampling(Adafruit_BME280::MODE_FORCED, Adafruit_BME280::SAMPLING_X1, // temperature Adafruit_BME280::SAMPLING_X1, // pressure Adafruit_BME280::SAMPLING_X1, // humidity Adafruit_BME280::FILTER_OFF, //filter Adafruit_BME280::STANDBY_MS_0_5); // long int t2 = millis(); // Serial.print("Setup: "); Serial.print(t2-t1); Serial.println(" milliseconds"); } // loop void loop() { //long int t1 = millis(); ambient.takeForcedMeasurement(); nodeManager.loop(); //long int t2 = millis(); //Serial.print("Loop: "); Serial.print(t2-t1); Serial.println(" milliseconds"); } #if NODEMANAGER_RECEIVE == ON // receive void receive(const MyMessage &message) { // call NodeManager receive routine nodeManager.receive(message); } #endif #if NODEMANAGER_TIME == ON // receiveTime void receiveTime(unsigned long ts) { // call NodeManager receiveTime routine nodeManager.receiveTime(ts); } #endif
I'm probably doing something wrong. Any help will be much appreciated.
Thanks
-
RE: BME280/BMP280 high consumption when sleeping
@TRS-80 said in BME280/BMP280 high comsumption when sleeping:
@bbastos said in BME280/BMP280 high comsumption when sleeping:
7uA during sleep
Sounds pretty good to me!
You calling it done then?
Yes, it`s pretty good! But I'd like to use nodemanager on my nodes, it's so much easier I'll open an issue on nodemanager's github.
Thank you so much for the help!
-
RE: BME280/BMP280 high consumption when sleeping
Thanks!
Either way, using mysensors library directly with @rvendrame tips I was able to get 7uA during sleep.
// Enable debug prints to serial monitor #define MY_DEBUG //#define MY_REPEATER_FEATURE // Enable and select radio type attached #define MY_RADIO_NRF24 #define MY_NODE_ID 100 //#define MY_PARENT_NODE_ID #include <SPI.h> #include <MySensors.h> #include <Adafruit_Sensor.h> #include <Adafruit_BME280.h> // I had to change I2C address in library for 0x76 (line 32) #include <Wire.h> Adafruit_BME280 bme; // I2C #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_PRESS 2 // MyMessage to controler MyMessage msgT1(CHILD_ID_TEMP, V_TEMP); MyMessage msgP1(CHILD_ID_PRESS, V_PRESSURE); MyMessage msgF1(CHILD_ID_PRESS, V_FORECAST); MyMessage msgH1(CHILD_ID_HUM, V_HUM); void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("BME280 Test", "1.0"); present(CHILD_ID_TEMP, S_TEMP); present(CHILD_ID_PRESS, S_BARO); present(CHILD_ID_HUM, S_HUM); } void setup() { //GND pinMode(5,OUTPUT); digitalWrite(5, LOW); //VCC pinMode(6,OUTPUT); digitalWrite(6, HIGH); //Baudrate Serial.begin(9600); //BME280 init initBme280(); //Initial reading serverUpdate(); } void loop() { digitalWrite(6, HIGH); initBme280(); serverUpdate(); //delay(200); digitalWrite(6, LOW); digitalWrite(SDA, LOW); // disable internal pullup digitalWrite(SCL, LOW); // disable internal pullup sleep(60000); //sleep 1 minute } void initBme280() { if (!bme.begin(0x76)) { Serial.println("Could not find a valid BME280 sensor, check wiring!"); while (1); } } // used to read sensor data and send it to controller void serverUpdate() { double T, P, H; T=bme.readTemperature(); P=bme.readPressure()/100.0; H=bme.readHumidity(); delay(10); send(msgT1.set(T, 1)); send(msgP1.set(P, 1)); send(msgH1.set(H,1)); // unmark for debuging Serial.print("T = \t"); Serial.print(T, 1); Serial.print(" C\t"); Serial.print("P = \t"); Serial.print(P, 1); Serial.print(" mBar\t"); Serial.print("H = \t"); Serial.print(H, 1); Serial.print(" %\t"); }
-
RE: BME280/BMP280 high consumption when sleeping
@Memphis007 said in BME280/BMP280 high comsumption when sleeping:
Hi,
Looks like you're using the 5v version of the bme280, there's an extra 3.3v regulator on this board, this could be the culprit.I really didn't paid too much attention when buying. I've taken better pictures of bme280 and bmp280, would you mind help me identifying?
Is there any way to modify the 5v version to works with 3.3v?
-
RE: BME280/BMP280 high consumption when sleeping
@TRS-80 said in BME280/BMP280 high comsumption when sleeping:
I am still one of the newer people around here, so I could be off base, but my first thought was "how are you measuring that?"
You need to put the digital multimeter in series with your circuit +- like this:
Please don't mind the bad quality pictures.
-
RE: BME280/BMP280 high consumption when sleeping
@rvendrame said in BME280/BMP280 high comsumption when sleeping:
@bbastos , welcome to mySensors. Try to add these lines before the sleep():
digitalWrite( A4 , LOW ); digitalWrite( A5 , LOW );
Stills unclear why, but it worked for me at least.
Reference: https://forum.mysensors.org/post/99876
Thank you @rvendrame! I'll surely try, the only problem is that I don't have control over sleep function, it's encapsulated in nodemager. I'll try to find the best place to put the code you've sugested.
-
BME280/BMP280 high consumption when sleeping
Hello,
First, I'd like to thank you all for the hard working building mysensors and nodemanager. This's an incredible and motivanting way of learn and build DIY iot devices even by beginners like me. So my big thank you!
About my problem, I'm getting 0.50mA when sleeping using BME280/BMP280, just arduino(pro mini) and radio gives me 5uA. I've tried to power the sensor from digital pins using PowerManager power(5,6), but i'm still getting 0.50mA when sleeping.
It seems like the i2c bus is not being disabled when enter on sleep mode.
Any help would be appreciated.
-
RE: BME280 node not sleeping
@ghiglie said in BME280 node not sleeping:
That's not a bad test bed!
I'm having some "headaches" still. The PIR isn't sending the V_TRIPPED 0 , so I know when there's moving but not when it stops - I can manage it via HomeAssistant anyway.
I'm afraid I'll not be helpful now. Have you tried to update nodemanager library? I'm using the development branch from github.
-
RE: BME280 node not sleeping
Thank you! Ohh that's pretty complex for my super noob skills
I'm on the same vibe, using mysensors to start learning about electronics and automation. My first node is still on breadboard, but alive even after desoldering led and volt. reg. :
-
RE: BME280 node not sleeping
@ghiglie said in BME280 node not sleeping:
So, new message to get up a notification with my full working sketch. I'm so satisfied!
Putting a BME280 in a garage is an overkill, but I couldn't get a decent measure from the DHTs I have. I added a PIR to it, just for a minor convenience.
With next node I'll explore OTA features - flash and configuration.// General settings #define SKETCH_NAME "GarageLibrary" #define SKETCH_VERSION "2.0" #define MY_BAUD_RATE 9600 #define MY_NODE_ID 2 #define MY_RADIO_NRF24 #define MY_SIGNAL_REPORT_ENABLED #define MY_SPLASH_SCREEN_DISABLED //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED #define MY_TRANSPORT_WAIT_READY_MS 5000 #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS 2000 //#define MY_PARENT_NODE_ID 0 //#define MY_PARENT_NODE_IS_STATIC #define NODEMANAGER_DEBUG ON // #define NODEMANAGER_DEBUG_VERBOSE OFF #define NODEMANAGER_SLEEP ON // #define NODEMANAGER_RECEIVE OFF #define NODEMANAGER_POWER_MANAGER OFF #define NODEMANAGER_CONDITIONAL_REPORT ON // #define NODEMANAGER_INTERRUPTS ON // #define NODEMANAGER_EEPROM OFF #define NODEMANAGER_TIME OFF #define NODEMANAGER_RTC OFF #define NODEMANAGER_SD OFF #define NODEMANAGER_HOOKING OFF #define NODEMANAGER_OTA_CONFIGURATION OFF #define NODEMANAGER_SERIAL_INPUT OFF // disable Forecast on BME280 - not working with OTA conf Off! #define NODEMANAGER_SENSOR_BOSCH_LITE ON #include <MySensors_NodeManager.h> // BME280 #include <sensors/SensorBME280.h> #define BME280_ADDRESS (0x77) //#define CHILD_ID_AMBIENT 1 SensorBME280 ambient; // PIR on D3 (optional build, PIN_PD3 is defined in MiniCore) #include <sensors/SensorMotion.h> SensorMotion pir(PIN_PD3); // Battery Level (default child_id 201) #include <sensors/SensorBattery.h> SensorBattery battery; // Radio Signal Quality (default child_id 202) #include <sensors/SensorSignal.h> SensorSignal signal; // before void before() { // let controller know ambient pressure sensor reports in hPa ambient.children.get(3)->setUnitPrefix("hPa"); // send unit prefixes to controller (i.e. V, A, hPa, %, etc.) nodeManager.setSendUnitPrefix(true); // battery level - BOD set to 1.8V, 2xAA = 3V max battery.setMinVoltage(1.8); battery.setMaxVoltage(3.0); // sleep cycle nodeManager.setSleepMinutes(60); // 500ms to let the transport send all buffer before sleeping. nodeManager.setSleepBetweenSend(500); // report freq for ambient measurements ambient.setReportIntervalMinutes(60); // report freq for battery battery.setReportIntervalDays(1); // report freq for radio signal - pseudo SR_TX_RSSI and SR_UPLINK_QUALITY are available for NRF24 signal.setReportIntervalDays(1); signal.setSignalCommand(SR_UPLINK_QUALITY); // call NodeManager before routine nodeManager.before(); } // presentation void presentation() { // call NodeManager presentation routine nodeManager.presentation(); } // setup void setup() { // call NodeManager setup routine nodeManager.setup(); } // loop void loop() { // call NodeManager loop routine nodeManager.loop(); } #if NODEMANAGER_RECEIVE == ON // receive void receive(const MyMessage &message) { // call NodeManager receive routine nodeManager.receive(message); } #endif #if NODEMANAGER_TIME == ON // receiveTime void receiveTime(unsigned long ts) { // call NodeManager receiveTime routine nodeManager.receiveTime(ts); } #endif
Nice! Do you mind sharing a picture of your node? I've just assembled my first battery node using arduino pro mini and somehow it's working
I'm a beginner in electronics and would like to compare, see if I did mess up something.