GithubHelp home page GithubHelp logo

deeemm / diy-flow-bench Goto Github PK

View Code? Open in Web Editor NEW
26.0 18.0 8.0 9.46 MB

Volumetric flow bench based on ESP32 and MAF sensor.

License: GNU General Public License v3.0

C++ 58.45% C 11.28% HTML 23.33% JavaScript 3.66% CSS 3.27%
flow-bench maf-sensor arduino measurement esp32 diy hardware controller

diy-flow-bench's Introduction

DIY-Flow-Bench

DIY Flow Bench Web Interface

GitHub forks    GitHub Repo stars    GitHub all releases    GitHub issues    GitHub contributors    Discord    GitHub

Version Information

General Version V2.0-RC.X

Download the latest official release

NOTE: This project is still in active development and is currently at Release Candidate stage. We are working towards a stable software and hardware release.

If you are interested in contributing with testing please head over to our discussion forums or Discord channel.

What is a Flow Bench?

A Flow Bench is a basic system to measure and display volumetric air flow.

It is used as a tool for measuring and quantifying modifications and improvements made to items suxh as automotive cylinder heads and carburettors by measuring the volume of air that they can flow within a set time period. By measuring the volume of air that can be passed through the item the user can determine if modifications made to the item help improve air flow characteristics.

Traditional flow benches utilise a manometer and regulate the reference pressure using calibrated flow orifices. Volumetric flow is then calculated using mathematical methods to convert the pressure drop across the testpiece into flow.

Modern flow benches use sensors to measure flow and reference pressures and then calculate flow in real time by microprocessor.

What is the DIY Flow Bench Project?

The DIY Flow Bench project (DIYFB) is a professional quality flow bench controller that produces results comparable with, and in some cases exceeding commercial grade systems.

The project comprises of two distinct aspects.

Software

The software code is developed in C++ and runs on an ESP32 microprocessor. The ESP processes sensor data and uses the results to calculate volumetric flow data, which is then displayed via web browser on any web enabled device.

Hardware

The hardware aspect of the project comprises of a PCB (commonly known as a 'shield') which connects to the ESP processor, The PCB includes environmental sensors to measure temperature, humidity and barometric pressure along with pressure sensors to measure the reference depression from the vacuum source. It also interfaces to a MAF sensor or additional differential pressure sensors. This sensor data allows the software to accurately measure and calculate volumetric flow.

The project aims to bring professional grade results to the DIYer without the price tag associated with owning a professional bench.

This repository contains the hardware schematics and software code needed to build a volumetric flow bench based on an ESP32 controller and commonly available automotive MAF sensors.

Support is included for the following systems architectures.

  • MAF based benches
  • Orifice based benches (In Development for V3 release)
  • Pitot style benches (In Development for V3 release)
  • Venturi style benches (In Development for V3 release)

The DIYFB system can be used on any flow bench and makes an ideal retrofit for older manometer based benches as well as being the perfect choice for new builds. We include DIY hardware plans so you can build a basic MAF based flow bench that uses a shop vac for the vacuum source. This is a great entry level bench and perfect for most shops and hobbyists. We also provide support for larger and more complex bench designs.

Project Goals

  • Validated software and hardware design.
  • Affordable & easy to source components.
  • Can be built & operated by a layman.
  • Generates results comparable with commercial flow bench.
  • Open source software and hardware design.
  • DIY Shield kits available to purchase.

Development Info

This branch contains the current release candidate and is based on the ESP32 port of the original project.

After unit and peer testing is concluded and all bugs are resolved, this version will become the official DIYFB V2 release.

If you use this code and have found issues or have comments relating to the release, please raise an issue in the bugtracker, comment in the support thread for the current version or hit us up at our Discord channel.

Please note that support is only provided for the current release so make sure that you are up to date and running the most current version.

Support

Documentation is provided for installation, configuration and use in the WIKI.

If you get stuck, feel free to create a discussion in the support forum, or see if anyone is available over on the Discord channel.

If you find a bug, or have a feature request, please raise an issue

License

This software is released under the GPLV3 license. For details on usage please refer to the license file included with this project

Demo

You can view an online demo of the Web UI at the followng link

https://diyflowbench.com/demo/

Further Information

diy-flow-bench's People

Contributors

deeemm avatar jwestes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diy-flow-bench's Issues

OTA Update

