Maker Pro
Maker Pro

Transistor Mosfet pairs to drive LED cube layers

rjamjb

Jan 19, 2013
50
Joined
Jan 19, 2013
Messages
50
I understand but that's wrong. On every multiplex phase, you need to clock a full set of new data into the cathode drivers. The only exception would be if every slice was displaying an identical pattern.

Remember with multiplexing that you have to drive each slice in sequence, in a loop. On each change of the multiplex phase, you have to disable the driver MOSFET for the current slice, output new data to the cathode drivers for the slice that's about to be enabled, and enable the driver MOSFET for the next slice.

The cathode driver chips can presumably be updated ready for the next multiplex phase DURING the current multiplex phase, and the final data can be latched in at the right instant, but this still only leaves about 1.5 ms to load them all each time.
I agree, I didn't mean that the update to the driver's gets missed, or stopped half way through I meant that the IRS only has to do the driver update and the switching from layer/layer. I think that I may not have been clear. What I was trying to say was that the part of the program that will generate the animations - which could be quite involved using floats etc, eg a ripple of colours involving sin/cos functions etc - this would not need to happen within the update cycle.

You are right about the updating - the channels will hold their state until signal sent to update them, this means you can update the driver data while the current multiplex phase so only one set of driver updates per phase.

In the ISR the loop would something like. Set ISR flag to zero, switch off current layer say (a), switch on all driver channels with current set of data for next layer say (b), switch on next layer (b), update driver with next set of data for layer after next (c), deal with some resetting/housekeeping, exit to main prog.





That raises another point. You need to get 192 cathode connections into each slice. How are you going to do all that wiring?

Just one column of one slice needs 24 cathodes and an anode, and the full slice has eight columns, for 192 cathodes total! Those 192 cathodes will be commoned up with the 192 cathodes of each other slice.


:D he he - that is the part of the project that will take most time. I think once I've got the circuitry sorted and am happy with the programming it will take me 3-5 x's as long to put the cube together!!. I'm going to make a jig to hold 8x8 column layers (x-z plane) which will hold 64 leds in place and allow me to solder the cathode columns together. The outside frame will have some slightly larger straight wire to provide stability and allow the cube to 'hang off' the frame. I'll make the jig on a home made cnc router so that I get perfect spacing and alignment and I've ordered an extra two tips for my soldering iron !!:D.

Note - the jig will possibly take a bit longer to make as it is currently snowing/mid winter and -ve temperatures here in the UK and my router is in an unheated garage. I prefer to do my projects in the most comfort I can :) ;)
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I agree, I didn't mean that the update to the driver's gets missed, or stopped half way through I meant that the IRS only has to do the driver update and the switching from layer/layer.
Right. And that involves transmitting 192 multi-bit brightness values to the cathode driver chips in 1.5 milliseconds. This is what I think you need to check for feasibility.

I think that I may not have been clear. What I was trying to say was that the part of the program that will generate the animations - which could be quite involved using floats etc, eg a ripple of colours involving sin/cos functions etc - this would not need to happen within the update cycle.
Sure, and just as well!

In the ISR the loop would something like. Set ISR flag to zero, switch off current layer say (a), switch on all driver channels with current set of data for next layer say (b), switch on next layer (b), update driver with next set of data for layer after next (c), deal with some resetting/housekeeping, exit to main prog.
Something like that. On each multiplex interrupt, you would only update the cathode drivers with the data for the NEXT phase. In your description you seem to be sending two lots of data to the cathode drivers. I think your ISR will be busy enough just sending one slice's worth of data each time.

That raises another point. You need to get 192 cathode connections into each slice. How are you going to do all that wiring?
Just one column of one slice needs 24 cathodes and an anode, and the full slice has eight columns, for 192 cathodes total! Those 192 cathodes will be commoned up with the 192 cathodes of each other slice.


:D he he - that is the part of the project that will take most time. I think once I've got the circuitry sorted and am happy with the programming it will take me 3-5 x's as long to put the cube together!!. I'm going to make a jig to hold 8x8 column layers (x-z plane) which will hold 64 leds in place and allow me to solder the cathode columns together. The outside frame will have some slightly larger straight wire to provide stability and allow the cube to 'hang off' the frame. I'll make the jig on a home made cnc router so that I get perfect spacing and alignment and I've ordered an extra two tips for my soldering iron !!:D.

Note - the jig will possibly take a bit longer to make as it is currently snowing/mid winter and -ve temperatures here in the UK and my router is in an unheated garage. I prefer to do my projects in the most comfort I can :) ;)
Well, you're nothing if not keen :)
 

rjamjb

