Author Topic: Three Component Data Logger (that works with Moteinos!)  (Read 1984 times)

EdM

  • Newbie
  • *
  • Posts: 32
Three Component Data Logger (that works with Moteinos!)
« on: February 08, 2017, 01:18:13 PM »
Hi everyone,

I've posted about the Cave Pearl Project before, but feedback from one of our new university collaborators suggested that the blog had grown into a spaghetti monster, and that they could not find anything. So I cobbled together a page that summarizes all the data logger build tutorials we've accumulated over the last three years, in a more or less logical order:

https://edwardmallon.wordpress.com/how-to-build-an-arduino-data-logger/

The UNO stuff is for some teacher friends of mine, but the 'promini' style build works great with Moteinos, and Moteino Megas as long as you adjust for the pin locations and stick with 3.3v models. 

Though none of our deployment sites are near any kind of internet access, I've had my eye on the Moteinos for one use that would be super helpful to the project: intercepting data from cheap wireless weather station sensors. And I mean the cheap ones because we would be using them for all kinds of weird experiments.  For example we have one idea for mapping canopy rainfall pass-through rates that could easily take up to 50 tipping bucket gauges to do.  I've been looking at the cheap the no-names ($20 each on eBay), the La Crosse series (about 25$ each), and the ones from Davis ($60 each). I am open to suggestions of other ones cheap enough that we won't loose too much money if they grow legs and walk away on their own (yes that happens...)

So I was wondering if anyone here knows of good libraries that already exist for these kinds of cheap sensors? 

