MOSFET vs. Transistor LED Circuit(s)? +Mosfet Clarification

Thread Starter

Mark Johnsen

Joined Nov 30, 2015
15
Darrell,

I made a copy of the Transistor circuit you did and then made a MOSFET version. I had to lower the resistor in the N-channel mosfet circuit from 470 to 140 based on the id current from the simulation. I'm guessing the id current (A) output is in milleamps (ie 4m)? When the resistor was 470, I only got 1.4m(amps?) vs. 4m for the other LED-resistor? I did check the settings for the mosfet and attribute the differences to that. I'll have to look up the specs for the mosfets I ordered and plug them into the simulator.

Here's dumb question, does it matter which side of the mosfet I put the LED and resistor? In the schematic I was following, they had the resistor-LED after the p-chan mosfet (ie gnd side) and it was reversed for the n-chan mosfet (ie resistor-LED on 5v die). I thought I read somewhere it didn't matter, but not sure.

I just got the digikey ship notice today, so a couple days before I can breadboard:) Getting excited...

Mark
 

dl324

Joined Mar 30, 2015
10,072
does it matter which side of the mosfet I put the LED and resistor? In the schematic I was following, they had the resistor-LED after the p-chan mosfet (ie gnd side) and it was reversed for the n-chan mosfet (ie resistor-LED on 5v die). I thought I read somewhere it didn't matter, but not sure.
If I follow what you're saying, yes, it does matter. It would change the turn on requirements.

BTW, in the schematic you referenced, the S/D terminals on all 3 MOSFETs are backwards. The way you have them connected, the body diodes would always be conducting. In the future, could you include the schematic in your post? The program took far too long to initialize on my tablet and I was about to abort just as the schematic loaded. Plus, it would be one link to break at some future date.
I just got the digikey ship notice today, so a couple days before I can breadboard:) Getting excited...
You live in the Bay Area, why are you ordering parts online? Jameco is in South Bay, along with Anchor Electronics and Haltek, and all generally have better prices than Digikey. I usually use Digikey to get an idea of what I shouldn't pay... I used to think that Jameco had the lowest prices, but Mouser occasionally beats them (though Jameco used to price match). Full disclosure - I started doing business with them about the time they started up, but stopped several years ago after a customer service issue; YMMV...
 
Last edited:
Hi Mark,

Your latest circuit post looks good, as far as I can tell. The positioning of the source and drain, for both p-channel and n-channel devices looks correct. You generally want the source connected to ground (or the lowest voltage) on n-channel devices and to the highest voltage for p-channel devices.

The current in the LEDs will be mostly determined by the series resistances, as you know. You have these nicely matched at just under 5 mA in the latest configuration. You may want a bit more current, depending on the LEDs that you choose.

What part numbers are you planning to use for the LEDs and mosfets?

Darrell
 

dl324

Joined Mar 30, 2015
10,072
The positioning of the source and drain, for both p-channel and n-channel devices looks correct. You generally want the source connected to ground (or the lowest voltage) on n-channel devices and to the highest voltage for p-channel devices.
It was too early in the morning. Something was wrong, but it wasn't S/D connections. The MOSFETs are the wrong polarity.
upload_2015-12-7_11-2-52.png

You can't print from that application? This is what I get when I printed:
upload_2015-12-7_11-8-19.png
 
Hi Dennis,

Maybe the confusion is that the LEDs are supposed to go on when the control lines are pulled down. The logic for the chip that Mark referenced is active low. I think that the polarity is correct with this assumption. To model the pull-down I just used a switch to ground, so the logic signals driving the pull-downs should match with the LED behavior.

My apologies for the difficulty in getting images out of systemvision.com. It's pretty new and we haven't made that as easy as it should be yet. There's a little '?' symbol at the lower right of the application. If you hit this symbol, a dialog will pop up allowing you to voice complaints and suggestions (which we highly value!).

Darrell
 

Thread Starter

Mark Johnsen

Joined Nov 30, 2015
15
If I follow what you're saying, yes, it does matter. It would change the turn on requirements.

BTW, in the schematic you referenced, the S/D terminals on all 3 MOSFETs are backwards. The way you have them connected, the body diodes would always be conducting. In the future, could you include the schematic in your post?
I'll take a look at the S/D terminals to make sure I understand. I dragged and dropped w/ out looking, so I'll check that. And, YES, no problem including a schematic. Thanks for checking it.

You live in the Bay Area, why are you ordering parts online? Jameco is in South Bay, along with Anchor Electronics and Haltek, and all generally have better prices than Digikey. I usually use Digikey to get an idea of what I shouldn't pay... I used to think that Jameco had the lowest prices, but Mouser occasionally beats them (though Jameco used to price match). Full disclosure - I started doing business with them about the time they started up, but stopped several years ago after a customer service issue; YMMV...
I do live in the bay area in 'north' Fremont near the dumbarton. So, that makes a bit of drive down to Haltek or across the bay to Jameco. It's always fun to walk the aisles at Haltek and drool. Before this and a few other projects, many aisles I just walked by, but not now:) I will say that I've seen some of their old motion control prices seem high to me (like for an old Compumotor L drive), but I guess if you need one you need one.

In the past I have shopped Mouser, digikey and maybe Allied electronics and it seems like you get good deals on about 1/2 of the items, but shipping will then get you an smaller type orders that I place. I actually like mouser better, but for some reason just went w/ everything at digikey.

