Best solution, Mega88, LEDs and FET

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi again!

I am working on a rather big 7-segment display (3 displays) and datasheet: https://www1.elfa.se/data1/wwwro...

Now to my question: I have to drive the 7-segments with 12V so I now have two options for a solution and want to here what you think. The cost is not a problem in this case, it's just a small part of the whole project. The reliability is what counts (big time so no failure due to a few dollar/euro)

My options is:
Option 1: Two FETs to be nicer to the Mega88.
Option 2: Just one FET.

Witch one would you choose to be on the safe side, and remember reliability is the key!

Thanks in advance for your time! :D

P.S. I have not added any other components than "the interesting ones" in this question D.S.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Neither solution will work. You need to use P-FETs on top for either to work, and you'll still need a pull up resistor on the gate of the top FETs.

However, it'd seem more logical to me to just have a N-FET on the ground side of the load, and no FET on the top (+12V) side of the load. You'll want a pull down on the gate of the FET to turn it off when the AVR isn't driving it (ie when the AVR is in reset)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Huh, ULN2803 x 3 would be my best bet if you don't mux the displays.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks to both of you!

nleahcim: Would BC337 (small signal NPN) work? If the NPN works I will use a base resistor and a pulldown. I do not have P-channels at home. I have to use transistors on top to be able to choose color (red/green).

Guillem Planisi: I am going to mux the 7-segments and they are red/green so I have to be able to choose the color as well as display.

------ UPDATE ------
I have two new options, witch one would you prefer, or witch one will work the best?

The four LEDs in each row is representing ONE segment in the 7-segment display and for each segment there is four red and four green LEDs, see datasheet in my first post in this thread.

Attachment(s): 

Last Edited: Sun. May 24, 2009 - 09:59 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ULN2003/2803 and UDN2891A

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MicaelKarlsson wrote:
Thanks to both of you!

nleahcim: Would BC337 (small signal NPN) work? If the NPN works I will use a base resistor and a pulldown. I do not have P-channels at home. I have to use transistors on top to be able to choose color (red/green).

Guillem Planisi: I am going to mux the 7-segments and they are red/green so I have to be able to choose the color as well as display.

------ UPDATE ------
I have two new options, witch one would you prefer, or witch one will work the best?

The four LEDs in each row is representing ONE segment in the 7-segment display and for each segment there is four red and four green LEDs, see datasheet in my first post in this thread.


Micael - I'm afraid that neither of those top switches will work still. The problem for N-FETs is that you need to drive the gate 5-10V above the source. If your FET is on your source and drain are at essentially the same voltage, and your drain is at 12V, so that means your gate needs to be at about 17V or more. Your AVR can only drive it to about 5V. For the BJT - you need to drive the base of the NPN about a diode drop higher than the emitter. If your BJT is saturated, you will have about 0.2V between the emitter and the collector, and since your collector is tied to +12V, that means you need to drive your base to about +12V - 0.2V + 0.7V or about +12.5V. Again, your AVR can only do about 5V.

I just noticed that you used a P-FET for the top switch in one of your options. If that is available to you then good! That'll make your life easier. However, you haven't drawn it right. You want a pull up resistor on it, not a pull down. You will want to drive the FET with the AVR output in open drain mode. That way, when you are outputting a 0, it will pull the gate down to 0V making VGS -12V turning the P-FET on. When you are outputting a 1 the AVR output will go high impedance and will be pulled up to +12V, making VGS 0V, turning the P-FET off.

However - somebody else should comment about if the AVR will be happy about having one of its pins pulled to +12V. A safer method would be to have the AVR driving the gate of an N-FET that is driving the gate of the P-FET, with the P-FET having a pull up resistor on its gate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks again nleahcim!

I have tried to Make a schematic from your explanation, does it looks right, the FETs I'll be using is: NFET: 2N7000 and P-FET: IRFD9120 (it's in HEXDIP, but the only non-SMD I can get in time)

I just missed the resistor on the right hand LEDs. This is one segment on my 7-segments.

