General

Conversion formula for 8266 and SEN0219

userHead Account cancelled 2021-03-27 01:48:24 3167 Views1 Replies
The 8266 has an ADC with an input voltage range of 1V. So 1V=1024. The input on the A0 pin is divided down so that 3.3V on A0 maps to 1V on the ADC. The SEN0219 has a valid output range of .4V to 2V which get divided down to .13V to .667V. For a scale of 1V = 1024 steps. that's 133 to 683 steps. So 0ppm corresponds to 133 and 5000ppm to 683. The conversion therefore is (analogRead(adcPin)-133)/(683-133)

CO2 in ppm = (A0 - 133)/550