Hi, I am hoping someone would be able to assist me getting a water pressure transducer to operate a relay for water pump with given pressure readings. Im Struggling to grasp the concept of ADC, Lambda, ect.
Im using a Nodemcu V3 lolin,
DFRobot sen0257 water pressure transducer
Accuary: 0.5% - 1% FS
And a 2 channel 5V relay. (only using one channel for now)
So as it stands and fighting with this for a while, I have the pressure transducer signal pin connected via a 2k trim pot voltage divider dropping 4.5V to 3.3V for the A0 pin on the node dev board
The sensor is getting a signal on the ADC between 0-1V and the sensor state is showing between 0-4.5V it seems in the log.
This how ever is probably not accurate and have gotten to the point. where im actually now not to bothered with calibrating correctly or converting the Voltage into mBar and PSI readings.
I need to get this working one way or another quite urgently. I have tried a few options in the ESPhome using on_range_value and the switch.toggle ect, but just dont seem to be coming right with getting the switch to automate.
For now i would be grateful if i could just get the switch to operate by sensor voltage level and calibrate the automation to the voltage provided with a external pressure gauge. If anyone is able to point me in the right direction, or offer assistance it would be a huge help. Thank you
I Didnt want to be hijacking gregs thread where this was starting to go a different way to his project,I Got a bit further but still having issue getting the switch to automate
Sorry yes, i did change pins around since doing the schematic, the code is working now, I had to invert the switch, it was kicking on, but actually keeping the relay off. this is working,
For now it does what i need, will look into calibrating it precisely and converting to bar or psi at a later stage. I just needed it to operate for now at set pressures.According to the pressure gauge it is a bit off, i get 0-0.94V on the adc at about 0-120psi. where ideally it probably should be 0-232psi in the 0-1v range. But as im only going to about 100psi max mostly 60-80 psi. its should still be ok for now. Thanks
Yes, I Did originally test with 4.5V and trimmed it down to 3.3V i will have to double check it again as it was with a CV Buck converter i was testing with