Posts made by funky81
-
RE: How low can arduino can go?
@Tibus my suggestion is that try other nrf radio.
Right now I can low as 10uA while sleeping -
RE: 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) -
RE: 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?
-
RE: 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 -
RE: 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 )
-
RE: State of the physical switch
@mainali have you finished the sketch? do you mind to share?
-
RE: State of the physical switch
@mainali I think @ferpando solution is quite nice. He add RF switch to existing button. @ferpando could we track physical switch state using this?
-
RE: 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
-
RE: 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.
-
RE: 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.
-
RE: 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?
-
RE: 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
-
RE: 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.
-
RE: [closed] Fail Code when Transmitting
adding more capacitor just like in the tutorial fixed this problem.
-
RE: 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 Transmitting
Finally, 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:100
What is that fail mean? Please help
btw, I have properly setup my nrf with arduino pro mini (cable, etc)Thanks
-
RE: pimatic-mysensors controller plugin
@jurasek I found out that pimatic installation in the website quite general.
for more details, you can use following link for the forum.
it gives me clear idea and more details step by step -
RE: Need working example battery powered sensor
@Jan-Gatzke Thank you very much Sir....Now this is getting excited
-
RE: Need working example battery powered sensor
@Jan-Gatzke mind to share it how?
-
RE: Need working example battery powered sensor
@jovo my experiences quite different with you. I can successfully compiled and upload the sketches. Unfortunately, the packet from node, never reach gateway. Even though I pump the NRF24L01+ power with step up regulator, but still the same. Since then, I never try it with 1MHz again...
To revert it again, burn your fuses again. Check this in Using the internal clock section
-
RE: My 2AA battery sensor
@m26872 in my previous sketch, yes, i'm trying to use EasyIOT's (Thanks @EasyIoT )
anyway, i'll flash with yours. I'll let know the result -
RE: Need working example battery powered sensor
@jovo said:
- battery life time min 6 months.
While searching I read about different aspects to improve power consumption. My initial conclusion is that I need to include the following items: - using a step-up converter to squeeze all energy from the batteries (which one has best performance/price?)
- signaling down the unused digital ports (seems to be the most easy item)
- low power sleep mode: there seems to be many different ways and status of sleep mode. I don't need external trigger. the default sleep mode from the sensor sketches seems not to give the power right saving (measurement show still 5mA while in sleep mode). It was written that we should be able to go down to 100's of uA but how?
- lowering clock freq and "burning fuses", etc..
I have the same questions. I've tried so many things, but the lowest still 2.4mA (I corrected my previous state that the lowest that I can go is 1mA - true,but it's not working actually).
I want to achieve xxx on uA as well....but still can't and stuck. - battery life time min 6 months.
-
RE: My 2AA battery sensor
@m26872 I still dont get it. Why I cant get the same efficient power like you.
I already follow all of your requirement in the first thread - difference only I use breadboard.
The minimum consumption (sleep) that I've got still 2.4mA, compare to you, it still huge differences. I dont know what's wrong with my setup.My sketch wake up every 10s (consumption up to 3.5mA), while sleep the lowest is 2.4mA.
#include <avr/sleep.h> // Sleep Modes #include <MySensor.h> #include <SPI.h> MySensor gw; #define BATTERY_SENSE_PIN #define SLEEP_IN_MS 86400000 // 1 day #define PROD false int oldBatLevel; void setup() { gw.begin(NULL,1); gw.sendSketchInfo("Basic-Sketch-MySensor", "1.0"); pinMode(2,INPUT); digitalWrite (2, LOW); pinMode(3,INPUT); digitalWrite (3, LOW); pinMode(4,OUTPUT); digitalWrite (4, LOW); pinMode(5,INPUT); digitalWrite (5, LOW); pinMode(6,INPUT); digitalWrite (6, LOW); pinMode(7,INPUT); digitalWrite (7, LOW); pinMode(8,INPUT); digitalWrite (8, LOW); oldBatLevel = -1; sendValue(); Serial.println("Startup Finished"); TurnOnLed(); } void TurnOnLed(){ digitalWrite(4,HIGH); gw.sleep(1000); digitalWrite(4,LOW); gw.sleep(100); } void loop () { sendValue(); gw.sleep(1000*10); } // end of loop void sendValue() { gw.powerUp(); int batLevel = getBatteryLevel(); if (!PROD){ gw.sendBatteryLevel(batLevel); TurnOnLed(); } else{ if (oldBatLevel != batLevel) { gw.sendBatteryLevel(batLevel); oldBatLevel = batLevel; TurnOnLed(); } } gw.powerDown(); } // Battery measure int getBatteryLevel () { int results = (readVcc() - 2000) / 10; if (results > 100) results = 100; if (results < 0) results = 0; return results; } // end of getBandgap // when ADC completed, take an interrupt EMPTY_INTERRUPT (ADC_vect); long readVcc() { long result; // Read 1.1V reference against AVcc ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); delay(2); // Wait for Vref to settle noInterrupts (); // start the conversion ADCSRA |= _BV (ADSC) | _BV (ADIE); set_sleep_mode (SLEEP_MODE_ADC); // sleep during sample interrupts (); sleep_mode (); // reading should be done, but better make sure // maybe the timer interrupt fired while (bit_is_set(ADCSRA,ADSC)); result = ADCL; result |= ADCH<<8; result = 1126400L / result; // Back-calculate AVcc in mV return result; }```
-
RE: Install your own controller on cheap android tvbox
Please share it with us...
-
RE: Power conservation with battery powered sensors
@lininger Anyway, have anyone realize the consumption every deek-robot pro mini (before cutting the power regulator and led) are not the same?
My first board takes 3.2mA while the other takes 2.4mA. All using the same battery, nrf24l01+ radio also sketch. And until now, I don't know where's the differences...
-
RE: Power conservation with battery powered sensors
@Sidey I had sames experience few days ago.. What i do is that I check the bootloader condition. I dont know if my case same with you, but I do that and its working well now.
-
RE: [closed] How to differentiate Arduino Pro Mini 3v3 and 5v?
Thanks guys for your replies...I'll try it one by one.
Thanks
-
[closed] How to differentiate Arduino Pro Mini 3v3 and 5v?
Like in the title, are there any guide to differentiate between these two items?
especially when you buy from ebay or aliexpress.thanks
-
RE: How low can arduino can go?
@GuyP could you share more about your project?
-
How low can arduino can go?
For the past 4 months, I've been searching combination for possible lowest power consumption for arduino pro mini with NRF24L01. So far, the lowest that I could get is 1 ma. What I already done is using arduino pro mini 8MHz (remove LED, power regulator, and change freq 1MHz) + NRF24L01. all components I buy from recommendation store in this site.
Could one suggest what should I do to run over 3 or 4 months battery using this combination? I'm using 2AA right now.
Thanks
-
RE: Controllers and Graph
same opinion with @BulldogLowell, I'll vote plot.ly...the free version enough for me.
And it support my programming languages also platforms. -
RE: Measure Battery Level on Vraw by comparing to the ATMega internal voltage. Possible?
@tbowmo my arduino pro mini working fine in 2xAA and connect to Vcc. I can calculate my battery consumption with internal 1V1 voltage function. I dont use internal voltage regulator and battery directly supply to arduino pro mini and radio.
In the future, I wanna test battery connect to step up regulator then connect to radio and arduino pro mini
-
MySensor Github Contribution
Hi Guys,
Just wondering, are there any easiest way to learn Github?
I used to use git, but only for local development, never interested to push it to github, since recently want to contribute in MySensor Github. If you guys have links / urls to share, please share here.Thanks
-
RE: Get string data
@C.r.a.z.y. Thanks for the code, very useful, coz I've found out is that i have to restart my pro mini every couple of days...
-
RE: My Outdoor Motion Humidity Sensor
Well, this looks good. but i still confused.
arduino only support VDC right? not VAC. mind to explain how you supply arduino with VAC?thanks @hek
-
RE: Get string data
@C.r.a.z.y. said:
if (re.indexOf("fail") >=0)
{
asm volatile (" jmp 0"); //reboot
}sorry for asking this, but is this the code for reboot?
does it work? -
RE: My Outdoor Motion Humidity Sensor
which power supply method are you using?
Battery, or AC voltage? looks like interesting -
RE: Mysensor-ing a Roomba vacuum cleaner.
I'd love to do it for you.
Unfortunately, roomba too expensive in my country
Anyway, good luck for your project.
Hopefully, you can share it here -
RE: Node to Node communication
@hek does it mean that the radio in repeater side has to be always in awake position?
-
RE: Radio does not go to sleep
sometimes I also experience the same thing.
the current consumption extreme high, similiar like it sent something (but nothing on the gateway).
and one way to solve it only change battery. i'm using pro mini 3.3v with 2x AA batteries.I only know the workaround but never know why it happen.
-
RE: Sample Door SW does not compile !
I can compile and use door sample from mysensor.
the difference is that i'm using old arduino ide 1.0.5, while you're using 1.5.5.
possible to change the ide ? -
WTShare Serial Gateway Auto ID
Hi, just wanna give my contribution to the community.
Following is the serial gateway code with support of auto ID, which is still missing in the latest of MySensor (1.4) library (CMIIW).links : bitbucket
-
RE: No Auto node id
@C.r.a.z.y. is this confirm? coz i'm having the same problem.
and Yes, i'm using serial for my gateway and usb for my sensor.
Please share if there's possible answer for this problem.thanks
-
RE: My 2AA battery sensor
Hi @dopustko , i've checked your cool website. can I ask few question regarding your setup?
I saw this page, in order to get low power consumption, you did burn fuse and disable brown-out? Possible to use it without usbtinyisp? -
RE: A compendium of hardware boards to support MySensor nodes
Keep this post updated...please
-
RE: Battery Level Measurement
Hi @tbowmo, do you mind to explain a bit about the design? I'm interested with your design.
I will use these steps for removing voltage regulator, http://goo.gl/CsZaNg
So the design will be battery > external step up regulator (http://goo.gl/PFt99R - to stabilize 3.3v) > vcc pin ?with these then I can use my first post design?
Thanks
-
RE: My 2AA battery sensor
Hi @m26872
The radio is powered straight from the batteries because it's high qauality demand on its supply and that it's good with a voltage all the way down to 1.9V. I still use the 4,7uF capacitor on radio as precaution.
So straigh the setup look like this ? battery > stablize regulator > radio ?
Since its battery and low power is wanted, I always remove the voltage regulator and power led from the Arduino pro mini and the power led from the step-up regulator (or the series resistor).
Do you mind to share the how to?
I set my power monitoring to report linear with 1.9V as 0% (Vmin_radio) and 3.3V as 100% (instead of 3.44 just to increase resolution). Power consumption looks good.
Which method do you use? voltage divider or the using internal vRef ?
Thanks
-
RE: Battery Level Measurement
@m26872 said:
I'm confused. Are you trying to use a 3.3v step-up to an 5V Uno?
I'm sorry to make you confused. Currently I'm using 3.3v arduino pro mini.
What I mean is not step up converter, but step up power converter (http://goo.gl/PFt99R) => to stablize 3.3v to maintain a steady 3.3 VDC even as the battery capacity diminishes. (like in this page http://www.mysensors.org/build/battery)Hmm..after I read your post (http://forum.mysensors.org/topic/486/my-2aa-battery-sensor/4), it seems I have the same goal like you. I'll asked few thing in your thread, if that's okay with you
-
RE: Battery Level Measurement
@m26872 right now, i dont have any plans to use more than 2 batteries in series.
but if i do, i will use step up power converter to stable it.but ofcourse this is my theory. am I correct ?
-
RE: Battery Level Measurement
@tbowmo right now, the battery will be connected only to vin, coz it raw.
my step up power converter (in this link) havent arrived yet. So i will use vin only.if it stable enough I will connect battery => step up power converter => vcc
then i will use the link that you provide beforeis my theory correct?
-
Battery Level Measurement
Hi Guys,
Need your advice for arduino battery level measurement.
The goal is that I want to monitor my battery consumption so I can get notice for battery replacement if it's already low.
This is my setup. is it correct already? I'm using this link as reference.Thanks
-
RE: How to wire battery sensor with battery voltage reports...
And also, is it correct to take power directly from the batteries instead from the arduino itself?
-
RE: How to wire battery sensor with battery voltage reports...
@sundberg84 said:
Hi!
Ok, i wanted to share my "sollution" or atleast current setup if someone else in the future has the same problem.
The radio and battery voltage sensor (R1/R2) is not connected to Step up regulator.
Also DHT22 sensor needs atleast 3v to operate so i put the arduino and DHT22 after the voltage regulator.Im sleeping the node for 15min, then sends temp and hum. The Battery status is sent each 8 loop. Now i will have a look how fast the battery is drained. I have not removed the led in the aurdino or step up reg so im guessing quite fast.
I have the radio about 15 meter (1 wall) from the gw - 100% seems to be st=ok.
Any improvement ideas - let me know,
Br
AndreasHi all, I'm newbie with these libraries.
And I'm a bit confused about the picture.
I'm guessing is that the picture still similar with the battery page in build sites. What makes me confused is that resistor position. And also what is the source to measure in the voltage divider? Is it vcc?