IoT Octopus : send data using Blynk

Blynk is another way of sending and visualising data, from the Octopus, besides using Thingsspeak. To use Blynk, one needs to register with Blynk and download the Blynk app (available on iOS and Android).

Set up a remote sensing device on Blynk

To set up a data transmitting device on Blynk, one needs to do the following:

From the Blynk app :
– Open the Blynk app on your smartphone.
– Click on “new project”.
– Choose “esp8266” for the “choose device” question.
– Wait for the “Auth Token” email that Blynk has sent.

(then) In ArduBlocks :
– In the Setup part of your ArduBlocks sketch, add aWLAN block and a Blynk-Cloud block.
– In the WLAN block : specify the name of your wifi network and the password.
– In the Blynk-Cloud block : the Copy the Auth Token from the Blynk email, and paste it into the API-Key part of the ArduBlocks Blynk-Cloud block.

„IoT Octopus : send data using Blynk“ weiterlesen

Measure CO2 with a Node MCU microcontroller, if you don’t have a IoT Octopus

This article is a variation on the tutorial explaining how to make a CO2 measuring device using a Octopus microcontroller, plus CO2 sensors and optional displays.

As one might not always have an Octopus microcontroller at hand, people have asked me how to build a CO2Ampel – CO2 traffic light warning gadget – with a different microcontroller. Thankfully, such a device was recently assembled at Chaos Computer Club Freiburg.

To keep things inexpensive, we’re skipping the NeoPixel LED of the other tutorial, in this tutorial. Thus parts could be obtained for around 55 EUR.
Later, we’ll cover how to connect the measuring device described here, to various displays . Also, those interested in finding further tips and information, can find more information in the Octopus section of this blog.
(This post is for the most part identical with the CO2 Messen mit dem Octopus tutorial, also on this blog.)

Parts

I have provided links to the Mouser Onlineshop and to Tindie. You can also find the parts elsewhere, and my links aren’t affiliate links. 

  • Node MCU (microcontroller, controlling the other elements ), via Amazon or Mouser.
  • CO2 sensor SCD30 – these are available with different interfaces. Eg. With a Grove connector – although often sold out – as well as without. In the case of the CO2 sensors without a grove connector, one needs to solder or otherwise connect it to the microcontroller. Slightly cumbersome but manageable. (Digikey from 53 EUR, RS Online from 72 EUR, Mouser around 50 EUR – at time of writing these were sold out, but new ones are orderd)
  • LCD panel – To display the data from the CO2 sensor. There are several variants, also with Grove connectors. From 6 EUR. from Mouser.
  • A power source – Likely you already have one – a USB charger. Just make sure you  have  a Micro-USB cable. Powerbanks are an alternative, especially if you want to carry the device around. 
  • Grove connector cable – 2.5 EUR by Mouser.
  • I2C Hub – a hub connecting several Grove connector cables. Grove connector cable – 2.5 EUR by Mouser.
  • A case – There are many ideas around. From Ikea picture frames, to Bird houses.
  • A Data ready USB cable – You probably have one at home, but may have to try several USB cables before you find one that can transmit data as well as power. Please note, quite often the USB cables one gets with various bits of electronics can only carry power. So it makes sense to try different USB cables if USB cable one doesn’t work.

Programming

To program Arduino code with visual programming (Ardu)blocks, we need to modify the Ardunio IDE code editor a bit. (For those that prefer text-code, you’ll find the produced Ardublocks code, in text form, at the end of this tutorial).

The easiest way to get going is to use a Windows PC and install the software following the instructions (including download links ) from the Umwelcampus Birkenfeld website. Instructions for MacOS and Raspberry PI can also be found, via the website’s overview page. I’ve also made some tutorials for Mac OS here on my blog. There is a (German language) Tutorial for Raspberry Pi, too.

Windows: download the zip file with the ‘blocky’ Arduino IDE and then install the relevant hardware driver software. Install the Arduino into a very short File tree, et. C:/iotw. You may also have to take care if you have another Arduino Version already installed. Pay attention which do you start. Start by double clicking on the „IOTWerkstatt.bat“ file.

