The Alpha Geek – Geeking Out

MEMS VOC

Project #30 – UNIHIKER – MEMS – Mk07

——

#DonLucElectronics #DonLuc #UNIHIKER #CH4 #VOC #Display #IoT #Project #Debian #Python #Thonny #DFRobot #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

MEMS

——

MEMS

——

MEMS

——

MEMS

MEMS (Micro-Electromechanical Systems) is the technology of microscopic devices incorporating both electronic and moving parts. MEMS are made up of components between 1 and 100 micrometres in size, and MEMS devices generally range in size from 20 micrometres to a millimetre, although components arranged in arrayscan be more than 1000 mm2. They usually consist of a central unit that processes data, an integrated circuit chip such as microprocessor, and several components that interact with the surroundings, such as microsensors.

DL2410Mk01

1 x UNIHIKER
1 x Fermion: MEMS VOC Gas Detection Sensor
1 x Fermion: MEMS Methane CH4 Gas Detection Sensor
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

UNIHIKER

ADC1 – 21
ADC2 – 22
VIN – +5V
GND – GND

DL2410Mk01p

DL2410Mk01p.py

****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - MEMS - Mk07
30-07
DL2410Mk01.py
DL2410Mk01
1 x UNIHIKER
1 x Fermion: MEMS VOC Gas Detection Sensor
1 x Fermion: MEMS Methane CH4 Gas Detection Sensor
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

-*- coding: utf-8 -*-
"""
# Import the unihiker library
from unihiker import GUI

# Import the time library
import time

# Import the Board module from the pinpong.board package 
from pinpong.board import Board

# Import all modules from the pinpong.extension.unihiker package
from pinpong.extension.unihiker import *

# Initialize the board by selecting the board type and port number;
# if not specified, the program will automatically detect it
Board().begin()

# Initialize pin 21 as analog input mode
# Fermion: MEMS Methane CH4 Gas Detection Sensor
adc0 = Pin(Pin.P21, Pin.ANALOG)

# Initialize pin 22 as analog input mode
# Fermion: MEMS VOC Gas Detection Sensor
adc1 = Pin(Pin.P22, Pin.ANALOG)

# Instantiate the GUI class and create a gui object
gui = GUI()

# Display the initial background image 'DL2410Mk01p'
img = gui.draw_image(x=0, y=0, w=240, h=320, image='DL2410Mk01p.png')

# Fermion: MEMS Methane CH4 Gas Detection Sensor
# Display the initial Fermion: MEMS Methane CH4 Gas Detection Sensor valueCH4
valueCH4 = gui.draw_text(x=30, y=151, text='0', font_size=18)

# MEMS VOC
# Display the initial Fermion: MEMS VOC Gas Detection Sensor valueVOC
valueVOC = gui.draw_text(x=30, y=221, text='0', font_size=18)

while True:

    # Fermion: MEMS Methane CH4 Gas Detection Sensor
    # Read analog value
    CH4Sensor = adc0.read_analog()
    valueCH4.config(text=CH4Sensor)
    
    # Fermion: MEMS VOC Gas Detection Sensor
    # Read analog value
    VOCSensor = adc1.read_analog()
    valueVOC.config(text=VOCSensor)
    
    # Delay for 1 second to keep the screen content displayed for a longer time
    time.sleep(1)

——

People can contact us: https://www.donluc.com/?page_id=1927

Electronics, IoT, Teacher, Instructor, R&D and Consulting

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
DFRobot Luc.Paquin: https://edu.dfrobot.com/dashboard/makelogs
Hackster.io: https://www.hackster.io/neosteam-labs
ELECROW: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: www.tiktok.com/@luc.paquin8
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #30 – UNIHIKER – MEMS VOC – Mk05

——

#DonLucElectronics #DonLuc #UNIHIKER #VOC #Display #IoT #Project #Debian #Python #Thonny #DFRobot #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

MEMS VOC

——

MEMS VOC

——

MEMS VOC

——

Fermion: MEMS Volatile Organic Compounds VOC Gas Detection Sensor

Fermion: MEMS Volatile Organic Compounds VOC Gas Sensor employs state-of-the-art microelectromechanical system (MEMS) technology, endowing the sensor with compact dimensions, low power consumption, minimal heat generation, short preheating time, and swift response recovery. The sensor can qualitatively measure VOC gas concentration and is suitable for indoor air quality detection, fresh air system, air purifier and other application scenarios. Kindly remove the protective film before usage. Gas detected: ethanol, formaldehyde, toluene, etc. Detection range: 1-500 ppm. It is advisable to preheat the module for at least 24 hours.

DL2409Mk05

1 x UNIHIKER
1 x Fermion: MEMS VOC Gas Detection Sensor
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

UNIHIKER

ADC – 21
VIN – +5V
GND – GND

DL2409Mk05p

DL2409Mk05p.py

"""
****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - Fermion: MEMS VOC - Mk05
30-05
DL2409Mk05.py
DL2409Mk05
1 x UNIHIKER
1 x Fermion: MEMS VOC Gas Detection Sensor
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

