• I just checked this (more or less) and it works for me - I changed your code to use the LCD in the 'hello world' LCD position, and used A4 (with 3.3v on it). I also stripped out the LCD code and just printed to the console and used A5 (also with 3.3v on it), and both work.

    What happens if you disconnect your voltage divider and connect the 3.3v pin in Espruino directly to A5? That should ensure that you have over 2.9v on A5, while not running the risk that you're over-volting it?

    Depending what you're connecting to, it's possible that you're actually measuring something with an AC component? If so the volt meter may well read less than the actual peak voltage.

  • What happens if you disconnect your voltage divider and connect the 3.3v pin in Espruino directly to A5? That should ensure that you have over 2.9v on A5, while not running the risk that you're over-volting it?

    This works fine :/ and now that you ask, I remember this was actually the first test I ran (i.e a wire straight from 3.3 -> A5, as a quick way to see what analogRead(...) gave).

    Depending what you're connecting to, it's possible that you're actually measuring something with an AC component? If so the volt meter may well read less than the actual peak voltage.

    I think you're probably right and you've given me a couple of good things to try out.

    I'm trying to switch a couple of devices based on the voltage in a 24V (nominally 24, in the real world 22-32V) offgrid solar system - to try to do that I'm currently testing with a cheapie Lab PSU in that range (I'm pretty sure the DC signal on this is ok) and supplying power to the Pico through a regulated buck converter circuit (this looks identical to the one using http://www.ebay.com.au/itm/181409861491) set to 5V and supplying the 5V via the USB plug. When I actually tested I was very slowly ramping up volts on the PSU (started at about 7V).

    All GNDs are common.

    I suspect if there's an AC signal getting in it might be the switching noise from the buck converter regulator.

    I'll see if I can get some time with an Oscilloscope to see if I can find any fluctuations that shouldn't be there.

    Cheers,
    Dave

    edit: many many typos.

About

Avatar for Gordon @Gordon started