I am glad you mentioned the local places because now I'll make sure I stop by next time I head down to Santa Clara. Need to get some good Korean food:)

thanks - Mark
 

dl324

Joined Mar 30, 2015
10,072
Maybe the confusion is that the LEDs are supposed to go on when the control lines are pulled down. The logic for the chip that Mark referenced is active low. I think that the polarity is correct with this assumption. To model the pull-down I just used a switch to ground, so the logic signals driving the pull-downs should match with the LED behavior.
Having drawn the schematic that he was converting to use MOSFETs, I know he put in the wrong polarity.
My apologies for the difficulty in getting images out of systemvision.com. It's pretty new and we haven't made that as easy as it should be yet. There's a little '?' symbol at the lower right of the application. If you hit this symbol, a dialog will pop up allowing you to voice complaints and suggestions (which we highly value!).
Is there a reason why the app takes so long to initialize? When I opened it on a tablet, I just figured the tabled didn't have enough compute power to do it quickly. When I opened it again on my desktop, it was still slow. If it's actually simulating the circuit, the app should be changed so that's only done by request (like in LTspice).
 

dl324

Joined Mar 30, 2015
10,072
I'll take a look at the S/D terminals to make sure I understand. I dragged and dropped w/ out looking, so I'll check that.
It was too early when I made my first comments. Something looked wrong but that wasn't it. You replaced NPN transistors with P MOSFET and vice versa. Those arrows sometimes get me because I don't use MOSFETs much. When I worked on IC designs, we didn't use the traditional symbols. We had a short hand that made hand drawing faster and we put a bubble on our P devices...
I do live in the bay area in 'north' Fremont near the dumbarton. So, that makes a bit of drive down to Haltek or across the bay to Jameco. It's always fun to walk the aisles at Haltek and drool. Before this and a few other projects, many aisles I just walked by, but not now:)
Whenever I'm in that area, I try to fit Anchor and Haltek into my itinerary. The last few times I was there it didn't work out.
I am glad you mentioned the local places because now I'll make sure I stop by next time I head down to Santa Clara. Need to get some good Korean food:)
Most of the restaurants my Wife and I liked have gone out of business...

Do you know if that Michael's restaurant near the ampitheater is the same one that used to be on El Camino?
 

Thread Starter

Mark Johnsen

Joined Nov 30, 2015
15
Hey guys - Forgive me if I'm rehashing what you already know but the 'quick summary' of what I'm trying to do:

Two of the LED's are on the MagINCn and the MagINCn is an "active low via drain output that require pull up resistors. If the magnetic field is in range, the output is turned off." Which I translate to mean it's connected to ground.

For the two LED's, I'd like the GRN LED ON when the magnetic field is in range and the MagINC is 'turned off.' The YEL LED will be off. When the MagINC 'turns on' when the magnetic field is out of range, then we swap the LED's (YEL ON, GRN OFF).

Darrell asked what parts I'm using. I plan to breadboard the circuit and then have a circuit board made and use different (smaller) compoennts that I saw from an example online. I have ordered the breadboard parts, thinking of the other parts for the circuit board.

Breadboard (digikey order)
Mosfets
FQP30N06L-ND MOSFET N-CH 60V 32A TO-220
FQP27P06-ND MOSFET P-CH 60V 27A TO-220

LEDs
754-1732-ND LED RED DIFF 5MM ROUND
754-1740-ND LED YELLOW DIFF 5MM
I have some green ones in a box in the garage, need to look up what they are...

TRANSISTORS
2N3904FS-ND TRANS NPN 40V 0.2A TO-92
2N3906FS-ND TRANS PNP 40V 0.2A TO-92

CAPACITORS
BC2665CT-ND CAP CER 0.1UF 50V X7R
399-4266-ND CAP CER 0.1UF 50V Z5U

Oh - fyi... Step 2 will be to convert the singled ended a, b, and Index encoder output channels to differential via this chip: DS34C87TMX/NOPBCT-ND

Circuit Board components from online project
Mosfets
512-BSS84 BSS84 p-chan FET
512-BSS123 BSS123 n-chan FET

0603 Red LED LS Q976-NR-1
0603 Green LED LG L29K-G2J1-24-Z
0603 Yellow LED LY Q976-P1S2-36

Mark
 

Thread Starter

Mark Johnsen

Joined Nov 30, 2015
15
Do you know if that Michael's restaurant near the ampitheater is the same one that used to be on El Camino?
That restaurant location is at the Shoreline golf links and I don't recall if it's changed names or tied to another restaurant. I don't play much golf anymore, but did at Shoreline years ago (it's a Robert Trent Jones (sp?) design or someone decent) and don't recall the name of the restaurant. I don't think it's changed, but I don't recall either - sorry.
 

dl324

Joined Mar 30, 2015
10,072
LEDs
754-1732-ND LED RED DIFF 5MM ROUND
754-1740-ND LED YELLOW DIFF 5MM
I have some green ones in a box in the garage, need to look up what they are...
I looked up a couple prices for grins. Are they really charging 20 cents for a red 5MM LED in qty 100? If you ever buying 3mm, let me know. I have thousands... The only 5MM I have is a blue diffused, standard (low) brightness.
 
Top