-*- coding: utf-8 -*-
"""
# Import the unihiker library
from unihiker import GUI

# Import the time library
import time

# Import the Board module from the pinpong.board package 
from pinpong.board import Board

# Import all modules from the pinpong.extension.unihiker package
from pinpong.extension.unihiker import *

# Initialize the board by selecting the board type and port number;
# if not specified, the program will automatically detect it
Board().begin()

# Initialize pin 21 as analog input mode
# Fermion: MEMS VOC Gas Detection Sensor
adc0 = Pin(Pin.P21, Pin.ANALOG)

# Instantiate the GUI class and create a gui object
gui = GUI()

# Display the initial background image 'DL2409Mk05p'
img = gui.draw_image(x=0, y=0, w=240, h=320, image='DL2409Mk05p.png')

# MEMS VOC
# Display the initial Fermion: MEMS VOC Gas Detection Sensor valueVOC
valueVOC = gui.draw_text(x=30, y=151, text='0', font_size=18)

while True:

    # Fermion: MEMS VOC Gas Detection Sensor
    # Read analog value
    VOCSensor = adc0.read_analog()
    valueVOC.config(text=VOCSensor)
    
    # Delay for 1 second to keep the screen content displayed for a longer time
    time.sleep(1)

——

People can contact us: https://www.donluc.com/?page_id=1927

Electronics, IoT, Teacher, Instructor, R&D and Consulting

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
DFRobot Luc.Paquin: https://edu.dfrobot.com/dashboard/makelogs
Hackster.io: https://www.hackster.io/neosteam-labs
ELECROW: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: www.tiktok.com/@luc.paquin8
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #29 – DFRobot – MEMS VOC – Mk23

——

#DonLucElectronics #DonLuc #DFRobot #VOC #SHTC3 #FireBeetle2ESP32C6 #Display #EEPROM #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

MEMS VOC

——

MEMS VOC

——

MEMS VOC

——

Fermion: MEMS Volatile Organic Compounds VOC Gas Detection Sensor

Fermion: MEMS Volatile Organic Compounds VOC Gas Sensor employs state-of-the-art microelectromechanical system (MEMS) technology, endowing the sensor with compact dimensions, low power consumption, minimal heat generation, short preheating time, and swift response recovery. The sensor can qualitatively measure VOC gas concentration and is suitable for indoor air quality detection, fresh air system, air purifier and other application scenarios. Kindly remove the protective film before usage. Gas detected: ethanol, formaldehyde, toluene, etc. Detection range: 1-500 ppm. It is advisable to preheat the module for at least 24 hours.

DL2407Mk07

1 x FireBeetle 2 ESP32-C6
1 x Fermion: MEMS VOC Gas Detection Sensor
1 x Fermion: SHTC3 Temperature and Humidity Sensor
1 x Fermion: 2.0″ 320×240 IPS TFT LCD
1 x MicroSD 2 GB
1 x GDL Line 10 CM
1 x 1 x Lithium Ion Battery – 1000mAh
1 x USB 3.1 Cable A to C

FireBeetle 2 ESP32-C6

VOC – 2
SCK – 23
MOSI – 22
MISO – 21
CS – 18
SCL – 20
SDA – 19
DC – 8
CS – 1
RST – 14
VIN – +3.3V
GND – GND

——

DL2407Mk07p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #29 - DFRobot - MEMS VOC - Mk23
29-23
DL2407Mk07p.ino
DL2407Mk07
1 x FireBeetle 2 ESP32-C6
1 x Fermion: MEMS VOC Gas Detection Sensor
1 x Fermion: SHTC3 Temperature and Humidity Sensor
1 x Fermion: 2.0" 320x240 IPS TFT LCD
1 x MicroSD 2 GB
1 x GDL Line 10 CM
1 x 1 x Lithium Ion Battery - 1000mAh
1 x USB 3.1 Cable A to C
*/

// Include the Library Code
// EEPROM Library to Read and Write EEPROM
// with Unique ID for Unit
#include "EEPROM.h"
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// Arduino
#include <Arduino.h>
// Wire
#include <Wire.h>
// SHTC3 Temperature and Humidity Sensor
#include "SHTSensor.h"
// SD Card
#include "FS.h"
#include "SD.h"
#include "SPI.h"

// MEMS VOC Gas
int iSensorVOC = 2;
int iSensorValueVOC = 0;
int x = 0;

// MicroSD Card
const int chipSelect = 18;
String zzzzzz = "";

// SHTC3 Temperature and Humidity Sensor
SHTSensor sht;
// Temperature
float T;
// Humidity
float H;

// Defined ESP32
#define TFT_DC 8
#define TFT_CS 1
#define TFT_RST 14

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 240x320
DFRobot_ST7789_240x320_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

// LED Green
int iLEDGreen = 15;

// EEPROM Unique ID Information
#define EEPROM_SIZE 64
String uid = "";

// Software Version Information
String sver = "29-23";

void loop() {

  // MEMS VOC Gas
  isVOC();
  
  // SHTC3 Temperature and Humidity Sensor
  isSHTC3();

  // DFRobot Display 240x320 - Temperature and Humidity
  isDisplayTH();

  // MicroSD Card
  isSD();

  // Delay 5 Second
  delay( 5000 );

}

getDisplay.ino

// DFRobot Display 240x320
// DFRobot Display 240x320 - UID
void isDisplayUID() {

    // DFRobot Display 240x320
    // Text Display
    // Text Wrap
    screen.setTextWrap(false);
    // Rotation
    screen.setRotation(3);
    // Fill Screen => black
    screen.fillScreen(0x0000);
    // Text Color => white
    screen.setTextColor(0xffff);
    // Font => Free Mono 9pt
    screen.setFont(&FreeMono9pt7b);
    // TextSize => 1.5
    screen.setTextSize(1.5);
    // DFRobot Display
    screen.setCursor(0, 30);
    screen.println("DFRobot Display");
    // Don Luc Electronics
    screen.setCursor(0, 60);
    screen.println("Don Luc Electronics");
    // Version
    screen.setCursor(0, 90);
    screen.println("Version");
    screen.setCursor(0, 120);
    screen.println( sver );
    // EEPROM
    screen.setCursor(0, 150);
    screen.println("EEPROM");
    screen.setCursor(0, 180);
    screen.println( uid );

}
// DFRobot Display 240x320 - Temperature and Humidity
void isDisplayTH() {
  
    // DFRobot Display 240x320
    // Text Display
    // Text Wrap
    screen.setTextWrap(false);
    // Rotation
    screen.setRotation(3);
    // Fill Screen => black
    screen.fillScreen(0x0000);
    // Text Color => white
    screen.setTextColor(0xffff);
    // Font => Free Mono 9pt
    screen.setFont(&FreeMono9pt7b);
    // TextSize => 1.5
    screen.setTextSize(1.5);
    // Don Luc Electronics
    screen.setCursor(0, 30);
    screen.println("Don Luc Electronics");
    // Version
    screen.setCursor(0, 60);
    screen.println( sver );
    // Temperature
    screen.setCursor(0, 90);
    screen.println( "Temp: " );
    screen.setCursor(60, 90);
    screen.println( T );
    screen.setCursor(125, 90);
    screen.println("Celsius");
    // Humidity
    screen.setCursor(0, 120);
    screen.println("Humi: ");
    screen.setCursor(60, 120);
    screen.println( H );
    screen.setCursor(125, 120);
    screen.println("% RH");
    // MEMS VOC Gas
    screen.setCursor(0, 150);
    screen.println( "VOC: " );
    screen.setCursor(60, 150);
    screen.println( iSensorValueVOC );
    screen.setCursor(125, 150);
    screen.println("ppm");

}

getEEPROM.ino

// EEPROM
// isUID EEPROM Unique ID
void isUID() {
  
  // Is Unit ID
  uid = "";
  for (int x = 0; x < 7; x++)
  {
    uid = uid + char(EEPROM.read(x));
  }
  
}

getSD.ino

// MicroSD Card
// MicroSD Setup
void isSetupSD() {

    // MicroSD Card
    pinMode( chipSelect , OUTPUT );
    if(!SD.begin( chipSelect )){
        ;  
        return;
    }
    
    uint8_t cardType = SD.cardType();

    // CARD NONE
    if(cardType == CARD_NONE){
        ; 
        return;
    }

    // SD Card Type
    if(cardType == CARD_MMC){
        ; 
    } else if(cardType == CARD_SD){
        ; 
    } else if(cardType == CARD_SDHC){
        ; 
    } else {
        ; 
    } 

    // Size
    uint64_t cardSize = SD.cardSize() / (1024 * 1024);
 
}
// MicroSD Card
void isSD() {

  zzzzzz = "";

  //DFR|EEPROM Unique ID|Version|
  //Temperature C|% RH|VOC|*\r
  zzzzzz = "DFR|" + uid + "|" + sver + "|"
  + String( T ) + "|" + String( H ) + "|"
  + String( iSensorValueVOC ) + "|*\r";

  // msg + 1
  char msg[zzzzzz.length() + 1];

  zzzzzz.toCharArray(msg, zzzzzz.length() + 1);

  // Append File
  appendFile(SD, "/dfrdata.txt", msg );
  
}
// List Dir
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
    
    // List Dir
    dirname;
    
    File root = fs.open(dirname);
    
    if(!root){
        return;
    }
    
    if(!root.isDirectory()){
        return;
    }

    File file = root.openNextFile();
    
    while(file){
        if(file.isDirectory()){
            file.name();
            if(levels){
                listDir(fs, file.name(), levels -1);
            }
        } else {
            file.name();
            file.size();
        }
        file = root.openNextFile();
    }
    
}
// Write File
void writeFile(fs::FS &fs, const char * path, const char * message){
    
    // Write File
    path;
    
    File file = fs.open(path, FILE_WRITE);
    
    if(!file){
        return;
    }
    
    if(file.print(message)){
        ;  
    } else {
        ;  
    }
    
    file.close();
    
}
// Append File
void appendFile(fs::FS &fs, const char * path, const char * message){
    
    // Append File
    path;
    
    File file = fs.open(path, FILE_APPEND);
    
    if(!file){
        return;
    }
    
    if(file.print(message)){
        ;  
    } else {
        ;  
    }
    
    file.close();
    
}

getSHTC3.ino

// SHTC3 Temperature and Humidity Sensor
// SHTC3
void isSHTC3(){

  // SHTC3 Temperature and Humidity Sensor
  if (sht.readSample()) {
     
     // Temperature
     T = sht.getTemperature();
     // Humidity
     H = sht.getHumidity();

  }

}

getVOC.ino

// MEMS VOC Gas
// is VOC
void isVOC(){

  // MEMS VOC Gas
  x = analogRead( iSensorVOC );
  iSensorValueVOC = map(x, 1, 4095, 1, 500);
  
}

setup.ino

// Setup
void setup()
{
  
  // Give display time to power on
  delay(100);

  // EEPROM Size
  EEPROM.begin(EEPROM_SIZE);
  
  // EEPROM Unique ID
  isUID();
  
  // Delay
  delay( 100 );

  // Wire
  Wire.begin();

  // Delay
  delay( 100 );

  // SHTC3 Temperature and Humidity Sensor
  sht.init();
  // SHT3x
  sht.setAccuracy(SHTSensor::SHT_ACCURACY_MEDIUM);

  // Delay
  delay( 100 );
  
  // DFRobot Display 240x320
  screen.begin();

  // Delay
  delay(100);

  // MicroSD Card
  isSetupSD();

  // Initialize the LED Green
  pinMode(iLEDGreen, OUTPUT);

  // iLEDGreen HIGH
  digitalWrite(iLEDGreen, HIGH );

  // DFRobot Display 240x320 - UID
  // Don Luc Electronics
  // Version
  // EEPROM
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Teacher, Instructor, E-Mentor, R&D and Consulting

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Categories
Archives