Author Topic: How to connect 14-3 character display to MCU  (Read 6553 times)

0 Members and 1 Guest are viewing this topic.

Offline sangarTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: in
How to connect 14-3 character display to MCU
« on: May 26, 2017, 11:18:45 am »
Hi,
Our project require 14-3 character display (BA56-12SRWA -Part number). Each 3 character display consumes 11 GPIO pins.For 14, it requires 154 pins . So,

Q1:Should I go with MCU have 154 GPIO pins?

Q2:(Or) There is something which will make design much more easier?


Thanks,
Muthu

 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: How to connect 14-3 character display to MCU
« Reply #1 on: May 26, 2017, 11:51:44 am »
No, you don't need an MCU with 154 pins. 

What you need to do is called "multiplexing" - effectively this means you need to light up each digit/character, one at a time, but simply do it fast enough so that it appears (to the human eye) as if the characters are lit up at the same time.

With 14 of those it'll probably get tricky to do it fast enough, so you may need a slightly more complex arrangement.
my random ramblings mind-dump.net
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: How to connect 14-3 character display to MCU
« Reply #2 on: May 26, 2017, 12:27:15 pm »
Multiplexing is a given, as the specified display is already multiplexed (3 common anodes and 8 segments = 11).

14x3 = 42 digits: serial multiplexing would impose rather serious limits on brightness, assuming the flicker would be bearable, as the maximum duty cycle qould only be 1/42 ~= 2.4%

There are other options:

Grouping: Have, e.g.,  5 separate groups of 3 displays (9 digits each, last one would only have 6) multiplexed: the number of IOs needed would be 8x5 for the segments plus 9 for the common anodes (they can be shared) = 49. Still a lot of pins.

The main problem then becomes the amount of current needed to drive all those LEDs with a decent brightness, I don't think any MCU can manage it, so drivers are a must in any case.

At this point, one can think of directly using LED drivers ICs with serial inputs, such as MAX6954: note that this IC is common cathode and no common anode version exists, so another display should be used (or some other chip...)
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: ro
Re: How to connect 14-3 character display to MCU
« Reply #3 on: May 26, 2017, 04:16:40 pm »
maybe you can use a small micro for each module ?
just enough cpu power to do the multiplexing locally and implement some sort of spi or other communication protocol ?
that will allow you to make some "complex" functions as well - dimming / some test modes to help you install the thing, maybe even power sequencing if needed

MAX6954 costs more than a F4 series mcu ... you can get 5-6 small atmega / pics / 8051 based mcu's for the price of one.
http://ro.mouser.com/Search/Refine.aspx?Keyword=MAX6954
vs
http://ro.mouser.com/ProductDetail/Microchip-Technology/PIC16LF1575-I-P/?qs=sGAEpiMZZMu9ReDVvI6axz8JhCmDpjG%2fyAs%252baLjPBcxSCf65hEWPow%3d%3d
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: How to connect 14-3 character display to MCU
« Reply #4 on: May 26, 2017, 07:09:10 pm »
At this point, one can think of directly using LED drivers ICs with serial inputs, such as MAX6954: note that this IC is common cathode and no common anode version exists, so another display should be used (or some other chip...)
Buy the common cathode version of the display BC56-12SRWA.
http://www.kingbrightusa.com/images/catalog/SPEC/BC56-12SRWA.pdf
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: How to connect 14-3 character display to MCU
« Reply #5 on: May 26, 2017, 09:37:56 pm »
Use a couple 595's per display, them pump data at 8Mhz or more, latch, done, you can even PWM the outputs using the OE pin.
 

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 825
Re: How to connect 14-3 character display to MCU
« Reply #6 on: May 27, 2017, 02:37:05 am »
There are many solutions to your problem, but I would consider treating each display as one 'problem'. Then take your 'solution' and multiply it by then number of displays needed (14). Your problem is now reduced to a single 3 digit display. When you can get one working, you just need to create 13 more of the same.

Of course, you will have to also think about how to communicate with these 'individual' displays, or how to link them together.


Here is something I created recently-
https://goo.gl/photos/rTCwusquFnb8AfQE6

