Archiv für den Monat November 2023

Oxocard Connect

In meinem Blogbeitrag Vermittlung digitaler Inhalte in der Schule hatte ich die das Informatikinteresse an den Schulen fördernden Mikrocontroller BBC micro:bit, Calliope mini, und Oxocard betrachtet.

Dieser Bereich ist nach wie vor in Bewegung, stellt doch die Digitalisierung in allen Lebensbereichen eine grosse Herausforderung dar.

Mit der Oxocard Mini Serie stellt die Schweizer Oxon AG Computerboards zur Verfügung, die das Eintauchen in Computergrafik und ihre zugrunde liegenden Algorithmen oder Spiele und Animationen mit ihren Quelltexten ermöglichen.

OxoCard (Mini) Science ist eine programmierbare Multisensorplatine, die mit Hilfe von sieben Sensoren die folgenden physikalischen Grössen erfasst: Licht/IR, Temperatur, Geräusche, Feuchte, Druck und flüchtige Kohlenstoffverbindungen (VoC, eCO2 und Ethanol). Auch hier steht der dokumentierte Quelltext zur Verfügung und eigene Experimente können gestartet werden.

Oxocard Science, Oxocard Galaxy & Oxocard Artwork

Das jüngste Kind der Oxocard-Familie ist Oxocard Connect – ein ebenfalls auf dem ESP32 aufbauendes und damit netzwerktaugliches Computermodul mit grafischem TFT-Display und einem Joystick für die Benutzer-Eingaben, welches durch seitlich einsteckbare Cartridges mit peripheren Komponenten, wie Sensoren etc., erweitert werden kann.

Oxocard Connect mit Air Cartridge

Die Programmierung kann wieder über den komfortablen Nanopy-Editor erfolgen. Zahlreiche Programmbeispiele und ausführliche Erläuterungen dienen der Einarbeitung und Auseinandersetzung mit diesem System. Zum näheren Kennenlernen möchte ich Sie auf den Beitrag von David Lee verweisen.

Ich möchte Oxocard Connect nicht mit Python programmieren, sondern diesen sehr ansprechend gestaltetem Controller mit der Arduino-IDE programmieren. Die zahlreichen Libraries ermöglichen die Erweiterung mit Sensoren und die Vernetzung sehr komfortabel. Mit dem Veroboard lassen sich Prototypen sehr einfach erstellen, bevor man mglw. eine anwendungsspezifische Cartridge erstellt.

Oxocard Connect Arduino Test

Für die Hardware-Konstellation habe ich ein Testprogramm erstellt, welches die folgenden Funktionen testet:

  • Ausgabe auf dem farbigen TFT-LCD mit 240 x 240 Pixel LH133T-IG01 mit ST7789VW LCD-Controller
  • Abfrage Joystick
  • LEDs über digitale IO
  • EEPROM über I2C-Bus

Auf der Cartridge stehen neben digitaler und analoger IO und I2C-Bus auch noch SPI zur Verfügung. Ausserdem kann die gesamte Schaltung auch extern mit 5V (VEXT) versorgt werden.

Der Einsatz eines so ansprechend gestalteten Controllers lässt schnell das oft vorhandene Drahtverhau mit seinen unsicheren Verbindungen vergessen.


Oxocard Connect Openweather Station

Oxocard Connect besitzt mit der vorhandenen Hardware alle Möglichkeiten, über das Internet auf Daten zuzugreifen und diese auf dem Display darzustellen.

Ich habe hier durch Abfrage der Wetterdaten von Openweathermap.org eine kleine Wetterstation als Anwendungsbeispiel erstellt.

Openweathermap.org stellt maximal 1000 Aufrufe pro Tag gratis zur Verfügung, weshalb hier der Abfragezyklus auf zwei Minuten eingestellt wurde. Werden die 1000 Aufrufe überschritten, dann kann ein blockierter Account die Folge sein.

Das Programm finden Sie auf GitHub unter https://github.com/ckuehnel/Arduino2023/tree/main/ESP32/Oxocard/Oxocard_OpenWeather


Oxocard Connect MQTT-Client

Simon Kemper beschreibt auf LinkedIn die Verbindung von Datacake und Slack zur Benachrichtigung bei kritischen Zuständen etc.

Unter Verwendung des TTN-internen MQTT-Servers bin ich einen anderen Weg gegangen.

Ich verwende Oxocard Connect als MQTT-Client und filtere nur die für das Monitoring erforderlichen Größen aus den Upload-Messages zur Anzeige auf dem Display.

