Author Topic: Multiplexing, By Digit or by Segment?  (Read 2851 times)

0 Members and 1 Guest are viewing this topic.

Offline The DoktorTopic starter

  • Regular Contributor
  • *
  • Posts: 179
  • Country: us
Multiplexing, By Digit or by Segment?
« on: January 14, 2016, 11:44:00 pm »
I'm planning to build myself a custom clock. I am looking for a combination of features I can't buy in the store, which is why I am building it. I desire a large blue LED display, the ability to sync time over the network, and automatically adjust for daylight savings time.

I've got some 2.3 inch tall seven segment blue LEDs which will make exactly the type of display I want. I'll be running an ESP8266 module to wirelessly connect to my network for time update, everything else will be taken care of by an Atmel 328p, including the multiplexing. Yes, I do have appropriate chips selected for handling the switching of the anodes and cathodes, as the voltages are a bit high for an AVR to handle :)

So, now you understand what I am trying to accomplish. This will be one or two units just for myself, it is not a product I'm trying to create, so absolute minimum cost is not really a factor.

My only real question is how do I handle multiplexing? Do I display the entire first digit, then the second, third, etc., or do I do each digit one single segment at a time? I understand that either is possible, but which is the more common method of multiplexing, and why?


Thanks
Ed
 

Offline rich

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: gb
Re: Multiplexing, By Digit or by Segment?
« Reply #1 on: January 15, 2016, 12:02:48 am »
Digit at a time. Reasoning:

Software stays sane, as you keep everything human readable and just do a simple 0 - 9 lookup table to get segments.

Clock is probably 4 digits, so lower scan frequency required.
 

Offline jbix

  • Newbie
  • Posts: 8
  • Country: us
Re: Multiplexing, By Digit or by Segment?
« Reply #2 on: January 15, 2016, 07:42:34 pm »
I agree with rich.  The software for digit is simpler, though segment multiplexing isn't horrible.  With digits, it's just one loop.  With segments, its a loop within a loop.  I'm workin on a clock as well (hoping to be a product though).  The only reason to go with segment multiplexing would be if you really want to keep the power consumption down. 

For example, let's say your using 20mA as your drive current for the 7-segment displays, and we'll figure that the average number of segments on is 5 (depending on what you like your numbers to look like).  Your average current would be about 100mA (assuming you're not PWM driving) to drive the 7-segments.  If you multiplexed the segments, the average current would be about 20mA to drive the 7-segments.  This doesn't take into account PWM driving or "off" segments, or other circuitry.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14610
  • Country: de
Re: Multiplexing, By Digit or by Segment?
« Reply #3 on: January 15, 2016, 09:24:55 pm »
There is hardly a reason to use multiplexing per segment, unless you have way more than 7 digits or are fixed with the drivers and choice of common anode or kathode.  Also current consumption does not make a difference, as the average current per LED is what counts.

Even with blue LEDs you can use the AVR to drive the segment lines - the digit side can be silightly higher (e.g. 1-2 V) than the µC supply (though usually 5 V would be Ok).  The LEDs will be off, and essentially no current flowing if the voltage at the LEDs is well below the forward voltage.
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 16973
  • Country: 00
Re: Multiplexing, By Digit or by Segment?
« Reply #4 on: January 15, 2016, 09:29:17 pm »
My only real question is how do I handle multiplexing?

With a MAX7219?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf