I want to use a NodeMCU together with 4 analog sensors which report readings between 1.4V and 4.8V. I want to use an ADS1115 to connect all 4 sensors via I2C to the NodeMCU.
And can someone tell me how to wire it correctly? I am not sure how/where to connect the 5V power supply from the NodeMCU VIN pin and how to connect the HV pin from the logic level shifter.
If you can run the A/D at 3V3 and use a resistor divider to get the voltage to the range of the analog input. You can use the MAP function to adjust your range. If you want more accuracy you can add some external electronics to offset the output voltage you are measuring.
Do you mean any voltage between 1.4V and 4.8V depending on the object in front of the sensor, or did you mean either 1.4V or 4.8V depending on whether an object is in front of the sensor or not?
No, I'm sorry. This is just a placeholder in the graphics, as I didn't have the fritzing part of the actual sensor at hand. I had it once, but didn't find it again, so I just used some 3 pin sensor.
In reality I am using the capacitive soil moisture sensor which reports 1.4V when completely under water and 4.8 when completely dry.
I had measured the sensor when powered at 3.3V, and it does not provide any meaningful readings.
Sorry should have mentioned that in the first post.
I have now completed the circuit as adviced by jim-p, and everything works now. I get good readings for all 4 sensors on the NodeMCU.