• This spring I got the idea to use a framed edp (e-ink paper-ish display) with a wifi connection to show the hourly electricity price and consumption. The electricity prices here in Europe have gone up quite a bit, so it's nice to pay attention to when during the day they are the lowest.

    So it's using a display from waveshare that can show red, white and black. I've written some code to dither other colors down to those three. There was no library for espruino, but there was some python code that I could easily convert to javascript. The hardest part about getting it to work was finding that reset needed to be toggled for only a few milliseconds, not several seconds. Weird.

    The next step was connecting to the wifi. I've used the esp8266 wifi module soldered to an espruino pico using the shim. Getting it to connect was really easy, it worked on the first attempt. But then getting it to connect again an hour later didn't work. After a lot of work I ended up rewriting the wifi module so that it doesn't connect to wifi as part of the setup call. I also changed some parts to use promises.

    The final problem was getting the deep sleep to work. I want this to run on batteries for as long as possible so it should deep sleep between refreshes (every hour). It should also disable the wifi and the e-paper controller.

    That's a short summary of where I am now. The problem I have is that the battery is drained very quickly, IMO. Three AA batteries in series are drained in about 12 days. It fetches the image to show every hour, so about 300 times before it dies.

    The batteries are not completely drained, the combined voltage is way above 3.3v, so I suspect there is too much peak current being drawn. Any tips on how to improve this?


    1 Attachment

    • 20220827_151148.jpg
About