Add support for OTA firmware update.

Using SPIFFS / ESP partitioning it is possible to perform an 'over the air' firmware update allowing users to update firmware via the web GUI.

This massively simplifies the process of installing firmware updates making this more accessible to the end users.

OTA does however require some amount of free partition space, which will impact storage capacity for datalog files.

One solution is to add support for and SD card and move all datalog storage there.

MPX4250 Ref Pressure Scaling error

When using the MPX4250 for pressure ref pin A2 i am seeing -43 at zero volts and 1044 at 4.8 volts.

Arduino (please complete the following information):

  • Firmware Version: Release V1 Beta Release #13 · Build 20080401
  • Hardware Type Mega 2560 DFROBOT display

SD Card support

Issue #61 'OTA Update' requires that datalog storage is moved from the SPIFFS partition to an external SD card.

Adding support for an External SD card allows the possibility of OTA updates.

One caveat to SD card support is that it requires 4 I/O points. We are already at the limit of available I/O on the ESPduino. So we need to consider which features have the highest priority or look at an alternative ESP platform that provides more I/O.

ESPduino choice is not necessarily fixed at this stage as shield designs are not finalised. however it would be prudent to review processor choice with a view to future-proof the shield design.

Verify Pressure sensor types

Need to validate / verify pressure sensor choice and code for:

  • Reference pressure sensor (should use absolute pressure sensor)
  • Baro pressure sensor (requires absolute pressure sensor)

Flow value fractional part displaying zero

Describe the bug
Flow value fractional part displaying zero on LCD screen

Expected behavior
flow value displayed to 1 or 2 decimal points

Arduino (please complete the following information):

  • Firmware Version: Builld 20080603
  • Hardware Type: Mega 2560

Drop support for BMP sensor in favour of BME sensor

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Drop support for BMP sensor in favour of BME sensor

Describe alternatives you've considered
None

Additional context
BMP sensor does not support humidity.
BME sensor is more appropriate choice for project

Orifice bench support

Request from Stefan Vince via FB page to support retrofitting into orifice bench.

Add support for additional displays

Add ability to use additional displays with tcMenu library.

Specifically add additional 4 x 7 segment I2C display units for CFM and Pitot

Validation

- [x] Creation of calibration plates

  • Determine flow rates for commonly available saw blades used as orifice plates (16/25/30mm)
  • 3rd party calibration of test orifices
  • Calibration of bench to test orifice
  • Verification of correct flow rates for other test orifice sizes
  • Results obtained from more than one system

Update calibration file settings in WIKI

The calibration file settings need to be added to the configuration page in the WIKI.

Essentially the setting and a short explanation of what it does needs to be added for each setting.

For example...


SELECT BOARD TYPE

Uncomment / Comment board as required. (Default Board is Mega2560.)
#define ARDUINO_MEGA_2560
//#define ARDUINO_UNO


GENERAL SETTINGS

Minimum pressure that we consider the bench is 'operational' / 'running' / vac source is on
#define MIN_BENCH_PRESSURE 0

Flow rate in cfm below which bench is considered off
#define MIN_FLOW_RATE 3

Number of scans over which to average output (helps stabilise results)
#define CYCLIC_AVERAGE_BUFFER 5

Minimum voltage that we consider the bench is 'operational' / 'running' / vac source is on
#define MIN_MAF_MILLIVOLTS 100

LS2 MAF file is pushing memory over 8k limit

Describe the bug
Memory issue when using Analog MAF data

To Reproduce
Steps to reproduce the behavior:

  1. Memory error when trying to upload program

Expected behavior
Program should upload

Arduino (please complete the following information):

  • Firmware Version: 1.0.20080307
  • Hardware Type: Mega 2560

Additional context
Only happens when trying to compile for analog MAF sensor support.
Trying to compile for LS2 MAF

V1 Beta testing

With feature development now locked for the V1 branch, we need to move on to validation and verification.

If you want to be part of the beta-test program, please download and build the beta release and report any bugs via the issues system.

Please tag your posts with the Version 1 Project and Version 1 Release tags to help us to find them.

If you have comments relating to other bugs / enhancements / etc, for both V1 and future development, please feel free to chime in. We are happy to consider all opinions / comments / experiences / etc.

Good luck with your build and if you have any questions, feel free to post them up here labelled as a question or on the project facebook page.

BME280 Sensor fault causes blank display.