Konkret überwache ich die Batteriekapazität eines solar-gepufferten SensorHubs von RAKwireless. Gerade jetzt in der dunklen Jahreszeit möchte ich den Ladezustand der Batterie überwachen, um die Nachladung tagsüber zu verifizieren.

Der SensorHub sendet die erfassten Umweltdaten zum TTS (CE) LNS, der diese an ein Datacake Dashboard zur Visualisierung weiterleitet. Sie finden dieses Dashboard über diesen Public Link.

Der Oxocard Connect MQTT-Client „subscribed“ die Upload-Messages des SensorHubs, filtert die Batteriekapazität aus der umfangreichen Upload-Message und bringt sie auf dem Display zur Anzeige. Die Aktualisierung des Displayinhalts erfolgt mit jeder neuen Upload-Message vom SensorHub.

Ein Screenshot des Consolen Outputs zeigt die empfangene Payload vor und nach der Filterung und die Extraktion der Daten. Auf dem Display wird aber nur die aktuelle Batteriekapazität angezeigt.

Consolen Output

2023-12-01/CK

SensorHub – Reduction of Power Consumption

The power supply of the SensorHub by an RAK9154 solar battery enables the autonomous operation of the complete measuring station. I describe this in my eBook SensorHub IoT Applications.

I had to close the chapter describing this application as follows: On sunny days, recharging the battery will hardly be a problem. On cloudy days, this balance looks less favorable, and it remains to be seen whether the weather conditions in my area offer sufficiently good conditions. It is, therefore, essential that the anticipated variant of the SensorHub promises to reduce power requirements further.

I have good news today. I got a new version of SensorHub and replaced the existing one. As you can see in the screenshot of the WisToolBox app, the hardware version changed from VF zu VH and the firmware from V1.1.79 to V1.2.6.

Existing Version of SensorHub
New Version of SensorHub

The following screenshot shows the behavior of the solar battery before and after the SensorHub replacement. The weather conditions are worse over the whole period.

You can see that before the replacement of the SensorHub the current consumption was about 50 mA in the phase of discharge. After the replacement, it is reduced significantly. The same behavior can be seen in the battery capacity curve. Before the replacement, the battery capacity dropped between 10% and 20% per day without recharging.

After the replacement, the discharge remains quite small. The current consumption was about 10 mA in the phase of discharge, and the battery capacity dropped by about 1%. The weather conditions were very bad therefore, the recharging was limited to a short time.

Now, I’m waiting for a sunny day so that the solar cell can charge the battery sufficiently to survive a period of bad weather without losing the connection.

The sun came out for a few hours, and the battery was charged. During this time, the solar cell delivers a considerable charging current.

We are on the right way, as you can see, after two days with a bit of sun.


2023-11-23/CK

SensorHub IoT Applications

RAKwireless‘ SensorHub is a modular ecosystem consisting of the main body and multiple pre-configured sensor probes. With pluggable, interchangeable probes and the option to add third-party sensors to the system, the Sensor Hub is a suitable and versatile solution platform for various IoT applications where environmental monitoring is needed outdoors.

The SensorHub can work battery-powered by non-rechargeable or solar-powered batteries or with an external power supply, depending on the application and deployment location.

For data transmission into Low-Power Wide-Area Network (LPWAN), LoRaWAN is available. Alternatively, NB-IoT can be used.

As a typical low-code system, it requires configuration with the WisToolBox app from a cell phone. WisToolBox also enables access to the measured values of all connected sensors, as the following screenshots show.

The eBook SensorHub IoT Applications will be available from Amazon from November 15, 2023. Pre-orders are already possible.

This eBook introduces the SensorHub system and its usage in industrial-grade IoT applications using LoRaWAN for communication.

The first image shows a SensorHub with a connected SensorProbe equipped with WisBlock sensors. This application is suitable for powering by batteries, too.

The second image shows a SensorHub Measuring Station built by RK900-09 Weather Station, RK520-02 Soil Moisture Sensor, and RAK9154 Solar Battery. These components build an autonomous working measuring station. The measuring station was installed to test the acquisition of the measuring values via the connected sensors on the one hand and its behavior regarding solar-buffered battery operation in the darker season on the other hand.

You can access the live data at https://app.datacake.de/dashboard/d/8f0da5ea-e1f5-4da8-b951-7c19c98e0de2 and the loading situation of the solar-buffered battery at https://app.datacake.de/dashboard/d/19f2e113-74b9-4950-81be-28f9df871ae0.

This new eBook shows how to create professional IoT applications with the RAKwireless SensorHub system.

I will publish additions and further applications here in this blog.

Your queries are welcome.


2023-11-08/CK