Raspberry Pi: Setup RaspberryPi Os (Raspbibian) for your Pi and then download the modified Arduino IDE from here.

Mac OS: this is a bit more complicated compared to Windows, but accomplishable using these instructions (in German, again), or the ones below. Here too, you need to install the relevant hardware driver software, and download the special Arduino IDE. This is done as follows:

  1. Download the Driver.
  2. Download and install the Arduino IDE.
  3. Following the installation of the Arduino IDE, right-click on the Arduino IDE icon, and select “Show package content” from the menu. This shows the files that make up the Arduino IDE.
  4. Open the “Contents” folder of the just-opened Aruduino package.
  1. Open the downloaded IoTW.zip file.
  2. Drag the “Portable” folder (of the expanded IoTW.zip file ) into the “Java” folder of the expanded Arduino IDE files.
  1. Now open the Arduino IDE.
  2. Open the “Tools” menu and go to Port submenu, and select “Dev/cu.SLAB_USBtoUART” option, to select the right port.
  3. Open the “Tools” menu, as before, and now open the “Board” submenu, and select the “Generic ESP8266 Module”, as our board.

Cabling

The ESP9266 is cheap and can be used as the microcontroller for the CO2 Traffic lights.

Connect yellow on the D1, white on the D2, black on the GND, and red on the 3V. The cables connect with the Node MCU as shown in the table below. Now we need to solder them into place.

Node MCU pinI2C / Grove Cable
3.3 Vred
GNDblack
D1yellow / SCL
D2white / SDA

Here and now is a good time to solder the (Grove) cables to the Node MCU.
Then we can do fun things like connect a Grove LCD and a SCD30 CO2 sensor to the Node NCU, via a I2C hub. As the grove Cables have preset colours, this should be simple.

„Measure CO2 with a Node MCU microcontroller, if you don’t have a IoT Octopus“ weiterlesen

Send data from the Octopus using Thingsspeak

Now it’s time to have a look at sending the data the Octopus microcontroller has measured, through its own sensors or attached ones, over the net.
For this tutorial, we’ll use the Octopus microcontroller’s on-board Bosch BME680 sensor.

Note for Mac and Pi users: Unfortunately, there’s an incompatibility with the Mac OS compiler and the Bosch BME680 BEC driver. Things fail in the compilation stage. A workaround is to read a single BME680 value at a time, or use a different BME680 driver, without BSEC. Sometimes it works, just try or use a windows system

The BME680 BSEC is a great sensor, which can measure:

  • Air pressure
  • Relative humidity ( rH )
  • Temperature
  • VOC – Volatile Organic Compounds.
  • IAQ – Air Quality Index (AQI). AQI values between 0-100 means the air is relatively ok. AQI values between 100 and 200 means it’s a good idea to ventilate regularly. Values above 200 indicate one needs to ventilate urgently.

The AQI value is calculated based on several factors. Thankfully we don’t need to worry about performing the calculations oursleves. The BME680 BSEC library does the complex calculations, and simply delivers us an AQI number. Simply select things relevan in the BSEC Block (the red arrow) and get the AQI value.


Thingsspeak Block with Bosch BME680 SEC in ArduBlocks


Sending measured data with Thingsspeak

Data can be sent from the Octopus, using the free Thingsspeak open source project and service. One can use the Thingsspeak website for free, for personal or educational purposes. Alternatively, one could also install the Thingsspeak software on a Raspberry PI, and use it as a Thingsspeak data receiving server. Using a Raspberry PI with Thingsspeak provides a low cost and low power solution.

„Send data from the Octopus using Thingsspeak“ weiterlesen

Octopus und Raspberry Pi

Immer wieder gibt es Fragen: Kann ich die spezielle ArduBlock Umgebung auch auf dem Raspberry Pi nutzen? Die gute Nachricht: Ja es geht. Michael Mattern vom Innovationslabor Digitalisierung (INNODIG), dem Makerspace am Umweltcampus Birkenfeld hat eine spezielle Version der Arduino IDE zusammengestellt. Gerade wenn wir eine CO2 Ampel bauen wollen, kann uns das helfen.