If a BME 280 is selected in the config.h for Baro, Temp or humidity sensor it will not boot up the display, it will stay blank. but if you fire up the serial monitor it will return The sensor did not respond. Please check wiring.
Using SPARKFUN_BME280

Arduino (please complete the following information):
Firmware Version: Release V1 Beta Release #13 · Build 20080401
Hardware Type Mega 2560 DFROBOT display

Additional context
Add any other context about the problem here.

Pitot bar graph display

Display pitot differential (Percentage) as a bar graph on the LCD display or alternatively external LED bar graph

This would give quick visual indication of high / low flow areas without having to view numbers on the screen.

MAF Data File configuration variables

Describe the solution you'd like

Additional variables in MAF Data files to be able to differentiate between different MAF Types

Discussion in forums - https://diyflowbench.com/forum/software/18-maf-data-file-standardisation#27

The inclusion of the following variables will allow differentiation between different sensor types when the data file is read in. It will also provide some amount of future-proofing as additional types can easily be added should it be required.

MAF Output Type

  • Voltage
  • Frequency

MAF Data Format

  • Key / Value
  • RAW Analog data

MAF Data Unit

  • mg/s
  • kg/h

Add support for additional languages

Language based strings split out into separate file (EN_Language.h)

Include call to file can easily be changed for difference languages

Also need to translate tcMenu files for full language support

Need to look at how to handle web page translations

Adjusted flow value displays zero

Describe the bug
Adjusted flow value displays zero

To Reproduce
View AFlow value on LCD

Expected behaviour
AFlow value displays scaled version of actual flow based on ref pressure.

Arduino (please complete the following information):

  • Firmware Version: Build 20080603
  • Hardware Type Mega 2560

Additional context
Add any other context about the problem here.
It's not working, but not really sure it's needed on a MAF style bench

Update calibration functions

Calibration functions currently use a two point method to determine response slope, however this only works for MAF sensors with a linear output.

It is proposed that MAF algorithms are to be hard coded such that the MAF sensors characteristics are defined by a lookup table or by mathematical means if possible.

For this reason it will only be necessary to calibrate the sensor to a single known value.

It is also proposed that a Compact Disc is used as the calibration orifice as this is a commonly available object.

Flow conversion generating large differences

Describe the bug
Issue described in bug #21 where converted flow figures seem to be abnormally different fro original value.

To Reproduce
Flow values converted by the convertMafFlowInWg() function appear to be large / different
eg 100cfm@4" = 158cfm@10"

Expected behaviour
Unsure. More info needed

Arduino (please complete the following information):

  • Firmware Version: Build 20080604
  • Hardware Type: Mega 2560

Additional context
The large difference in values may be normal. Need to validate whether results are okay.

Change MAF scaling to use lookup table

Integrate lookup table for MAF sensor within a separate file called from within calibration.h

Users can then create simple volts / flow lookup table to describe the output function of their MAF sensor.

File should be named with MAF part number to make it easy for others to identify the data.

File format should be header file with function that loads data into array.

MAF is therefore set at compile time.

Artefact after API response

Describe the bug
Artefact sent after API response - ':4992'

To Reproduce
Send API message

Expected behaviour
API response should not include artefacts

Arduino (please complete the following information):

  • Firmware Version: 1.0.20080901
  • Hardware Type Mega 2560

Additional context
Not seen in local copy

Flash main CFM display on / off to alert user of error

Error handler only displays message on small display screen, whereas user will most probably be looking at pitot or CFM displays.

Add functionality to error handler to flash CFM / Pitot displays to alert user that there is an issue

Version and build not displaying on lcd screen

Describe the bug
Version and build not displaying on lcd screen

To Reproduce
View version / build menu items

Expected behaviour
version / build to be show.

Arduino (please complete the following information):
Build 20080602

Additional context
Might be a variable type / variable typecasting issue

Max flow error check

Ref pressure check - compare actual pressure against stored max ref pressure (ie max flow).

If pressure drop is approaching stored value, then the flow is nearing limits of vac source, so display error message on screen to alert user.

Add support for RH sensor

Need to include RH measurements to allow correct conversion of Mass to Volumetric flow

Look at integration of DHT11 Sensor / Library

Humidity correction creating error in calculated result

Describe the bug
CFM reading high when baro + temp + RH correction enabled

