Best screen for a Pi Zero W energy monitor project - inky hat?

I’m going to create a simple python project running on a Pi Zero W pulling a few bits of data from existing on-site mysql database and I want to display the data on a screen attached to the Zero W.

I want the unit in the kitchen running 24/7 showing current electricity and solar usage. These figures can change pretty quickly, ie you put the kettle on and the watts ramp up etc. So I intend pulling the figures from the database as frequently as maybe every 5 seconds and updating the display with the new figures.

I really do like the look of the inky hat but i’m worried about the refresh times for my project. Those that used the inky hat, what is it like when firing rapid amounts of changing data at it? Does it keep up?

If not the inky hat, what other options? Maybe the GFX hat? or Hyper Pixel (non touch) which seems overkill?

I don’t think any of the other lesser screens would suit.

I suppose worst case I could only send the figures every 30 seconds… same maybe the inky hat could be ok?

Any thoughts would be appreciated.

Hi,

I have the red and black inky pHAT sitting on my desk showing the weather station.

As it is three colours, it really does take about 15 seconds to refresh.

Mine is set to refresh every 15 minutes, and the display flickers whilst doing so.

I imagine watching this continually flicker for 15 out of every 30 seconds would become tiresome very quickly.

The black and white one has a quicker refresh rate, at a few seconds.

Personally, if I were showing rapidly changing data I would use LEDs.

The Four Letter pHAT has a nice CPU example that is constantly refreshing.

I guess it depends on the amount of data to display, the aesthetic you are looking for etc.

This post is worth a read.

Also, The inky pHAT story.

Cheers,

Simon.

1 Like

Thank you.

mmmmm, Inky doesn’t seem a good fit then.

I’m looking to display something like
Solar Gen: 2345w
Consuming: 800w
Daily Gen: 8123w
Daily Cons: 2345w

With the figures constantly updating through the day.

So maybe the Hyper Pixel is the best bet?

Any cases for the HP on a Pi Zero W?

The HyperPixel is an amazing screen and comes in a non touch version (and you could use web technologies to build your display and just launch a browser full screen).

I think the best alternative for your situation through would be the all new GFX Hat! https://shop.pimoroni.com/products/gfx-hat (you could even make it change colour in response to the usage!)

1 Like

Yeah, looks good and might be the best option. I do think the HyperPixel is overkill for this.

It wasn’t until I watched the YouTube vid did I realise that the GFX Hat allowed so much on screen. 128x64 doesn’t sound that much until you see examples. :)

Do you think the GFX Hat sit okay atop a Zero W in something like a basic Pibow case?

Been thinking about this… The GFX Hat dimensions mean it will taller then the Pi Zero W? Not sure it will hang together quite right?

Yes, I could use a Pi3 (with it having the wifi) but seems totally overkill just to run a bit of a python script.

Is there any way of getting something like this small display rigged up simply to a Zero W?

This fits on a Zero:

You could even use the joystick to scroll through your different input variables.

You will probably lose the top layer of the Pimoroni case though.

Not sure if this is the solution you are looking for, but food for thought.

2 Likes

The closest I have ever come to encasing a Zero plus a pHat in a case is the pHAT badge.

I have all three colours and I have to say the smoke grey, with a Scroll pHAT HD inside it looks fantastic.

You may have to do some ziggery pokery to get it to sit flat as it is meant as a badge, but, with the zero in place it will sit at an angle on a desk.

I can probably dig one out and take a pic if needed.

Simon.

2 Likes

Thanks Simon.

Maybe the screen i’m looking for hasn’t been made yet? A smaller Zero sized version of the GFX Hat without the buttons? Just a simple screen?

I like that pHat-badge case but I can’t see the GFX Hat working with it because of the size.

Found this on eBay and wonder if it might do a simple cheap job for a test?

Ahhhh, my naivety. Obviously that 16x2 screen needs cabling to the correct pins… way past my level of expertise.

So i’m thinking sod the Zero W route, get a Pi3 and just get the GFX Hat… way more expensive and overkill for the project. But at least it will look aesthetically pleasing and allow me to display more stuff on screen. :)

You could always use a 40 pin GPIO ribbon cable to connect the Pi Zero to the Hat, or a Mini Black HatHacker to put the Pi “above” the GFX Hat. There’s no reason they have to be stacked in the traditional sense.

If you did want to mount it directly on the Pi Zero, you can use two standoffs and the other side would just be a little flappy. Depends what you want to put it inside though. I have plenty of projects where I have a big HAT on the little Pi and it usually works ok.

I spent a bit of time yesterday wiring up one of those 2x16 LCD displays.

Whilst it works, the display has a bigger footprint than the Zero, so finding an off the shelf case will be tricky.

As suggested above, you can break out the Zero and the HAT with a GPIO cable.

I use a slightly different GPIO cable as I have never got the normal Female to Female ‘Printer Cable’ versions to work (the cable below has a Male to Female connection so you will have to decide if this is how you want to solder up your Zero and HAT).

https://www.modmypi.com/raspberry-pi/gpio-and-breadboarding/40-pin-ribbon-cables/40-pin-gpio-male-to-female-ribbon-cable-150mm-(gertboard)

+1 for deciding on what case the finished article is going to go into.

Personally, I like old tins and you should be able to fit a Zero and that HAT inside and Altoids tin!

http://www.hackmypi.com/PiMiniMint.php

https://imgur.com/r/raspberry_pi/k0u1P

Cheers,

Simon.

Thanks Both,

I’ve ordered the Pi3+ and Gfx Hat and have a PiBow case knocking about, so going to see what that all looks like for starters.

I need to concentrate some time to the coding and setup side, so happy to go with the easy plug in of the pre-built hat. :)

Will hopefully post up when i’ve got it working. :)

Finally, i’m back with an update. :)

So in the end, the Pi3+ I ordered turned out to be too big and bulky for what I wanted to do, so I used a Zero W with my GFX Hat instead.

I’ve got an EmonPi device from https://openenergymonitor.org/ monitoring and storing my energy usage and solar production via CT clamps on wires near the electricity meter.

I’ve written some Python on the new Zero W to pull the recent usage/solar figures via their API and display the results on the GFX Hat. When there is more solar than usage, the screen goes green and when there is more usage than solar it stays red.

Case wise I couldn’t find anything I thought suited, so I made one out of Lego. I think it looks ok?

Final part of the project is to get more data on the screen. And also maybe get a better font or bigger font. Maybe even something more like graphics, ie larger so that you can see from further away. But my Python coding hasn’t stretched to fonts/graphics… especially on the GFX Hat, so any pointers would be appreciated.

Below are some photos. :)

Cheers.

Have updated the code to use the font from the Hello World demo… it helps seeing things from afar, but its not the most clear of fonts.

Could do with some suggestions of super clear fonts that could work well on the GFX Hat?

Any suggestions?

Have tried about 20 from dafont and found this one, looks nice apart from the W… it will put me on for a while. :)

https://www.dafont.com/bebas-neue.font

1 Like

Hi Zarch, great job on the energy monitor with the gfxhat, looks good in the lego case and i love how the backlight changes colour depending on net usage of the PV system.

I would like to build one of these for my house, would you be willing to share your code with me to have a tinker around with getting it to work with the fronius inverter and smart meter i have here? My programming skills are pretty basic, but with a starting point like the work your have done, i could probably get things working here!

Many thanks
Simon

Hi Simon,

I will copy/paste the code when I get home as I don’t have access to it here.

But in summary, its a constant loop that every 10 seconds goes off to talk to my emonPi

It pulls the solar generation, the home consumption via simple API from the emonPi.

Then depending on whether consumption is higher than generation or vice-versa I switch colour of the screen and display the current values.

The loop then waits another 10 seconds before doing it all again.

I just have the script running in the background 24/7.

Its not hugely robust and can fall over so i’ve tried putting some error checking in. But my Python skills are poor, so i’m battling with this. :)

Future plans:
Better error handling (so it doesn’t crash!)
Some sort of progress indicator. So every second it shows some dots or a progress bar or something.

So I suppose for your project you need to able to get reliable
a) solar generation from the Fronius
b) energy consumption in the house… how are you going to that? What have you got in place?

Hope all this helps.

Nice looking project. using the Lego for your case was a cool idea. IMHO finding and or making a case for you project can be a real PITA.
The new 3A+ might be a good fit in there instead of a Zero? Just throwing it out there. I’ve used A+'s in a couple of my headless projects because they are hat sized. Real easy to mount a Sense hat for example to them.
The new 3A+ is quad core with a full sized HDMI and one full sized USB. All the extra bits you don’t need are loped off, lol. I have one on the way to play with.
I have a couple of weather clocks that I display scrolling text on the LED matrix. Its RGB so my messages can be different colors depending on conditions. I want to replace the sense hat with the Unicorn Hat HD 16x16 goodness. Sorting out the scrolling text part in python is the really tricky bit that I haven’t sorted out yet.

Anyway, a big thumbs up on a well done project. =)

1 Like

As nice as they look I think a 3A+ would be overkill… the Zero W only runs a single python script in a loop, so seems perfect. Plus, its working, so no intention of changing it now. :)