Well, I finally broke down and decided to experiment with 7 segment displays. I would rather program a TFT touch or just a plain TFT display because of their flexibility to display lots of information across screens. A 7 segment display is so very limiting, even with extended digits. However, as a novel idea I decided to make a world clock to display times across the globe. The perfect application for the low cost 4 digit, 7 segment display! So more on the project as it gets more advanced, but here are my “discoveries” and thoughts about the TM1637 display from RobotDyn.
Step 1: Parts
To experiment with theTM1637 display, the only things you need are:
- TM1637 Display
- An RTC or DHT to read some information - optionally, no hardware, just do a simple counter
- Arduino Uno, Mega or Micro
- A few jumper wires
Step 2: Software Considerations
I found 3 different libraries to use with the TM1637
- TM1637.h - recommended by RobotDyn but older
- TM1637display.h library - by AVISHORPE seems to be the favorite
- SevenSegmentTM1637.h - By breeme. Most functionality and possibilities.
Try them all and see what you think, so far I am most comfortable with the TM1637display library.
Step 3: Initial Thoughts
When I first got my display I bought it with some generic 7 segment displays (12 lead) and some shift registers. Using them was more work than I needed and limited me to using a Mega for my world clock. The TM1637 display uses I2C and so even a micro will handle 4-5 of these displays, but I’ll confirm as my project develops! But using just (2) GPIO pins each - that’s a big plus.
The unit is very cost effective, just a $1.50 for the larger (50x19mm) display at RobotDyn.com.
Easy to install and use for a project. Good size, bright display that is adjustable, 4 mounting holes (RobotDyn version), dual end access, only 4 connections (5v, Gnd, Data, Clock), color variations (5), and “simple” programming (read on…).
Step 4: Programming
So far, I have been happiest with the TM1637display.h library and used it to get the following results and findings. These probably aren’t the only issues, but the things I have come across and found work arounds to resolve.
About that programming now. When I first hooked up my display and ran the examples for all three libraries, I got nothing. No display, no read out, nothing. In fact it seemed to freeze the Arduino up and declined to output even a serial output. I’m just a maker but surely I couldn’t mess this simple little display up! After some research, I found some information in lots of places, thus let me try to pass on some of what I have found.
Like an LCD display you can output a string of integers to the display. There are more ‘complex’ ways to place the information but not necessary. The display is limited with strings and characters and limits the set available, so if you need text these may not be the best solution.
Using a ‘delay’ of any type seems to cause the display to freeze. This may be unique to the RobotDyn display as others seem to avoid the problem but this wasn’t the only issue. To get around it I found 2 steps. First I cutoff the built in capacitors on the rear of the device - which I was too lazy to desolder. Second, I commented out all delays. Success! The display sprang to life. Now, there is no way to set timing (such as a counter) so less than ideal, but I want a clock and/or temperature gauge, so I can work with this.
On the RobotDyn display the decimal points don’t seem to be accessible. I haven’t found a definite solution - and won’t need it - but be aware.
Documentation for the colon was cumbersome, but I found a fairly simple solution using a one line command. I can't make it blink easily, but again, of little issue for my project. Use ‘display.showNumberDecEx(0,64);’ and there is a colon.
To get the display to show a steady readout I just used for() statements to repeat the output for the duration I want it to show. Just gives me more subroutines to call. But I’ll take the win.
To get different colors you have to order a color corresponding display. You can not change the color of the display. If this is how you are going to use them, order a batch from Amazon with 5 different color displays. With RobotDyn you order a color or a batch of 1 color.
Step 5: Conclusion
So far that’s what I have found but if you have any suggestions I would appreciate the feedback or suggestions. I’m still learning about the display and have a lot to learn and understand about them. Any other notes you have are welcome. Thanks and I hope this helped others interested in the 7 segment display. Enjoy!