Remember that ESP32 analogue inputs top out at 3.3V. Reading the specs of that sensor, if the value goes above 60 PSI you will probably need to have a voltage divider.
If the PSI goes above 50 PSI… it will go BOOM! I have personally done this and thankfully was not standing next to it. Sadly this injures or kills several people every year.
I didnt think the early models of ethernet esp32 had an ADC pin and it after looking at this board, it doesnt look like it does either. That sensor is an analog sensor, as the pressure increases or decreases the sensor outputs a proportional voltage change and that is read fron an ADC input that board doesnt appear to have.
It looks like the Olimex esp32 poe boards not only have a few ADC pins but they have several gpios, wifi,BT, a micro usb for programming it as well as other things. It looks like the m5stack esp32 poe they just made it really small by gutting it of everything useful and then put it in a pretty case with silk screen graphics…
Damn… really wish you answered me earlier. Ordered the M5 stack… which only has digital input? Going forward what are the analog input pin normally called?
I am in the US… looks like I can get this from Digikey, but the case is not available. Does everyone just make their case?
The documentation on the m5stack is extremely thin and not very detailed like other spec sheets so, I wont 100% promose theres no ADC on it but, I couldnt find any mention of it having any and i checked multiple sources to see if they had better info. The internet is so lazy. Someone puts out a less than desirable data sheet and everyone just copies it instead of making it useful to someone.
If you look at the Olimex (or any component) and look for their documentation, you will find one that is “gpio pinout” its lke the road map for the board. Pinouts are very important! You should have a copy, bookmark, etc for any boards you use. This is how you know the capabilities and which pins are usable, not usable, or usable but in a limited capacity, like if a gpio has an internal pull-up resistor that is always ON or a gpio that is tied to the boot sequence and it wont boot if you wire something to it and pull it down because, it needs to be high inorder to boot up. This stuff happens to people all the time because they dont check their pinout sheer.
Im in the US too, IN. Unfortunately, I dont know any good sources for these. Ive actually never even used one of these poe esp32’s. If you look at the pinout picture, youll see the different colored boxes with labels coming from each gpio. Each of those gpio are capable of being used for multiple roles. The ones that have ADC1_CH0, ADC1_CH1, etc, etc. Those are your ADC pins so, ADC(analog to digital converter), its #1 on Channel 1 or its ADC2 on channel 2 and so on.
I cant speak for everyone else, some do, some dont, some hot glue their whole breadboard with esp and all straight to their drywall! Ive seen it!
Idk if you noticed but, this board comes in like 5 or 6 variations. Some are bigger or shorter, some have different ethernet speed capabilities, memory differences, and have different features like the SD card capabilities or Li ion battery monitoring and charging, one of them has a connector for a longer and external wifi antena which yould absolutely need if you needed the wifi/BT and install it in a metal box, youd need an external antenna and theres a bunch of other differences you might want to look through.
Feel free to ask around or do your own due diligence on the M5stack too, you’re not going to hurt my feelings if I was mistaken. Its your time, your money, your project so do whatever you gotta do. I just dont see ADC or the mention of it… It doesnt have half the features of an Olimex but, that is a really nice case for it.
One more thing. I noticed these “user warnings/notifications” about do’s and dont’s as far as like plugging a cat5 cable between esp32 and a pc that is powered by AC mains and not POE powered. There were several of these, I would just strongly suggest reading over it if you want to avoid releasing the magic smoke from within. Also, you know you’re going to need a voltage divider as well right? You can simply make one if you have an assortment of resistors and some pcb protoboard.
Nice! I had considered an i2c ADC expander like was suggested but I wasnt 100% sure based on the slim data sheet if it had that capability either. Gpio, ADC, PWM etc, expanders are very helpful and useful in some circumstances but, I wouldnt go this way if it were me. The M5stack just wasnt the right board to start with and you would have been jumping through hoops to use it for anything else in the future or if you just wanted to add some simple sensors to your pool filter project.
The Olimex looks to be far better than the m5stack anyway. You were giving up a lot of functionality just for that case. It was a nice case but, not worth what you would’ve lost and the additional problems that came with it.
I was worried about this, my self and I just installed one on my well, same sensor to a ESP32, all I ended up doing was feeding the sensor 3.3V and its happy with that and thus will never exceed the 3.3V.
If you just put 40 and 60 psi does it understand what below 40 and above 60 is? If you have zero pressure, does the sensor show 0 PSI? I assumed you need a full range defined…
sorry for the delayed response, but yes, it see’s below 40, its just not as accurate. using the calibrate_linear it helps correct it. If I wanted I could add more “defined” points in there. I could add a third point of
1.30 → 35.0
and it will start to adjust the scaling even more. ( I dont think there is a limit to the defined points)