Automation pHAT
Les Pounder takes a look at a new board that offers a budget introduction to home automation. Now all he needs to do is train his robot to make coffee.
Les Pounder takes a close look at a new board that offers a budget introduction to home automation design for the Pi Zero, but that will also fit any 40-pin device.
Ahome monitoring and automation board for £12? Surely that’s not possible? Well gang, it’s time to readjust your levels of expectation…
The team from Pimoroni has released another of its Raspberry Pi Zero W sized “pHAT” boards. The Automation pHAT is a tiny board, designed for the Pi Zero, but compatible with all 40-pin GPIO Pi. It features plenty of solutions for working with higher voltage devices, and comes with a line of screw terminals to ensure a solid connection. Note that the board does require some soldering, but it’s nothing too challenging.
Looking along the board the first thing we can see is an NEC EE2-5NU relay rated for up to 24V at 2A, but according to the datasheet this relay can switch up to 220V. Yet because of the small tracks on the board and no separation, this isn’t a safe option, so you should stick to 24V maximum.
There are three analog inputs, rated for up to 24V and controlled by an ADS1015 12-bit chip, which offers slightly better resolution compared to the traditional MCP3008. The ADS1015 communicates with the Raspberry Pi using the I2C protocol and will return the voltage it receives based upon the reference voltage supplied. Using a 10K potentiometer connected to the 5V terminal we saw values between 0.0V and 4.99V.
There are three buffered digital inputs rated up to 24V ready to be connected to devices such as doorbells and sensors. In the centre of the board are a ground and 5V connection, which can provide a reference voltage for components such as potentiometers. The Automation pHAT comes with three 24V tolerant-sinking outputs. In other words the ground connection for a circuit is placed in the output, and a power source – typically the 5V source on the board – is placed at the other end of the circuit. By turning the output on, you complete the circuit and the output device connected to the terminal, for example an LED, will light up. On the far left edge of the board are breakout connections for SPI, but you’ll need to source some header pins to solder onto this.
Software solutions
But all of this hardware is useless without software, and once again the team provide an easy-to-use Python 2 and 3 library. The library is called automationhat because it works with the larger HAT version and the pHAT version that we have for review.
The inputs, outputs, analog and relay are all handled via the Python library using their own classes, and we can set the value of a connection, or we can read the value. We created a simple program that would read the value of the analog input as we turned a 10K potentiometer. If the value was over 2.0V it would trigger the relay to click into life, but below 2.0V the relay would shut off.
This is a great board that’s well priced for small budgets and projects. The Python library is simple to use, and the board is well made and has good secure terminals to prevent short circuits. The larger version of the board at £27 is less value for money.
If you’d like to take your first steps with home automation, or would like to work with analog and higher voltage devices, then this is the ideal board. It offers an easy entry point, and a safe introduction to higher voltages. Always be careful when working with voltages greater than what the Raspberry Pi is used to as you may damage the board.
Have a go with this board – you won’t be disappointed.