And also whether you could track multiple different rain gauges with the same Moteino base station (I know that's asking a lot... so perhaps the real question is how do you run more than one of these guys in the same general area without confusing the receivers)
« Last Edit: February 08, 2017, 02:00:01 PM by EdM »

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #1 on: February 08, 2017, 03:15:21 PM »
Interesting blog.  I jumped straight to power reduction and I'm confused how your sleeping data loggers use so much current. A 328p @ 16MHz sleeping on a wdt = 4.4uA and add another 2uA for a MCP1702.  Sleep currents on the sensors I'm used to are around 100nA.  If SD cards take 70uA even in sleep, would it not make sense to log data to EEPROM and then periodically power on the SD card, dump the EEPROM, and then depower the SD card?  70 microamps is a massive sleep current for a peripheral.  I've looked into FRAM a little too but rejected the Adafruit product because it uses I2C and in their usual fashion have decided to make everything 5V and level shift.  Something like this seemed to hit the sweet spot between capacity and price: http://www.mouser.com/ProductDetail/Cypress-Semiconductor/FM25CL64B-GTR/?qs=sGAEpiMZZMtsPi73Z94q0OKOSVYv1Kg2ctR%252bIIU5pa4%3d

64kb for $2.80 and you can run the SPI bus at 8MHz.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #2 on: February 08, 2017, 04:15:08 PM »
@EdM,
Great content as usual, very fond of your underwater probes.
I tried to look around your blog but can't seem to find this - what kind of enclosures are those that you use?

64kb for $2.80 and you can run the SPI bus at 8MHz.

@ChemE -Maybe it's the SD-card convenience factor but still at the massive sleep current I'd look into other things.
FWIW the Moteinos have the optional FLASH MEM chip which by default is 4Mbit and can run SPI at 8mhz as well.

EdM

  • Newbie
  • *
  • Posts: 32
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #3 on: February 08, 2017, 05:13:48 PM »
@ ChemE:

I'm just starting to experiment with de-powering the SD cards now. Three years ago I ran across some fairly dire warnings about  the SD libraries not liking multiple inits, and those were from Grieman who wrote the SDfat library. More recent posts about it seem to indicate that the de-powering approach is OK now with SDfat.  Those warnings scared me away from the idea for a while but the folks over at OSBSS (http://www.osbss.com/ ) claim to have >100 K restarts on their depowered SD cards without data loss.  Even without de-powering I'm seeing sleep currents below 0.09mA, and that easily gets past a year on 3xAA's. So the pressure to reach lower sleep currents has been reduced somewhat and I spend most of my time now on trying to get good calibrations.  Also keep in mind that I am using all sorts of cheapest ebay parts, and that affects the sleep currents as well.  But as they say, its not a bug, its a feature: many of the folks we work with would struggle to pay even $10 for a logger.  The thing about the calibrations is that, after the initial failures (which take out about 20% of the ebay sensors), you can end up investing the same amount of time whether you pay $30 or $0.30 for a sensor.

@Felix:
We make the enclosures ourselves
 The key part for the 4" housings

https://edwardmallon.files.wordpress.com/2014/10/platform-parts.jpg

 is the Fernco QWIK cap bottom on the bottom which holds the platform in place,

https://www.menards.com/main/plumbing/rough-plumbing/pipe-tubing-hoses-fittings-accessories/fittings/flexible-fittings/4-qwik-cap/p-1444430434796-c-1478181399646.htm?tid=-7009352537086454214

 and for the 2" tube housings,

https://edwardmallon.files.wordpress.com/2015/02/cavepearldataloggerhousing_explodedview_wlabels.jpg

the key part is the Formufit 2 in. PVC Table Screw Cap

http://www.homedepot.com/p/Formufit-2-in-Furniture-Grade-PVC-Table-Screw-Cap-in-White-4-Pack-F002ECT-WH-4/205749364?cm_mmc=Shopping%7cTHD%7cG%7c0%7cG-VF-PLA-D26P-Plumbing%7c&gclid=CjwKEAiAoOvEBRDD25uyu9Lg9ycSJAD0cnBy24TdtsAvMVEAz_YhfHXZXq4t_57SR3kGOsb_S9DwkRoCIdbw_wcB&gclsrc=aw.ds

everything else is just off the shelf in the plumbing isle.


EdM

  • Newbie
  • *
  • Posts: 32
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #4 on: February 08, 2017, 05:33:01 PM »
Oh, and I almost forgot:

I went with the I2C eeproms initially, simply because they come free with the RTC board I am using, but yes their relative slowness means they use more power compared to the spi versions, and far more power than fram.

The SD cards let us grab the logger data with a simple card swap,  without bringing a laptop/download cable into the caves where they are installed. Sometimes that's a really nice feature.  I have not yet reached the point of figuring out a remote optical download unit like you see with onset loggers, and corrosion/deposition is an issue for the external contact approach you see for loggers like the reefnet sensus.

I can see the day (...when my coding skills improve..) when we get rid of the SD cards for a pure memory based solution, but for our deployments that would work far better if we could download the data without cracking open the housings - especially under water.
« Last Edit: February 08, 2017, 07:26:54 PM by EdM »

WhiteHare

  • Hero Member
  • *****
  • Posts: 1296
  • Country: us
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #5 on: February 08, 2017, 09:37:20 PM »

Though none of our deployment sites are near any kind of internet access, I've had my eye on the Moteinos for one use that would be super helpful to the project: intercepting data from cheap wireless weather station sensors. And I mean the cheap ones because we would be using them for all kinds of weird experiments.  For example we have one idea for mapping canopy rainfall pass-through rates that could easily take up to 50 tipping bucket gauges to do.  I've been looking at the cheap the no-names ($20 each on eBay), the La Crosse series (about 25$ each), and the ones from Davis ($60 each). I am open to suggestions of other ones cheap enough that we won't loose too much money if they grow legs and walk away on their own (yes that happens...)


Though it's possible to intercept the wireless signals from cheap tipping bucket gauges, you put your thumb on the key issue: how to tell them apart?  Maybe it would be easier to assign one moteino to each tipping bucket and have it count the tips.  Then, when each moteino sends that info to the basestation-datalogger, it can use separate node ID's for each tipping bucket.

So, that means you don't need to start with a wireless tipping bucket.  Literally any tipping bucket is going to have some kind of hardware interface that gets toggled whenever the bucket tips.  You just tap into that hardware interface with whatever moteino is assigned to it.

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #6 on: February 08, 2017, 10:24:39 PM »
Could these not be boiled down to a 3D-printed tipping bucket, a hall effect sensor, and a Moteino?

EdM

  • Newbie
  • *
  • Posts: 32
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #7 on: February 08, 2017, 10:41:34 PM »
Given how simple the task on the sending side would be (basically just a reed switch interrupt) , I suspect this might finally be the task that makes me look at the ESP8266's, as they seem to be popping up around $2.50 on eBay.  Then I could use a Moteino based logger as the central data gathering unit. It would all depend on how easy it was to get the separate units to act as nodes, and how well they would handle something like a rain storm event, which could potentially have them firing randomly in very close succession - possibly leading to conflicts.

I need to go do some googling now, as I am sure someone has already tried something like this with an ESP...

WhiteHare

  • Hero Member
  • *****
  • Posts: 1296
  • Country: us
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #8 on: February 08, 2017, 10:53:00 PM »
Could these not be boiled down to a 3D-printed tipping bucket, a hall effect sensor, and a Moteino?

Notionally, yes.  I get the impression though that reed switches are what is most typically used on battery operated weather gear so as to completely avoid any unnecessary, ongoing current drains.  Even anemometers use them.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1296
  • Country: us
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #9 on: February 08, 2017, 11:04:47 PM »
IIRC, one caveat about the tipping bucket rain sensors is that in order to work correctly, they have to be installed perfectly level.  If you're relying on shims, this can be a little trickier than it sounds.  If you were to install 50 tipping rain bucket sensors in awkward locations all at once, then all that leveling may drive you mad....

EdM

  • Newbie
  • *
  • Posts: 32
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #10 on: February 09, 2017, 12:39:13 AM »
WH you are right about that leveling thing, which I had not really thought through.  We would have to find a building/trailer roof nestled under just the right kind of tree canopy, or something similar.  Which with that many sensors laid out might be a good idea anyway, just to keep them out of sight.   

Or I just forget the volumetric aspect of the idea, and just lay out a field of my vibration drips sensors since they don't care much about impact angle...

WhiteHare

  • Hero Member
  • *****
  • Posts: 1296
  • Country: us
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #11 on: February 09, 2017, 05:07:23 AM »
@Edm
You might try also posting your OP question on www.wxforum.net.  When it comes to weather related sensors, those guys have tried it all and are generally very knowledgeable and helpful, especially for an interesting project such as yours.  I'm sure you'd get some additional thoughtful answers/suggestions.
« Last Edit: February 09, 2017, 05:18:03 AM by WhiteHare »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #12 on: February 09, 2017, 08:41:46 AM »
The SD cards let us grab the logger data with a simple card swap,  without bringing a laptop/download cable into the caves where they are installed. Sometimes that's a really nice feature.  I have not yet reached the point of figuring out a remote optical download unit like you see with onset loggers, and corrosion/deposition is an issue for the external contact approach you see for loggers like the reefnet sensus.

I can see the day (...when my coding skills improve..) when we get rid of the SD cards for a pure memory based solution, but for our deployments that would work far better if we could download the data without cracking open the housings - especially under water.

You are in the right place to explore ListenMode and wireless programming. The 60-70uA savings from not using an SD would give you the power budget to do a lot of that, and more.
Sounds like not going underwater to read/reprogram your probes might save you some time and trouble.

EdM

  • Newbie
  • *
  • Posts: 32
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #13 on: February 13, 2017, 11:51:48 AM »
Thanks WH, I will join the weather forum and do some digging there.

Finally got around to a few SD card depowering tests. Which took my sleeping logger down to about 0.02mA (if they had well behaved sensors).  Have to test it all out for a while tho before I trust the method enough to actually deploy it in the field though.

I used a 2n7000 mosfet on the ground line because that's what I had lying around, which is probably shaving things a little too close to Vgs(th) with only 3.3v logic. So I am looking into a P-mosfet for high side switching.  I have ordered a few BS250's [http://www.futurlec.com/Transistors/BS250.shtml]  but I am still learning about what exactly would be a mosfet suitable to use with 3.3v mcu control. I'd love to hear about any favorite p-channel mosfets that you typically to use for SD size currents (<100mA) at 3.3v?
   
....even better if it comes in a nice TO-92 package as all my loggers are built with hand soldered jumpers...

cheers!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: Three Component Data Logger (that works with Moteinos!)
« Reply #14 on: February 13, 2017, 02:41:54 PM »
I can recommend the Si2356 or Si2333.
They are sot23-3 and not terribly hard to use. I made a SOT23-x/SC70 breakout you might find useful.