1. Do I select analog or digital input if the transducer is running through ESP32 analog to digital converter pin (ADC)?

2. What is the best approach to performing the pressure / voltage calculation in BruControl? I have this calibrated in a sketch on the arduino for testing but not sure how to integrate into Brucontrol given its calculation. Is this a case to create a script in BruControl in order to perform the calculation (see below)?

**Some additional context: **

- Transducer is a 5v sensor; however, the ADC can only read 0-3.3V. I setup a voltage divider which enables 5v input into the transducer and 3.3v output into the ADC pin at max PSI. (e.g. 100PSI = 3.3v). Also calculated respective min/max voltage proportions @ 3.3v values (given the transducer documentation provided min/max values for 0-5v ADC pins)

- Based on the input voltage, the following calculation needs to occur:

**Equation: **

pressureValue = ((pressureValue1-pressureZero)*pressuretransducermaxPSI)/(pressureMax-pressureZero); //conversion equation to convert analog reading to psi

**Variables for equation above: ***const int pressureZero = 360;* //analog reading of pressure transducer at 0psi -- this is 360/4096 counts; therefore, ~0.09V at 0PSI*const int pressureMax = 4096;* //analog reading of pressure transducer at 100psi -- therefore 4096/4096 = 3.3v and 100PSI*const int pressuretransducermaxPSI = 100;* //psi value of transducer being used - 0-100PSI*float pressureValue1 = 0;* // used for Arduino analogRead

Thanks!

]]>

This is good to know too. Some members of my local homebrew club are moving to automation for brewing and/or fermentation, so I've been talking up Brucontrol over the Pi-based systems. This future feature will be good for me to share with them as well.

]]>