Jan 19, 2013
50
Joined
Jan 19, 2013
Messages
50
Something like that. On each multiplex interrupt, you would only update the cathode drivers with the data for the NEXT phase. In your description you seem to be sending two lots of data to the cathode drivers. I think your ISR will be busy enough just sending one slice's worth of data each time.

Agree- only need to send one set of data at a time in the ISR.

On the diode issue I think I misunderstood this part of the circuit. I'll spend a bit more time perusing to make sure I understand it properly.

The Driver chips haven't displayed any further issues since I rewired and have daisy chained two of them also with no problems. In hind sight I think two things may have been occurring -1. I had big loops of connecting wires and moving these around may have created inductance interference with the other wires - now the wiring is short and laid flat and I don't think will be an issue. 2. I was inadvertently creating a short to ground by touching one or more of the wires. If the problem does recur then I'll definitely be back


Appreciate all your help on this I think I am comfortable enough to order a few components now and work on a physical layout to get all 8x switches on a compact solder board.
 

rjamjb

Jan 19, 2013
50
Joined
Jan 19, 2013
Messages
50
Components arrived today - now the hard work begins.

One last post on this, I did some research on timings and have seen a post where someone has been able to update 64 led's at once with in 204.8 microseconds to a TLC5940 using a 20Mhz pic.

My layers have 64x3 leds so for this example that's 204.8*3 = 614 microseconds. Need to multiply by 8 for the layers/multiplexing = 1638 microseconds - Now change from the 20MHz clock to my 80Mhz = divde by four = 410 microseconds or 0.410 miliseconds compared with the 1.5625 milliseconds that you've posted as being a reasonable upload speed.

Probably quite simplistic to compare in this way and maybe spi and or bitbanging may give me an advantage in my code but it does look doable with a bit (if not a huge amount) of headroom.

Will be sure to post back once I've got the circuits in place and 'hopefully' again when the project is complete.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
That sounds promising.

I think your calculation is wrong. Each multiplex phase, which will take about 1.5 ms, only updates one slice. So you don't need to multiply your 614 microseconds by 8. (If you do, the answer isn't 1638 microseconds anyway.)

This guy who updated 64 LEDs at once in 204.8 microseconds... were they RGB LEDs? Did he use a PIC with an SPI peripheral?
 

rjamjb

Jan 19, 2013
50
Joined
Jan 19, 2013
Messages
50
OOps -:eek: embarrasment factor on both the logic and the math !!!!! Hands up and then hold head in shame. Why on earth didn't I think for a couple of minutes first.!!

There was no more data on the original post - just that 64LEDs updated in that time so can't tell how and what specific hardware etc - if they were RGB then things are better by 3 factor. Also - taking my factor of 8 error out then this improves things (even from the wrong calculated number !!!) from my original conclusion.

:)
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK.

You might want to check the maximum clock rate for the cathode driver chips. If you need to use an SPI peripheral, if you're running your PIC at 80 MHz, you may have to slow down the peripheral to meet the limits of the cathode driver chip, so you may not get four times the speed.

In any case it sounds feasible if you have a PIC with an SPI peripheral built-in. I don't think it would be practical with bit-banging, although at 80 MHz clock you might manage it...
 

rjamjb

Jan 19, 2013
50
Joined
Jan 19, 2013
Messages
50
Another problem

Hi,

I got the mosfets delivered a while ago and unfortunately I would have to be a complete solder ninja to the infinite grade to be able to manually solder those to a solder board so.....

First I had a quick look at how easy it would be to get a pcb made up to spec and then use heat/flow solder techniques to surface mount manually. Well I'm afraid that is too steep a learning curve at this stage, while it seems a viable proposition I think I'd rather spend my time on my project rather than spend a lot of time for a small gain in terms of the overall project.

Secondly I decided to do some research into through hole mounted components that could replace the mosfets in the circuit set out. It is actually very very difficult to find logic mosfets with the sort of specs that the SMount components have. I have spent a long time going through various manufacturers sites to find what I'm looking for. I think some compromise on ideal vs price has been necessary (IR have a driver IC N&P channel with perfect specs - it is irradiated and the only place I've seen a quote was for over $500 each!!!!! - I believe it was designed for space technology)

Anyway I eventually came up with the following three components - the first two are the n and p logic mosfet drivers and the last one the power mosfet - which I think is the easiest to source and there are several alternatives with differing specs I could identify.

Before I order these could I ask if these can simply replace the mosfets in the original switch circuit earlier in this thread, or would any changes to that circuit be needed, and indeed are they in fact suitable?

ZVN4306A
Rds (on)
Threshold voltage
Fast switching
http://www.farnell.com/datasheets/1643206.pdf


