I’ve been working with Jamie Mann for a while now, previously releasing the MotoZero – a simple yet pretty motor controller, and the ZeroView – a clever PCB camera module window mount for the Pi Zero.
The ZeroSeg is the latest addition to the family, this time more angled at the display of data rather than robotics or camera projects.
Let me show you around…
The idea for the ZeroSeg started when I was playing with some generic parts I had lying around my office. One of these was a common 7-segment pre-soldered unit, which seems to be made by the millions, and by many different manufacturers in China, yet somehow always has the same circuit:
After finding a decent code library to allow me to use the board, I had the display up and running in no time – but I didn’t like the clunky and generic nature of the module.
I have this thing about messy wires, and as I wasn’t planning on making a housing for the module, I suddenly thought “Why hasn’t anyone made a PiZero version of this?”
The seed was planted…
I quickly ordered some small common cathode displays and started pulling apart the module. I wanted to find out exactly what this ‘generic’ wiring looked like, including the SMD MAX7219 chip, so that I could re-create the circuit to work with the code library I had found.
After a couple of hours tracking down the PCB’s traces with my multimeter, and mapping out the 24 pins of the chip, I finally had a circuit diagram to test out.
Trial & Error
The next part wasn’t so smooth! My first couple of attempts at breadboarding the circuit had mixed results. Segments would light up but in the wrong order. Data would show backwards or with missing segments…and I ran out of coffee. Crumbs!
I found that my through-hole MAX7219 had to be the ‘CNG’ variety rather than ‘ENG’ (I struggled to see much difference on the datasheets), and also found some of my circuit tracking was wrong due to the SMD and through-hole chip datasheets having differences I hadn’t noticed first time round.
With those issues removed, my prototype was working!
The next task was to produce some prototype PCBs. I had designed the board using RS DesignSpark PCB (commercially free PCB software) and fired off the gerbers to Ragworm (a quick and easy PCB prototyping service here in the UK).
Why do we get prototypes? Because we’re humans, and humans have this wonderful tendency to make mistakes…
I made an error with the initial prototype – one of the MAX7219 pins was traced incorrectly – meaning the code library I intended to use sent characters to the display in the wrong order – oops.
I quickly corrected the bad trace, made some other visual tweaks, and ordered another prototype. This one worked perfectly, so we were all set to order parts for retail – and here we are today!
The ZeroSeg comes in kit form, meaning you have to solder it yourself.
Now I know some of you are a little unsure about soldering, but I’ve always preferred kits over pre-assembled boards. Taking a bag of parts and making a ‘thing’ yourself can be so much more rewarding than just ‘buy thing > plug thing in’.
Here’s a shot of all the parts – displays, chips, sockets, resistors, capacitors, switches and more:
I wrote a user guide for the board that’s about 30 pages long. A large chunk of those pages are devoted to making the assembly nice and easy, through detailed instructions and lots of helpful pictures. It also shares some of the example code…read on…
The Python code for the board is a clone of Richard Hull’s excellent MAX7219 library. Richard’s library makes using the chip and displays very easy indeed. In fact, you could use any code library that works with the generic units, which is exactly why I wanted to wire this board the same way.
As the installation isn’t as simple as some of the other boards I’ve made, I wanted to utilise GitHub to allow users to follow a short set of commands to grab everything they need to run the board.
It took me a while to get my head around the repository service, but I eventually ‘cloned‘ Richard’s library and made all the necessary changes, tweaks and additions the board required.
The ZeroSeg library can be found at: https://github.com/AverageManVsPi/ZeroSeg
Richard’s original library is at: https://github.com/rm-hull/max7219
What Does It Do?
The ZeroSeg is primarily a display, 8 characters to be exact, and more suited to numbers rather than letters. This is because the displays are the 7-segment variety that don’t quite have the curves and additional segments to represent letters correctly (although obvious ones such as F, E, O, A etc work well).
Note: Some very kind and clever people have ‘forked’ (?) the GitHub library and are adding letters and other cool stuff. Once I work out how to test and approve these changes (without breaking everything) they’ll be available in the library.
I also added a button to each side of the display to make the board much more useful for projects. Changing what data is displayed, refreshing data or even manipulating data are just a few of the example uses for the wee clickers.
The board was designed with the Pi Zero in mind (hence its shape and size), however it will fit on any 40-pin Raspberry Pi model. It also includes HAT mounting holes, allowing you to stack the ZeroSeg on top of other boards.
In terms of the data being displayed, only your imagination and coding ability are the limits. My small initial list of project ideas looked like this:
- Time display
- Date Display
- Stock price display
- Temperature monitor
- Email counter
- Christmas countdown
- PIR motion sensor counter
- Disk space monitor
- IP address scrolling display
Where Do I Get One?
I had a lot of fun designing this board, working out how to use the code libraries and then expanding on it to add my own touches.
The result is a cute little add-on packed with 8 characters and 2 buttons – all on a tiny Zero-sized PCB. I love it, but I’m biased of course.
They’re selling fast, so grab one quick!
Until next time…