Here's a brain teaser for you:
I have the following 3 digit 7 segment display that has only 6 wires
Experimentally I found out how it works, even though I don't understand it, but anyways every segment is lit by a combination of HIGH and LOW of certain two pins, the combinations are below:
So I tried to make it work, but encountered the following problem (as you can see in the first picture): if, for example, I want to activate the segment that requires pin 5 high and pin 6 low, it also activates the other segments that require 5 to high, because apparently if a digital output is not high, it's automatically pulled to ground, and that's a problem. I tried by setting the other pins I don't use in a segment to high, but then the segments that require 6 low are being activated, so that didn't work.
Other option I have would be transistors or a tri-state buffer, but for that I need all 12 digital inputs of arduino for the two states of each pin of the display.
Hope you understand what my problem is and maybe you have some advice on how to solve it.
Thanks in advance!
Edit: I managed to drive every segment individually using a small delay, and it works if the sketch has only the code for the display, but as soon as I add more code (for the temperature sensor I want to use) it starts to malfunction. You can find the code below.
LE: I managed to make it work by leaving only the display function in the loop and calling every 5 seconds the function for the temperature sensor. It still refreshes the display when it is called, but that doesn't bother me.
Here's the code: http://www.mediafire.com/file/2bs5r8u5rkzpu8g/6w_3D_7S_display.rar
-
3You can emulate tri-state by setting a pin to INPUT. That gives you your three states that you need: OUTPUT & HIGH, OUTPUT & LOW, and INPUT.Majenko– Majenko03/23/2018 21:28:14Commented Mar 23, 2018 at 21:28
-
1Sometimes the simplest solution is the best solution, thanks Majenko!sundaysfantasy– sundaysfantasy03/23/2018 21:41:50Commented Mar 23, 2018 at 21:41
-
The link to your code is not working.VE7JRO– VE7JRO03/25/2018 14:34:00Commented Mar 25, 2018 at 14:34
-
I changed the upload site, try now.sundaysfantasy– sundaysfantasy03/25/2018 17:00:30Commented Mar 25, 2018 at 17:00
-
1It’s a hassle because I split the code into tabs and would mean to upload everything individually. Anyways, I solved the issue.sundaysfantasy– sundaysfantasy03/26/2018 15:13:53Commented Mar 26, 2018 at 15:13
2 Answers 2
What you have is a Charlie-Plexed display like the one in the picture below. You need one more wire than this example because your display also includes the decimal point. If you go through the electrical paths where for each pair one line is driven high, the other is driven low and all other lines are set to input, only one LED at a time will be forward biased.
-
Yes, that’s exactly how i did it, glad to find out how it works, thanks !sundaysfantasy– sundaysfantasy03/28/2018 04:40:17Commented Mar 28, 2018 at 4:40
Thank you for above information, helped me a lot with a similar 7-segment display. ;)
A fresh link to the OP's original file:
https://drive.google.com/file/d/1G9Fknrpn4E85xdxtZdb-2jlWqemdT6xo/view?usp=drive_link
And mine, using it as a 3.7v battery volt meter: https://drive.google.com/drive/folders/1HA1fTVTCFzFU_idXX0rM5-RFQmmX1vFO?usp=sharing
Arduino "everytime" library available from the library list, or here: https://github.com/kfessel/everytime
Joe
-
2While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From ReviewGreenonline– Greenonline06/23/2025 17:15:12Commented Jun 23 at 17:15
-
1Free file access is blocked, requires that owner grants access. @Jdev99 please change this to free access for anybody.MatsK– MatsK06/23/2025 17:37:03Commented Jun 23 at 17:37
-
Fixed the link, for everybody to open it.Jdev99– Jdev9907/27/2025 17:01:59Commented Jul 27 at 17:01