Go Down

Topic: [Solved]Help a noob with transistors please. (Read 564 times) previous topic - next topic

ConfusedNerd

Aug 28, 2019, 08:38 pm Last Edit: Sep 04, 2019, 12:33 pm by ConfusedNerd Reason: Adding photo again.
So a long story short, I have a transistor BS170 that acts as if always on when using 12 power supply (for led strip) but acts appropriately if connected to arduino 5v pin. I also have 10k resistor between arduino and gate.
Attached picture shows what I have so far, I am new to the point of not really knowing if drain is supposed to connect to ground and source to led or other way around, but both ways the problem is exactly the same. If anyone can point out the mistakes I would appreciate it.

Photo: https://prnt.sc/oysp1e (too large file to upload here apparently, whoops)


Additional info: Intended use for transistor is to act as switch for about 35 cm strip of led, it should be pulling under 0.2amp at 12v This BS170 resistor looked good enough for my needs but let me know if it has to be changed out.

For testing it was connected to 10cm strip of led (6 leds total).

Thank you for you time ~!

Problem solved, I also had to connect the arduino ground to the main power supply ground for it to work as intended.

septillion

Source to GND, drain to V- of leds. Reduce resistor of the gate to 100Ω (or remove it altogether, it's just a small mosfet).

35cm is about borderline what you can drive. And you will loose in the order of a volt across the transistor.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

larryd

#2
Aug 29, 2019, 12:01 am Last Edit: Aug 29, 2019, 12:03 am by larryd
Use cct. Q3 but cct. Q4 would be better as this transistor is not a logic level MOSFET.

Obviously your strip replaces the loads in the schematics.

Suggest you get a Logic Level MOSFET.




Show us a good schematic of your circuit.
Show us a good image of your wiring. 
Give links to components.
Posting images: 
https://forum.arduino.cc/index.php?topic=519037.0



No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

JohnRob

#3
Aug 29, 2019, 03:41 am Last Edit: Aug 29, 2019, 03:44 am by JohnRob
Try this configuration:



The 3000 pf is optional.

The 1k should remain.  Its goal is to save the arduino in the event something goes wrong.

I've successfully used this FET device many times with a 5V arduino.   I don't think it will work with a 3.3v arduino



Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

raschemmel

#4
Aug 29, 2019, 03:55 am Last Edit: Aug 29, 2019, 04:26 am by raschemmel
@johnrob,
Are you aware that your schematic has no part number for the mosfet so your statement:

Quote
I've successfully used this FET device many times with a 5V arduino.   I don't think it will work with a 3.3v arduino
  
has no meaning. (or should I search for a Q1B datasheet ?)
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

larryd

#5
Aug 29, 2019, 04:20 am Last Edit: Aug 29, 2019, 04:28 am by larryd
Do not place an input capacitor to GND in MOSFET switching applications.

Adding an input capacitor to GND slows down the switching action and keeps the transistor in linear conduction thus heating the device.


During Arduino power up, I/O pins float.

This will make the input to your circuit be at non logic levels that can lead to component failure.

In this case, you should place a resistor from the input to GND, ~10k should work in most conditions.

Reduced your series resistor to 220 ohms.






No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

JohnRob

@johnrob,
Are you aware that your schematic has no part number for the mosfet so your statement:


has no meaning. (or should I search for a Q1B datasheet ?)
I was referring to the original post referencing the BS170.  I guess It would have been clearer if I modified the schematic to match.

Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

JohnRob

Do not place an input capacitor to GND in MOSFET switching applications.

Adding an input capacitor to GND slows down the switching action and keeps the transistor in linear conduction thus heating the device.

During Arduino power up, I/O pins float.

This will make the input to your circuit be at non logic levels that can lead to component failure.

In this case, you should place a resistor from the input to GND, ~10k should work in most conditions.

Reduced your series resistor to 220 ohms.
The 1000 ohm and 3300 pf capacitor is there for a reason.  This "smoothing" of the gate drive edges will significantly reduce RF noise generated by the MosFet switching.   If you look at the time constant of the RC (ignoring the gate charge for now) the RC is 0.033 µS.  Hardly enough to Heat the MosFet. Especially if the switching frequency is in the order of 200 Hz.

The 10k from gate to ground is probably a good idea.  However if the OP follows my recommendations this resistor should be more like 50k.    I've had a LED driver with 3 output channels working in my home for about 4 years without the gate to ground resistor and have no issues.
Personally I think the gate to ground resistor is a very good idea during the prototype phase when the connection to the MosFET could be an open circuit (i.e. not connected to the Arduino or anything else)  Once the circuit is finalized it should be omitted because it does reduce the gate voltage a slight bit.  And with the BS170 there is just enough gate voltage to begin with.






Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

larryd

"The 1000 ohm and 3300 pf capacitor is there for a reason.  This "smoothing" of the gate drive edges will significantly reduce RF noise generated by the MosFet switching.   If you look at the time constant of the RC (ignoring the gate charge for now) the RC is 0.033 µS.  Hardly enough to Heat the MosFet. Especially if the switching frequency is in the order of 200 Hz."

This is just misleading and deceptive, it belongs on the Instructables web site along with all the other information they spew there.

Many users use PWM with LEDs, the frequency is 490Hz and 976Hz on the UNO.

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

raschemmel

#9
Aug 29, 2019, 07:50 pm Last Edit: Aug 29, 2019, 07:50 pm by raschemmel
God knows we hate inaccurate information on the forum. It's like cancer , you have to remove it
before it spreads...
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

JohnRob

Quote
This is just misleading and deceptive, it belongs on the Instructables web site along with all the other information they spew there.
Everyone must make their own final design decisions.  This would be mine.  However I can assure you the concept I describe is not misleading nor deceptive.  The additional heat generated is trivial even at 1000 Hz, you can calculate it for your self.

Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

larryd

#11
Aug 29, 2019, 10:51 pm Last Edit: Aug 29, 2019, 10:55 pm by larryd
Most people on this site know how to make a band pass filter to remove frequency components.

Doing so using a MOSFET operating in its knee/linear region is stupid, miss leading to new people making them think this is proper design guidelines, not needed to remove higher frequencies as there is no need in a LED application like this, can lead to component failure if applied to other situations.

We can all show new people short cuts in electronics design but volunteers here have gone through a huge effort to instruct new people in proper design techniques.  To have someone like yourself come and spew nonsense undermines all our efforts.

Look at the OP user name !



No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

Paul__B

The 1000 ohm and 3300 pf capacitor is there for a reason.  This "smoothing" of the gate drive edges will significantly reduce RF noise generated by the MosFet switching.   If you look at the time constant of the RC (ignoring the gate charge for now) the RC is 0.033 µS.  Hardly enough to Heat the MosFet. Especially if the switching frequency is in the order of 200 Hz.
The FET already has significant gate capacitance - that is the basis of the whole discussion about switching speed.

It is therefore entirely unnecessary to add capacitance.

If you want slower switching, simply increase the value of the resistance - which should in any case be directly adjacent to the FET.

The 10k from gate to ground is probably a good idea.  However if the OP follows my recommendations this resistor should be more like 50k.
This resistor should not be connected at the gate of the FET.  It should be on the source side of the series resistor.  It is a default to determine the gate voltage when the microcontroller is not doing so due to a reset or abnormal state.  So it should be between that microcontroller output and ground, not at the gate of the FET.  It then does not diminish the drive voltage whatever its value.

Smajdalf

not needed to remove higher frequencies as there is no need in a LED application like this
Interesting. One of reasons for "you must always use a Gate resistor" rule is reduction of the noise caused by inrush current into the Gate capacitance. Here OP is switching hundreds of mAs or even amperes but noise is suddenly no problem? You want to protect the MOSFET from an imaginary harm but do not care about the poor power supply which has to deal with the abrupt changes of load?

I don't want to say I would use a cap on the gate but it is interesting point of view and it should be considered carefully. Not "removed before it spreads".
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0

larryd

#14
Aug 30, 2019, 12:44 am Last Edit: Aug 30, 2019, 01:04 am by larryd
@Smajdalf

A gate resistor is used in these Arduino applications to protect the output transistors inside the Arduino/micro-controller.

Your statement is misleading.
" One of reasons for "you must always use a Gate resistor" rule is reduction of the noise caused by inrush current into the Gate capacitance."

"You want to protect the MOSFET from an imaginary harm but do not care about the poor power supply which has to deal with the abrupt changes of load?"
OMG, it must be a full moon all kinds of crap coming out.


No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

Go Up