Forum Replies Created
-
AuthorPosts
-
@shicks The previous thread about I2C power that I’m aware of was when I learned that the jumper on the I2C grove port needs to remain in the constantly-powered position, otherwise the Wire library crashes, at least with certain sensors, including the Turner.
I *think* my Mayfly is sleeping: All LEDs switch off, if that means anything. If I connect to USB for serial output (all other testing has been lipo-powered, with no USB connection) and turn on debugging in LoggerBase.h, the traces indicate that it sleeps at the end of sampling:
12345678910111213141516171819202122232425262728293031323334353614:22:00.408 > ... zzzZZ Processor is now awake! <--LoggerBase14:22:00.408 > Current Unix Timestamp: 1615900920 -> 2021-03-16T13:22:00-07:00 <--LoggerBase14:22:00.408 > Logging interval in seconds: 120 <--LoggerBase14:22:00.408 > Mod of Logging Interval: 0 <--LoggerBase14:22:00.408 > Time marked at (unix): 1615900920 <--LoggerBase14:22:00.408 > Time to log! <--LoggerBase14:22:00.408 > ------------------------------------------14:22:00.408 > Running a complete sensor update... <--LoggerBase14:22:11.536 > Successfully connected to SD Card with card/slave select on pin 12 <--LoggerBase14:22:11.564 > Opened existing file: TU_Boise_turbidity_2021-03-16.csv <--LoggerBase14:22:11.586 >14:22:11.587 > \/---- Line Saved to SD Card ----\/14:22:11.587 > 2021-03-16 13:22:00,9.40396,0.0328,4.882,22.75,-57,9014:22:11.587 >14:22:11.587 >14:22:11.618 > Waking up Digi XBee3 Cellular LTE-M ... <--LoggerBase14:22:12.834 > Connecting to the Internet... <--LoggerBase14:22:19.356 > Sending out remote data. <--LoggerBase14:22:19.357 >14:22:19.357 > Sending data to [ 0 ] data.envirodiy.org14:22:20.380 > POST /api/data-stream/ HTTP/1.114:22:20.440 > Host: data.envirodiy.org14:22:20.440 > TOKEN: cd004b10-01a5-4e77-83cb-6ebefdf3e37914:22:20.440 > Content-Length: 36714:22:20.440 > Content-Type: application/json14:22:20.440 >14:22:20.440 > {"sampling_feature":"5f73afcf-22e8-496a-a4dd-4ebf70bb81af","timestamp":"2021-03-16T13:22:00-07:00","2669cd98-28d1-4b26-8c19-90acf32dedcf":9.40396,"b5720e79-47c6-435a-a88d-d11b650c570d":0.0328,"6e63a9f8-b8e6-44c8-a1ed-63d074a0c7da":4.882,"c635d2db-1509-4e9d-a248-ca66f3aeb11a":22.75,"293fdffc-558d-450c-9c79-4021e56bf7cc":-57,"dd123f56-6009-42a0-b90b-a1b5f2862208":90}14:22:20.440 >14:22:22.973 > -- Response Code --14:22:22.974 > 20114:22:22.974 > Updating modem metadata... <--LoggerBase14:22:34.663 > Disconnecting from the Internet... <--LoggerBase14:22:35.349 > ------------------------------------------14:22:35.350 >14:22:35.350 > Setting alarm on DS3231 RTC for every minute. <--LoggerBase14:22:35.350 > Putting processor to sleep. ZZzzz... <--LoggerBaseOn the external ADC: Yes, I used it to accommodate the 5v max from the Turner. I was thinking that this would be more accurate than using a 2/3 voltage divider to drop 5V to ~3.3V. But it sounds like you’re suggesting a 1/1 divider that would simply halve the output voltage, which you would then double in code. FYI, I’m using differential signaling to sense the Turner’s output, to hopefully make it less susceptible to noise.
@neilh10 Note that the Turner is powered by switched 3V3 from the D10-11 Grove connector, so it should be getting powered off during sleep. Also, since the ADC is powered by 5V, the Turner’s 0-5V outputs will be within Vdd+0.3V.
-Matt
@shicks Thanks for those details. I wonder whether it could be the turbidity sensor, rather than the Mayfly, that’s actually drawing power, but I wouldn’t have thought it could do that while (or if) the Mayfly is sleeping. A bit more about my circuit:
I’m powering the Turner from Mayfly’s switched 3V3. The Turner’s analog output is 0-5V, which I’ve connected to an external ADS1115 ADC. The Mayfly’s communicates to the ADC over I2C via a logic level shifter. The Turner also has a digital input to trigger its wiper, and a digital output that signals when the wiper is in its home position.
I’ve attached a wiring schematic. Does anything jump out that could be leaking current during sleep?
@neilh20 Thanks for the feedback, and I’ve got a very similar spreadsheet! I’ve also just received the parts for a FTDI cable to get serial output without supplying power – thanks for your work with this!Matt
Trout Unlimited
Attachments:
Hi Neil,
I’m powering the Turner Turbidity Plus via the Mayfly’s 3.3V, and its average current draw during wiper cycles is 109mA.
Thanks for sharing your wingboard. As far as wiring, I have some of the EnviroDIY protoshields that I plan to use. I’m interested in how, physically, you connected the Vbat to your ADC for measurement. Are you using the onboard ADS1115 or an external one? Any photos you can share?
The STC3100 looks interesting. Have you found a breakout board for it, or are you a surface-mount-soldering ninja? 🙂
Best,
MattAha – I think that must be it. I retested with a new Mayfly, and its reported voltage agrees with my multimeter within 0.1V. The old Mayfly (s/n is either 180080 or 190080) was probably purchased in 2018, and has been my desktop tester, almost always under USB power, so didn’t detect any problems until now.
Thanks @shicks!!
Matt
Hi Nancy,
I don’t use the Arduino IDE, but as a workaround, I’d try downloading a previous version of ModularSensors. Delete ModularSensors from your Arduino libraries folder, and grab a zip of the previous version, 0.27.8 from the Releases page on github and install it instead.
-Matt
Confirmed via the PIO forum: https://community.platformio.org/t/valueerror-invalid-simple-block-0-28-01/19759
I suspected that was it! Confirmed that the .1 works for me as well.
I don’t believe 0.28.01 is valid, per semver.org: “Numeric identifiers MUST NOT include leading zeroes.”
Interestingly, sometimes PIO will fail silently when I use 0.28.01 via lib_deps (no error message), but it doesn’t install the lib dependencies at all. When I change it to 0.28.1, the dependencies install properly. I’ve reported on the PIO community because I think that the error handling could be improved.
Thanks Anthony!
Matt
Thanks Jim. Ohm’s law – copy that! 🙂
The coulomb counter I’m using is from Sparkfun. It pulses one of its pins low each time that 0.614 coulombs of charge have passed through its sense resistor. Very easy to use.
Regarding the decreasing current: Is it possible that the battery’s internal resistance is increasing as it discharges, and this causes current flow to decrease? I’m no EE, so I’m just making a guess.
-Matt
Hi Jim,
Thanks for sharing your findings; this is interesting and useful for me. I’ve been thinking about battery capacity and power consumption issues recently and have used a coulomb counter to measure the charge consumed by a Mayfly/sensor test configuration. I hope to share my findings soon. One question on my mind is: how many amp-hours can I pull out of a given battery (4400mAh in my case) before it drops to a given threshold voltage. Your results give me an idea how I might test that.
I’m curious: how did you measure discharge current when doing the battery test?
Sara’s and Shannon’s points about prioritizing data collection to the SD card make good sense for a sensor station in the environment. I also wonder what is a safe depth-of-discharge for a LiPo before its life expectancy or performance is adversely affected, but I haven’t done any research on that yet.
Best,
Matt
Trout UnlimitedAh, got it! That makes total sense to me know. Thanks @shicks !
Matt
-
AuthorPosts