Was brauche ich?

Der Imager

Als erstes Laden wir von Raspberry.org den Raspberry Raspberry Pi Imager herunter. Das ist ein kleines aber schönes Programm, in dem wir schon alle notwendigen Betriebssysteme angeboten bekommen.

Wir wählen Rasypberry Pi Os (32 Bit) aus

Der Imager ist total komfortabel. Sobald wir im gesagt haben auf welche SD Karte wir das „flashen“ sollen, schreibt er das Betriebsystem auf diese. Beim ersten Mal muß er die ca 1 GB nochmal runterladen, das kann also ein wenig dauern.

Da wir den Pi nicht „headless“ betreiben wollen, sondern mit Bildschirm und Tastatur und Maus, brauchen wir auch keine weiteren Einstellungen zu ändern. Was wir einstellen, können wir direkt am Pi über dessen grafische Benutzeroberfläche. Also Pi anschließen und starten. Der erste Start-Up dauert dann etwas länger.

„Octopus und Raspberry Pi“ weiterlesen

Leserbrief zu „Erspart uns die Panikmache mit völlig irrelevanten Labortests!“ von Volker Amend

Der Leserbrief von Volker Amend enthält eine Reihe von Behauptungen, die bei näherer Recherche nicht standhalten:

Er behauptet, der Corona PCR Test sei nicht validiert und nicht standardisiert. Richtig ist aber, dass der Corona Test schnell nach vorliegen der entsprechenden Virus Proben standardisiert und validiert wurde. Und zwar vom Labor an der Charite zusammen mit der Universität Hongkong, der Universität Rotterdam, der nationalen Public-Health-Organisation in London. Ein entsprechender Journal Beitrag (Detection of 2019 novel coronavirus (2019-nCoV) by real-time RT-PCR.) erschien bereits am 22.1.2020. Dieser Test grenzt auch gegen andere (Corona) Viren ab und schlägt nur beim SARS-Cov-2 Virus an.

