For the Electronics Gurus. A question to insure I'm not doing something which c
James Long
Posts: 1,181
I want to control a mosfet (logic level) with a 5 volt digital output. Can I also put a led (with a current limiting resistor) on the same line?
Will the line be pulled down to the LED forward voltage? Or not?
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Will the line be pulled down to the LED forward voltage? Or not?
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Comments
pEdit: the limit is your current capability of the output. The led will not change the line voltage level, it will only draw 3..20mA (depends on the led)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
Post Edited (dMajo) : 11/25/2009 7:59:25 PM GMT
Dmajo,
I know the LED and resistor will draw exactly 7 mA. I'm wondering if the LED will prevent the mosfet from turning to full on.
I may do something different. I may use the pin to sink the led and source the mosfet. I know that should work.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
So basically, if the pin can source more current than the LED can draw, the pin voltage will never fall.
Just to insure we are on the same page, I attached a image of how the items are connected. The wire from the right is the input (digital 5v), the top wire is the voltage source to the Mosfet, and the lower wire is the supply from the mosfet.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
I decided to go a different route. I decided to sink the LED and source the Mosfet. I do not want to breadboard the whole project, so I just decided it was best that way. That will invert the LED output, but not a big deal for what it is.
This is on a solar power project so the LED being off when the mosfet is on is actually giving 7mA of more power.
But I do appreciate all the information. I figured I was correct, but I do try to insure I'm not wasting my time. If I would have had a mosfet, I would have just tried it. I didn't have any that could be put on a breadboard....I have plenty of surface mount items I could have hacked around to get to work, but too much of a pain to do so.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Post Edited (James Long) : 11/26/2009 5:22:29 AM GMT
· Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
Yea I know....horrific grammar.
@Dmajo......yes you are right....it is an output.
But any how...I did change the direction of the LED to facilitate a different operation.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Do keep in mind though that this is an international forum, and for many participants English is a second language. They have learned a second language, which is more than a lot of us (myself included) have done.
Of course then there are those I know have English as a first language and their spelling and grammar are.... oh well, just grin and bear it.
Hey my spelling is not great, but I have definitely seen worse.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Kwinn,
No problem......I may have taken it to heart, mainly because I do not spell well. It really sucks when I have to re-edit my own post 4 times before I get it right.
I do also see many post from members who have English as a second language. It is hard at time to follow their meaning, that is why I try to keep everything in a formal manner when posting to them. I try to stay away from slang or other bad habits.
It's Thanksgiving here in the US, and I give thanks for all the friends and associates I have here online and in the Parallax forums. Especially those to help with the non-microcontroller stuff.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
dMajo, now I am impressed. Your English is excellent and your posts clear and easy to understand. I wish I had half your linguistic talent. After all these years traveling to Quebec regularly I am barely able to order a coffee and bagel at Tim Hortons.
Anyway thank you very much
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
Post Edited (dMajo) : 11/27/2009 2:02:01 PM GMT
I use these with a series resistor in parallel with a high-efficiency Aromat polarized relay coil (w/flyback diode), and drive them all directly with a Stamp pin; total current draw is just·17 mA. No driver transistor required.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Something to keep in mind with CMOS outputs is that they are primarily resistive so it's not true that they hold their voltage as that voltage will vary with load. With no load you will have maximum output voltage but even a 7ma load will affect the output voltage a bit and this is especially important when driving a MOSFET. You did the right thing though by sinking the LED and sourcing the MOSFET as this will ensure the MOSFET gets the maximum drive. The last suggestion with using a high-efficiency led (or just super-bright) at low currents will also work if you have to source the led. I find that it only takes a little effort to find super-bright leds at around the same price as common leds. I used some 0603 leds recently from DIGIKEY which are really bright and cheap, but they are perhaps a tad small for prototyping.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*