Reski Rukmantiyo
Posts
-
How low can arduino can go? -
How low can arduino can go?@Tibus my suggestion is that try other nrf radio.
Right now I can low as 10uA while sleeping -
How low can arduino can go?@Tibus do you have other nrf to try? I'm affraid you're using fake nrf.
30% of my nrf (out of 10), are fake...one more thing, sleep method in above post dont turn off nrf radio while sleep.
you can try gw.sleep() if you want turn off nrf radio while sleep (MyGateway gw) -
How low can arduino can go?@iask how is the result?
-
How low can arduino can go?@iask I haven't upload my latest door sketch to my node yet. But if I'm using above sketch, idle 4uA and around 18mA while transfer.
Do you have any issues like me before?
-
pimatic-mysensors controller plugin@Fredrik-Carlsson please try it, please notice me if you find any bugs.
I'm in the middle of pull request to @Dheeraj -
pimatic-mysensors controller plugin@Fredrik-Carlsson info you havent got one, please check my development git
- Pulse sensor ( Watt, KWh and Ampere )
{
"id": "EnergySensor,
"name": "Energy Sensor",
"class": "MySensorsPulseMeter",
"nodeid": 3,
"batterySensor": true,
"sensorid": 1,
"appliedVoltage" : 220
}
- Pulse sensor ( Watt, KWh and Ampere )
-
State of the physical switch@mainali have you finished the sketch? do you mind to share?
-
State of the physical switch -
How low can arduino can go?@AWI yes, it can communicate with the gateway normally.
Following is my test result- First code
/** */ #include <SPI.h> #include <MySensor.h> #include <avr/sleep.h> //#include <avr/wdt.h> MySensor gw; // watchdog interrupt //ISR (WDT_vect) { wdt_disable(); /* disable watchdog*/ } // end of WDT_vect void setup() { // pinMode(7,OUTPUT); // digitalWrite(7, HIGH); // gw.begin(); Serial.begin(115200); Serial.print("Setup"); } void loop() { // gw.powerUp(); //digitalWrite(7, HIGH); // gw.sendBatteryLevel(0); Serial.print("Loop"); Serial.flush(); // gw.powerDown(); //gw.sleep(30*1000); sleep(); // digitalWrite(7, LOW); // sleep(); } void sleep(){ // disable ADC ADCSRA = 0; // clear various "reset" flags MCUSR = 0; // allow changes, disable reset WDTCSR = bit (WDCE) | bit (WDE); // set interrupt mode and an interval WDTCSR = bit (WDIE) | bit (WDP3) | bit (WDP0); // set WDIE, and 1 second delay wdt_reset(); // pat the dog set_sleep_mode (SLEEP_MODE_PWR_DOWN); noInterrupts (); // timed sequence follows sleep_enable(); // turn off brown-out enable in software MCUCR = bit (BODS) | bit (BODSE); MCUCR = bit (BODS); interrupts (); // guarantees next instruction executed sleep_cpu (); // cancel sleep as a precaution sleep_disable(); }With this code I've got
- Test_Current_0 : 0.004 mA - Plain, Just Arduino (w/o LED, w/o Voltage Regulator)
- Test_Current_0 : 0,009 mA - Config in point 1 + Voltage Regulator (HT7333)
- Test_Current_0 : 1,58 mA - Config in point 2 + NRF24L01+
Another test
/** */ #include <SPI.h> #include <MySensor.h> #include <avr/sleep.h> //#include <avr/wdt.h> MySensor gw; // watchdog interrupt //ISR (WDT_vect) { wdt_disable(); /* disable watchdog*/ } // end of WDT_vect void setup() { // pinMode(7,OUTPUT); // digitalWrite(7, HIGH); gw.begin(); Serial.begin(115200); Serial.print("Setup"); } void loop() { //gw.powerUp(); //digitalWrite(7, HIGH); gw.sendBatteryLevel(0); Serial.print("Loop"); Serial.flush(); //gw.powerDown(); gw.sleep(30*1000); //sleep(); // digitalWrite(7, LOW); // sleep(); } void sleep(){ // disable ADC ADCSRA = 0; // clear various "reset" flags MCUSR = 0; // allow changes, disable reset WDTCSR = bit (WDCE) | bit (WDE); // set interrupt mode and an interval WDTCSR = bit (WDIE) | bit (WDP3) | bit (WDP0); // set WDIE, and 1 second delay wdt_reset(); // pat the dog set_sleep_mode (SLEEP_MODE_PWR_DOWN); noInterrupts (); // timed sequence follows sleep_enable(); // turn off brown-out enable in software MCUCR = bit (BODS) | bit (BODSE); MCUCR = bit (BODS); interrupts (); // guarantees next instruction executed sleep_cpu (); // cancel sleep as a precaution sleep_disable(); }Config is the same with no 3 (above), but the power consumption in sleep I take around 2.37 mA.
Is it maybe I've got bad NRF24L01+ ?
----- Updated
It seems my suspicion, it seems the cause of high power consumption is NRF24L01+ radio. I've checked all of my radio, it appears that 2 of 9 seems fake / bad condition.Thanks for contribution of @HarryDutch @AWI @Dheeraj @tbowmo @GuyP and others, so now I can play with other level of MySensor.
Thanks
-
How low can arduino can go?@HarryDutch thanks for we'll explained information. I really really appreciate it. Thanks to you, my adventure go to land of low power start to Gammon website. Well explained also in that website.
And finally I can make justification about what cause that give me bad power consumption. Start with plain arduino, either using led or not, finally I can dive to 4uA (thanks to you). After that, slowly but sure, I attach RF, the result still quite the same (without calling mysensor library) - few uA differences - not significant.Then I start with mysensor code, and guess what, it now bump to 2.2mA like my first email. At this point, I realized the one that cause high power consumption is mysensor library. Until now, I still doing test about this. Will update it here for sketches and result for every sketch.
-
How low can arduino can go?I hope from this thread at least I can learn something from you guys, on how to achieve uA while sleep. The arduino that I'm using is Deek Robot version (yes, it's a clone) from Alicia Store ebay, and the nrf24l01+radio I also got from store link.
-
How low can arduino can go?@Dheeraj I don't know what happen. It all happen with arduino pro mini from Deek Robot. I have 4 of them, and almost all indicate the same number.
Any suggestions?
-
How low can arduino can go?@AWI in the above code, I already try to sleep for 8 seconds... But still don't get till uA :worried:
-
How low can arduino can go?@tbowmo said:
is your measuring device capable of measuring low currents below 1mA?
Yes, it can
And what have you done software wise, for lowering power usage of the arduino?
following is my result (after cut voltage regulator, cut led, put RF radio, @ 1MHz):
- running below code : 1,89mA
void setup(){ } void loop(){ }- running below code : 2,07mA
void setup(){ Serial.begin(4800); Serial.println("Setup"); } void loop(){ Serial.println("Loop"); delay(1000); }- running below code : 2,26mA
#include <SPI.h> #include <MySensor.h> MySensor gw; void setup() { gw.begin(); Serial.print("Setup"); } void loop() { Serial.print("Loop"); gw.sleep(1000*8); }- running below code : 3,86mA
#include <SPI.h> #include <MySensor.h> MySensor gw; void setup() { gw.begin(); Serial.print("Setup"); } void loop() { gw.powerDown(); }All the power consumption taken after one minute after power is on.
-
[closed] Fail Code when Transmittingadding more capacitor just like in the tutorial fixed this problem.
-
Need working example battery powered sensor@Jan-Gatzke i've tried this bootloader with several of my arduino pro mini.
most of them run @ 1 Mhz, thanks to you. but somehow the current consumption dont decrease. but i've check with my usbtiny for the fuse, it already @ 1MHz....no clue what happen here
-
[closed] Fail Code when TransmittingFinally, i've success flash my arduino pro mini to run at 1MHz.
But somehow the message never come to gateway and when I debug, it said something like thesesensor started 1, id 1 send: 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,st=fail:1.4.1 send: 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0 send: 1-1-0-0 s=255,c=3,t=11,pt=0,l=21,st=fail:Basic-Sketch-MySensor send: 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0 send: 1-1-0-0 s=255,c=3,t=0,pt=1,l=1,st=fail:100 Startup Finished send: 1-1-0-0 s=255,c=3,t=0,pt=1,l=1,st=fail:100What is that fail mean? Please help
btw, I have properly setup my nrf with arduino pro mini (cable, etc)Thanks
-
pimatic-mysensors controller plugin -
Need working example battery powered sensor@Jan-Gatzke Thank you very much Sir....Now this is getting excited :+1: