Replies: 3 comments 3 replies
-
Hi Tocio88, this library only depends on the SDK for the SAMD21 and I do not remember explicitly downloading the Arduino Helper library. Please try this:
Even without the patching you should be able to build the library after selecting a SAMD21 board. After building the library, open one of the examples - it should also build successful. There are some uncommitted changes for RealTimeClock and TimerCounter that will follow soon. Alternatively or additionally you should consider using VS Code as IDE. If this is of interest for you I could also commit them. Finally there is a project I haven't found the time to document that uses the SAMD21, a solar panel, an energy harvesting chip, a very small lipo battery and a 433 MHz transmitter using this library - only the temp/hygro sensor is still waiting to be connected. The prototype is on my desk and running continuously since May mostly at very low ambient light (less than 100 lux) after initial charging. Let me know if this helped to get it working or if you need more info. |
Beta Was this translation helpful? Give feedback.
-
Hi Jens,
Many thanks for your reply!
Last two days and nights I did diving into your library and tracking every
single error and dependencies and at end I managed to get it to work with
lot of googling and forums, and it compiles your simple EIC program.
Indeed I’m building this new type of simple weather station to track snow
melt on the Greenland Ice cap, and it made with a TTL sonic height sensor,
samd21 (I’m using an arduino zero for now but it is consuming too much I
found out so I’ll switch to other boards like sparkfun ones with less
component on it that eat milliamps for nothing), RTC, SPI FRAM memory, I2C
ublox gps for time sync and position and UART iridium satellite
communication, 20Ah lipo battery and 3W solar panel. Everything packed
inside a small box and as lightweight as possible.
I wrote already the program based on the RTCzero library, and was working
until I found out that the rtc.stanby() wasn’t making the samd sleeping.
Google helped me out to find that I had to disable the systemTicks and with
that I see the system sleeping but I’m still consuming too much power like
35mA. So I came across your library and started to dive into it.
What also I noticed from my previous days tests that I cannot have both
libraries (your and RTCzero) due to the ISR handler double function
declaration… So I was thinking to use your library to make repetitive
interrupts to wake up the board to make measurements, store data and send
data, and using an external RTC clock with physical interrupt to get
timestamp to save my data.
Am I correct or am I missing something?
This is kind new programming for me. Till now I have used research grade
Campbell data loggers for all our weather stations but for this specific
type of weather station we need something cheap, tiny and less power
consumption that the others.
But till now it has been an interesting 2 weeks of getting crazy hitting my
head lot of times and fixing all problems/bugs one by one, so it’s nice,
and right now I have around 1000line of code running at my desk just to
test the routines if everything works.
I’m also very interested in your prototype project, which chips are you
using to maximise the energy harvest?
Best regards,
Giorgio
|
Beta Was this translation helpful? Give feedback.
-
Hi Giogio, I think you are on the right track for your project. Sound very interesting to me, Part of the problem with very low power consumption is the total number of components and the way they are wired. Little details can change the minimum power requirements significantly in both directions (see comments to my mods of XIAO board in the README). On one hand you probably don't want to design your own board, but on the over hand it will be hard to optimize if you don't. As you already noticed, very low power consumption projects need a different approach how to code. An MCU typically does not come with an OS, so you are responsible for everything. RTC wakeup is a what I use in my project, too, but the SAMD21 RTC is good enough for me, as I just need a fixed 3 min period. Only if you have to do something at a specific time with very high precision, e.g. at 12:00:00.000Z, than I would look for a good external RTC. In all other cases the additional chip is a waste of power. The SAMD21 RTC can also be used in calendar mode, but you would need to extend my lib a little bit for this by improving on RTCzero. If you have GPS you can sync the calendar time once in a while to stay current. Anyway: You obviously save the most power by turning everything off that is not needed. Mixing the various low power libs will not work as they often use the same resources and try to to apply conflicting configurations. Most of the popular libs are practical for general use but they don't deliver max. power saving. My lib ties to take power saving a step further. But to make the most of it, please acquaint yourself with the clock system of the SAMD21 if you have not already done so. E.g. it is very important to understand that lowering the clock of a peripheral will save power but will also increase the access time and that will also cost power. The specific use case decides which configuration is best. I created the lib after some initial tests. Have a look at the README.md of my test project. It compares several chips and provides some consumption values for the SAMD21. Regarding my solar DHT project, I use a 68x37 mm panel with a max. output of 5V and 0.3W (using a larger panel would make things too easy). The LIPO has 50mAh only. The energy harvesting is handled by a TI bq25570. The TI chip fills a capacitor from the panel and when the voltage of the capacitor is high enough the chips starts to charge the LIPO and/or power the output. To make it a little easier, I used a CJMCU-2557 board that comes with a super cap. The disadvantage of this board is that the output voltage is fixed to 2.5 V by soldered resistors. The code of my solar DHT project should give you a good idea how to make use of the lib for a non-trivial use case. I will try to post the code within the next 10 days, but no promises. Kind regards, |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm interested to use your library to get the samd21 in low power mode for a project at university on the Greenland ice cap. I have downloaded also the Arduino Helper library but I cannot make the program to compile due to all dependencies.
Could you give me a help to install all dependencies and library needed for make it run on the Arduino IDE? Thanks
Beta Was this translation helpful? Give feedback.
All reactions