ZVP4424A - MOSFET, P, LOGIC, E-LINE
Threshold voltage
Rds On
Fast Switching
http://uk.farnell.com/diodes-inc/zvp4424a/mosfet-p-logic-e-line/dp/9526129


IRF9510 for the main power Pchannel mosfet
Threshold voltage
Rds On
Max source/drain current - 4A
http://docs-europe.electrocomponents.com/webdocs/0791/0900766b80791188.pdf
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
What package are they? A SOT-23, which is the most common package for SMT MOSFETS, it really pretty easy to solder by hand with a soldering iron. You just need a very fine conical tip, fine solder wire, some tweezers, and a good magnifier. Of course, you would almost have to have a PCB, but you might try soldering them across two strips on stripboard as well, with a cut across the strip that has two pins soldered. I have done that with SMT LEDs.

Bob
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
None of those devices is very suitable. The drivers aren't specified to operate with 3.3V gate signals, and although the typical graph shows that a typical device would work, not every device they ship is "typical"!

The main MOSFET you found has a very high ON resistance of 1.2 ohms, and that's specified at Vgs=-10V so it's not a logic-level MOSFET.

Those devices I suggested sure are tiny! I had assumed you would be doing a PCB for this project, to keep the size down. What construction method are you planning to use?

I've just noticed that the DMP2035 that I suggested is not suitable - it contains two MOSFETs, yes, but their drains are connected together internally! I'm sorry about that. I wasn't expecting it. The SI4931DY-T1-E3 which has a much lower ON-resistance would still be suitable.

You might rather use individual MOSFETs for the main switching position. I've found a couple of ones that look good:

1. Vishay Siliconix Si2333DDS-T1-GE3 SOT-23 Rds(on)=0.028@Vgs=-4.5V USD0.50
http://www.digikey.com/product-detail/en/SI2333DDS-T1-GE3/SI2333DDS-T1-GE3CT-ND/3679984

2. Vishay Siliconix Si4403BDY-T1-GE3 SOIC-8 Rds(on)=0.017@Vgs=-4.5V USD1.00
http://www.digikey.com/product-detail/en/SI4403BDY-T1-GE3/SI4403BDY-T1-GE3CT-ND/2441947

I'd go for the first one, in the SOT-23 package, even though its ON-resistance is a bit higher. You can mount a SOT-23 device on stripboard pretty easily. On one track, cut the copper on both sides of a hole, then place the SOT-23 sideways, with the gate and source straddling the cut, and the drain sitting on the adjacent track.

Another option is little SMT adapter boards such as those made by http://www.schmartboard.com. I've used similar boards from another company (don't remember the name sorry) and they work fine. They do waste space though.

For the drivers, it would be easier to use old-fashioned leaded transistors such as BC547/557 or 2N3904/3906. Here's an updated schematic.

attachment.php


WARNING! THIS CIRCUIT HAS SEVERAL PROBLEMS AND I DON'T RECOMMEND IT.
 

Attachments

  • RJAMJB.002.GIF
    RJAMJB.002.GIF
    6.2 KB · Views: 586
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
There are a few problems with that design. I'll post an update when I've figured out the best way to solve them.
 

rjamjb

Jan 19, 2013
50
Joined
Jan 19, 2013
Messages
50
Thank you so much for your input on this.


None of those devices is very suitable. The drivers aren't specified to operate with 3.3V gate signals, and although the typical graph shows that a typical device would work, not every device they ship is "typical"!
Glad that I cross checked first - I knew the drivers were marginal from the specs - this is what I thought was the compromise.


The main MOSFET you found has a very high ON resistance of 1.2 ohms, and that's specified at Vgs=-10V so it's not a logic-level MOSFET.

Mmm, yes, think that I'd not looked at this carefully enough - I was interested in the 1.2Ohms though. In your previous posts you'd mentioned importance of as low a resistance as possible. I'd thought that 1.2ohms wouldn't really be that much difference to a few hundred milliohms that the other mosfets are spec'd at. I would be interested in the importance of this point for my own education.
- edit - just noticed that they are a few 10s of milliohms - I guess that is quite a difference

Those devices I suggested sure are tiny! I had assumed you would be doing a PCB for this project, to keep the size down. What construction method are you planning to use?

