Skip to the content
PCBKitNew board
2 layers34.2 × 73.3 mmSchematics v2, the printed circuit board in 3D

A web-usb enabled application running on ESP32S2 supporting displaying sensor data on a Waveshare e-paper display / sending sensor data to the cloud

Size
34.2 × 73.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
3
Nets
6
Pads
48
Tracks, vias
15, 0
Pours
1
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
19 Apr 2021
Updated
22 Oct 2022

Overview

Schematics v2 is an open-source printed circuit board by xtrinch, from the xtrinch/esp32s2-bme280-webusb repository on GitHub. It is a 2-layer board of 34.2 × 73.3 mm with 3 parts on 6 nets, routed with 15 tracks and 0 vias.

It belongs with the lEDs and displays and sensors and measurement boards and the ESP32 boards of this library.

README

README.md

esp32s2-bme280-webusb

Sends periodic bme280 humidity, temperature, pressure and battery voltage data from esp32s2 development board to sensor dashboard backend via Wi-Fi.

Is configurable via a web interface using webusb. Since the board uses native usb communication, the serial output will also be emulated via USB so it may not work as you would expect a regular serial connection - if it's configured wrongly, there will be no output in your serial monitor. If the board sleeps, when you connect it to USB, you will not be able to flash it. Board needs to be wide awake and listening to USB commands for flashing to work. When the board is connected to the computer - the neopixel of the esp32s2 will light up and the display should display PC instead of the usual measurements.

If you botch the code and manage to put it to sleep when on USB, boot the board into bootloader mode by holding the button BUT1 on the board when connecting to USB, then you will be able to flash via USB again.

Currently, this firmware can make it around 7 months on a 1200mA battery connected to the dev board. The board can be configured to send the measurements to the server once every N times via the parameter maxRtcRecords to optimize battery time.

Built with PlatformIO.

See also backend and frontend repo, or see it live with some sensor data from my living room.

Components

Additional things needed to assemble the PCB

  • PH2.0 8 pin connectors for the display (bent needle for the PCB)
  • min 2, max 4 2.0mm high spacers to mount the display above the ESP32S2, depending on how many sides of the display you want to fixate
  • PH2.0 2pin connector for the battery (if the battery doesn't already come with one)
  • bunch of male / female headers
  • 1x push button - right angled for RESET button
  • 1x push button - regular for BOOT button

Setup

  1. Have a sensor dashboard backend running (see https://github.com/xtrinch/sensor-dashboard-nestjs-backend) or use iotfreezer.
  2. remove the solder from LED1_ENABLE SMD jumper (i.e. open it) on the ESP32S2, because it consumes a large current
  3. solder the BAT_SENS and PWR_SENS jumpers on the ESP32S2, to be able to detect battery voltage levels
  4. Uncomment the part in main.cpp that routes VREF to a GPIO on the ESP32S2. Program the board, measure VREF and input it into import_env.py under REF_VOLTAGE (if it's e.g. 1.1, input 1100). This will be needed for accurate battery measurement and you cannot skip this step.
  5. Copy import_env.example.py to import_env.py and define your sensor dashboard url.
  6. Run pio run -t buildfs && pio run -t uploadfs to upload the icons the display uses for humidity/temperature
  7. While having your board plugged into the computer, reboot the board and configure it via the web interface (via webusb) of the sensor dashboard (iotfreezer).

Troubleshooting

If you cannot upload to your board on linux, input sudo chmod a+rw /dev/ttyUSB0.

To monitor across reboots, as uploading and monitoring does not work, use the following command on Linux: while [ true ]; do cat /dev/ttyACM0; done

To check out the usb descriptors, run lsusb -v. To check out the kernel logs for errors, run dmesg.

Convert icons

convert temperature-2-48.png -background white -alpha remove -alpha off -compress none -depth 24 -resize 48x48 temp-final.bmp

Production deploy

Make sure to turn off DEBUG to save power.

PCB

See schematics-w-display folder for full project. It was drawn in KiCad and it's a two sided PCB.

Image of Yaktocat

End product with casing

Casing is parametric and drawn in FreeCad 0.19. It is made to fit the above PCB. For FreeCad project, see casing-w-display folder.

Image of Yaktocat Image of Yaktocat

TODOs

  • use ULP to use power pin as ADC wakeup source
  • reference ADC voltage to parametrizable params?

Parts

3
QtyValueFootprintReferences
2Conn_01x21_FemaleConnector_PinHeader_2.54mm:PinHeader_1x21_P2.54mm_VerticalJ1, J3
1Conn_01x06_FemaleConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ2

Questions

How big is the Schematics v2 PCB?

It measures 34.2 × 73.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Schematics v2 use?

3 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Schematics v2 KiCad files?

From the xtrinch/esp32s2-bme280-webusb repository on GitHub, at the commit this page was made from: the board is schematics-v2/schematic.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Schematics v2 design in my own project?

Its repository states no licence, so its author keeps all rights: ask xtrinch before reusing the design.

More from xtrinch/esp32s2-bme280-webusb

1
  • 2 layers59.8 × 61.5 mmSchematics w display, the printed circuit board in 3D

    Schematics w display

    xtrinch/esp32s2-bme280-webusb

    A web-usb enabled application running on ESP32S2 supporting displaying sensor data on a Waveshare e-paper display / sending sensor data to the cloud

    11 parts4

Similar boards

  • 2 layers40 × 30 mmBlinky, the printed circuit board in 3D

    Blinky

    earthtojake/text-to-cad

    Design physical products with AI

    3 parts26kMIT
  • 2 layers51.9 × 16 mmPassive2-rpi non standard adapter, the printed circuit board in 3D

    Passive2-rpi non standard adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    3 parts4.4kGPL-2.0
  • 2 layers16.3 × 16.3 mmSensor, the printed circuit board in 3D

    Sensor

    scottbez1/splitflap

    DIY split-flap display

    3 parts4.2k
  • 2 layersSub, the printed circuit board in 3D

    Sub

    atopile/atopile

    Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️

    3 parts4kMIT
  • 2 layers85 × 30 mmDual stomp, the printed circuit board in 3D

    Dual stomp

    torvalds/GuitarPedal

    Linus learns analog circuits

    3 parts2.5kGPL-2.0
  • 2 layers124.5 × 33.7 mm172319-1 connector, the printed circuit board in 3D

    172319-1 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    3 parts1.2k
  • 2 layers10.5 × 83 mmProgrammingAdapter, the printed circuit board in 3D

    ProgrammingAdapter

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    3 parts1.1k
  • 2 layers21.2 × 51.3 mmPico reset, the printed circuit board in 3D

    Pico reset

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    3 parts1.1kMIT