mosfet switching

Thought I had this fixed.

Logic level n channel low rds on. PWM to gate, load -ve to drsin, source to GND. Using an LED in place of load.

LED remains on. 1v across gate and drain. Pull down resistor serves only to short the circuit and does not seem to allow gate voltage to reduce to 0v.

Logic level n channel low rds on. PWM to gate, load -ve to drsin, source to GND. Using an LED in place of load.

Yes that is right.

LED remains on.

Wired it up wrong or missidintified the pins or blown FET.

1v across gate and drain

?? Have you specified the right pin as an output? Sounds like it is an input trying to float.

Pull down resistor serves only to short the circuit and does not seem to allow gate voltage to reduce to 0v.

Can you post a picture of your wiring, this is not what will happen.

1v across gate and drain

My mistake - 1v across gate to source.

Wired it up wrong or missidintified the pins or blown FET.

It worked first time at 6v, and thereafter not working.

Circuit diagram attached. Note - no pull down resistor shown on the diagram. Please ignore component values - no time to create parts for this.

I have found the mistake in wiring the test circuit, but this doesn't fix the problem. I'll get bac to the problem later. A blink sketch should help analyse the switching. Once I've got that sorted PWMing the LED should verify the switching.

You circuit looks good. Testing with an LED + series resistor first is a good idea. However, a couple of capacitors (e.g. 1000uF and 0.1uF) across the 12v supply and close to the mosfet and 12v connector would help, especially when you have the Peltier connected rather than the LED/resistor. Otherwise the inductance of the wiring to the 12v supply may cause unexpected results, given the high current you will be switching.

Given the high parasitic capacitance of the power mosfet, you may find that using a 2N3904 and 2N3906 in a emitter follower configuration to give you better gate drive with a 200mA sink/source capability vs the arduino's 20mA.

ajofscott:
Given the high parasitic capacitance of the power mosfet, you may find that using a 2N3904 and 2N3906 in a emitter follower configuration to give you better gate drive with a 200mA sink/source capability vs the arduino’s 20mA.

If you do that, also connect a 150 ohm resistor between the bases and the emitters, so that the gate drive still reaches 0v and +5v. However, at the low default PWM frequency of the Arduino and the relatively low voltage you are switching, I doubt that switching time is a problem. The effect of slow switching would be that the mosfet gets hotter than the DC calculations predict.

I have the power supply caps in place and find that the FET gate is not going to 0. Resistors of different values gate to ground is the only means of temperature control. Basically, the gate is on constantly, irrespective of pwm or digital pin 0 value.

I have reproduced the circuit on Every Circuit, an Android app, and clearly see the effect of different resistor values.

An alternative is to use another FET. The previous Fairchild chip worked every time but the power rating was too low and rds on a bit too high. I want to avoid another layer of complexity if I can.

geoland: I have the power supply caps in place and find that the FET gate is not going to 0. Resistors of different values gate to ground is the only means of temperature control. Basically, the gate is on constantly, irrespective of pwm or digital pin 0 value.

I suspect that either your wiring is not as you think it is (e.g. you have a short circuit between the gate or the Arduino pin and something else), or the Arduino digital output pin you have the gate connected to is faulty. Try this:

  • disconnect the resistor between mosfet gate and Arduino pin

  • connect mosfet gate to ground through a resistor, value not critical, say 1K to 10K

  • measure voltage at gate and at Arduino pin, also check whether the mosfet is passing current to the load.

This will tell you whether the nonzero gate voltage is coming from the mosfet or from the Arduino.

When you say "digital pin 0", you don't mean digital pin #0 on the Arduino (aka the Rx pin) do you?

Wouldn't it help to pull the Gate down to Ground via a 10k-47k?, too?

[The Gate is acquiring a charge.]

Keep the 220? in series between the digital output pin and the gate, add a "10k?" from Gate to Ground.

What is the model of the transistor? Are you using a big load? If not, I use 2N2007 with no series resitor on the gate, source to GND and drain to your load. The other side of your load will have voltage on it (5V, 24V, etc) so when you pull the transistor to ground you complete the circuit. For higher current loads, use an IRF830. These are all depletion or enhancement N type MOSFETS. Good luck.

Thanks folks.

I found the fault, which I thought I had fixed - obscure, to me at least.

Two paths to GND - analog and digital - both are tied to the board. However, it was necessary to tie FET source to GND through the analog GND, as well as the GND shared by digital functions and power supply.

Pull down resistor is doing it’s job now.

Thanks for the advice. Now to improve the code.

But there is no analogue ground on an arduino, we're you using your own board? If so why did you post a diagram of an arduino?

I think he may have been referring to my earlier suggestion in another thread, to dedicate one of the Arduino ground pins as "analog ground" and use it only for the ground side of sensors feeding the analog inputs.

My interpretation of his solution is that he didn't have a good connection between mosfet source and any Arduino ground pin in the first place - maybe due to a dodgy connection.

That's correct - separated the lines to ground - analog and digital to the Arduino board.

Unfortunately, the solution of connecting to the 'analog ground' reintroduced noise from the MOSFET/TEC switching, but I fixed that with 22uf gate to source.

In hindsight I agree that connecting to the dedicated analog ground wire bypassed an otherwise poor connection on the 'digital ground'.

Well, this has been an experience. I will retrace the wiring see what gives.

geoland: Unfortunately, the solution of connecting to the 'analog ground' reintroduced noise from the MOSFET/TEC switching, but I fixed that with 22uf gate to source.

That is going to make your mosfet very hot at medium PWM values, because you'll be operating it largely in the linear mode. If you want to reduce switching noise, you should use an inductor and Shottky diode in the drain/Tec circuit instead. You'll need to increase the PWM frequency so that the inductor size becomes manageable.

It seems like you have problems just getting basic reliable wiring. I would throw away the solder less bread board an solder your connections properly.

I think the offending part is a terminal block with connector receptacles. I used a jumper to bridge the TEC -ve and digital ground - PCB on the drawing board.