ZeroSeg 7-Segment Add-on Board

ZeroSeg LitThe ZeroSeg fully lit...ahh pretty!

I recently released a new Raspberry Pi add-on board that I designed in conjunction with The Pi Hut – the ZeroSeg!

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…

ZeroSeg add-on board

The ZeroSeg

Generic Inspiration

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:

Generic 7-segment unit

MAX7219 wiring on the ocean of generic units seems to always be the same

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…

Reverse Engineering

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!

MAX7219CNG

The ZeroSeg uses the ‘CNG’ version of the MAX7219 chip

ZeroSeg Prototypes

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…

ZeroSeg Prototypes

ZeroSeg prototypes from Ragworm

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 Kit

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:

ZeroSeg Kit

The ZeroSeg kit – great for those of us who enjoy soldering

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 Code

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).

ZeroSeg Characters

The ZeroSeg sports 8 characters of 7-segmentyness

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.

ZeroSeg button

Because everyone loves a button…

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.

ZeroSeg Fitted

The ZeroSeg fits all other 40-pin Pi models- not just the Zero

Example Projects

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?

This design was in conjunction with The Pi Hut, who currently exclusively stock the ZeroSeg. The price at the time of writing is £10, which includes everything you need (minus the Pi of course).

PiHut ZeroSeg

The ZeroSeg is only currently available at The Pi Hut

Summary

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…

Be the first to comment on "ZeroSeg 7-Segment Add-on Board"

Leave a comment

Your email address will not be published.


*