ESP8266 remote power display for energy monitor and ESP8266 remote power display for energy monitor – EV2 documented a design and some variations for a real power display using emontx3 / emonhub / mqtt. This article documents an evolution to use the ESP8266 HSPI port for much higher speed writing of the LED display, high enough to be later adapted for multiplexed displays.
The remote power display uses a ESP8266-12E devkit 1.0 module, a common 3.3V 4 digit 14.2mm seven segment LED module with 74HC595 shift register per digit. The particular LED module has sufficient space to mount the ESP8266 inside the module.
Above, the interior of the module that suits the implementation.
It seems impossible to buy the ESP8266-12E devkit 1.0 module without header pins, so they will need to be removed to allow the module to mount snuggly against the rear cover of the LED module. That done, a couple of holes in the rear cover, and some cutouts in the LED module cover and side for access the USB socket and the ESP8266 can be fixed to the rear cover with some M2.5 nylon screws.
Above, a cable for the display is cut and soldered direct to the ESP8266 module (do this with the module separate from the cover, and select the cable end that will not require a 180° twist).
The pins for the HSPI port are fixed, and further, a 3k3 pull-down resistor needs to be added to D8 (GPIO15) to prevent the display altering the boot up method. The resistor can be seen soldered between the D8 and GND pins.
Pin mapping to suit this cable connection is RCK=D8 (/CS), SER=D7 (MOSI), SRCLK=D5 (CLK), and set invert_display=true.
Above is a capture of the display load with the clock rate set the 1MHz. It could go faster, but this is plenty fast enough.
The code is somewhat simpler, and there are changes to accomodate the SPI port which sends MSB first.
The code is written in Lua script. It is under active development, the code as it evolves is available online https://github.com/owenduffy/rpdiotm.