Home › Forums › Mayfly Data Logger › Low power project
- This topic has 8 replies, 5 voices, and was last updated 2019-06-25 at 9:10 AM by Cal.
-
AuthorPosts
-
-
2016-09-28 at 3:22 AM #1735
Hi,
What is the power consumption of the Mayfly in sleeping mode? For some underground projects we cannot use solar pannel. What lifetime can we expect for a 1h logging interval? Is it the same as a Stalker V3 or less due to the bigger processor?
Thanks
Eric -
2016-09-28 at 3:11 PM #1736
When a Mayfly board is asleep, it draws around 0.27mA. If you have a microSD card in the socket, the card draws a little current on its own, so then the Mayfly draws around 0.43mA when sleeping with a card.
When the Mayfly is awake and idle, it draws 6.5mA.
Battery life in a deployment would depend on the size of the battery and what sensors or other devices you’re powering with the Mayfly. You can do some estimations at this site: Oregon Embedded Battery Life Calculator. Just plug in the above numbers for the Mayfly, your battery capacity, and information about the waking time.
-
2016-11-30 at 11:16 AM #1822
For anyone interested in putting their Mayfly to sleep between sensor readings, I recently posted this Sleeping Mayfly Logger example sketch:
-
2016-12-22 at 10:55 PM #1877
Hi Shannon.
I try to combine the sleep mode code to my SDI12 logger code. Unfortunately the SDI12 library crash with the Sodaq PcInt library.
I am not familiar with how Arduino library work. Is that any way can solve it? So that I can implement the sleep mode in my SDI12 logger
Below is the Error:
Attachments:
-
2016-12-23 at 7:27 AM #1880
The sleeping sketch I mentioned above works fine as long as you don’t use the SDI12 library at the same time. If you do, there’s some conflicts due to the SDI12 and SODAQ_Pcint libraries looking at the same ports. So I created modified versions of both libraries that fixes the conflict. (This conflict also happens if you use SoftwareSerial and Pcint at the same time, so I also made a modified version of SoftwareSerial.) It’s kind of a brute force fix and there’s probably a better way, but it gets the job done.
If you don’t already have all of the libraries I posted recently (https://github.com/EnviroDIY/Libraries) get them and then simply change the include statements at the top of your sketch to look like this:
Arduino12#include <Sodaq_PcInt_Mod.h>#include <SDI12_Mod.h>You don’t have to change anything else in your sketch, the modified libraries will handle everything the same.
-
2016-12-30 at 3:40 AM #1887
Thx Shannon!
I will test it in coming days.
-
2017-01-09 at 4:57 AM #1925
I tested the SDI12_Mod.h solely and the microcontroller will restart after begin the library 🙁
Problem solved(7 Feb 2017)
I am now using hardware interrupts D10 (you need to cut the trace solder a jumper to D10 at SJ1 on the back of the board)
Now you don’t need the pin change interrupt library(conflict with SDI library)Below is the code:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273//Sleep mode setting#include <avr/sleep.h>//RTC Setting#include <Wire.h>#include <Sodaq_DS3231.h>char time_stamp[20];void setup(){//Start SerialSerial.begin(57600);//Begin RTCSerial.println("Begin RTC");if (!rtc.begin()){Serial.println("Couldn't find RTC");}//rtc.setDateTime(DateTime(__DATE__, __TIME__));//Begin sleep modepinMode(10, INPUT_PULLUP);attachInterrupt(2, wakeISR, FALLING);rtc.enableInterrupts(EveryMinute); //RTC interrupt modeset_sleep_mode(SLEEP_MODE_PWR_DOWN); //Set the sleep modeSerial.println("Setup completed!!!");}void loop(){Serial.print("logging at: ");sprintf(time_stamp, "%02d:%02d:%02d",rtc.now().hour(),rtc.now().minute(),rtc.now().second());Serial.println(time_stamp);//delay(10000);//SleepsystemSleep();}void wakeISR(){//Leave this blank}void systemSleep(){//Wait until the serial ports have finished transmittingSerial.flush();//Serial1.flush();//The next timed interrupt will not be sent until this is clearedrtc.clearINTStatus();//Disable ADCADCSRA &= ~_BV(ADEN);//Sleep timenoInterrupts();sleep_enable();interrupts();sleep_cpu();//wake up heresleep_disable();//Enbale ADCADCSRA |= _BV(ADEN);} -
2018-04-18 at 5:07 PM #12241
I wanted to resurrect this particular thread because we have been running into the same issue that Chan had. However, I note that there is a new variant of the SDI12 library as of roughly 2 weeks ago (EnviroDIY_SDI12_PCINT3) and I am pretty sure that it is an updated version of the SDI12_mod that Shannon sent in response a few years back in this thread.
We are going to work on this because we are interested in having the Mayfly control several SDI-12 sensors in a remote field site using the RTC to put the logger to sleep in order to only collect measurements every hour.
I get the sense that that is what the water monitoring project around the Delaware River basin is doing, but it is tough to know without looking at the code. Our network will be in remote northern NH.
-
2019-06-25 at 9:10 AM #12954
From what I read in the documentation, the following sketch should include these libraries for concurrent SDI-12 and RTC support.
#include <SDI12_PCINT3.h>
#include<Sodaq_PcInt_PCINT0.h>
void setup() {}
void loop() {}But I get compile error:
libraries\EnviroDIY_PCInt_PCINT0\Sodaq_PcInt_PCINT0.cpp.o (symbol from plugin): In function
PcInt::attachInterrupt(unsigned char, void (*)())’:
__vector_4′
(.text+0x0): multiple definition of
libraries\EnviroDIY_SDI12_PCINT3\SDI12_PCINT3.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board EnviroDIY Mayfly 1284p.I can get a sketch to compile (and work) with old SDI12_Mod.h instead of SDI12_PCINT3.h
What is wrong?
Cal
-
-
AuthorPosts
- You must be logged in to reply to this topic.