Blog
OpenEnergyMonitor

Chip Shortage & Hardware Development Update

It’s been some time since we gave an update on what we are doing and what is coming next. There’s a lot happening behind the scenes. This post will be mostly about hardware but we’ve also moved our office space amongst other things.

Chip shortage

Some of you may have noticed that we are out of stock on quite a few key items in the shop at the moment. We have unfortunately been hit by the ongoing chip shortage, affecting the whole of the electronics industry.

The chip shortage seriously affects several key components that we use including the ATmega328 microcontroller, RaspberryPi’s and the chip that we were planning on using for new hardware, the STM32F303. There’s no general availability of these through standard distributors and the lead times from the manufacturers themselves are around a year. The pricing for these components through more speculative distributors are also eye wateringly high, which we don’t think would represent good value if we added this additional cost to our units.

Introducing the AVR-DB microcontroller range

hardware22-1.jpg

The good news however is that after searching around for alternative options we found a new range of microcontrollers in the same AVR family as the ATmega328 that look very promising, both from a feature set perspective providing a welcome upgrade to the capability of our energy monitoring hardware but also on price and availability.

The AVR-DB range is the latest and highest spec 8-bit AVR microcontrollers from Microchip, launched relatively recently in mid-2020.

The AVR128DB48 is of particular interest to us are (with comparison to the current ATmega328 in brackets):

  • 12-bit ADC (4x improvement)
  • 18 channels on the 48 pin version (up from 8)
  • Higher sampling rate potential (~3x)
  • Flash memory up to 128k (4x)
  • All the usual peripheral requirements (SPI, UART, I2C etc)
  • Potentially useful PGA Op amps built in
  • Relatively low cost
  • Availability is relatively good, and we have secured the stock that we need!
  • Wide range of package types & pin counts.
  • Arduino compatible core called DxCore

hardware22-2.jpg

These features provide many of the key benefits that we were hoping to get from using the STM32 range, in particular the 12-bit ADC, larger number of analog channels and a higher sample rate. That said the AVR-DB has still only a single ADC multiplexed to a large number of input pins and so does not allow for simultaneous sampling across voltage and current channels which was a nice feature of the STM32, but it’s also hard to say how much difference that would make in practice and is it worth the higher price of the STM32 chips?

The lack of availability of the STM32 chips mean we don’t have much choice in the short term, but it’s certainly something to consider in the longer term.

A large plus for the AVR-DB range over the STM32 range is compatibility with our existing firmware developed for the ATmega328, In particular Robert Wall’s latest CM (Continuous Sampling) firmware using the native RFM69cw driver code. The modifications to make this firmware work on the AVR-DB is small. The familiarity provided by the hard work of Spece Konde on the DxCore for the Arduino IDE is also a huge plus for us and other open-source contributors. Combining the use of the DxCore with the modified low level commands for continuous sampling in the EmonLibCM library provides the best of both.

We’ve actually gone ahead and ordered, and received enough stock of a combination of AVR128DB48 and AVR128DB32 chips to see us through the next 18-months or so.

We are also well on our way on the design process for using these chips, with successful testing of these chips and new emonTx, emonPi and emonTH board designs in progress.

Ultimately, if all goes well we expect to have the new units in stock in ~3-4 months time, mid to late July 2022. In the meantime, we have more stock of our current emonPi units on the way in a few weeks.

Voltage output CT sensors

hardware22-3.jpg

The new versions of the emonTx and emonPi will feature many of the same improvements that we were intending to implement with the STM32 development, which are in many ways more important than the microcontroller itself for the overall accuracy and general functionality of the system.

The first change is to support 333mV voltage output CT sensors. This is probably the most widely used type of CT sensor. There are many manufacturers, current ranges and accuracy ratings. By switching to this voltage output standard it’s much easier to select the right CT for the application and there’s no need to change the burden resistor on the circuit board to use different CTs.

Precision voltage sensing

hardware22-4.jpg

