Transistor and solenoid and arduino not acting as expected

OK I ran the other test as well.

First, the Arduino just turns on and sits idle for 15 seconds, then I do analogwrite(pinnumber,255) for 15 seconds. Then analogwrite(pinnumber,255*.50) for another 15 seconds.

The voltage drop from drain the source is 12.3 V when the arduino just boots up and sit idle.
When it runs at 100% duty cycle, the voltage drop is 0.7 V which is what is expected.
Then when it runs at 50% duty cycle, the voltage drop is 6.9 V, this must be when it is getting very hot.

Why would the voltage drop be so high at this duty cycle, is it because this is not a logic MOSFET?

That is correct. I put it backwards …twice :see_no_evil:

Thank you for this diagram, I think I understand but I don’t have the circular transistor. I’m not sure what it’s called.

I just ordered a logic level MOSFET, I’m hoping that will simplify life and I can just run it from the Arduino pin. Quick question while we’re at it I do not need a pulldown resistor or a gate resistor with this logic level MOSFET connected to the arduino pin, correct?

I guess you will. The FET stores a charge similar to a capacitor and stays ON. The pulldown resistor fixes this. @bitherder_57 pointed this out in post #5.

Bringing the driving pin to LOW may take care of this, though. I will do some testing tomorrow.

Here are a few different typical MOSFET circuits for you to examine:

Thank you I will go with the top left design.

So it seems I need a resistor from my Arduino to the gate, I’m not sure what the purpose of that is.

It also seems I need a pull down resistor from the gate to ground to make sure the MOSFET stays off.

I thought I ran across a post on the arduino farms were people were saying a gate resistor is not needed for the Arduino

You may find time to read this: https://www.build-electronic-circuits.com/mosfet-gate-resistor/

  • R13 is use when the Arduino first powers up.

  • GPIO pins are set to input when power is first applied; the input impedance is >100megΩ.

  • Without R13 the MOSFET gate floats, hence the Gate voltage can rise due to nearby circuit leakage currents, as a result the MOSFET can turn ON at power up time; R13 prevents this.

  • R14 ensures the GPIO output pin is not stressed when changing state. R14 also helps reduce high frequency switching noise (due to MOSFET switching) from causing problems elsewhere.

  • The resistor values shown should work well in most situations.

Are you measuring this with a DMM?

Yes there are people that are either lucky or good at reading datasheets and doing the math. Which one are you? :upside_down_face:

Hey Tom, I ran some experiments for voltage drop across the drain source MOSFET under different PWM duty cycles.
The results don’t make sense, can you help me understand?
At this point, I got the new logic level, MOSFET that I’m using, along with a gate resistor, as well as a pulldown resistor.
So my source voltage is 12 V, I have a solenoid which is four ohms resistance, and I added a two ohm resistor in series.
When I run at 100% duty cycle it’s 1.8 A, at 80% duty cycle this drops to around 1.4 A.

What I don’t understand is why would the voltage drop across the components change with PWM at 80% duty cycle.
For example, the drain to source voltage drop when off is about 12 V which is expected, and when it’s fully on at 100% duty cycle, the voltage drop across the MOSFET is 0.03 V which is also expected.

At 80% duty cycle, the voltage drop across the MOSFET is like 2 V, I’m wondering if my multimeter is in accurate when there’s pulse width modulation.
Otherwise, what are the implications of this, does this mean the MOSFET has a very high almost 4 W power dissipation? When I touch it it is not getting super hot, I’m not sure what 4 W power dissipation feels like.

My gut says everything is working right and that the measurements for my multimeter are incorrect when I implement PWM, if this is not the case, then I’m doing something dangerous, and would like your opinion.

There is nothing wrong with your measurements. This is how PWM works. It makes the average voltage across the load lower as the percent modulation decreases. Your meter is reading this average voltage.

What is actually happening is at 80% modulation the transistor is fully on for 80% of the time and fully off for 20% of the time. The reason for using PWM is to reduce power loss in the transistor. So when the transistor is on there is very little power loss and when it is off there is no power loss.

Hi, @rickarduinotinker

100% 12V 1.8A
So complete circuit resistance is ;
V / I = 12 / 1.8 = 6R66

Resistance of load = 4 +2 = 6 Ohms
Resistance source to drain = 6.66 - 6 = 0.66 Ohms.

Power dissipated in MOSFET;
P = I * I * R = 1.8 * 1.8 * 0.66 = 2.13W
Was your MOSFET getting hot at 100% duty?

If 100% duty is 1.8A then 80% will be;

1.8 * 0.80 = 1.44A close enough with a meter that is measuring average current.

Tom... :grinning: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.