Software Documentation

This page contains information about the Software developed for the Multiflexmeter V4.

The Multiflexmeter V4 is powered by Microchip’s SAMD21 MCU. The SAMD21 is a Cortex-M0+ powered microcontroller with up to 256kb flash memory and 32kb SRAM. The unit can reach clock speeds up to 48 MHz. ( More information )

The SAMD21 is a big step forward compared to the AtMega328P. Unlocking features such as USB communication and Real Time Counter natively, while the power consumption stays equivalent.

Main goals

The software will be developed incrementally, starting with V4F1.0 which will contain only the required functionality as described below. The following firmware versions will add new features such as USB support and over the air configuration updates.

Just like the Multiflexmeter hardware, the firmware must be modulair. This means it must support different hardware such as:

  • Different types of communication: GPRS and LoRa;

  • different sensors: JSN-SR04T, DS18B20, DHT21;

  • and possibly boards: AtMega328P and SAMD21.

To achieve this level of modularity a lot of abstraction has to be created. The diagram below shows different components and the abstractions layers.

The firmware focuses on re-using existing external code. For example: porting Arduino libraries for a sensor should not be too difficult.

Another important note is that the Hardware Abstraction Layer can use existing frameworks such as MBED / Arduino to increase development speed, although this might cause bloating.

V4F1.0.0

This is the first released firmware version for the Multiflexmeter V4 and will only contain the bare minimum features to function properly.

  • Must support different sensors to comply to different setups

  • Must be able to apply median filter over readings to eliminate errors

  • Must be able to build dynamically formatted payloads to support different sensors and measurements

  • Must perform measurements in a constant interval

  • Must enter low power between measurements to prevent unnecessary power consumption

  • Must send payload through LoRaWAN