Pages: 1 [2] 3   Go Down
Author Topic: Full brightness multiplexing.  (Read 4411 times)
0 Members and 1 Guest are viewing this topic.
Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks dc42,

I am sure its possible, but I have to have decide this weekend, so I have no time to experiment .

I think I would have needed a double sided board for the normal MAX chip type multiplexing ?  and the MAX chips here are over 10 times the price of the normal TPIC6B595N

I managed to design a single sided board with 5 TPICs for a 5x7 module today, and I know it works and I can get the chips. ( double sided boards are a lot more expensive here, especially the setup charges for a prototype board like this )

When I get a chance I will try some multiplex boards
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why not use thirteen TPIC6B95s as the column drivers and eight P-channel mosfets as the row drivers?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That could be good, trouble is I cant find the max allowable current pulse for the chips I have, and I have designed a single 5x7 board that I can just stack side by side for any number of digits, or build them up into bigger panels later on ( there is no border around the pcb )

I will look at that idea when I get a break though, and also see if I can do it on a single sided board, thanks
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The good news is I have an extended period to design this project ( the pcb manufacturer closes down this week til mid Jan and is not taking any new jobs before then )

So I think I will try the Mosfet and TPIC idea, or possibly the MAX 7219,    I dont know how Tadya can sell them for $1.25 when Mouser is $11 or more, and I see Tadya have an online discount of 15% until the 12th!

Which library would be best to experiment with, ( I only want single colour )

I am now going to RTFM about multiplexing, thanks for the leads.

« Last Edit: December 09, 2012, 04:19:53 pm by Boffin1 » Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
how Tadya can sell them for $1.25

Trust me, you do not want to know.
Logged

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmm,   I asked my manufacturer about pulsing the LEDs, and they replied :-

Quote
Hi John,
I see . It's ok with leds . We did pulse testing on such leds.
But it will increase the decay of light a little bit .
You can try an samples .

So I asked what pulse width and frequency they tested at  ?  they said :-


Quote
Frequency is 1.0hz .
1 time per second. We tested 3 monthes . And if leds ok . then we use the chips.

which I work out to being on all the time  :-)

so I asked if I can pulse them 150mA at 10% M/S ratio, and they replied :-

Quote
Hi John,

No . 30mA is the max current .

150mA will burn the leds.

If need 150mA . You should use 0.5W

So it looks like I am abandoning multiplexing for now as I have a couple of thousand of these LEDs left, even though I can't get specs on them :-)
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Offline Offline
Sr. Member
****
Karma: 7
Posts: 264
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I is somewhat off topic, however the statement that an LED appears to be half as bright at 50% duty cycle then at 100% is incorrect for several reasons.
The relation between drive current and luminance is not linear.

It is pretty well explained here:

https://ledshield.wordpress.com/2012/11/13/led-brightness-to-your-eye-gamma-correction-no/
 
Logged


Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Headroom,   thats an interesting link.

So running the LED for half the time only loses a quarter of the perceived brightness,  and you could go down to 1:7 ratio before losing half the perceived brightness.

I just googled LED graph current luminance, to see what increase in current would restore full brightness, and again found pages of conflicting stories about PWM,  i.e. from electronics-tutorial.ws  .
Quote
So pulses at a frequency of 100Hz or more actually appear brighter to the eye than a continuous light of the same average intensity.

A theory from an old HP document according to another page http://electronics.stackexchange.com/questions/17528/does-pulsing-an-led-at-higher-current-yield-greater-apparent-brightness

I think I will have to knock up 2 samples of my 7x5 display and actually test it in the sun while varying the duty cycle of the one.
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So running the LED for half the time only loses a quarter of the perceived brightness,  and you could go down to 1:7 ratio before losing half the perceived brightness.

That makes sense, your eyes perceive light intensity as a logarithmic function. Here's the short table I use:

Step | Duty
===========
  0  | 0
  1  | 1
  2  | 3
  3  | 7
  4  | 15
  5  | 31
  6  | 63
  7  | 127
  8  | 255
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Another point I have been ignoring,  while trying to maintain maximum brightness,  is that each time I buy another batch of LEDs they are much brighter than the previous ones anyway !

It was only a couple of years back that normal ( 25mA ) cheap LEDs broke through the 1000 mcd mark, now 11,000 are common.

Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

  DC42 suggested 
Quote
Why not use thirteen TPIC6B95s as the column drivers and eight P-channel mosfets as the row drivers?

Sounds a good idea , and  I have built a test panel, but only 7 x 5 LEDs.   (  I only have enough LEDs for the project in this format !  I am going to leave a physical gap between each character display - later on I might move to 8x8 and do scrolling )