To Reproduce
Steps to reproduce the behavior:

  1. Enable baro + temp + RH correction

Expected behavior
Results not dissimilar to those recorded with ambient settings

Arduino (please complete the following information):

  • Firmware Version: 1.0.20080307
  • Hardware Type: Mega 2560

Additional context
BME280 sensor being used

Make sure that we are reading MAF data array from lowest value to highest

MAF check is looking for first higher value in data array, however this will only work is we are reading the array from its lowest value to its highest.

This may not be an issue if MAF Data file is sorted in correct order but need to verify this is the case as if data is in high to low order the value returned will be incorrect (it will return first value)

Erratic Rotary Encoder

This could be my wiring issue.
I have the 2 x Caps 150n attached
fly lead length is about 2ft long from encoder to arduino.
Pin A = D2
Pin B = D3
Pin C= GND
switchP1 = GND
switchP2 = D5

Issue is it will only go in a down direction with counter clockwise rotation or clockwise rotation, The push button for OK is very hit and miss to function.

Validate mass > volumetric flow calc

Describe the bug
Reference pressure not included in mass > cfm calcs

Mass flow value is ABSOLUTE (unaffected by environment). Does reference pressure affect the calculation from Mass flow to Volumetric flow?

Expected behavior
CFM should be accurately calculated from Mass flow value for ALL test environments

Additional context
Currently only barometric pressure is taken into account in conversion. I suspect that reference pressure also needs to be factored into algorithm.

Example

  • 28"/wg is approximately equivalent to 1.01psi.
  • Current conversion in undertaken at atmospheric pressure with baro correction for environment (nom 14.7 psi).
  • Therefore at 28" reference pressure the reference pressure is effectively (14.7-1.01)=13.06psi.
  • This offset provides a deviation of some 20cfm at a nominal flow value of 150cfm.

Need to validate results.

Either:

  • Conversion is calculated at nominal barometric pressure and then result is offset for environment (baro + ref pressure)
  • Both baro and reference pressure offset are factored into conversion

Review ESPduino I/O

With reference to Issue #62 SD Card Support, we need to review available / spare I/O on the current ESPduino board to determine whether it has enough I/O to support all planned features. These include:

Support for Pitot / Orifice benches
Support for Fan bank control
Support for VFD Fan speed control
Support for SD Cards
Support for external measuring devices
Support for Stepper valve opener

It is possible to provide SD or additional I/O support via I2C which may negate the need for additional I/O, however this introduces additional componentry which may simply be negated by moving to a different ESP processor / breakout board.

This task therefore should aim to:

  • Capture & tally all current and future planned I/O requirements, preferably allowing spare capacity for future expansion.
  • Compare I/O requirements with ESPduino I/O availability
  • Compare I/O requirements with other ESP32 processors / breakout boards
  • Make an informed choice for processor selection

Best case

  • All features supported
  • 25% spare I/O capacity

Marginal case

  • All features supported
  • no spare capacity

Worse case

  • insufficient I/O

Potential solutions...

  • Prioritise Features
  • Reuse I/O (no need for simultaneous MAF and Orifice support)
  • Use I2C devices (Pressure / baro / I/O etc)
  • Employ expansion boards

At this stage I am confident that all features can be supported on the same shield, however processor choice and control methodology may need to change.

CFM Reads Zero on V1 Beta Release #9

Just loaded beta9 for some reason the CFM only reads zero the MAF voltage does change
with airflow. I may be doing something wrong.
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Do this '....'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Arduino (please complete the following information):

  • Firmware Version: [e.g. 1.0.20042001]
  • Hardware Type [e.g. Mega 2560]

Additional context
Add any other context about the problem here.

Shorten menu descriptions

Menu test on 2x16char D1Robot screen was hard to read as descriptions and output values overlapped. Shorted descriptions so that D1Robot screen can be used as default screen

ESP32 Serve gzipped pages

  • Check SPIFFS for index.html.gz
  • Fall back to seperate files if not present
    Optimize caching for page updates

Floating MAF voltage

MAF I/P showing 4v with no sensor disconnected.

Need to validate with sensor connected

Support for digital gauges

Add support for standard digital gauge protocol to be able to record valve lift as suggested by Edvinas Juodviršis.

  • Support standard serial gauge protocol.
  • Lift value recorded and stored with flow data
  • Lift value displayed on dashboard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.