0

i want to use volte and current sensors (ZMPT101B and ACS712) on node MCU these sensors are analog but node mcu has on analog pin can i use digital D0 pin for voltage sensor?

5
  • 7
    yes, but the resolution is one bit. – dandavis Dec 16 '20 at 21:41
  • @dandavis I was about to respond with NO but yours is better. – romkey Dec 16 '20 at 21:48
  • @dandavis lol ... your comment stirred a few memory cells ... more than one bit resolution is possible ... google 1-bit ADC – jsotola Dec 17 '20 at 4:38
  • @mohamedmansour you can use one digital input if you use some external circuitry ... monitor the output of a comparator ... the two comparator inputs would be, the voltage input and an programmable reference voltage ... for example, suppose full scale is 6 V and you have an input of 4 V ... first you compare the input to 3 V and record 1 ... next compare to 3 + 1.5 V and record a 0 ... next you roll back the 1.5 V and compare to 3 + 0.75 V and record a 1 ... next compare 3 + 0.75 + 0.375 V and record a 0 ....... so far the digital data is 1010 .... you can keep going for more bits – jsotola Dec 17 '20 at 5:37
  • use an I2C ADC module. they have usualy at least 4 ADC pins. – Juraj Dec 17 '20 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.