I'd intended to put the circuits on one or more through hole strip boards/solderboards. The size of the overall circuitry is not really that much of a limiting factor. The LED cube will be about 475mm per side. It will sit on a piece of MDF which itself forms the top of a pedestal type box, say 50mm deep. All the electronics (and the numerous cables from the cathode columns will be inside). If space is an issue then I'll just make the pedestal a bit deeper- say 100mm if needed. So inside the box will be my 5v, 4A supply, the chipkit ciruit board, the circuit board with the 12 tlc5940's and all the chip driver circuitry, a 5v-3.3v dc/dc converter, and also the circuitry for the switches per this post. If these switches need to go on more than one board then I'm not too concerned.

I've just noticed that the DMP2035 that I suggested is not suitable - it contains two MOSFETs, yes, but their drains are connected together internally! I'm sorry about that. I wasn't expecting it. The SI4931DY-T1-E3 which has a much lower ON-resistance would still be suitable.

You might rather use individual MOSFETs for the main switching position. I've found a couple of ones that look good:

That would be fine - as per above size is not really a limiting factor. To reply to the previous post on packages the original mosfets I have are SOT523

1. Vishay Siliconix Si2333DDS-T1-GE3 SOT-23 Rds(on)=0.028@Vgs=-4.5V USD0.50
http://www.digikey.com/product-detail/en/SI2333DDS-T1-GE3/SI2333DDS-T1-GE3CT-ND/3679984

2. Vishay Siliconix Si4403BDY-T1-GE3 SOIC-8 Rds(on)=0.017@Vgs=-4.5V USD1.00
http://www.digikey.com/product-detail/en/SI4403BDY-T1-GE3/SI4403BDY-T1-GE3CT-ND/2441947

I'd go for the first one, in the SOT-23 package, even though its ON-resistance is a bit higher. You can mount a SOT-23 device on stripboard pretty easily. On one track, cut the copper on both sides of a hole, then place the SOT-23 sideways, with the gate and source straddling the cut, and the drain sitting on the adjacent track.
.
Another option is little SMT adapter boards such as those made by http://www.schmartboard.com. I've used similar boards from another company (don't remember the name sorry) and they work fine. They do waste space though.

Perhaps SOT-23 are a bit bigger than SOT523? - you are giving me a bit of confidence that this is possible. I'm looking again at the SOT523's and they really are very tiny.

For the drivers, it would be easier to use old-fashioned leaded transistors such as BC547/557 or 2N3904/3906. Here's an updated schematic.

attachment.php

I'm intrigued - part of the reason for the mosfet drivers is the fast rise/fall times - will this perhaps be compromised with the transistors?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
SOT 523 1.7 x .98 mm
SOT 23 2.9 x 1.3 mm

So they are a bit bigger than what you are looking at.

Bob
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Yeah, SOT-23 is big enough to work with manually. Using transistors will slow things down a bit, but not significantly.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I had a look at improving the driver, then I figured it would solve a lot of problems if you just used a driver IC. It's arguable that the main MOSFETs aren't really heavy enough to justify a full-fledged driver IC, but it's much more compact than a discrete solution, and not much extra cost for a one-off project. And of course it will give very good performance and well-defined behaviour.

There's a quad driver (so you'd need two of them for eight MOSFETs) in a 14-pin plastic DIP, available from Micrel and Microchip, with three versions:

Micrel MIC4467,8,9
Microchip TC4467,8,9 (cheaper than Micrel)

You can use any of the three versions; the difference is in the input configuration. Probably the 4467 and 4469 are the easiest to interface (the 4468 can only be configured with an active low input). See http://www.digikey.com/product-detail/en/TC4469CPD/TC4469CPD-ND/115363

It will seem a bit funny to have big 14-pin DIP devices driving tiny little SOT-23 power MOSFETs but it's probably the best solution. Call it a hybrid design - a mixture of old and new technology :)
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
What are the needed specs? Surely there is a logic level MOSFET in sot-23 that will do the job without any driver needed.

Bob
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Okay, I see the problem. Even logic level MOSFETS require 4.5V to saturate, and the signal is 3.3V.

The thing is, at a multiplexing rate of around 100Hz, you are not going to need fast turn on and turn off times, so a simple voltage shifter with a collector resistor should be fine. I made a battery charger that used this configuration running at 10000Hz and there was very little heating due to the time spent in linear region. I used a 1K collector resistor. So just a single transitor, 1K collector resistor and 10K base resistor would be all you would need in the way of a gate driver.


Bob
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
He's concerned about getting fast switch-off to avoid ghosting. Of course he could add a short delay between multiplex phases without losing significant brightness, then an NPN with a 1k collector resistor would be a good idea, and cheaper (if not smaller) than a quad driver in DIP-14.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
What are the current and Rdson requirements? I have found many MOSFET that specify their on resistance at 4.5V but it only goes up by 20% at 3.0V. There should be one of these that would work without a driver.

Bob
 
Top