The second key change will be to upgrade to using a ZMPT101 precision voltage transformer for higher accuracy AC voltage sensing. The current use of a standard AC output power adapter is the largest source of error in our system, so upgrading this part will provide the greatest gain in measurement accuracy.

The precision voltage sensing unit will be an external unit that plugs into the upgraded emonTx/emonPi and will also include an integrated power supply module so that only a single socket is required. This unit will also have the option of being hard-wired for a fixed installation and full three-phase monitoring.

Precision reference

The third key change is to use a precision voltage reference chip to increase the accuracy of the ADC conversion.

Accuracy

Overall with the above combination and careful selection of other components in the system it should be possible to get to a maximum error for an uncalibrated system in the 1-2% range, the realistic error is better still if you applied a monte-carlo analysis of likely component tolerances. This will provide a significant upgrade to the out-of-the-box accuracy of our units.


Over the next set of posts I will outline what’s new on the new hardware designs and then continue to give updates on progress as they are tested, and we get them ready for production.

Here are a couple of pictures of our new office in the meantime. We have a unit in a really nice community building near Llanberis in North Wales, there’s an onsite cafe that does really good food, cakes and coffee, we are nearer the mountains and walking distance from where we live which makes it all a lot more convenient. If you are in the area and would like to drop in to say hi, please get in touch!

hardware22-5.jpg

To join in the discussion, see this thread on our community forums: https://community.openenergymonitor.org/t/avr-db-emontx-v4-new-hardware-in-progress/20209


Cydynni emonCMS dashboard on display

Following on from work started over two years ago with Cydynni Trystan was tasked with a one off shop-front display project. This was intended as a high quality display screen showing an emonCMS dashboard with the real-time output of the local hydro-energy project.

The shop is based in Bethesda, North Wales, and serves as an information point on the community energy project, to celebrate it’s recent success.

Cydynni-1

Daniel Bates helped design and build the laser-cut stand using Sketchup and Inkscape, having the 6mm plywood laser cut with the help of John at the Bangor University FabLab.

Cydynni-1

Cydynni-1

Here’s a github repo with the software and CAD design we used for the display


Introducing emonDC

emonDC is a project aiming to develop DC current and voltage measuring tools compatible with OpenEnergyMonitor.org project. The main board in development is emonDCduo, a dual-channel DC monitor, WiFi enabled, aimed at solar/battery systems. emonDC has been developed by Daniel Bates.

emonDC development kits are now available in the OpenEnergyMonitor Store.

Example System Schematic

Target Uses

  • 12V, 24V and 48V Solar PV systems, up to 64.4V max
  • Battery monitoring.
  • Remote DC data-logging.

Documentation on the unit, and on DC monitoring theory, is contained at the Github repo.

Features

  • Two-channel high or low-side DC current and voltage sensing, up to 64.4V or 75V, suitable for a wide range of extra low voltage generator/battery systems.
  • 50Amps onboard shunt rating or 1000A external shunt rating.
  • Hall-effect current sensor footprint alternative for isolated current only measurement.
  • Waterproof, clear-top plastic case.
  • 128 x 32 OLED display.
  • WiFi Connectivity.
  • Low-power mode (10mA draw).
  • Accurate 12-bit ADC.
  • Over-voltage and reverse voltage protected (fuses).
Read on →

2018 Development Review

We have been refreshing the project development plan and as part of this looking at the goals we set ourselves in the last plan, posted last February: OpenEnergyMonitor goals 2018/2019. This post is an update on the progress made before outlining the new development plan in a separate post.

Its been a busy year, with significant progress made on most of the goals outlined, looking through all of the github pull requests and commits its evident how much of a team effort it has all been. Thank you to everyone who has helped throughout the year.

Read on →

Demand Side Response Development

openevse leaf

Demand side response (DSR) has been a OpenEnergyMonitor project interest for some time (e.g PV diversion) but has only made its way into a product more recently with our work on the OpenEVSE charging station. The OpenEVSE already implements real-time DSR, this post outlines how we are working on improving on this by integrating the forecasting and scheduling approaches being developed as part of our involvement in the EnergyLocal project.

