ADC Pins Outputting Voltage?



  • I was trying out the ADC on my Lopy (v1.0) with a DC voltage supply just to get acquainted with the attenuation features. At 1 volt on Pin 19 (G6) the ADC was reading 4095 at attenuation levels 0, 1, and 2 and it hovers in the mid-3000s on attn=3. After breaking out the multimeter I found the pin I was using had a voltage of 3V. Can anyone explain this? Is there any way I can I turn it off?



  • @robert-hh Sorry, I misunderstood. I didn't take the pin's voltage with the 1V connected, however I took the voltages of other pins without anything connected. I think the input-only pins were fine, as was pin 20 (and a few others) but some GPIO pins were outputting between 1-3 volts.



  • @cryog0at No, that was not my questions. I was wondering what you see as the output of the voltage source, either connected to the LoPy or just open, when you set it to 1V.
    You might also try another pin, like P13, which is input only.



  • @robert-hh No, the 3v I was reading was coming directly from the pin, no voltage connected



  • @cryog0at So with the voltage source set to 1V and connected to both GND and P19, you see a value of 3V taken with a multimeter between P19 and GND? What reading do you get at the output of the voltage source when you do not connect is to anything but the multimeter?



  • @robert-hh I connected the power source to pin 19 just for reading and I connected the ground from the power source to the ground from the lopy. I'm also using the expansion board which I forgot to mention and am powering the board from a cell phone charger.

    Pull up resistors make sense but are they adjustable? Like can I turn them off if not needed? I haven't found any documentation about this



  • @cryog0at DC power supply have typically a low output impedance. If you connect that, set at 1V, to P19, the ESP32 can hardly push that up to 3V. Unless a PIN is set to output. there may be only pull-up resistors of 10k-30kOhm. So all of that seems strange. I did trials with the ADC, connecting it to a DC power source, and everything worked a expected.
    Just not to forget the simple question, and sorry if that's not obvious: did you connect both P19 and GND to the DC power source?



  • @robert-hh My school has DC power supplies that let you adjust voltage and current. But even while not applying the voltage the pin was giving 3V.



  • @cryog0at How did you apply the 1V?


 

Pycom on Twitter