I am using minimal parts- a PIC16F1578, a couple caps, a couple pnp to drive the 2 common cathodes (I'm driving the cathodes a little differently, but for a reason). The circuit board fits exactly to a 2 digit 14 segment display, and I can connect as many displays as needed, in any arrangement I want. Each digit has its own 'address' which I send serial data to via a simple protocol (which allows for 126 digits to be addressed). The board has 3 connections- power, ground, serial in. Each board uses the same connections, and they all see the same serial data. I'm driving the anodes (led segments) directly from the microcontroller pins and the brightness I'm getting is not a problem (the bigger problem is how to control the brightness to a very low level, which is easy in this case as the PIC has a 16bit pwm of which I'm using 12 bits, to drive the common cathodes). The PIC16F1578 is a 20 pin micro, and I need 2 common cathodes, 14 segments (+ decimal point), and serial in- that's 18 pins I'm using and with the pps feature it is possible (the reset pin becomes the serial in). I'm pushing the current capabilities of the PIC a little bit, but have been running a number of them on a breadboard at max brightness and at 5volts for quite a while without a problem.

If I was doing the same thing for your display, I would just switch to a PIC16F1574 (14 pin version- 3 common drivers, 7 segments + decimal point, serial in = 12 pins). It's $1.07 in single quantities. I'm using less than half the flash space, and a quarter of the ram, so no need for larger flash.

There are other ways to drive the displays (shift registers), but in any case you will be multiplexing the displays (no way around that unless you use individual single digit displays).

 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: How to connect 14-3 character display to MCU
« Reply #7 on: May 28, 2017, 05:53:07 am »
If you want a simple cheap and flexible solution,  take a look on TM1638 from Titan Micro,

 

Offline sangarTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: in
Re: How to connect 14-3 character display to MCU
« Reply #8 on: May 29, 2017, 07:24:24 am »
Hi All,

We decided to go with MAX6954. I read  that One MAX6954 support up to 16 digits. My requirement is 42 digits. So,  My application needs 3 MAX6954.
Can anyone share reference design and sample code for MAX6954?



Thanks,
Muthu
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5019
  • Country: ro
  • .
Re: How to connect 14-3 character display to MCU
« Reply #9 on: May 29, 2017, 09:16:49 am »
Why wold you pay 15-20$ for a single MAX6954 when you could just use a microcontroller and some led driver?

Maxim parts are expensive and hard to buy and often not on stock, forget about them.

You can buy proper led drivers at cheap prices , for example here's a nice 24 channel led driver :  PCA9956BTWY

Once you have it, it's up to you if you use a single one or if you use multiple ones to make your overall display show multiple digits at a time instead of multiplexing them and risk having more flicker

