Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Using SAMD51/Wio Terminal

Home Forums Infrastructure and Equipment Using SAMD51/Wio Terminal

Viewing 1 reply thread
  • Author
    Posts
    • #18146
      neilh20
      Participant

        I’ve ported MS to the Wio Terminal – which has an ARM “CORTEX-M4” SAMD51 microprocessor

        It opens up a whole field of potential Adafruit boards that also use versions of the SAMD51 https://www.adafruit.com/search?q=SAMD51  The big benefit of the SAMD51 is that it can go to a 2Mbytes of Flash and possibility even larger with XIP “execute in place” in external flash – for program features. The SAME5x family is also pretty much the same processor, and the can go into a pretty low power shutdown mode. At least for the ARM32 family. The Wio Terminal has built in WiFi, and should be possible to plug in a modem for Adafruit boards.

        Thanks to EnviroDIY having the SAMD Compilers as a base in the build environment. As ever , getting time and updating the libs to deal with a different RTC and time is a bit tricky.

        So far, the basic structure I’m looking at is 4temperature sensors + temp/humidity.
        Wio-Term with sensors

        The screen offers some instant visibility – but its a power hog, so turns off pretty quickly

        6 Sensors display

        The measurements are transmitted over WiFi and can be seen on MMW (though its a test site, and will delete it at some time in the future) https://monitormywatershed.org/sites/nh_temp5/

      • #18303
        neilh20
        Participant

          A follow up – I had this running for about 6 weeks last year.

          The code is in my fork is at  https://github.com/neilh10/ModularSensors/tree/release1/examples/samd_log_display_mmw  and is available to the main at any time.

          For test purposes, I positioned the temperature sensors in my office, attached to different areas round the heating vent, with the winter heating kicking in.

          This is is very much an alpha test – its designed to do an end-2-end system test and characterize areas that need more work.

          What showed up was the difficulty in labeling or easily “tracking” what was being measured . It turns out there isn’t the capability to give multiple sensors of the same type (DS18 thermistor) a “nickname” to describe the location that they are positioned in

          I documented it here https://github.com/ODM2/ODM2DataSharingPortal/issues/686

          For the DS18 temperature sensor readings to be easier to decode and track – the Arduino world of make it easy – I would want to add distinguishing labels – hints to understand the graphs –  “Vent Output”, “Vent Underneath”, “Vent-Horiz 1ft”,  “Window ledge”

          Of course for analysis it can be repeatedly downloaded – brought into a spreadsheet, and meaningful labels added/

           

          Some other issues,

          I wanted to configure the DS18 temperature sensor s/n in my .ini file – to make it easier to manage the sensors. However for some reason moving the DS18 from standard static initialization, to a dynamic initialization and then setting the s/n number failed to work. It should be easy – but that’s the story with software – I’m missing something somewhere. In the interests of trying out the alpha test config  I created a bug to be able to track it later and moved on

          As I had discovered in testing, the Wio Terminal internal WiFi networking module RTL8720 – has some problems with hanging when dealing with external conditions. A couple of other people have the same issue, No answer from Wio Terminal about this. https://forum.seeedstudio.com/t/rpcwifi-problem-when-wifi-is-lost/262273/4

          As expected from a circuit analysis the Wio Terminal, while nice looking, doesn’t do Low Power. I had wound down the clock frequency to use as little power as possible, and still the 6Ahr battery  lasted about 2.5days.

          Conclusion : This has shown that the  ModularSensors modifications for SAMD51/SAME51 processors with ARM tools works. The SAMD51/SAME51 is good fit for a sensor node as it has an architecture with number of configurable serial peripherals – including  possibly up to 6 serial UARTs+I2C+SPI,  and 32DMA and 2MBytes program flash + low cost external flash that can be dual usage.  However I need to try with some other SAMD51 boards that can achieve a low power state. I have a few Adafruit options, some  with LCDs.  I also need to be able to easily interface to an LTE Modem,  and for Modbus generate +12V & RS485.

          Other processors include the newish lowish power, ESP32-C6 with 3 UARTS could also be attractive, but is a different tool set. The ESP32 based “M5 Stack” boards are trying for lowpower by turning off the electronics  all together.

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.