Recently at work my team was throwing around the idea of real-time feedback by adding a big counter to the workspace to keep track of things like time left in the development cycle, number of static analysis warnings, etc. For that reason I decided to build a large Seven Segment Display to provide that continuous visual feedback. I designed the display completely from scratch to serve as a simple project that utilized a wide variety of skills. Below I go through each step of the process and how each part works.
For the actual segment part of the display I used transparent PLA from Hatchbox. I didn’t have any trouble with how these turned out and am happy with the filament. I had to do some experimentation with infill percentage in order to get the right amount of light passing through. I believe in the end I settled on 20%.
Here’s a close up of the semi-transparent digits. Two 5mm LEDs fit snugly into the holes int he back.
The individual segments are designing to press fit into black PLA frames. I “welded” the four separate frames together using a 3Doodler to extrude plastic into the gaps. For aesthetics I only welded the backs of the frames together, so while they’ll stay connected the seams won’t hold up to much abuse.
To keep board size small and reduce complexity I designed individual boards for each segment. They only consist of two 5mm through hole LEDs, a current limiting resistor, and a 0.1″ header to connect to the main board.
Here’s a pic of the boards soldered up and hot glued into the display.
The control board is just a breakout for the TPIC6B595 which is a high current shift register that can power LEDs and be daisy chained together using SPI.
I’m using the Sparkfun ESP8266 Thing Dev Board as the brains of the project. This nifty little WiFi controller is Arduino-compatible and allows me to communicate with the display without needing to connect it to a USB port.
Like I mentioned above, I’m using the SPI bus to communicate to each individual LED controller and daisy chaining them all together. All that’s required is to write out four separate 8-bit numbers to set the appropriate LEDs.
The server side of things is the most complicated part of the project. I borrowed heavily from the Web Server example in Sparkfun’s hookup guide. The Thing board hosts a web server which accepts GET requests with the number to set the display two. It then parses the string version of the number and converts it to the correct 8-bit sequence to set the seven segment display.
The client side of things involved writing a Python script to submit the GET requests based on what data is being measured. The current example is going through a directory and counting the occurrences of “if” in the code.
As always, the source code and 3D files will be up on my Github. I’m travelling this weekend, but will upload all the files Monday night.
While the LED display was plenty bright in my dim home office, I found out that they weren’t nearly strong enough to overcome the bright fluorescent lights at my office. It’s difficult to see in the picture above, but it’s hard to read the numbers from more than a few feet away. When I originally designed the display I erred on the side of caution and ran the cheap eBay LEDs at ~3mA. Unfortunately, this was not nearly enough. While it would be relatively easy to swap out the resistors to increase the current to the LEDs, I’m also unhappy with how much the plastic segments diffuse the light and think just making the LEDs brighter would only exacerbate the problem.
For version two I think I’ll experiment with two different ways to fix the problems above. One option would be to use “straw hat” LEDs instead of the generic 5mm kind. These LEDs have improved light diffusion. I could also use hemispherical holes in the plastic digits, rather than cylindrical ones, so that the light is directed in a wider pattern.
Another option would be using WS2812B. In conjunction with an improved plastic digit to help with light diffusion, this LED would greatly simplify the electronics of the display. These LED modules have built in resistors and control logic, allowing them to be daisy chained and controlled via a serial interface without any need for the shift register control board that I used for version one. WS2812Bs are also RGB LEDs, so another benefit is that the color would be controllable.
Hopefully I’ll get a chance to start on version two soon!