Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

134 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Multi-Ferro-DAQ

Measurement setup to analyze up to eight charge sources (e.g. ferroelectric sensors) simultaneously.

The system connects up to 8 channels via two RJ45 connectors (4 sources per connector).
The PCB is designed for mobile use β€” it can be strapped to a test person, runs on battery power, and transmits data in millivolts (mV) via WiFi at up to 2000 samples per second.

The ESP32 microcontrollers on the PCB should be flashed with the Arduino script located at:
/Software/ADC_readout/ardu_adc_dual_core_wifi_tcp/ardu_adc_dual_core_wifi_tcp.ino


⚑ Flashing

The ESP32 microcontroller can be flashed with the Arduiono IDE, using the .ino script mentioned above. Make sure you have the necessary libraries installed as well as the /Software/ADC_readout/lib/ directory.

Select an ESP32-S3 board without SRAM and make shure that Events and Arduino run on Core 0.

Tools

If you do an initial flashing of the board or encounter some issues during upload try to restart the ESP32 into programming mode by pressing and holding the "BOOT" button while shortly pressing the "RESET" button. Afterwards the ESP32 will be detected automatically as a target or can be selected as an "ESP32 Family Device" under the port/device selection.

Use this programming-mode procedure only after a compile/ upload process for an ESP32-S3 without SRAM was started, as the IDE otherwise tries and fails to build for an "ESP32 Family Device".

The Arduino script is tested to be working with the MATLAB script /Software/ADC_readout/Matlab/ADC_WiFi_readout_TCP.m using MATLAB R2024b.


🧩 Setup

1. Power On

  • Flip the power switch to ON or reset the powered on PCB.
  • During startup, the status LED turns YELLOW, indicating the setup phase.

2. Ready State

  • When the LED turns MAGENTA, the ESP32 is ready to start a measurement.
  • A white flash under the shielding of the charge amplifiers and ADC indicates that the ADC is set up and communicating.

3. WiFi Connection

Connect to the ESP32’s WiFi hotspot:

  • SSID: ESP32_Hotspot
  • Password: 123456789

Then connect to IP Adress 192.168.4.1 under TCP port 8080 to communicate. (see this Matlab script for more details)

4. Initialization

The ESP32 expects initialization values in a hardcoded format and order.
Garbage bytes can be sent to initialize with the ADCs own default values.

Data Type Count Description
int64 1 Maximum number of samples to collect (PCB resets afterward).
uint32 1 ADC sample rate β€” choose from: 1000, 2000, 4000, 8000, 16000, 32000, 64000.
Rates above 2000 cause sample loss and are not recommended.
uint16 8 ADC settings registers for CHAN1–CHAN8.
Only the lower byte is used; set the upper byte to zero.
uint8 8 Preamp values for CHAN1–CHAN8.
These overwrite previously set register values. The preamp value is factored out by the microcontroller before data transmission.

5. Start Measurement

Once initialized, the status LED turns GREEN and remains green until:

  • The measurement times out, or
  • It is stopped manually.

πŸ”‹ Power Supply

  • The PCB can be powered via USB-C or battery port.
  • The battery can be charged directly by the PCB.

Battery indicator LED behavior:

  • Solid RED: Battery is charging.
  • Fast blinking RED (while powered on): No battery detected.

πŸ“‘ Usage

After setup, the microcontroller begins sending data via TCP packets to the client until:

  • The measurement times out, or
  • It is stopped by being sent any byte via TCP by the recieving client.

Data Output Format

The TCP stream contains segments of nine floats per sample:

Channel Description
CHAN1–CHAN8 ADC values in mV (–2500 mV to +2500 mV)
CHAN9 Timestamp (in ΞΌs) since the last ESP32 reset

Fault Flags:

  • A value of –9999 mV or +9999 mV indicates that the ADC’s negative or positive fault flag was triggered.
    This occurs when the measured value exceeds Β±2375 mV (β‰ˆ95% of input range).

πŸ“‘ Usage with MultiMeasurementMonitor

The DAQ can also be used as a Client for the MMM (MultiMeasurementMonitor) Project with this firmware.

The available settings etc. will not change, but the benefits of the MMM are available to the user. Please note that the ClientName is set via the JSON upon programming and the WiFi credential can be altered via the SerialMonitor upon startup.

For furhter details on using Clients with the MMM, visit the MMM Project on Github.

Client Tab


πŸ” Post-Measurement

  • After a measurement ends, the PCB automatically reinitializes.
  • It is ready again when the status LED turns MAGENTA.
  • The PCB can also be reinitialized manually by pressing the RESET button.

🧭 Additional Features

  • An IMU is included on the PCB.
    Although tested, it is not used in the current firmware version running on the ESP32.

About

Measurement Setup to analyze multiple ferroelectric sensors simultaneously

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /