Re: Analogue input Nodemcu
Posted: Thu Feb 07, 2019 5:53 pm
Because the NodeMCU already has a divider it is best not to use an external divider if you want to increase the division ratio above the supplied 3.2 This just makes the calculation more complicated and increases the battery drain.
Instead just include an extra series resistance between the battery voltage and the analog input. This is simpler and minimises battery drain.
You start with
Board Input ----220K ---- ADC ---- 100K ----0V
So include an extra 100 or 120K in series between the battery and the input
Battery --- 100K --- Board Input ---- 220K ---- ADC --- 100K ---0V
Now the divider is 4.2:1 which should be OK for most LIPOs
If you used 120K extra
Battery --- 120K --- Board Input ---- 220K ---- ADC --- 100K ---0V
the divider would be 4.4:1 which would give a bit more headroom.
Instead just include an extra series resistance between the battery voltage and the analog input. This is simpler and minimises battery drain.
You start with
Board Input ----220K ---- ADC ---- 100K ----0V
So include an extra 100 or 120K in series between the battery and the input
Battery --- 100K --- Board Input ---- 220K ---- ADC --- 100K ---0V
Now the divider is 4.2:1 which should be OK for most LIPOs
If you used 120K extra
Battery --- 120K --- Board Input ---- 220K ---- ADC --- 100K ---0V
the divider would be 4.4:1 which would give a bit more headroom.