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.
Explore Projects Built with Automation pHAT
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
This circuit is designed for an aquaponics system monitoring application. It uses an Arduino Nano ESP32 to read data from various sensors including temperature, humidity (AHT10), pH, TDS (Total Dissolved Solids), and dissolved oxygen, and controls a water pump via a relay based on the water temperature. The system is powered by a lipo battery through a buck converter, ensuring stable voltage supply to the sensors and the relay controlling the pump.
This circuit features an ESP-8266 microcontroller interfaced with a PH Meter for sensing pH levels, an LCD Display for output, and a 5V relay to control a 12V pneumatic solenoid valve based on the microcontroller's logic. The ESP-8266 reads the pH value from the PH Meter and likely displays it on the LCD. Power regulation is managed by a voltage regulator that steps down 12V to 5V and 3V required by the various components, and a 12V 5A power supply is used to provide power to the circuit, which is also connected to a 220V AC source.
This circuit involves two Raspberry Pi 3B units interfacing with multiple pH Meter V1.1 sensors and ADS1115 ADCs to measure pH levels. Additionally, two 4-channel relay modules are controlled by the Raspberry Pis to manage external devices, likely for automation purposes.
This is an automated environmental control system for plant growth that uses an ESP32 to monitor soil moisture and pH levels, and to manage irrigation through solenoid valves. The system aims to maintain optimal growing conditions by adjusting watering schedules based on sensor inputs.
Follow the on-screen instructions to complete the installation.
Example Code
Below is an example Python script to control the relay and read an analog input:
import automationhat
import time
# Ensure the Automation pHAT is detected
if not automationhat.is_automation_hat():
print("Automation pHAT not detected. Please check the connection.")
exit()
# Turn on the relay for 5 seconds
print("Turning on the relay...")
automationhat.relay.one.on()
time.sleep(5)
automationhat.relay.one.off()
print("Relay turned off.")
# Read and display the value of ADC channel 1
adc_value = automationhat.analog.one.read()
print(f"ADC Channel 1 Value: {adc_value:.2f}V")
Important Considerations and Best Practices
Voltage Limits: Ensure that the input voltage to the ADC channels does not exceed 24V.
Relay Ratings: Do not exceed the relay's maximum switching capacity of 24V DC or 2A.
Secure Connections: Use the screw terminal block for reliable and secure wiring.
Library Updates: Regularly update the Pimoroni library to access the latest features and bug fixes.
Troubleshooting and FAQs
Common Issues
Automation pHAT Not Detected:
Ensure the pHAT is properly seated on the Raspberry Pi GPIO header.
Verify that the Pimoroni library is installed correctly.
Relay Not Switching:
Check the wiring to the relay terminals.
Ensure the load connected to the relay is within its rated capacity.
Incorrect ADC Readings:
Verify that the input voltage to the ADC channels is within the 0-24V range.
Check for loose or faulty connections to the analog sensors.
FAQs
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.