Looking for a sanity check and advice. I need to assemble a device that I'll mount on a tugboat, and leave there for periods of up to one month collecting data for seakeeping studies. Periodically, I'll swap out the battery pack and SD card.
Requirements:
No external power & batteries should last one month (temperature 0C-30C)
Data Sample rate 100Hz
Data channels must include: timestamp, heading/pitch/roll, accelerations (x,y,z)
Data to be stored internally
Smaller than a shoebox.
Sealed enclosure.
Candidate Hardware:
MKR Zero (low power, built-in CD slot, built-in RTC)
MKR IMU shield (9 axis IMU)
MKR 485/CAN shield (to allow incorporating 3rd party IMU hardware if needed)
DS3231SN RTC (if MKR Zero RTC drift is unacceptable)
3.7V LiPo 11000mAh Battery pack (e.g. for trail cam)
Pelican (or similar) enclosure.
I'm looking for general advice about whether I've selected appropriate hardware, or if there's something better.
Also, the following more targeted questions. Does anyone have experience with the drift rate of the built-in MKR Zero RTC? Would it be easy to integrate a DS3231SN RTC into the package?
Finally...A possible variation of my device could include a wired/wifi connection to the tugboat's GPS and log the lat/lon/heading/speed over ground in addition to the other channels. I'm not sure of the GPS data-stream format however.
For that, I'm considering the MKR WiFi 1010 with MEM Shield instead of the MKR Zero.
I'm at the stage of selecting the major components, so it's a bit early for a wiring diagram. My candidate components would have very little "wiring" except for the boards themselves and a connection to a battery pack, which I expect to be very straightforward.
3.7v is the appropriate source voltage for the MKR zero board, and I plan to size/oversize the battery pack somewhat by trial and error. I'm not sure how to determine the power requirements a-priori, or if that's even possible. How would you suggest I do that?
After building the system and deploying the code, I suppose I could monitor the voltage and current to establish a nominal power usage and use that to confirm early assumptions about power use.
So, power consumption is invariant to the deployed code then?
.. In any case, I don't see the power consumption being a big issue. I can upsize the battery pack and/or reduce my deployment time to 1 week as needed.
I'm more interested in hearing advice or experiences about using the MKR Zero + MKR IMU for similar use cases and any pitfalls I should be aware of before ordering the hardware.
As you will see if you browse through the forum, many of the recently released Arduino products are undersupported, in some cases with example code that simply does not work.
Few of the regulator contributors on this forum have experience with them, with the new Uno R4 being a prominent exception, as people struggle to fix the many deficiencies.
I'm considering the MKR series because they seemed fairly turnkey - at a glance it looked like I just need to put the IMU shield on the board, connect a power source, write the sketch, and away I go.
BUT, I'm now also looking at the more widely used UNO with 9-DOF motion shield (I already have these). Initially did not see how to record data to an SD card with the UNO. But now I found a "data logging" shield for the UNO, so this option seems possibly better.
Some users concerns about the Bosch BNO055 being "obsolete." I do like the fact that it applies a sensor fusion algorithm internally. The newer sensors I've seen being touted as "better" don't perform sensor fusion (Kalman filter or other), which is a showstopper for me... unless there's a good fusion algorithm in an available Arduino library ...is there??
In any case, as a redundant IMU, I've ordered the Witmotion WT901 MPU9250 board to try as well, link:
I believe wit-motion will provide me with good customer support for connecting this device to my board. I've had good experiences with them
There are several other IMU fusion libraries, and all the more recent 9DOF sensors substantially outperform the obsolete BNO055.
I like the ICM-20948, with Mahony or Madgwick(*) fusion filters.
Adafruit has two other filters of higher complexity, however since the sensors must be individually calibrated to work at all, the effort you put into that turns out to be a deciding factor.
(*) Ignore this nonsensical comment by Adafruit: the Madgwick filter runs quite well on an ATmega328. However, the faster processors are better choices.
Madgwick This algorithm is very popular when you have faster Cortex M0, M3, M4 or faster chips. It isn't going to run on an atmega328p