Weiter behautet er, die Fehlerquote läge bei bis zu 2 Prozent. Immer wieder haben unterschiedlichste Medien dargelegt, dass die Labore – nach Empfehlungen des RKI – die „Dual-Target“-Methode verwenden, daher bei positiven Test, wird im Labor nochmal die gleiche Probe überprüft. Damit kommt an auf eine Spezifität von 99,99 Prozent bzw. ein Fehler würde bei einem von 10.000 Tests auftreten. (siehe: https://correctiv.org/faktencheck/hintergrund/2020/09/09/pcr-test-auf-sars-cov-2-warum-in-der-praxis-falsch-positive-ergebnisse-selten-sind/).

Er behautet ebenso: „die Fehlerquote deckt sich mit Prozentzahl der positiven Corona Tests“. Auch diese Behauptung ist irreführend. In der Kalenderwoche 37 waren 0,86% der Tests positiv, in der KW 41 2,49 % und in der letzten Woche (KW 42) 3,62%. Die Anzahl der insgesamt durchgeführten Corona Tests stieg dabei nicht.

Infografik: Anteil positiver Corona-Tests steigt kontinuierlich | Statista
Quelle
„Leserbrief zu „Erspart uns die Panikmache mit völlig irrelevanten Labortests!“ von Volker Amend“ weiterlesen

Gegenkundgebung: Respect the Science!

Gegenkundgebung zum Besuch von „Schwindelarzt“ Bodo Schiffman in Freiburg. Donnerstag 22.10. 10:45
Sammelpunkt Platz der Alten Synagoge. Während der gesamten Versammlung herrscht Maskenpflicht und es ist ein Abstand von mindestens 1,5 m einzuhalten.

Do 10:45 Karlsplatz

Respect the Science!

Corona ist real.

Gegenkundgebung zum Besuch von „Schwindelarzt“
Bodo Schiffman in Freiburg. 

Donnerstag 22.10. 10:45
Karlsplatz (google maps)

Am Donnerstag gegen 11:00 will der „Schwindelarzt“ Bodo Schiffman mit seinem Bus auf der Durchreise nach Zürich auch nach Freiburg kommen. Er befindet sich mit weiteren Anführen der “Querdenken” Bewegung derzeit auf deiner Tour durch die deutschsprachigen Länder um dort Kontrafaktisches über die Corona Epidemie zu verbreiten.

In der Vergangenheit hat er bei seinen Tourstationen insgesamt drei Tote Kinder durch Maskenpflicht erfunden, einen Poliozei- oder Militärputsch gegen die Bundesregierung gefordert. Seine Anhänger rufen immer wieder auf gegen die Infektionsschutzmaßnahmen bewußt zu verstoßen und gehen z.b. ohne Maske einkaufen oder stellen sich vor Schulen und belästigen Kinder. Sie verhamlosen den Holocaust. 

Während zu Beginn der Querdenken Kundgebungen in Freiburg dies noch hauptsächlich Menschen waren, die persönlich von Einschränkungen im Rahmen der Coronakrise betroffen waren, handelt es sich in den letzten Wochen um eine mindestens rechtsoffene Veranstaltung auf der auch häufig das politische System der Bundesrepublik Deutschland verächtlich gemacht wird. (Einige Beispiele am Ende des Artikels)

Dies wollen wir nicht mehr hinnehmen.

Freiburg hat als Wissenschaftsstadt eine lange Tradition, neben der Albert-Ludwigs-Universität, gibt es die Pädagogische Hochschule, mehrere Fachhochschulen und zahlreiche Forschungseinrichtungen. An der Uniklinik, dem St. Josefskrankenhaus, dem Diakonie Krankenhaus und Lorettokrankenhaus kämpfen auch heute Ärzt*innen und Pflegende um das Leben von an Corona erkrankten Personen. 

Deshalb rufe ich alle Freiburger*innen auf, sich am morgen um 10:45 auf dem Karlsplatz zu versammeln, dort werden wir ggf. zum Bus bzw. Kundgebung von Querdenken gehen. Während der gesamten Versammlung herrscht Maskenpflicht und es ist ein Abstand von mindestens 1,5 m einzuhalten. Bitte reist mit dem Fahrrad an. Von Sprechchören und Gesangsdarbietungen werden wir absehen.

„Gegenkundgebung: Respect the Science!“ weiterlesen

CO2 Ampel Ideen

„Im Internet“ oder besser auf twitter erreichen mich immer wieder coole Ideen für die CO2 Ampel. Ein paar habe ich hier gesammelt, als Inspiration vielleicht für den Nachbau. Dieser Artikel wird ständig auf dem laufenden gehalten.

Hardware

Viele Leute haben gute Ideen für nette und sinnvolle Gehäuse.

Im Ikea Bilderrahmen, den gibt es für unter 5 EUR bei IKEA:

In einem netten Gehäuse. Vorne für die Kinder mit Neopixelring, jinten für die Lehrer mit LCD. Diese Bastelanleitung berueht übrigens auf dem Assembled Feather HUZZAH w/ ESP8266 und dem Seeestudio Grove-Shield, beide könnten ggf. etwas einfacher zu beschaffen sein als die Octopus Platine.

Im Google Kartong und mit TagoIO:

Nikolai Ruhe hat eine schöne große Ampel mit LED Streifen und ESP32. Die kann man kaum übersehen.

Software Ideen

„CO2 Ampel Ideen“ weiterlesen

CO2 messen mit Node MCU (falls man keinen Octopus zur Hand hat)

Nicht immer hat eine Octopus Platine zur Hand. Deshalb haben mich einige gefragt, wie man eine CO2 Ampel bzw. eine Meßgerät mit einer anderen Platine bauen kann. Im Chaos Computer Club hier in Freiburg wurde schließlich so eine Ampel gebaut. Wir haben hier – auch aus Kostengründen, diese Teile dürften etwa bei 55 EUR liegen – etwa auf eine NeoPixel LED verzichtet. Später wird es hier Tipps geben, wie man dieses Meßgerät mit anderen Ausgabegeräten verbinden kann. Wer aber dazu noch Tipps sucht, dem seien die anderen Artikel zum Thema Ocotopus auf dem Blog angeraten. Dieser Post ist in Teilen identisch mit der Anleitung CO2 Messen mit dem Octopus.

Teile

  • Node MCU (Platine die steuert) (bei Amazon, bei Mouser)
  • SCD30 (CO2 Sensor) (Digikey ab 53 EUR inklusive Mwst, RS Online ab 72 EUR mit MwSt, bei Mouser derzeit ausverkauft)
  • Grove LCD Display (bei Mouser)
  • I2C Hub (für die Bequemlichkeit, bei Mouser)
  • Kabel (es reicht eine Packung, bei Mouser)
  • USB Kabel (zur Stromversorgung und zum flashen)
  • Stromversorgung, entweder Powerbank oder Handyladegerät

Programmcode

Hier gibt es zunächst eine Anleitung, eigenen Code mithilfe der Ardublock Software zu schreiben bzw. zusammen zu klicken, wer das nicht will und einfach mit der Arduino IDE Code reinkopieren, der findet unten ein Beispiel mit einer Anleitung.

ein ganz einfacher Code im Ardublockly, der aber alles zeigt was wir zum Meßen brauchen.

Am einfachsten verwendet man ein Windows PC und installiert es sich nach Anleitung (mit Downloadlinks) auf der Website vom Umweltcampus Birkenfeld. Auf der Übersichtsseite zum Projekt Octopus finden sich auf die Anleitungen für Pi und MacOs. Ich habe für MacOs auch eine Anleitung auf diesem Blog.

Für Windows ist es relativ einfach, download des aktuellen Zip-File der Werkstatt-Plattform und dann den Chipsatz Treiber installieren. Wie es geht haben sie in einem PDF erklärt. Wichtig ist unter Werkzeuge den richtigen „Com“ Port auszuwählen.

Für MacOS ist es ein wenig komplizierter, aber mit der Anleitung auch gut zu machen. Auch hier den Chipsatz Treiber installieren, die Arduino IDE von Arduino herunterladen, dann installieren. Dann in den Ordner Programme gehen, dort rechtsklick und „Paketinhalt zeigen“ auswählen. Wir sehen dann was sich hinter dem Icon verbrigt, nämlich die Struktur des Arduino Programms. Jetzt das Archiv „IoTW.zip“ herunterladen, dann entpacken und öffnen. Da gibt es ein Unterordner namens „Portable“, diesen nehmen und in die auf dem Mac installiere Arduino IDE und da in den Unterordner „Java“ ziehen.

Noch sind wir nicht ganz fertig, wir gehen noch unter „Werkzeuge“ auf „Boardverwalter“, da gibt es ganz viele Boards. Wir gehen auf „ESP Community“ Package und führen ggf. eine Update durch.

Bei „Werkzeuge“ wählen wir noch unter Port: „/dev/cu.SLAB…“ aus. Als Board stellen wir „Generic ESP8266 Module“ ein. Mehr müßen wir nicht einstellen.

Sollte etwas beim flashen der Software auf das Board nicht klappen, vielleicht mal ein anderes USB Kabel verwenden.

Verkabelung

Gelb an D1, Weiß an D2, Schwarz an GND und Rot and 3V.

Wir verkabeln an den Node MCU wie folgt und löten dann ggf.:

Node MCU BeinchenI2C / Grove Kabel
3,3 Vrot
GNDschwarz
D1gelb / SCL
D2weiß / SDA

Hier können wir die Kabel auch schon an den Node MCU anlöten. Danach stecken wir auf dem I2C Hub sowohl das Kabel an das Grove LCD Display als auch an den SCD 30 CO2 Sensor.

Auch hier werden wir löten müßen.
SensorKabel
VINrot
GND (schlecht zu lesen)schwarz
SCLgelb
RXSDAweiß
Verkabelungsschema

Die Umweltwerkstatt Birkenfeld hat die Überlegungen, Hintergründe und ein wenig eine Anleitung auch auf ihrer Website zusamemngefasst.

„CO2 messen mit Node MCU (falls man keinen Octopus zur Hand hat)“ weiterlesen