Here's an example for 9 digits using a single such led driver .. you'd basically require 3 pins to enable digits (you'd enable 3 digits at a time , 1 out of 3 digits from each 3 digit display) and two pins (i2c communication to led driver to tell it which channels should be on or off.




You can go wide and simply add led drivers by giving each led driver a unique i2c address (this particular led driver chip can handle up to 125 devices on the same i2c bus) but for 42 digits, you'd probably use 5 such chips ( 5 x 3 x 3 = 45 digits and just leave the digits 43, 44, 45 unused).

You will still need only 3 pins to enable digits  and only 2 pins for i2c

ex .. for 18 digits :



send  48 x 1 byte (one for each channel)  to connect the 48 cathodes you want to ground.

send voltage on digits 1, 4 , 7 , 10, 13 and 16  (a single i/o pin connected to the base of a transistor or mosfet) and then the output of that transistor or mosfet sends power into those digits
wait some time
disable the led drivers to turn off all channels

send 48 x 1 byte (one for each channel)
send voltage on digits 2 , 5, 8, 11, 14 , 17
wait some time
disable led drivers to turn off all channels

send 48 x 1 byte (one for each channel)
send voltage on digits 3 , 6, 9, 12, 15 , 18
wait some time
disable led drivers to turn off all channels

so unless i'm too tired to think straight, you'd need a simple microcontroller with 3 output pins and 2 data pins (i2c)

Your microcontroller simply has to convert numbers to segments in order to figure out which channels to be turned on or off and enable the digits you want ... fairly simple to do even with a 1-2$ microcontroller.


« Last Edit: May 29, 2017, 09:27:51 am by mariush »
 

Offline sangarTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: in
Re: How to connect 14-3 character display to MCU
« Reply #10 on: May 29, 2017, 10:23:02 am »
Hi mariush,

Ok. Each display(3 character display) have 3 control pins. For, 16 display, it will become 48. If I am right, these control pins has to be controlled from Micro-controller not from LED drivers like PCA9956.

How should I multiplex so that only 3 pins from microcontroller controls 16 display?



Thanks,
Muthu
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5019
  • Country: ro
  • .
Re: How to connect 14-3 character display to MCU
« Reply #11 on: May 29, 2017, 10:36:08 am »
No, you won't have 48 pins... unless you really want to.

Each led driver has 24 channels, so it can turn on or off 24 segments. At any point in time, you only turn on one digit out of each 3 digit display so you connect the 24 channel led driver to 3 separate  3 digit displays.
Therefore, you can use 3 i/o pins to send power to digits, to 3 digits at any point (first digit from each 3-digit display).  One pin will enable digits 1-1 , 2-1, 3-1 , 2nd pin will enable digits 1:2,2:2,3:2 , 3rd pin will enable digits 1:3,2:3,3:3
At any point, only one of those 3 i/o pins is 1 and the others are 0, so you actually have to use a loop in the source code of the microcontroller to show a third of the digits for a period of time, then the next 1/3 of digits (each center digit from the 3 x 3digit displays) then the last third set of digits and if you do it fast enough your eyes will see all digits turned on.

If you use multiple 24 channel drivers, 3 i/o pins should be enough because you just scale it ..  and you have the 2 or 3 pins required for i2c and optional enable/disable chip pin

You can use more than 3 io pins to send power to digits and then you may be able to lower the number of individual led driver chips, but everything becomes more complex and you may have more flicker on the display because you turn on and off digits more often and you have to push more bytes or bits through the i2c bus
For example you can connect the 2 cathodes from each set of 3 x 3 digit displays on a led driver chip channel and then use 6 i/o pins to enable digits differently, for example in the picture below you send power to digits 1,4,7 using one io pin , then another io pin for digits 10,13,16  , then another io pin for digits 2,5,8,  then another pin for digits 11,14,17 and so on ...  6 pins to enable  2 x 3 digits at any particular time.
You save a led driver but you turn on and off digits twice as often, and that can introduce flicker .. and can also make the circuit board harder (because you have all those connections between cathodes before the wires go to the led driver


« Last Edit: May 29, 2017, 10:51:34 am by mariush »
 

Offline sangarTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: in
Re: How to connect 14-3 character display to MCU
« Reply #12 on: May 29, 2017, 11:03:27 am »
Hi,
Now, I understood. Digit pins in 3- character display are Dig-1,Dig-2 and Dig-3.

My application needs 16 displays. So 16display's Dig-1 has to be connected to GPIO-1 Micro-controller.

Then, all 16 display's Dig-2 pins has to be connected to GPIO-2 of Micro-controller and Dig-3 pins of all 16 displays for GPIO-3 of Microcontroller.


Am I right?


Thanks,
Muthu
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5019
  • Country: ro
  • .
Re: How to connect 14-3 character display to MCU
« Reply #13 on: May 29, 2017, 11:24:20 am »
Yes, pretty much.

But you don't connect directly to microcontroller pin , because a microcontroller i/o pin can typically only output around 25-50mA (and depending on microcontroller, some can only output up to 100-150mA on ALL output pins).

As an example, you would probably configure the segments to use around 5mA or some value below 10mA at max brightness .. so if a digit displays "8" (all segments but the dot are lit), then your digit would use 7x5mA = 35mA .. if you multiply that by 16 you have 560mA to show 8 on 16 digits at one time.

Personally, if i configure the segment current to 5mA, i'd allow for 5mA x 8 segments x 16 digits = 640mA + about 10% for safety, so around 800mA.

I'd use a transistor with a minimum hFe (amplification/gain/whatever) of let's say 200  and then I'd know that if the transistor receives 5mA on the base pin from the micro, there will be at least 1000mA of current allowed to flow between collector and emitter of the transistor which is above our minimum desired value of 800mA  (we use the transistor as a switch)

so i/o pin ->  [ small value resistor, example 10ohm ] - > base pin of transistor 

5v ---- [[ collector pin of transistor ---- base pin to resistor and then micro ----- emitter  (about 4.3..4.6v) ]] ---- digit anode 

resistor on base pin of transistor is important, without it you can damage the transistor by pushing too much current in it.

mosfets are voltage devices, they'll turn on when voltage on the gate pin goes above a threshold and turns off when the voltage goes below a threshold. You typically need a resistor between the gate and ground to quickly discharge the gate capacitance and turn off the mosfet , without one the mosfet could need a long time (milliseconds) to turn off, like a fade out... so you'd have "ghosting" on the display digits
« Last Edit: May 29, 2017, 11:27:51 am by mariush »
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Re: How to connect 14-3 character display to MCU
« Reply #14 on: May 29, 2017, 11:25:50 am »
Right, but via a transistor that can handle the current involved. You're way over what the data pin can handle directly.
 

Offline sangarTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: in
Re: How to connect 14-3 character display to MCU
« Reply #15 on: May 29, 2017, 12:00:08 pm »
Hi,

I got it. I have one more question.
Though multiple digits powered up when GPIO-1 is high, I can use the specific digit which I want to display?.


 for example, first digits of 16 displays will be enabled when GPIO-1 high. But, I want to display only 8 digits out of it. At that time, all other 8 digits should be turned off and it should not show anything which is unwanted.

I think that this is purely programming related. Writing the specific LED register so that LED segments output available for that particular digit which I want to display.


Am I right?
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5019
  • Country: ro
  • .
Re: How to connect 14-3 character display to MCU
« Reply #16 on: May 29, 2017, 12:07:16 pm »
Sure, yes.

You control each segment of each digit , so in order for one digit to be fully off you simply set all the segments to off (0) for that digit. Then even if you enable a digit by sending power to it, no cathodes are connected to ground by the led driver IC so the segments won't light up. 
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: How to connect 14-3 character display to MCU
« Reply #17 on: May 29, 2017, 12:26:54 pm »
If you are going to use a mosfet, which you probably are, you will need an P-channel mosfet since you will need to switch the high-side of the segments. (5V to Common Anode)

An P-channel mosfet turns off when Gate is higher or equal to Source.
An P-channel mosfet turns on when Gate is more than Vgs below Source.

image source
« Last Edit: May 29, 2017, 12:53:48 pm by Jeroen3 »
 

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 825
Re: How to connect 14-3 character display to MCU
« Reply #18 on: May 29, 2017, 03:16:12 pm »
Quote
Our project require 14-3 character display
Quote
My application needs 16 displays

This is why I suggested treating each display separately, as the number of displays needed will most likely be a moving target.

Also consider this-
-when treating each display separately, you have only one small pcb design to make, duplicated n times (n appears to be changing)
-with a single micro for each display, it will contain its own multiplexing and require minimal outside connections (since it does its own multiplexing it will continue to display the info without any further outside assistance)
-a pic micro can be had in dip/so/ssop packages, so you can breadboard one display to design/test
-a micro can be found anytime, in many configurations, with no worries about a 'specialty' chip that may be hard  to find in the  future (possibly near future)
-the same program would be used for each display, so only one program needs to be developed (same as using a specialty chip, as you will need to develop one program for control)
-connections between each board will be minimal- power, ground, signal (or could use other comm methods which require  more pins- spi/i2c/etc)
-each digit can be controlled separately (with its own brightness setting)

here is a parts list for a micro solution, for each display-
1ea pic16f1574, 14pin micro (dip,so, or ssop)
1ea 3digit display
3ea pnp transistor (or npn, depends on display)
1ea 100n cap (micro bypass)
1ea 10uF cap (micro supply)


Here is what I would do (if you wanted to use a micro for each display)-
get a micro in dip package, get a display, some transistors and caps, wire it up on a breadboard and just start to get a display working with multiplexing. Once that is done (which is quite easy), the rest just becomes a matter of fine tuning, handling how you want the communications protocol to work, etc.

Maybe my ideas are odd, but I just like as simple as possible (minimal parts, minimal connections, minimal everything).
 

Offline sangarTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: in
Re: How to connect 14-3 character display to MCU
« Reply #19 on: May 30, 2017, 12:42:17 pm »
Hi,
I wanted to go with PCA9956 but My colleague ordered three quantities on MAX6954. Eventually,for Pilot production, I will go with parts like PCA9956 in order to minimize cost.


Ok. Coming to MAX6954, in the datasheet, it says that how to interface 8 two digit display (totally 16 digit). I am wondering to connect 5- 3 digit display to MAX6954. Have anyone had experience on this?

Q1: How to interface 5-three digit display to MAX6954?
     
       three digit display-BC56-12SRWA.



Thanks,
Muthu
 

 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: How to connect 14-3 character display to MCU
« Reply #20 on: May 30, 2017, 04:11:09 pm »
Q1: How to interface 5-three digit display to MAX6954?
     
       three digit display-BC56-12SRWA.
Please, understand that my suggestion for MAX6954 was just an example to show that specialized drivers exist, I've never personally used that IC! :-//

At most 4 3 digits displays can be connected per IC, as the common cathode drivers are only 8 and each has to serve 2 digits with a different set of segment drivers.
Page 8, table 4 shows the connections: one display will have its 3 cathodes connected to CC0-2 and the segments to 1a-1f, the second will still use CC0-2 but with segments 2a-2f. Same for another couple of displays, using CC3-5.

If you want to use the remaining positions (CC6 and 7), single or double displays are needed.
Nandemo wa shiranai wa yo, shitteru koto dake.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf