As per the definition provided in Wikipedia, a smart meter is usually an electronic device that records consumption of electric energy in intervals of an hour or less and communicates that information at least daily back to the utility for monitoring and billing purposes. Smart meters enable two-way communication between the meter and the central system. (Read full Wikipedia Article)
This sounded exiting to us and we jumped to see if we could do the communication and control of the energy meter using CoAP. Here are the features of this “CoAPMeter”:
- First, consumer uses credit card (or any form of online payment) to buy energy credits
- Once credits are available, the meter starts
- When 100% of credits are consumed (in case consumer does not recharge), the meter stops
Additionally, the consumer can remotely switch-on or switch-off the meter (via browser or a phone app)
As a rule, in all our projects, we use hobby grade components that are easily available locally or online. This was no exception. The board shown below, was built using easily available parts.
The key parts of this board are:
- A regular domestic energy meter (we used a single phase meter)
- An optocoupler that transfers the pulse LED from the meter to our sensor reader board (see the red and black wire coming out of the meter in picture above)
- A control board to switch-on and switch-off the power from the meter.
- A power supply board
- A Netduino board that runs .NET Micro Framework and the CoAPSharp library
- A GSM board built using Sim900
Theory of Operation
The Netduino board is the main controller board. At first, when the system switches on, the Netduino board switches off the power output from the meter.
The board then queries our CoAP server to check how many credits are available. If it finds that credits are available, it switches on the output power from the meter.
When the meter switches on, the Netduino board starts to get pulses from the meter (via the optocoupler). The pulses are counted and sent to our CoAP servers periodically. The meter consumption data is sent as a CON message. The ACK message from the server contains information about credits available. When all credits are used, the meter is stopped.
All the communication between the Netduino board and the central CoAP server is made via GPRS.
It’s as simple as it gets. Welcome to CoAPMeter and SmartGrid!