

The Automation pHAT, manufactured by Pimoroni, is a versatile add-on board designed for Raspberry Pi. It is tailored for automation projects, offering a range of inputs and outputs to control and monitor devices. With its GPIO pins, analog inputs, relays, and other features, the Automation pHAT simplifies the process of integrating sensors, actuators, and other components into your projects.








The Automation pHAT is packed with features that make it ideal for automation tasks. Below are its key technical specifications:
The Automation pHAT connects to the Raspberry Pi via the GPIO header. Below is the pin configuration:
| Pin | Name | Description |
|---|---|---|
| 1 | 5V Power | Supplies power to the Automation pHAT |
| 2 | GND | Ground connection |
| 3 | Relay COM | Common terminal for the relay |
| 4 | Relay NO | Normally open terminal for the relay |
| 5 | ADC1 | Analog input channel 1 (0-24V) |
| 6 | ADC2 | Analog input channel 2 (0-24V) |
| 7 | ADC3 | Analog input channel 3 (0-24V) |
| 8 | Output 1 | Buffered output channel 1 |
| 9 | Output 2 | Buffered output channel 2 |
| 10 | Output 3 | Buffered output channel 3 |
The Automation pHAT is easy to set up and use with a Raspberry Pi. Follow the steps below to get started:
curl -sS https://get.pimoroni.com/automationphat | bash
Below is an example Python script to control the relay and read an analog input:
import automationhat
import time
if not automationhat.is_automation_hat(): print("Automation pHAT not detected. Please check the connection.") exit()
print("Turning on the relay...") automationhat.relay.one.on() time.sleep(5) automationhat.relay.one.off() print("Relay turned off.")
adc_value = automationhat.analog.one.read() print(f"ADC Channel 1 Value: {adc_value:.2f}V")
Automation pHAT Not Detected:
Relay Not Switching:
Incorrect ADC Readings:
Q: Can I use the Automation pHAT with a Raspberry Pi Zero?
A: Yes, the Automation pHAT is compatible with all 40-pin Raspberry Pi models, including the Raspberry Pi Zero.
Q: How do I power the Automation pHAT?
A: The pHAT is powered directly through the Raspberry Pi's GPIO header, so no additional power supply is needed.
Q: Can I control the relay and outputs simultaneously?
A: Yes, the relay and buffered outputs can be controlled independently using the Pimoroni library.
Q: Is the Automation pHAT suitable for AC loads?
A: The relay is designed for DC loads up to 24V. For AC loads, additional precautions and components may be required.
By following this documentation, you can effectively integrate the Automation pHAT into your automation projects and take full advantage of its features.