Short description

SodaStream Oled Display

Everyone who owns a SodaStream has probably asked themselves how full my CO2 cylinder is. In most cases the cylinder is empty once you have been shopping. Most SodaStream users have a second cylinder, but it still sparked my creativity to come up with a simple solution.

The small software program is currently used to determine the number of impacts pressed and shown on the display (line 2). In line 3 is the added time of the duration / length of the pushed pushes. These values can be used to roughly estimate how much Co2 is still in the cylinder. What is shown graphically in line 4 by means of a progress indicator.

Hardware required

  • Wemos D1 mini (ESP8266)
  • Limit switch Ender 3 Pro
  • OLED Display I2C 0,96 Zoll
  • Cable / single wires
  • 3D Printer + Filament
  • Soldering iron with equipment

Software required

  • Arduino IDE
  • Tinkercad
  • Ultimaker Cura / Prusa Slicer

3D Printer settings

Ender 3 Pro

Print Settings

3D Printer Tinkercad STL File

Tinkercad SodaStream

Arduino IDE Software Code

I have to adapt to publish (currently code excerpt).

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <ESP8266WiFi.h>

#define SCREEN_WIDTH 128 // display width, (pixels)
#define SCREEN_HEIGHT 64 // display height, (pixels)

// I2C connected display SSD1306 
#define OLED_RESET     0 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

#define NUMFLAKES     10 // Number of snowflakes in the animation example

#define LOGO_HEIGHT   16
#define LOGO_WIDTH    16
static const unsigned char PROGMEM logo_bmp[] =
{ B00000000, B11000000,
  B00000001, B11000000,
  B00000001, B11000000,
  B00000011, B11100000,
  B11110011, B11100000,
  B11111110, B11111000,
  B01111110, B11111111,
  B00110011, B10011111,
  B00011111, B11111100,
  B00001101, B01110000,
  B00011011, B10100000,
  B00111111, B11100000,
  B00111111, B11110000,
  B01111100, B11110000,
  B01110000, B01110000,
  B00000000, B00110000 };

Result Pictures

ToDo

  • Wemos D1 Mini ESP.deepSleep
  • One Case for alle the stuff
  • Smaler Display Case
  • Battery shield + display battery status
  • Change Wemos D1 Mini to ESP8266 BLE + IOS App

Control of a relay module using an Arduino Nano v3

Since I have to reset my work hardware or switch the voltage several times a day from home office, I built a small circuit from an old Arduino Nano v3 and a relay module that enables me to do this. Since I found it awkward to start the relay every time via the Arduino IDE with the serial monitor, I also wrote a GUI that can be executed using JAVA JDK for easy handling.

Hardware required

  • Arduino Nano v3
  • Relais Modul
  • RGB LED (not needed)
  • Single Wires
  • Solder stuff
  • 3D Printed case (not needed)

Schematics

Tinkercad circuits Arduino Nano

Code

Code for Arduino IDE which worked with the attached GUI.

#define LEDR 8     // red
#define LEDG 9     // green
#define LEDB 10    // blue
#define RELAIS 11  // relais

void setup() {

  // set LED's pin to output mode
  pinMode(LEDR, OUTPUT);
  pinMode(LEDG, OUTPUT);
  pinMode(LEDB, OUTPUT);
  pinMode(RELAIS, OUTPUT);
  
  Serial.begin(9600);          //start serial communication @9600 bps
}

void loop(){
  
  if(Serial.available()){      //id data is available to read

    char val = Serial.read();

    if(val == 'b'){             //if b received
      digitalWrite(11, HIGH);   //turn on relais
      digitalWrite(10, HIGH);   //turn on green led
    }
    if(val == 'f'){            //if f received
      digitalWrite(11, LOW);    //turn off all led
      digitalWrite(10, LOW);
    }      
  }
}

Processing IDE GUI for MacOS

With Processing IDE it is easy to create a JAVA GUI for Arduino which is running on MAC OS X and Windows. The only think what you have to install additional is the latest JAVA SDK.

3D Printer Settings

Print Settings

Result