Read on →

Emoncms Blue Theme

For a fresh clean start to 2018 the default Emoncms theme has now been set to “blue” :-)

The blue theme was chosen to give a consistent user experience between the other OpenEnergyMonitor websites e.g. Forum, Guide, Learn, Homepage etc.

We like the clean look of the blue theme, we hope you do also :-)

If you don’t it’s easy to revert to back to the old black theme by setting $theme = standard in settings.php. There is also a user contributed yellow theme called sun which is available.

emonPi Emoncms will update automatically during emonPi update to use the new theme as long as settings.php has not been user modified.

Feed view in Standard, Blue and Sun theme:

Read on →

emonPi Remote Access with Dataplicity

Network devices such as an emonPi connected to a local network are secured behind a firewall, often integrated into a router.

The conventional way for obtaining access remotely is to open a port in the firewall and ‘port-forward’ requests to this port to the local emonPi. This method works but is cumbersome and insecure. It’s cumbersome because most users connect to the internet via their ISP using a non-static IP. Therefore the WAN IP address often changes, a dynamic DNS service such as Duck DNS, or noIP can be used to link a dynamic IP to a static domain name, however this is cumbersome to set up and often requires purchasing a domain name, dynamic DNS Subscription and handling the dynamic DNS IP address updates.

The port forwarding method of remote access is also insecure since by default the emonPi uses an insecure http connections, this is not a problem on a secure local network but not recommend for use over the internet.

Dataplicity

Dataplicity offers a easy to setup web-service service to enable secure remote access (SSH/HTTPS) to RaspberryPi devices. The free tier allows free access to a single RaspberryPi device.

1-dataplicity

5-dataplicity

6-dataplicity

Follow the steps on the Remote Access page of our User Guide to setup Dataplicity on an emonPi.


Introducing IoTaWatt

IotaWatttm is an open-hardware 14 channel WiFi connected electric power monitor. It’s based on the ESP8266 IoT platform using MCP3208 12 bit ADCs to sample AC voltage and current.

IoTaWatt can log data locally to on-board SD card and post directly to Emoncms.org via WiFi.

There are no plans to discontinue the emonTx. Both the IoTaWatt and emonTx have advantages in key areas which complement each other.

IoTaWatt is fully open-source and has been developed by Bob Lemaire @overeasy in partnership with OpenEnergyMonitor.

IoTaWatt

View in Shop → Setup IoTaWatt

Hardware

IoTaWatt

The IoTaWatt uses the WiFi enabled ESP8266 (ESP-12S) microprocessor. The ESP8266 is mounted using NodeMCU adaptor, the decision was made to use the NodeMCU form-factor to allow flexibility for customisation and future upgrades e.g ESP32.

The onboard SD card allows data to be saved locally with high resolution and network resilience. If the IoTaWatt is posting to an Emoncms server and loses network connectivity data logged to the SD card will be bulk uploaded to Emoncms when a network connection is restored.

An on-board real-time clock (RTC) ensure the time-stamp is always correct. The RTC is set using NTP. Using the IoTaWatt on a WiFi network with a reliable internet connection is highly recommended, however, the IoTaWatt can operate without an internet connection once the RTC has been initially set via NTP.

Firmware

IoTaWatt

The IoTaWatt is configured via a web interface served directly from the IoTaWatt ESP8266. See IoTaWatt.com for a live demo of the interface.

The IoTaWatt supports automatic over the air (OTA) firmware updates.

Read on →

CydYnni – Energy Local, community hydro smart grid

Over the last year we have been involved in a project in our local area (Snowdonia, North Wales) called CydYnni – EnergyLocal. The project is at the forefront of making it possible for households to source their electricity directly from local, community-owned renewable sources.

The Bethesda pilot project, How it works

