TJHXPCB
Published © CC BY

Rigid-Flex PCB: IoT Sensor Node Design to Assembly

How we designed and assembled a rigid-flex PCB for a cylindrical IoT sensor node — stackup, DFM, and turnkey PCBA in Tianjin, China.

AdvancedFull instructions providedOver 1 day7
Rigid-Flex PCB: IoT Sensor Node Design to Assembly

Things used in this project

Story

Read more

Schematics

connect

Code

code

C/C++
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME680.h>

// ====================  ====================
// ESP32-S3  I2C 
#define I2C_SDA  8
#define I2C_SCL  9

//  hPa
#define SEALEVELPRESSURE_HPA (1013.25)

// I2C
Adafruit_BME680 bme;

void setup() {
  Serial.begin(115200);
  delay(1000);

  Serial.println("ESP32-S3 + BME688 ");
  Serial.println("=====================================");

  //  I2C
  Wire.begin(I2C_SDA, I2C_SCL);

  //  BME688 
  if (!bme.begin()) {
    Serial.println("  BME688 ");
    Serial.println("    I2C 0x76  0x77");
    while (1) delay(10);  // 
  }

  Serial.println(" BME688 ");

  // 
  bme.setTemperatureOversampling(BME680_OS_8X);   // 
  bme.setHumidityOversampling(BME680_OS_2X);      // 
  bme.setPressureOversampling(BME680_OS_4X);      // 
  bme.setIIRFilterSize(BME680_FILTER_SIZE_3);     // 
  bme.setGasHeater(320, 150);                     // 320C  150msBME688 
}

void loop() {
  // 
  if (!bme.performReading()) {
    Serial.println("  BME688 ");
    delay(2000);
    return;
  }

  // 
  Serial.println("\n--- BME688  ---");
  Serial.printf("       : %.2f C\n", bme.temperature);
  Serial.printf("      : %.2f %%\n", bme.humidity);
  Serial.printf("      : %.2f hPa\n", bme.pressure / 100.0);
  Serial.printf("  : %.2f K\n", bme.gas_resistance / 1000.0);
  Serial.printf("   : %.1f m\n", bme.readAltitude(SEALEVELPRESSURE_HPA));

  delay(3000);   //  3 
}

Credits

TJHXPCB
2 projects • 0 followers
PCB design and assembly manufacturer based in Tianjin, China. One-stop services: PCB assembly, electronic enclosure,, motor controllers.

Comments