Humirel HTG3500 series


I am looking at using the Humirel sensor HTG3515 with an ESP32 Wroom-32D, but I am not understanding how to connect it, if possible. I’ve included the pin out assignment for the sensor below. So far, I have connected it thus:
2.VCC-5V (also tried 3.3V)

I thought it would be enough to connect 3 and 4 to any ADC pin, but it seems not. Does anyone know how it should be connected?

Also, I have done the reading with mgos_adc_read_voltage(). I thought this ought to be enough, i.e. no special library?


This is hardware development, not mOS…
Vcc must be whatever your datasheet says, AND it must also cause Vout to fall within the ESP32 I/O operating conditions.
As far as I can go for free (not that I want to charge you, I just won’t do it), you need HTG35x3 which works at 3.3V. You could trick the 5V version to work by properly conditioning the output before going into the ESP32.
You have the 5V part, if you do the test with less than 50% humidity you might be lucky… otherwise use a voltage divider (two resistors).
For the temp part, the NTC pin looks like just a plain old NTC, you need a current source or if you can live with the extra non-linearities and/or correct them just a pull-up resistor of suitable value.
This datasheet has (almost ?) all info anyone with the required knowledge would need to use the part.

On the mOS side, did you initialize your I/O as an ADC pin ? The API is here


Thanks for your reply, depsite being off-topic. (I was originally asking about libraries for the sensor, but when I realised you don’t need any special library, I didn’t consider the fact that the question didn’t fit in any longer.)

Of course I had embarrassingly enough forgotten to initialise the pins as ADC, at the time of writing (although realising shortly afterwards) - but this obviously accounted for part of my problem! Thanks also for the tip about 3.3V - I think after changing the sensor and using a voltage divider and pull-up resistor, everything ought to work.