user78037: On an ESP8266 I try to analogRead(A0) my soil moisture sensor using a voltage divider but I get unexpected low values.
The MT3608 increases the esp's output voltage from 3.3V to 5.5V which is the recommended voltage for my capacitive soil moisture sensor v1.2 (different to the picture below I use v1.2, not v1.0). When there is no voltage divider in the game and the sensor is dry, the sensor outputs ~4.5V (yellow wire). The output is around ~2.3V when the sensor is completely wet.
For my voltage divider I use a 150 Ohm (R1) and a 39 Ohm (R2) resistor. Given ~4.5V Vin on the yellow wire this should provide me with ~0.9V Vout on the green wire, because Vout=Vin*(R2/(R1+R2)). A voltage <=1V I could safely attach to the esp8266 A0 analog pin. However, using the voltage devider I measure only 8,3mV instead of the expected 0.9V! It drops to 7.7mV when Vin is 2.3V (wet sensor).

What am I doing wrong? Any advise is highly appreciated!
For testing I currently use a board which has a build-in internal voltage divider that allows for up to 3.3V input, however in the final design I need to run everything using an ESP12-E without such an internal divider.

user77887: When designing a voltage divider with 2 resistors, there are 2 things to consider:

The ratio between R1 and R2, which gives the output voltage: U(out) = U(in) * [R2 / (R1 + R2)]
The magnitude of each resistors: to get a 1/2 ratio, you need to have R1 = R2 no matter their value. But depending the value of your resistors (it can be 10Ω, 1kΩ, 100kΩ or 10MΩ for example), you will have a different current travelling through the bridge. The higher the resistors, the lower the current, and vice-versa.

When mesuring voltage inside the voltage divider, the ADC can be considered as a load to the circuit (as shown below). Some forums state that the input resistor of the ESP8266 ADC is around 20MΩ. If the resistors of the bridge are too low, the current will be high and will only travel through the bridge, leaving not enough current for the ADC to measure (electrons are lazy and always take the path of least resistance). On the other hand, if the resistors are too high, the current will be to low to be accurately detected as well.

In most cases, voltage dividers are build with resistors between 10kΩ and 1MΩ. This allows enough current to travel through the ADC to give an accurate measure of the voltage.
As suggested by dandavis comment, choosing (R1 ; R2) = (15kΩ ; 3,9kΩ) or (150kΩ ; 39kΩ) should work in your circuit.

78037: <p>On an ESP8266 I try to analogRead(A0) my soil moisture sensor using a voltage divider but I get unexpected low values.</p>
<p>The MT3608 increases the esp's output voltage from 3.3V to 5.5V which is the recommended voltage for my capacitive soil moisture sensor v1.2 (different to the picture below I use v1.2, not v1.0). When there is no voltage divider in the game and the sensor is dry, the sensor outputs ~4.5V (yellow wire). The output is around ~2.3V when the sensor is completely wet.</p>
<p>For my voltage divider I use a 150 Ohm (R1) and a 39 Ohm (R2) resistor. Given ~4.5V Vin on the yellow wire this should provide me with ~0.9V Vout on the green wire, because Vout=Vin*(R2/(R1+R2)). A voltage &lt;=1V I could safely attach to the esp8266 A0 analog pin. However, using the voltage devider I measure only 8,3<strong>mV</strong> instead of the expected 0.9<strong>V</strong>! It drops to 7.7mV when Vin is 2.3V (wet sensor).</p>
<p><a href="https://i.stack.imgur.com/Sd95M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sd95M.png" alt="enter image description here" /></a></p>
<p>What am I doing wrong? Any advise is highly appreciated!</p>
<p>For testing I currently use a board which has a build-in internal voltage divider that allows for up to 3.3V input, however in the final design I need to run everything using an ESP12-E without such an internal divider.</p>
 77887: <p>When designing a voltage divider with 2 resistors, there are 2 things to consider:</p>
<ul>
<li>The ratio between R1 and R2, which gives the output voltage: U(out) = U(in) * [R2 / (R1 + R2)]</li>
<li>The magnitude of each resistors: to get a 1/2 ratio, you need to have R1 = R2 no matter their value. But depending the value of your resistors (it can be 10Ω, 1kΩ, 100kΩ or 10MΩ for example), you will have a different current travelling through the bridge. The higher the resistors, the lower the current, and vice-versa.</li>
</ul>
<p>When mesuring voltage inside the voltage divider, the ADC can be considered as a load to the circuit (as shown below). Some forums state that the input resistor of the ESP8266 ADC is around 20MΩ. If the resistors of the bridge are too low, the current will be high and will only travel through the bridge, leaving not enough current for the ADC to measure (electrons are lazy and always take the path of least resistance). On the other hand, if the resistors are too high, the current will be to low to be accurately detected as well.</p>
<p><a href="https://i.stack.imgur.com/7Jv9C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Jv9C.png" alt="Voltage divider with load" /></a></p>
<p>In most cases, voltage dividers are build with resistors between 10kΩ and 1MΩ. This allows enough current to travel through the ADC to give an accurate measure of the voltage.</p>
<p>As suggested by dandavis comment, choosing (R1 ; R2) = (15kΩ ; 3,9kΩ) or (150kΩ ; 39kΩ) should work in your circuit.</p>