I want to get this one panel going to test in the sun.

I have 5 rows driven by mosfets, and 7 columns with 7 resistors to DRAIN1 to DRAIN7  of the TPIC6B595. ( DRAIN0 not used )

One problem is that I have migrated to the RFM22B wireless modules ( and RF22 library )  that uses SPI and the pin 2 interrupt.

I have been using  Shiftout to run my 7 seg displays ( latching ),  but I now have have 24 characters that I wish to update , and it sounds like SPI is the way to go speed wise to multiplex each row sequencially ?  Crossroads uses SPI for everything ( sorry this is new ground for me )

I have used SPI and each driven chip needs a chip select input ?  So if I need 24 chip selects I could do that with 3 CD4017s and one clock pin of the arduino ?   

My old Shiftout version just pumps out the data to the first data in pin.

If the receiver detects an interrupt ( I am hoping it is only when a message arrives )  it will presumably disrupt the display refresh?

I could possibly blank the display with the notG while it is dealing with the incoming data..

I am also trying to get my head round the array to store the data in.     It used to be a binary byte for the 7 seg , which I just called up for  shifting out the data for each digit.

Now  I must send out the right byte pattern for the top row of the number for each digit, latch it in,  then load the  second row, and so on ?

I have searched for a library to do this, but they seem to be devoted to particular chips  ( which are expensive here )

I am going to write a sketch to run this one display to show a couple of letters, using shiftout for now, if anyone has some pointers I will appreciate it .
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have used SPI and each driven chip needs a chip select input ?  So if I need 24 chip selects I could do that with 3 CD4017s and one clock pin of the arduino ? 

You don't need 24 chip selects, you can daisy=chain the TPICs from the SPI pins just like you do with ShiftOut. So one CS pin for all the TPICs.  

If the receiver detects an interrupt ( I am hoping it is only when a message arrives )  it will presumably disrupt the display refresh?

If the ISR uses SPI to communicate with the radio, then possibly, but not necessarily. It depends on how the ISR is written, and on whether you can use the same SPI clock fate for both devices. Or, if you can afford to wait a few microseconds before servicing the interrupt (which depends on whether the receiver can buffer incoming data), then you can disable interrupts while you send data to the TPICs.


I am also trying to get my head round the array to store the data in.     It used to be a binary byte for the 7 seg , which I just called up for  shifting out the data for each digit.

Now  I must send out the right byte pattern for the top row of the number for each digit, latch it in,  then load the  second row, and so on ?

Use an array with 8 bytes per 8x8 display, one byte for each row. Shift out the bytes for the rows you want to update.

I am going to write a sketch to run this one display to show a couple of letters, using shiftout for now, if anyone has some pointers I will appreciate it .

The standard ShiftOut is extremely slow. It is not difficult to write a much faster version. See the code starting at line 446 of https://github.com/dc42/arduino/blob/master/Libraries/Lcd7920/lcd7920.cpp. It could be made even faster by calculating and storing the port address and but mask just once during initialization instead of once per byte sent.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks thats pretty encouraging.

Quote
You don't need 24 chip selects, you can daisy=chain the TPICs from the SPI pins just like you do with ShiftOut. So one CS pin for all the TPICs. 

OK so I will use MOSI for the data, clock for clock, and CS for latch .

The RF22 presumably sets the polarity, speed,  etc for the SPI, so I will just fit in with that with a different CS pin?

Quote
Or, if you can afford to wait a few microseconds before servicing the interrupt (which depends on whether the receiver can buffer incoming data), then you can disable interrupts while you send data to the TPICs.

I usually send the transmission several times anyway to be sure ( its just updates of scores now and again ) so I can disable interupts while refreshing each rows data.  ( if the SPI is fast enough there should be time before the next refresh using GMikes timing check  )

I also have a countdown clock that I use "blink without delay" routine for, using millis(), will this be OK ?
Quote
Use an array with 8 bytes per 8x8 display, one byte for each row. Shift out the bytes for the rows you want to update.

Thats basically what I am putting together now for the test which I was going to try with shiftout, but I will try SPI instead.
Can I send out 24 bytes in one go while the CS is low, and then raise it to latch the data?

I'm afraid the example with the LCD display is confusing for me at the moment, I will try my baby steps method to get it running with one panel, and see what happens with 35 LEDs up against the African sun in the morning.

Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can I send out 24 bytes in one go while the CS is low, and then raise it to latch the data?

Yes, you can.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1183
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Great,  thanks ,  long night ahead ...
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Pages: 1 [2] 3   Go Up
Jump to: