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?
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!)
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?
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).
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.
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!
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?
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. =)
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. :)