The first part of the CydYnni project started with about 80 households (with 20 more joining soon) and a single 100 kW hydro generator. Using smart meters suitable for half hourly billing in participating households and at the hydro generator, the amount of hydro power used by the community is calculated for every half hour. The hydro tariff is 7p / kWh for the power used each half hour by the community providing a significant saving for households. Any additional power required is bought from the supplier Co-operative Energy on a time-of-use tariff.

The project provides cost savings to participating households, increased income for local renewable energy schemes and a more direct sense of having electricity provided from - in the case of the pilot project a hydro turbine just down the road!

There is a nice video here on the project which gives a good overview:

There are a number of organisations working on the project of which we are one small part:

  • EnergyLocal: The organisation founded by Mary Gillie with the initial idea and in depth understanding of the energy market behind the project.
  • CydYnni: A local consortium of community energy projects and organisations including Ynni Ogwen and Partneriaeth Ogwen, Ynni Padarn Peris, Moelyci, Coetir Mynydd, Antur Waunfawr, Ynni Anafon and the National Trust.
  • Co-operative Energy: The Energy Supplier through which households participate in the project.
  • Epower also known as NFPAS: The non fossil fuel purchasing agency – handling aggregation, power sharing and the nuts and bolts of billing.
  • 1010: Graphic design
  • OpenEnergyMonitor: web app development in part 1 and home hub (base-station) development in part 2.

It’s been great being involved in such a pioneering project run in the local community in which we live (the OpenEnergyMonitor office is about 5 miles from Bethesda).

Our role so far has been to develop a web app / energy dashboard so that participants can see when the local hydro generator is running and how likely they are to be on the cheaper hydro tariff. Participants can see their own consumption as well as the aggregated consumption of all participants.

The main energy dashboard app designed by 1010 and implemented by ourselves can be viewed online here:

https://dashfwrdd.energylocal.org.uk

cydynni-app.png

The source code for the app is open source and available on github here:

http://github.com/trystanlea/cydynni

We have also developed a dashboard that is more focused on exploring the full data history of the hydro generation and community consumption, this dashboard can be viewed online here:

https://dev.cydynni.org.uk

cydynni-history.png

From the start of January the hydro supplied 57% of the electricity consumption of the participating households. You can really see how the available hydro generation decays usually over about a week after a significant rain event and the extent of the oversupply when it is raining.

It would be interesting to model the addition of solar to see how periods of lower rainfall might be supplanted by solar generation and explore other options for supplying the unmatched demand - e.g. anaerobic digestion.

Part 1: Energy Dashboard / Web App development

This first stage of the project relies on the app or looking at how rainy it is to signal to the households when it’s a good time to use energy. Any demand shifting is done manually by the householder. The data update rate from the smart meters is also relatively slow, with 48 half hourly readings updated daily but usually available in the app with a lag time of anywhere from 15 hours up to 63 hours over the weekend.

Part 2: Hub

The next stage of the project for us is to improve on this with an in home hub (based currently on the OpenEnergyMonitor emonbase), which will interface with a WIFI/radio meter gateway developed by Energy Assets, providing much faster 5-10s meter readings as well as enabling control of smart appliances, plugs and EV charging.

This development has driven some of our most recent improvements to the EmonPi/EmonBase, such as the recently launched WIFI Hotspot setup and ongoing development on the emoncms device module, which alongside auto-configuration of inputs and feeds provides the option to define control devices starting with the Sonoff S20 WIFI Socket, Martin’s WIFI Relay unit and the OpenEVSE charging station.

Over the coming months I will try to blog more on development progress and the technical implementation of the system in addition to insights into the data coming from the project demonstrating local community energy.


Advances Wales Magazine Article

Advances Wales is a quarterly magazine showcasing the latest news, research and developments in science, technology and engineering here in Wales, UK.

In the latest issue (82) we have been lucky enough to have an article featuring OpenEnergyMonitor. It’s well written and mentions a number of exciting developments that we have been working on e.g. CydYnni local energy project. Stay tuned for a blog post coming soon about this project.

Download the full magazine here.

advances artice