I don't dare to pull an AVR pin to 12V, at least not this time.

So, does this looks right?

--- UPDATE ---

I have done another schematic, would this one work?

If both work, witch one is the best to use?

Attachment(s): 

Last Edited: Sun. May 24, 2009 - 04:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What if you just have one transistor (BJT or FET, your choice) at the bottom of each diode chain and then do the muxing on the transistors (base or gate)?

Letting the smoke out since 1978

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

digitalDan: It's a red and green 7-segment display, so I have to choose what color to use first and then turn on the right segments. But your suggestion sounds nice.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MicaelKarlsson wrote:
Thanks again nleahcim!

I have tried to Make a schematic from your explanation, does it looks right, the FETs I'll be using is: NFET: 2N7000 and P-FET: IRFD9120 (it's in HEXDIP, but the only non-SMD I can get in time)

I just missed the resistor on the right hand LEDs. This is one segment on my 7-segments.

I don't dare to pull an AVR pin to 12V, at least not this time.

So, does this looks right?

--- UPDATE ---

I have done another schematic, would this one work?

If both work, witch one is the best to use?


Micael - I'm afraid it still needs some work. When you turn on "FET-MKI" you're short circuiting +12V to ground. Your FET will blow. Furthermore, Q1 is upside down. You want the source of the P-FET tied to +12V. Otherwise the FET's body diode will conduct and you'll lose the ability to turn off the high side.

So - you need to switch the drain and the source on the P-FETs. Additionally, you need to connect the drain of FET-MKI to the gate of the P-FET, and the source of FET-MKI to ground.

Make sense?

Your other schematic also needs some work... but I prefer the first methodology so let's concentrate on that one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I now have two options for a solution ..... The reliability is what counts
Then think of a 3rd solution like proper constant current drivers.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nleahcim wrote:

Micael - I'm afraid it still needs some work. When you turn on "FET-MKI" you're short circuiting +12V to ground. Your FET will blow. Furthermore, Q1 is upside down. You want the source of the P-FET tied to +12V. Otherwise the FET's body diode will conduct and you'll lose the ability to turn off the high side.

So - you need to switch the drain and the source on the P-FETs. Additionally, you need to connect the drain of FET-MKI to the gate of the P-FET, and the source of FET-MKI to ground.

Okey, I have made the changes you suggested (I hope), see attached schematic. Is it correct?

nleahcim wrote:

Make sense?

Your other schematic also needs some work... but I prefer the first methodology so let's concentrate on that one.


Yes it makes sense, and I agree!

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Would it be possible to use optocoupler on top instead of N- and p-channels? (I found a handful in one of my spare-parts-box)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MicaelKarlsson wrote:
nleahcim wrote:

So - you need to switch the drain and the source on the P-FETs. Additionally, you need to connect the drain of FET-MKI to the gate of the P-FET, and the source of FET-MKI to ground.

Okey, I have made the changes you suggested (I hope), see attached schematic. Is it correct?


Hi Micael - you forgot to make the change to FET-MKI. I think you'll be all set then.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MicaelKarlsson wrote:
Would it be possible to use optocoupler on top instead of N- and p-channels? (I found a handful in one of my spare-parts-box)

Yes. An optocoupler should be fine for the top side. Just make sure that it can handle the current that you're pushing through it. Most that I've used have been pretty wimpy - 50ma or so. It looks like your top switch could have something like 150ma or so on it if you had all the segments lit.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've been digging around a bit and found a Solid State Relay that looks like it will do my job, it can handle up to 120 mA but the little "monster" wants 50 mA to switch so I think a ordinary small signal BJT would work, one like BC337.
Something like 12V->relay->(collector-BC337-emitter)->GND and a 1k resistor from AVR to base and a 10k pulldown from BC337 base to GND. Sounds like it could work or am I up in the clouds again?

Oh I almost forgot, the datasheet to the solid state relay: http://www.clare.com/home/pdfs.n...$file/LAA110_R09.pdf

By the way each segment wants 10 mA!