Pimoroni Automation HAT for Raspberry Pi Lights stay on


#1

I had some free time last weekend and setup my Pimoroni Automation HAT for Raspberry

It was working great this morning and I placed it into the final enclosure. I had it wired as described in the forum to a 12v power source and a 12v pump. After some time the relays started switching erratically. I did a safe reboot of the raspberry pi and when it came back online all of the lights came on the Automation Hat came on and stayed on.

All the lights are on

I disconnected all of the inputs and all of the lights remain on. I’ve left the device plugged in and power cycled it several times without much luck. The pump was some distance from the PI so I doubt water could have come into contact with it.

I’ve reinstalled Raspbian on the pi and the I am able to see that the automation hat python library can still see the device, but I don’t have any luck interacting with it.

Could you please advise what I can do to get this working?


#2

What happens when you attempt to control it from the Python library? I would be very concerned if you couldn’t switch the relays or any of the outputs, but bear in mind the LEDs are actually driven by an sn3218 using software and aren’t directly connected to any of the IO. So if your IO is working, and the LEDs are not, it’s possible the sn3218 chip itself has gone awry or had its outputs fried.

Try removing the HAT from your Pi and power for a few minutes, and firing it up again.


#3

@gadgetoid I have removed it from power several times without any changes, The last time for ~4 days. I’m not able to switch any of the relays or control and haven’t tried to read from the ADC.

test.py

#!/usr/bin/env python
import time
import automationhat
print('start')
if automationhat.is_automation_hat():
    print('inside')
    automationhat.light.power.write(0)
    automationhat.relay.one.on()
    time.sleep(45)
    automationhat.relay.one.off()
    print('end')

the hat shows up as recognized, but quits without running any of my functions

$ python3.4 test.py
Automation pHAT detected...
start

#4

For some reason it looks like your code is detecting it as a PHAT instead of the fullsize version? Would explain why your code doesn’t do anything.


#5

I"ll run through the setup again, how do I fix the lights?


#6

Install log

Next choice is a “Automation Hat”… Can only upload one photo at a time :-(

$ pimoroni-dashboard
Updating apt indexes...
.........
Reading package lists...
.........

This script will install everything needed to use
Automation HAT
Note: Automation HAT requires I2C communication


Checking environment...
Installing python-pip...
Python 3 is not installed. Would like to install it? [y/N] y
Installing python3-pip...

Checking hardware requirements...

Checking for packages required for GPIO control...
RPi.GPIO installed and up-to-date

I2C must be enabled for Automation HAT to work
I2C is now enabled

Checking packages required by I2C interface...
smbus installed and up-to-date

Automation HAT comes with examples and documentation that you may wish to install.
Performing a full install will ensure those resources are installed,
along with all required dependencies. It may however take a while!


Checking for dependencies...
python-sn3218 is required
Installing python-sn3218...
python3-sn3218 is required
Installing python3-sn3218...

Installing python-automationhat...
install ok installed
Installing python3-automationhat...
install ok installed

Checking for additional software...

Downloading examples and documentation...
Resources for your Automation HAT were copied to
/home/pi/Pimoroni/automationhat

All done. Enjoy your Automation HAT!

Press Enter to continue...

Running the same test as above:

$ python3.4 test.py
Automation pHAT detected...
start

Some config info

$ python3.4 --version
Python 3.4.2
$ uname -a
Linux bot 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux

OS: 2017-04-10-raspbian-jessie-lite.img
Raspberry pi 3 model b 1.2


#7

If you remove the “if” statement does the subsequent code appear to run? (Maybe use some “print” statements to verify)


#8

I’ll see if I can simplify this problem. When I run the code from your examples here I get the same errors as above. It reports that my shield is a pHAT, everyone of the lights stay lit, I can’t perform any switching, in this code it loops forever without performing anything.

I hoping you can provide a solution to fix this, or if its passed the point of repair please let me know and I will inform adafruit.


#9

The detection routine for pHAT/HAT is to check if the sn3218 exists. It looks like yours is blown somehow, causing the library to assume you’ve got a HAT connected. I suspect it’s beyond any simple repair, but you might still be able to toggle the relays using GPIO or pigs:

Try this and see if relay 3 toggles:

sudo apt-get install pigpio
sudo pigpiod
pigs w 16 0
pigs w 16 1

#10

I have the same problem, just bought an automation hat two days ago and everytime I run some script (even the examples) the code says that phat is detected. Therefore I can’t use the 3 relays of the board with automationhat functions, I have to toggle them using the gpio of the raspberry.
The hat is brand new, so it’s weird that the problem is that the sn3218 is blown.


#11

What happens if you open a Python repl and run: import sn3218?