with <=1.5 Pa resolution and 1500 Pa full scale pressure
- bogde on GitHub for this nice Arduino-library: https://github.com/bogde/HX711
- circuits4you.com for the Arduino-Code to upate values on a webpage via AJAX-call: https://circuits4you.com/2018/11/20/web-server-on-esp32-how-to-update-and-display-sensor-values/
Different pressures are passed to either side of a membrane where the difference of pressures are converted into a differential force. A loadcell (frequently used in electronic scales) converts this differential force into electrical signal (differential voltage). Through means of amplification and ADC circuitry this differential voltage is converted to a digital signal which is processed by an ESP32.
Check the videos to get an idea of the assembly process. Generally speaking you would need some screws and nuts of size M3 and M4, a nitril or latex glove to use as membrane material, a 1 kg loadcell with HX711 module and an ESP32. Check the Bill of Materials (BOM) for further information. Special attention is needed to adjust the threaded bar in respect to the membrane supports (nut M4 + washer pressing the small membrane against the membrane support): after correct assembly the loadcell mustn't put any force on the membrane and vice versa! Furthermore the smaller adjustment screw mustn't squeeze the loadcell against the threaded bar - round a bit the contact surfaces and leave a tiny gap of ~0.1 mm on either side and you should be fine.
- Wire up loadcell to HX711 module. Most likely like this: + red: E+, black: E-, green: A+, white: A-
- Now HX711 module to ESP32: VCC: 5V, SCK: GPIO23, DT: GPIO22, GND: GND
- Change WiFi credential in Arduino-Code for ESP32 and flash it. Let's play!
At power up ESP32's IP shows up on serial. After a short setup-routine - mainly setting to zero, applying calibration factor - scaled values are showing up at the serial port. There's also a rudimentary user-interface in form of a webpage generated by the ESP32 that shows current values (with ~2 s update rate) and some buttons for setting to zero and starting the calibration routine. By pressing the buttons further information shows up on serial.
Given a membrane with diameter of 90 mm - minus the d 16 mm for sealing the threaded bar against ambient - and a differential pressure of 10 Pa the result is a force of ~ 6 x 10-3 N => ~ 6 g. Assuming a loadcell resolution of 1 g (~1 x 10-3 N) you can expect a overall digitized resolution of 1.5 Pa with @ a full scale range up to x1000 => 1500 Pa
In the Arduino code supplied there's a routine to get the values for calculating the calibration factor that has to be passed to the HX711 library. See also: https://github.com/bogde/HX711
- Rough calibration can be done applying known weights to the loadcell in horizontal position and do the math considering the active membrane surface: 6161 mm² (90² - 16²)*pi/4.
- Far more accurate however will be applying known pressures to the sensor - think of water columns: 1 cm H20 ~ 100 Pa.
- If used with together with a flow sensor like https://github.com/AndreasIBZ/bidir_flowsensor you should skip "known weight calibration" and use directly "known flows" instead. As pressure drop is proportional to velocity to the power of 2, calculating with a constant linear factor like used in the HX711 library isn't possible. To make the ESP32 spitting out flow values throuh the serial you have to add some calculation like y = ax² + bx + c, where x is the flow and y the pressure.
If 3D-printed achievable accuracy will vary due to varying geometry quality. Special attention has to be paid to leak testing of 3D-printed parts and the whole assembly. The membrane material is a very thin elastomer (e.g. from a nitril or latex glove) whose long-term stability is crucial for the function.
So far there hasn't been done further testing neither with the pressure sensor nor together with the mentioned bidirectional flow sensor. Thorough checking for leaks and accurate calibration has to be performed before you can expect reliable measurements with the described DIY setup. Especially long-term stability and EMC-safety has to be considered.
- sadly the webpage responds slow, i experienced time-outs. I guess it's related with the AJAX-calls, that don't arrive in time through WiFi ...
digital differential pressure sensor with high pressure span by @Andreas_IBZ (Telegram) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.