Automation HAT Analogue In spurious reading

The analogue channel frequently (approx 10% of the time) gives incorrect readings, often 4.37, or 0.03. I’ve wired to the HAT 3.3V and 5V sources as well as a 1.5V battery. I’ve also tried tieing unused channels to ground, and confirmed similar behaviour on all channels. Attached screenshot shows very simple code which reads and prints every 2 seconds with the inut tied to the Pi’s 5V. The white LED also blinks despite constant voltage. Please help.

The Pinout is here,

If your not plugging it directly onto the Pi’s GPIO, make sure you have all the grounds connected. At least all the ones with a black marker in the pinout I posted.

Thanks for reply. To be clear the hat is directly connected to gpio. The behaviour occurs even if the signal is directly wired to the pi. I found a similar post but there was no reply. One thing to note is that the white led occassionally blinks off even when connected to steady 5v so I suspect this is electrical not software.

Ok, I wasn’t quit sure how you had it hooked up. Missing a ground connection can cause weird things to happen if you had been using jumpers etc.

I have one of the smaller automation pHAT’s and just ran the same code. Input is 100% steady, so I suspect it could be a faulty HAT. I attach a similar post from Mar 26 from CasaJizoh which is the same problem. I f I don’t get a response to this post I will contact customer support directly

On the main Shop page, there is a contact us link at the bottom. Click that and you can e-mail tech support directly. I’d also put a link to this thread in the e-mail. That should speed things up and get somebody from Pimoroni to post back here.