This project has been launched IPEM PiHat on KickStarter
Introduction
As an extension to my STEM ESP32 based Home Automation Power Energy Monitors, a new expanded version has been designed for flavours of the Raspberry Pi - the IPEM PiHat
IPEM Raspberry Pi PiHat ATM90E36 IoT Power Energy Monitor SDK -
- Super exciting news that my first KickStarter project has been fully funded - so thank you all for your support.
- Please feel free to take a moment and check it out!
These pages are in the process of being updated to include details of the production version of IPEM PiHat and PiHat Lite.
IPEM PiHat and IPEM PiHat Lite - Comparison ChartAs we steam ahead to production, just wanted to quickly share some 3D renders of the final pre-production version of the two great looking boards.
Notable visual changes- Improved layout from beta board
- GPIO Expander
- DIL Switches added to speed up configuration
- Accurate RTC DS3231 with Battery Backup connection
- Switchable Rogowski Inputs and filtering
- LDO regulator to provide isolated 3V3 to each stacked board
- Swapped DAC and ADC for improved SN ratio
- Type C 5V DC input on PiHat Lite. This feeds into the two Raspberry Pi 5V GPIO Pins, so allowing you to power the whole system (single boards, or stacked), via Type C.
A Power Energy Monitor is hardware that essentially safely samples and collects data via one or more CT Cable Clamps. This then allows the user through the software to report and analyze electric energy usage. Some other examples of my monitor boards are shown below.
With this data, you can simply report usage, or expand and use the information to save, or divert, energy in many different ways to improve efficiencies and ultimately reducing your costs to the mains power energy provider.
Monitoring power consumption is typically completed using a CT current clamp (essentially a transformer), clipped over the premises mains consumer unit tails and plugs into the local mains circuit to 'sample' the mains voltage and frequency in some way.
NB. You do not need to be an electrician to do this!
The below example photo shows a CT Current Clamp safely clipped over the Live (Brown), tail from the mains inlet to the meter.
TIP: The clamp(s) could equally be clipped over a live wire from one, or more, ring circuits, workshop feed, or solar inverter mains connection, so measuring and monitoring individual circuits, rather than just the overall mains input connection.
The most important take away point, is that this is all done safely and with no connection to live mains electricity.
The below flow chart shows the selection of energy monitor types that has evolved through my designs, AC and DC, then flows down to the new IPEM PiHat
The IPEM PiHat IoT Power Energy Monitor SDK design contains all the proven key technology of my IPEM and IPEC including the ADC and DAC, neatly packaging these for use on a Raspberry Pi PiHat, flavours thereof, or other MCU boards such as ESP32 and STM32, or even on my new ESPuno Pi.
The heart of the IPEM boards is the Microchip ATM90E32 or ATM90E36. These are high-performance and accurate AC mains energy metering devices for:
- Single phase
- Two phase
- Dual phase
- Split phase
- Three-phase four-wire (3P4W, Y0)
- Three-phase three-wire (3P3W, Y or Δ), systems.
The ATM90 device is used in a range of premises and applications including:
- Smart Meters
- EV Charging
- Homes
- Education
- Offices
- Commercial
- Factories
- Farms
- Greenhouses
- Factories
- Industry
- Solar Farms
- Wind Farms
- Off Grid Systems
The ATM90 series of monitor devices are proven for accuracy. The IPEM PiHat core is the ATM90E36A which is used around the world in power monitoring instruments that also need to measure voltage, current, THD, DFT and mean power.
The IPEM boards requires little, to no, calibration and is easy to setup. You can use the ATM90E32 code for the standard functionality.
As the IPEM boards only safely sample the AC via a low voltage transformer, you are able to monitor varying AC (RMS) voltage mains around the World, such as:
USA and Canada which typically is 120 V or 230 V @ 60 Hz
- With ranges around 114 V to 126 V
Europe and UK which typically is 230 V @ 50 Hz
- With ranges around 216 V to 253 V
Japan which typically is 100 V @ 50 Hz or 60 Hz
- Eastern Japan is 50 Hz, and western Japan is 60 Hz
- Should you wish to know more, see this Wiki
The IPEM PiHat has been designed to be easy to use and offer a range of extended and powerful features which would conventionally need extra hardware.
InterfacesA top level list of interfaces include:
ATM90E36
- Accurate Energy Monitoring
- Easy to setup and use
DAC
- Provide analogue signals, or PWM/MPPT output, driven from data measured from the current clamps
- Could be used to control battery charging or window openers for example
ADC
- Provides a means of external Voltage monitoring
- Solar Battery voltage monitoring for example
Relay Outputs
- Control of external equipment based on Energy usage from two isolated and independent output
OLED Display
- Adding an I2C display to easily show real-time information and monitoring
IPEM could be thought of as a Swiss Army Knife of the Mains Energy Monitor world for use by STEM, developers, maker communities, solar energy and industries.
The IPEM PiHat has been designed to fit Raspberry PI 3, 4 and 5, equivalent clones. The displayed board component layout is subject to slight change on the production board.
The production version of the IPEM PiHat will allow stacking, although the variant IPEM PiHat Lite, is also required (as you cannot stack two or more IPEM PiHats).
The IPEM PiHat Lite only has the ATM90E36 Energy Monitor, removing any port conflicts from the the other ADC/DAC devices, as they are not required when stacking.
Whilst the specific version of the board is being fabricated, a 3D mock preview is shown below for reference only.
The IPEM PiHat Lite can be used in its standard form (on it's own), along with a single IPEM PiHat, and/or stacked with more IPEM PiHat Lite's.
The IPEM board uses SPI as a means of data communication, with an I2C expander to provide individual GPIO functionality to each ATM90E36.
Following design thoughts prior to finalising the production board, the following improvements have been added.
Change from OneWire to using a two wire I2C Expander. This provides 64 individual addresses, so essentially 64 stacked IPEM's.
The design improvement is a much more sensible route as you now assign a fixed address to each board using a DIP switch. This also makes it so much easier is field and with software support and configuration.
The unique design will allow up to a max of:
* 1 x IPEM PiHat + 63 x IPEM PiHat Lite's
or
* 64 x IPEM PiHat Lite's
Stacking of IPEM PiHat and/or IPEM PiHat Lite boards, if needed, is subject to only a potential limitation in system noise. In the real world though, three or four boards would normally be more than sufficient (remembering each board has three CT Clamp inputs).
CT Clamps and Rogowski Current TransformerThe original IPEM design provided for using the YHDC SCT-013 100A-50mA.
The updated IPEM PiHat and IPEM PiHat Lite production design, now allows for either use of CT Clamps, and/or Rogowski Current Transformers.
NB. The displayed MRC-36 is an example only and not tested.
CT Clamps and Multiple PhasesAC inputs between the boards can be paralleled up as needed when stacking, so you can mix and match single, two or three phases between boards.
The unique ability to stack the IPEM PiHat Lite boards allows great flexibility to the end user and the eventual project installation.
Mains MonitoringAll my boards are designed to be safe and easy to use - with NO live working, mains electricity parts or dangerous exposed high voltages.
The IPEM PiHat uses only low voltage 8 to 12 V AC such as from a bell transformer and clip on CT Clamps.
Electrical Circuit TypesThe IPEM and IPEC series are capable of monitoring a number of variations in energy monitoring systems, the IPEM PiHat offers the same monitoring features.
- Accurately monitors both Import and Export
- Single phase (Home, Office etc.)
- Multiple Single Phases. (Different circuits or home/office rings, Inverters etc.)
- Dual Phase (2 x Live -Typically for USA. i.e. 2 x 110V)
- Three Phase Star (3 x Live and 1 x Neutral) [Needs ATM90E36 version]
- Three Phase Delta (3 x Live)
Further information on Three Phase circuits can be found here
IPEM Three Phase Installation ExampleThe below is an example of the IPEM ESP32 boards being used in one of a large three phase solar commercial installation cabinet. The IPEM PiHat would offer the same functionality.
NB. This installation was using the early IPEM incorporating the standard ESP32 which did not have a U.FL antenna connector, so the installer put a small wireless access point in the cabinet.
Data provided from the IPEM PiHat can be extrapolated through your code in any way you wish, in order to easily integrate with your IoT Home Automation system, or Solar Installation monitor.
All software and code is open source, community based and allows you to develop and integrate as you wish.
The main process typically used for publishing data (internally or externally), is via MQTT, or you could use other direct publishing routes such as to Domoticz, Zabbix or Home Assistant.
Data from the ATM90 includes:- Mains RMS Voltage (each phase)
- Mains Frequency (each phase)
- Import and Export Values
- Mains RMS Current
- Calculated RMS Power
- Active Power (Absorbed or Used by the Load)
- Calculated Total Active Power
- Re-Active Power
- Calculated Total Reactive Power
- Apparent Power (Total Amount of Power Flowing from Source to Load)
- Calculated Total Apparent Power
- Fundamental Power
- Harmonic Power
- Power Factor
- Phase Angle
The IPEM PiHat IoT Power Energy Monitor board main features:
Compact and Flexible Design SDK Board
- All connections are low voltage, for safe operation
- Easy to interface
- Designed to fit on a Raspberry Pi, or similar mechanical profile controller.
ATM90E36 Energy Monitor
- 3 x Phases Line CT Clamp Input
- Example YHDC SCT013000
- 3 x Voltage Inputs (AC RMS)
- 1 x Phase Neutral CT Clamp
- DMA Mode (Logging via SPI)
- Power Modes Settings
- Auto DMA selection option via GPIO
24C64 EEPROM
- Parameter Settings
- Security information
- Logging
- Reading Accumulation
MCP4728 DAC
- 12 bit I2C DAC
- Four Independent Buffered Output Channels
- Configured for Default DAC Out, or Modulated (Example MPPT)
- Configurable Solder Pads
- On-Board DAC EEPROM (For DAC Codes and Addressing)
- Can be configured to drive DAC based on CT Clamp Current / Power
- Connected to a JST header
ADS1115 ADC
- 16 bit I2C ADC
- Four Independent Input Channels
- 860 Samples per Second
- Delta-sigma with PGA
- Connected to a JST header
- Differential or Single-ended inputs
- Maximum of 5.5V input
OLED I2C
- I2C Interface
- OLED I2C Connector
- Configurable Power Pins
AC Low Voltage Input (for Safety)
- Power safely derived from a SELV / Wall AC/AC Power Supply
- 8 to 12V AC RMS
- Examples GreenBrook DAT01A or TLC TC TR7
Temperature
- On Board NTC (Temperature)
Isolated Outputs
- Two Relays for Isolated NC or NO outputs
- Max 2A 30V DC or 0.5A 240V AC
- Brought out to 2 x 3 pin 2.54mm headers
User Interface
- Programmable Button
- RGB Status LED
- User Configurable
Power LED
- On 3V3
ATM CT LEDs
- CF1 - Active
- CF2 - ReActive
- CF3 - Fundamental
- CF4 - Harmonic
PCB designed the same size as a Raspberry Pi 4 or 5.
- Also allows for the optional OLED display to be included, or not.
- Size 85 mm x 55 mm
Note: The above specification and peripheral devices are subject to change slightly due to component and BOM availability.
Brochure
Updates
26th Dec 2024 - Boards have arrived. Bring up and testing will follow over the new couple of weeks.
Board DeliveryThe IPEM PiHat board SDK will be delivered fully tested and ready for your configuration and use, as needed.
You will require one or more CT clamps and a suitable AC power supply. Details of recommended examples below.
As part of the final factory test, the board will be tested and packaged in an anti-static bag, ready for shipping.
Availability
The IPEM Raspberry Pi PiHat is due for release by March 2025. Further details to follow, or please contact me for information. See KickStarter for further information.
Comments
Please log in or sign up to comment.