Arduino Forum

Using Arduino => General Electronics => Topic started by: esgeroth on Apr 22, 2018, 08:15 am

Title: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 22, 2018, 08:15 am
I'm trying to switch a mosfet IRF3205 from an arduiono uno. I have a TC4227 mosfet driver to drive the mosfet. When connected, the mosfet will not turn off. So I wrote a blink sketch to the arduino and tested with an LED. If connected directly the LED will blink but if connected to the mosfet driver as in the attached schematic then it stays on. Am I connecting this thing correctly? Shouldn't the LED blink when connected to the driver chip?
Here is a TC4227 datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/20001422G.pdf
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 22, 2018, 08:36 am
I'm trying to switch a mosfet IRF3205 from an arduiono uno. I have a TC4227 mosfet driver to drive the mosfet. When connected, the mosfet will not turn off. So I wrote a blink sketch to the arduino and tested with an LED. If connected directly the LED will blink but if connected to the mosfet driver as in the attached schematic then it stays on. Am I connecting this thing correctly? Shouldn't the LED blink when connected to the driver chip?
Here is a TC4227 datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/20001422G.pdf
For one, the IRF3205 is not really a Logic Level MOSFET -- it might work, but can't be relied on to function properly at 5V. BUT, your little LED experiment should have resulted in a blinking LED even when connected to pin7 on the TC4227.

Just for laughs, try connecting pin 4 to ground.

If that doesn't solve it, then check continuity on all your connections, and check if the voltage on pin 6 is steady at 5V.  And, if you have a scope, check for the waveform right at pin 7.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: outsider on Apr 22, 2018, 10:02 am
Don't you need at least 8V on the TC4227 Vdd pin to drive a non logic level MOSFET?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: TomGeorge on Apr 22, 2018, 12:28 pm
Hi,

Can you please post a complete copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Reverse engineer your circuit, you may find your problem.
What voltage and load are you switching with the MOSFET?
The 4227 should be good to 4.5V Vdd supply by the specifications.

Can you please post a picture of your project, so we can see your component layout?

Do you have a DMM?
If so, measure pin 7 of the 4227 as you connect pin2  of the 4227 from gnd then 5V, with nothing connected to the output, or the inputs of the 4227.

Tom... :)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: Wawa on Apr 22, 2018, 01:10 pm
That driver, when powered with 5volt, isn't much better than driving that mosfet directly from an Arduino pin.
That mosfet is not a logic level fet, and needs at least 10volt at the gate to fully turn on.

Power the driver with a 10-12volt supply, with enough ceramic capacitance on the VCC pin (see datasheet).

Mosfets are ESD sensitive devices. Handling the gate wrong will destroy them.
Test the mosfet by connecting gate to source, and measure drain/source with a DMM as you would measure a diode.
It should conduct in one direction only.

What are you switching, and at what (PWM) frequency.
Leo..
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 22, 2018, 07:23 pm
I should have mentioned that when I had the mosfet attached to the TC4227 I had 12v on the vdd pin.
Right now I've taken the mosfet out of the equation by setting up the little LED experiment in the schematic. If an LED won't switch on and off then the mosfet certainly will not.

With pin 4 of the TC4227 attached to ground the LED still will not blink.

If i disconnect the 5v from the arduino output to the vdd pin on the TC4227 then the LED starts blinking.

I'm using a sound card scope for now, if I examine TC4227 pin 7 there is nothing or just a bit of noise. Unless I disconnect vdd then I can see the switching signal on pin 7.

Uhh, maybe this is a bad chip?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 22, 2018, 07:37 pm
Don't you need at least 8V on the TC4227 Vdd pin to drive a non logic level MOSFET?
The simple answer is "yes".  But, there is a more complex answer involving how much Drain current you want to switch, and how much "on" Drain to Source voltage is tolerable -- as well as power dissipation, etc.  In a production environment, you probably wouldn't make these concessions, but in the "hobby" environment, it might make sense. 

For instance, if a non-logic level MOSFET is really cheap at, say, ALL Electronics, and say, it's designed for an ID of up to 10A, but you only want to switch 1A, and you can see, from the datasheet, that at 5V on the Gate, the Drain will easily handle 1A, then why not!  The only other consideration might be a higher gate capacitance than, say, a Logic Level MOSFET designed to switch 1A.  But that's only a possible factor, if speed is an issue.  A MOSFET with a VGTH that is higher than might normally, be considered too high to be "Logic Level", might be just fine at logic levels (at least with 5V logic) if it's not made to function at the extremes of it's capability.

The IRF3205 (that the OP says he/she is using), has a VGTH of 2V to 4V, and at 5V it has a range of Drain currents where it could easily be considered as "on".  From the datasheet,  at case Tj = 25°C, it won't be fully on for Drain Currents higher than around 6.5A - and even as high as 10A, if as much a 200mV can be tolerated in the channel  -- so, there's a good chance, it will work just fine as a "Logic Level" device, in the OP's application -- as long as the current demand is within these margins.

Transistors are Linear Devices.  The definition of "on" is a relative thing, and has everything to do with the end result.  "On" is defined by whether, or not, it's driving the load, within requirements, without frying in the process. Technically, a MOSFET, that can achieve a max of 50mΩ, can still be considered "on" if the channel is only at 1Ω, if that is enough to properly drive the load, and if the MOSFET doesn't get too hot, doing it.

Hobby electronics is all about out of the box thinking ;D
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 22, 2018, 07:40 pm
That driver, when powered with 5volt, isn't much better than driving that mosfet directly from an Arduino pin.
Not necessarily.  What the driver provides is extra drive to overcome gate capacitance.  But, that's only an issue at high speed switching. 

That mosfet is not a logic level fet, and needs at least 10volt at the gate to fully turn on.
See my previous post.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 22, 2018, 09:56 pm
If someone has been able to find a datasheet for a TC4227 please post it because Google has nothing.

Are you sure you don't mean TC4427 (https://www.mouser.com/ds/2/268/20001422G-967549.pdf) ?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: TomGeorge on Apr 22, 2018, 11:44 pm
Hi,
Please answer post #3.

Thanks.. Tom.... :)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 23, 2018, 02:40 am
If someone has been able to find a datasheet for a TC4227 please post it because Google has nothing.

Are you sure you don't mean TC4427 (https://www.mouser.com/ds/2/268/20001422G-967549.pdf) ?
The OP included a link to a datasheet, and it is, indeed, for the TC4426/TC4427/TC4428 -- so presumably the TC4427.  In other words, typo in his/her "capture" and original post text.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: MarkT on Apr 23, 2018, 02:57 pm
You haven't connected the unused input of the TC4427, pin 4 - connect it to ground as indicated in the applications info section of the datasheet.

That MOSFET requires >=10V on the gate to work properly, it most definitely is _not_ logic-level.

Vgs(th) is _nothing_ to do with switching on, its about switching off. 

I suggect providing the industry standard 12V on pin 6 of the TC4427, and lots of ceramic decoupling for it
(1uF or more is good, within a few mm of the chip - note the need for decoupling is clearly stated in the datasheet, its absolutely vital for a MOSFET driver which handles large currents into a capacitive load).

What are you trying to do?  Do you actually need a MOSFET driver - a logic-level MOSFET might be easier
if you don't need high speed PWM.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 23, 2018, 03:51 pm
I could be assuming too much but I believe the OP chose the TC-4427 because he thought "Logic Level Mosfet " meant Mosfet driver. Either that , or he thought that using a driver would guarantee that it is logic level, which may be true. I have used the TC4427 with 5V inputs and it worked, but I had +12V on Vdd.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 23, 2018, 06:44 pm
That MOSFET requires >=10V on the gate to work properly, it most definitely is _not_ logic-level.
Like I said before:
Quote

For instance, if a non-logic level MOSFET is really cheap at, say, ALL Electronics, and say, it's designed for an ID of up to 10A, but you only want to switch 1A, and you can see, from the datasheet, that at 5V on the Gate, the Drain will easily handle 1A, then why not!  The only other consideration might be a higher gate capacitance than, say, a Logic Level MOSFET designed to switch 1A.  But that's only a possible factor, if speed is an issue.  A MOSFET with a VGTH that is higher than might normally, be considered too high to be "Logic Level", might be just fine at logic levels (at least with 5V logic) if it's not made to function at the extremes of it's capability.
It's all about context.  In a production environment, the Iron Fist rules.  But in hobbyland, the lines are blurred.  They are blurred by lack of budget [i.e. no start-up capital, or research fund, or, usually, ability to purchase at price dropping quantities, etc.].  They are blurred by lack of customer service woes or potential for large-scale recalls, etc.  They are blurred by the "fun factor" and in most cases, the lack of anyone's life on the line.
But, I get your point about VGS(TH). In my mind I wasn't connecting the gate threshold with Logic Level capability.  Just that the threshold needs to, at least, be lower than the highest level defined as a logic "1" -- with enough margin for a credible switch action to occur [in the particular application].  But, I neglected to make that clear.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: outsider on Apr 23, 2018, 08:49 pm

FWIW:
http://www.analog.com/media/en/technical-documentation/data-sheets/4227fa.pdf (http://www.analog.com/media/en/technical-documentation/data-sheets/4227fa.pdf)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 24, 2018, 03:00 am
Sorry about the typo, I definately meant the TC4427 not TC4227.
When pin2 is connected to ground pin7 reads 0v.
When pin2 is connected to Vdd(5v) pin7 reads 5v.
When pin2 is connected to the arduino output pin then pin7 always reads 5v.
If i disconnect Vdd from arduino 5v and leave it floating then the LED starts blinking.
Connecting pin4 to ground makes no difference.
Adding bypass capacitor to input as is shown in the datasheet has not changed anything.

For those of you worried about mosfet properties I believe I've ruled that out by posted the test schematic in the original post. There is no mosfet involved right now. I'm just trying to get the LED to blink so I can see that the driver works. The end goal is to drive an irf3205 mosfet with 12v on Vdd. That didn't work so I simplified and posted the above schematic as a test. I know what a logic level mosfet is and that the irf3205 isn't. That's what the driver chip is for.
 
I've added a picture of the test circuit.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: Wawa on Apr 24, 2018, 03:20 am
When pin2 is connected to ground pin7 reads 0v.
When pin2 is connected to Vdd(5v) pin7 reads 5v.
When pin2 is connected to the arduino output pin then pin7 always reads 5v.

If i disconnect Vdd from arduino 5v and leave it floating then the LED starts blinking.
Connecting pin4 to ground makes no difference.
Adding bypass capacitor to input as is shown in the datasheet has not changed anything.
Maybe something wrong with your code (pinMode), which we haven't seen yet.

Don't experiment that way with electronics.
The 22pF shown is the internal parasitic capacitance of the chip itself.
A designer might want to know that, to calculate other parts of the circuit.

A bypass cap from VDD to ground, close to the chip, might be needed.
More so when you drive a mosfet.
Leo..
Title: Re: Arduino controlled mosfet driver wont switch.
Post by: esgeroth on Apr 24, 2018, 03:35 am
Don't experiment what way? No one learns anything by not experimenting.
The code is just the blink example with the delay turned down to 50 and the out pin changed to pin 3. The LED will blink when driven directly from the arduino.
I've added a 1uf bypass capacitor to Vdd as well.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: Wawa on Apr 24, 2018, 05:01 am
Don't experiment what way?
Connecting 5volt to the input, and removing power to the chip.
If you use sensitive electronics outside the specs, then you could damage them.
Then you could be chasing your tail finding the problem (as you do now).
Leo..

Edit: the datasheet shows the unused input connected to ground (Fig. 4.0)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: TomGeorge on Apr 24, 2018, 06:14 am
Hi,
OPs Picture;
(http://forum.arduino.cc/index.php?action=dlattach;topic=542973.0;attach=254666)

How are you outputing pulses, can you post your code?

If you are using PWM, analogWrite then is it pin2 or 3 in your picture?

Tom.. :)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 24, 2018, 06:49 am
It's just the blink example sketch.
Code: [Select]

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(3, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(3, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(50);                       // wait for a second
  digitalWrite(3, LOW);    // turn the LED off by making the voltage LOW
  delay(50);                       // wait for a second
}
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: TomGeorge on Apr 24, 2018, 06:54 am
Hi
Code: [Select]
delay(50);
is 50ms.

Code: [Select]
delay(1000);
 is 1s.

Tom... :)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: Wawa on Apr 24, 2018, 07:11 am
As Tom said.

50ms on, 50ms off, would just be a dimmer LED to a human.

Leo..
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 24, 2018, 07:24 am
Not at all. 50ms on and 50ms off is 10 blinks per second. Plenty slow enough to see it. I'm watching it right now.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: Wawa on Apr 24, 2018, 08:31 am
Not at all. 50ms on and 50ms off is 10 blinks per second. Plenty slow enough to see it. I'm watching it right now.
In my universe 20ms (twenty milliseconds) is 20/1000 of a second or 0.02 seconds. or 1/50 of a second.
Leo..
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 24, 2018, 08:43 am
The on/off period is 100ms. Not 20ms.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: Wawa on Apr 24, 2018, 08:56 am
Sorry, read it wrong. 10Hz can be seen.
Leo..
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: MarkT on Apr 24, 2018, 11:47 am
Adding bypass capacitor to input as is shown in the datasheet has not changed anything.

You wouldn't say that if you could see the waveforms on an oscilloscope.  Decoupling is mandatory
for reliable operation.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 24, 2018, 04:33 pm
Why are you using DigitalWrite (blinking) , instead of AnalogWrite (PWM) ?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 24, 2018, 04:58 pm
It's hard to tell, when looking at your photo, because of parallax, but it looks like the Orange lead is connected to pin 2 (on the Arduino), yet, your sketch is pulsing pin 3.

Regarding the "decoupling capacitor" that some are screaming about.  Yes, for "proper" operation, it is required, but it's not going to make all that much difference at such low frequencies -- but, to make everyone happy, and to remove one of the variables, I suggest to include it in your test circuit.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 24, 2018, 06:42 pm
You wouldn't say that if you could see the waveforms on an oscilloscope.  Decoupling is mandatory
for reliable operation.
The light still won't turn off. So it does not make any difference that matters.

Why are you using DigitalWrite (blinking) , instead of AnalogWrite (PWM) ?

Like I said, I just wrote the blink sketch so that I can see the light blink. How is this going to make a difference?

It's hard to tell, when looking at your photo, because of parallax, but it looks like the Orange lead is connected to pin 2 (on the Arduino), yet, your sketch is pulsing pin 3.

Regarding the "decoupling capacitor" that some are screaming about.  Yes, for "proper" operation, it is required, but it's not going to make all that much difference at such low frequencies -- but, to make everyone happy, and to remove one of the variables, I suggest to include it in your test circuit.
It does look like that in the picture but it's definitely in pin 3. I have added the recommended capacitor as I posted in my last post so hopefully everyone should be happy.

I'm not finding very many circuit designs using this chip. Should the signal input pin be pulled down with a resistor? The arduino has an internal pull down resistor right?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 24, 2018, 07:19 pm
Should the signal input pin be pulled down with a resistor? The arduino has an internal pull down resistor right?
This is quite a perplexing problem. 

Regarding the Arduino output, and whether it has a "pull down resistor" or not.  The ATmega8 datasheet doesn't seem to reveal the exact electronics of the output [only shows a "buffer" symbol], but more than likely it's an arrangement of a p-channel FET and an n-channel FET in a "totem-pole" like arrangement [not sure if totem pole is the proper term for this kind of circuit -- but it's similar to the old TTL totem pole outputs].  So, I doubt there's an internal pull down resistor, but there is a pull down action, probably via an n-channel FET (so no need to add a pull down resistor).

So, have you watched, with a scope, the Arduino output, as it toggles, while it's connected to pin 2 on the TC4427?  To make sure the line is actually toggling (when the TC4427 output [on pin 7] remains high)?  What about if you place the probe right on pin 2?  Do you still see the toggling signal?

It's so odd, that manually manipulating the voltage on the TC4427 input, causes the LED to indicate a change, yet the Arduino output has no effect.

What if you try the other driver -- pin 4 and pin 5 (on the TC4427?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 24, 2018, 07:35 pm
Quote
Like I said, I just wrote the blink sketch so that I can see the light blink. How is this going to make a difference?
FYI,
If you want to DIM the LED, use PWM (AnalogWrite)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 24, 2018, 07:42 pm
You wouldn't say that if you could see the waveforms on an oscilloscope.  Decoupling is mandatory
for reliable operation.
This statement indicates a lack of understanding of the role of a decoupling capacitor.  It does two things.  It decouples (i.e. removes) the noise caused by transitions in digital output circuitry [more of an issue in the days of TTL], and it supplies immediate current [that would not, otherwise, be available due to inductance in the supply lines] for each digital transition.  And, the decoupling effect can, actually, be considered a side effect of the latter function.  This is only an issue at higher speeds and when there are other circuits that could be affected by these current spikes.  It may alter the rise or fall time, but at 10Hz, this just isn't significant.

For what the OP is doing, this is a minor effect that plays no role in debugging the issue.  The TC4427, will function well enough to provide a credible result -- which was proven by the OPs experiment where he/she manually applied high and low voltage to the TC4427 input, which produced an observable change in the LED's brightness.  

When the OP says "has not changed anything", he/she means within the context of the experiment -- i.e. still fails to produce the expected indication in the LED.  The fact that the LED failed to pulse, even with the capacitor, excludes the capacitor as a determining factor.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 24, 2018, 07:45 pm
FYI,
If you want to DIM the LED, use PWM (AnalogWrite)
This is not about dimming the LED.  The OP is trying to determine why the TC4427 is not driving the LED, when the Arduino is applied to it's input.  He/she wants a clear indication of actual transitions, not a dimming of the LED.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 24, 2018, 09:37 pm
Wouldn't a voltmeter tell you that ?

You don't need a scope to determine that,
nor do you need to 'blink' it. A simple on/off test should suffice. I don't see how any of the tests done do far are as good as a voltage meadurement with s meter. The fact a DMM has not been mention should tell you something. All of the questions about voltages have been ignored so it would seem the OP either doesn't have a DMM or doesn't know when and where (or how?) to use it.
How about providing  a schematic with voltage measurements ?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 24, 2018, 10:22 pm
Wouldn't a voltmeter tell you that ?

You don't need a scope to determine that,
nor do you need to 'blink' it. A simple on/off test should suffice. I don't see how any of the tests done do far are as good as a voltage meadurement with s meter. The fact a DMM has not been mention should tell you something. All of the questions about voltages have been ignored so it would seem the OP either doesn't have a DMM or doesn't know when and where (or how?) to use it.
How about providing  a schematic with voltage measurements ?
You make very good points -- with all the charm of a robot ;)   Heard from Dr. Morbius, lately?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 24, 2018, 10:42 pm
Wouldn't a voltmeter tell you that ?

You don't need a scope to determine that,
nor do you need to 'blink' it. A simple on/off test should suffice. I don't see how any of the tests done do far are as good as a voltage meadurement with s meter. The fact a DMM has not been mention should tell you something. All of the questions about voltages have been ignored so it would seem the OP either doesn't have a DMM or doesn't know when and where (or how?) to use it.
How about providing  a schematic with voltage measurements ?
A DMM has been mentioned and I provided the measurements in post #15.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 24, 2018, 10:46 pm
A DMM has been mentioned and I provided the measurements in post #15.
Don't let the "haters" get to you.  

Based on those measurements, I'm wondering if the jumper wire could be open -- that's why I suggested you measure right on the pin -- i.e. pin 2 of the TC4427.  
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 25, 2018, 12:13 am
@ReverseEMF,
Quote
Don't let the "haters" get to you. 
The only one getting emotional here is you.

Try leaving it out and just discussing the technical details , like the fact that the TC4427 was  designed
to drive mosfets. It works fine when used that way.

Put 12V on Vdd and drive it with a 5V output from the arduino and you will see 12V on the output. 
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 25, 2018, 12:25 am
...the TC4427 was  designed to drive mosfets. It works fine when used that way.

Put 12V on Vdd and drive it with a 5V output from the arduino and you will see 12V on the output.  
The TC4427 datasheet specifies the "Supply Voltage Operating Range" as 4.5V to 18V.  So, it should work at 5V.  And it should drive an LED the way the OP is attempting.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 25, 2018, 12:33 am
@ReverseEMF,The only one getting emotional here is you.

Try leaving it out and just discussing the technical details , like the fact that the TC4427 was  designed
to drive mosfets. It works fine when used that way.

Put 12V on Vdd and drive it with a 5V output from the arduino and you will see 12V on the output. 
There is no reason to be so argumentative. No one is being emotional at all.
As has been posted several times 5v is within the operating range of the TC4427 driver. I also had originally posted that I started with a mosfet on the output with 12v on Vdd and it would not turn off the mosfet when switched off. That's why I posted the test circuit above with the LED as a test. If it wont turn off an LED how can I expect it to turn off a mosfet?
I'm thinking that ReverseEMF is the only one here who has actually read the entire thread.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 25, 2018, 12:52 am
Did you read the datasheet for the mosfet ?
If you read it I think you will find that you need -10V to turn it off.
That's been your problem since the beginning. Only a logic level mosfet will turn off with 0V.
Most require at least -7V to turn off.
If you try connecting -10V to the mosfet gate I think you will find it turns off.
The TC4427 is not a bipolar device so you would need one that runs off a +/- power supply voltage.
The TC4427 has been a waste of time if you are trying to drive a mosfet that requires a negative
voltage to turn off. Try turning off the mosfet with a 9V battery connected with the "+" to GND.'
I don't know why the TC4427 won't turn off the led but I believe that is a different issue than why it
won't turn off the mosfet.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: TomGeorge on Apr 25, 2018, 02:06 am
Hi,
Can  you verify how you have the LED connected on the protoboard.
In you picture it looks like you have positioned so both its pins are shorted at pin3 of the 4427.
Shouldn't the resistor and diode connection be on a separate row?
(http://forum.arduino.cc/index.php?action=dlattach;topic=542973.0;attach=254839)

Tom... :)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: Wawa on Apr 25, 2018, 02:18 am
Seems correct.
Pin3 of the chip is ground, and the LED/resistor is connected between output(7) and ground.

Pin4 (second unused input) should be grounded too.

I think it's time to try a new chip.
Like all mosfet parts, handle it with ESD precautions.
Leo..
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 25, 2018, 02:50 am
Did you read the datasheet for the mosfet ?
If you read it I think you will find that you need -10V to turn it off.
That's been your problem since the beginning. Only a logic level mosfet will turn off with 0V.
Most require at least -7V to turn off.
If you try connecting -10V to the mosfet gate I think you will find it turns off.
The TC4427 is not a bipolar device so you would need one that runs off a +/- power supply voltage.
The TC4427 has been a waste of time if you are trying to drive a mosfet that requires a negative
voltage to turn off. Try turning off the mosfet with a 9V battery connected with the "+" to GND.'
I don't know why the TC4427 won't turn off the led but I believe that is a different issue than why it
won't turn off the mosfet.
I have, and I can find no reference to requiring -10v to turn off. Voltage is relative. Do you mean -10v relative to drain? because that would just be ground.

Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 25, 2018, 03:00 am
post the datasheet

Relative to the gate of course.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 25, 2018, 03:05 am
post the datasheet

Relative to the gate of course.
http://www.irf.com/product-info/datasheets/data/irf3205.pdf

Ok, so when the gate is charged with 12v what is the voltage at the gate? And then when switched to ground what is the voltage relative to the gate?
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: TomGeorge on Apr 25, 2018, 03:43 am
Hi,
Have you got your test circuit like this, and running the blink code with  3000 delay?
That is so you can see the changing voltage on the input and output pins with a DMM.
(http://forum.arduino.cc/index.php?action=dlattach;topic=542973.0;attach=254848)

Thanks.. Tom,, :)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: tinman13kup on Apr 25, 2018, 03:53 am
I looked at an old datasheet, and while it has min/max input values relative to VDD, it only lists a max VDD of 21VDC. All the characteristics are listed using a VDD of 18VDC. Perhaps increase the voltage on VDD to the 12VDC you plan on using anyhow and see if it makes a difference in operation.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 25, 2018, 03:55 am
Why do you need such a high current mosfet ?

The voltage relative to the gate would be -12V.
I still think you should try connecting the "+" side of a 9V battery to the GND and "-" side to the gate.
You haven't had any luck with anything else . That should turn it off.
I wouldn't waste any more time with the TC4427, unless you are going to try running it off +12V, which
always worked for me.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 25, 2018, 04:12 am
Adding a pull down resistor to the signal input (TC4427 pin 2) seems to fix the problem. I was erroneously assuming that the atmega328 had internal pull down resistors. It only has a pull up resistor. So digitalWrite(3, LOW); isn't low enough. Seems to be the same as leaving the pin floating.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: Wawa on Apr 25, 2018, 04:37 am
Pull up/down resistor are not needed if the pin is set to OUTPUT with pinMode.
An Arduino pin has an internal mosfet switch to VCC and a mosfet switch to ground.
Maybe your Arduino pin is damaged (assuming you did set the pin to OUTPUT).
Leo..
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: TomGeorge on Apr 25, 2018, 05:22 am
Hi,
Try your code from another PWM pin on the UNO without the pulldown.

Tom.. :)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 25, 2018, 06:46 am
Tried changing the arduino ouput pin and left out the pull down resistor and it works. Set the output back to pin 3 and the LED is stuck on. Put in another atmega328 chip and wrote the same sketch with the output on pin 3 and now its working. So there it is, an atmega chip with a bad pin.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 25, 2018, 06:59 am
Holy crabcakes -- I step away for a few hours and all heck breaks loose ;) 
You are being pummeled with so much misinformation, I'm not surprised you're confused.

Quote
Pull up/down resistor are not needed if the pin is set to OUTPUT with pinMode.
An Arduino pin has an internal mosfet switch to VCC and a mosfet switch to ground.
Maybe your Arduino pin is damaged (assuming you did set the pin to OUTPUT).
This is absolutely correct.  So, it's not clear why adding a pull down resistor would make a difference.  The TC4427 datasheet gives a worst case max input low voltage of 0.8V.  In other words, as long as the voltage on TC4427's pin 2 is 0.8V, or lower, in relation to TC4427's pin 3, the output should go low.  But, there's a thought -- have you measured the voltage on pin 3 (right on pin 3), with the negative probe on the Arduino ground pin [in other words, the positive probe on pin 3 and the negative probe on at the point where Gnd is supplied by the Arduino?  If it isn't 0, then we could be on to something, there.  Could be some sort of ground loop [doesn't seem likely with the relatively small current caused by the LED -- but who knows?] .


Quote
The voltage relative to the gate would be -12V.
I still think you should try connecting the "+" side of a 9V battery to the GND and "-" side to the gate

Totally ridiculous!  The IRF3205 is an N-Channel MOSFET. And why are we talking about "voltage relative to the gate"?!?  The datasheet specs voltages relevant to the gate, as relative to the source. And these are positive voltages.  The IRF3205 datasheet specs the RDS(on) [of 8mΩ] at 10V [POSITIVE 10V] -- which, BTW, is a good indication that this is truly not a Logic Level MOSFET BUT, esgeroth has stated that he/she intends to drive it with 12V on the TC4427 VDD pin, so that is quite sufficient to drive this MOSFET.
BUT, to get a fix on WHY this thing isn't working, esgeroth is running it at 5V, which, according to the Datasheet, should work.

BUT, it would be informative for esgeroth to apply 12V to the TC4427 VDD pin, and then change R1 to something more like 420Ω.

Quote
I looked at an old datasheet, and while it has min/max input values relative to VDD, it only lists a max VDD of 21VDC. All the characteristics are listed using a VDD of 18VDC.

Then that datasheet is bogus.  The datasheet esgeroth provided shows this MOSFET to be a 55V device, with voltages like 55 and 44 used in the characterizations.

Quote
Have you got your test circuit like this, and running the blink code with  3000 delay?

That's a good idea.  At such a low frequency the Arduino output will be more in line with your manuel test, where you physically connected 5V to the input, then 0V to the input. 




Title: Re: Arduino controlled mosfet driverwont switch.
Post by: TomGeorge on Apr 25, 2018, 10:18 am
Hi,
328 Output circuit;
(http://forum.arduino.cc/index.php?action=dlattach;topic=542973.0;attach=254884)

Quote
So, it's not clear why adding a pull down resistor would make a difference
Lower MOSFET may have got zapped, though strange it went open circuit.

Tom... :)
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 25, 2018, 03:32 pm
All an all , there was something to be learned from this post:
1-know when and how to test the ATMega328 digital outputs. (I use a walking bit sketch that cycles all the outputs one a time from H to L and then back to high and repeats on all the outputs. It's a test setup on a breadboard with leds connected to the outputs. I have a 28 pin ZIFF socket (https://www.robotshop.com/en/28-pin-zif-socket.html?gclid=CjwKCAjwzoDXBRBbEiwAGZRIeIZQTbszJidJF_JGr6TjfXYqBI-zHcrfMbB3ssRl3OEPbxtc79clqxoCnYEQAvD_BwE)
I have a 100k pot  with a knurled knob connected across +5V and GND with a wire from the wiper to plug into the analog inputs when I want to test those. 

2- When interfacing the TC4427 to an arduino, if the output won't turn off, first try the easiest solution, which is a pulldown resistor on the output of the ATMega328 (the TC4427 input)

3- Configure outputs as outputs if you intend to use them as such.

So, back the IRF3205.
Is it , or is it not turning OFF now ?

As I recall, this was the original issue.
Were you able to turn off the mosfet by just grounding the gate ? (not using the TC4427)
Were you able to turn off the mosfet with the TC4427 after you got the led to turn off by replacing the
ATMega328 chip ?

Title: Re: Arduino controlled mosfet driverwont switch.
Post by: ReverseEMF on Apr 25, 2018, 04:20 pm
2- When interfacing the TC4427 to an arduino, if the output won't turn off, first try the easiest solution, which is a pulldown resistor on the output of the ATMega328 (the TC4427 input)
Don't you mean, manually apply 5V to the input, then measure the output, then apply Gnd to the input, and again measure the output?  Verify that it complies with the following table:


 Input  TC4426  TC4427  TC4428 
IN A~OUT AOUT A~OUT A
IN B~OUT BOUT BOUT B


I don't understand what applying a "pull down" resistor achieves?  If the Arduino output is compromised, then item #1 will catch that.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 25, 2018, 04:38 pm
Correct me I am wrong, but didn't the OP start this post with the comment that he did exactly what you just described: (Reply # 15)

Quote
Quote
When pin2 is connected to ground pin7 reads 0v.
When pin2 is connected to Vdd(5v) pin7 reads 5v.
When pin2 is connected to the arduino output pin then pin7 always reads 5v.
yet here we are on Reply# 58 and the OP didn't find the root cause until Reply# 54:

Quote
Tried changing the arduino ouput pin and left out the pull down resistor and it works. Set the output back to pin 3 and the LED is stuck on. Put in another atmega328 chip and wrote the same sketch with the output on pin 3 and now its working. So there it is, an atmega chip with a bad pin.
The point is , the easiest test is add the pull-down resistor, if that fixes the problem then it points to a defective ATMega328, and replacement (or testing) thereof. If your comment:

Quote
Don't you mean, manually apply 5V to the input, then measure the output, then apply Gnd to the input, and again measure the output?  Verify that it complies with the following table:
was that useful, then why did it take 39 posts (54-15) to find the problem ?

Title: Re: Arduino controlled mosfet driverwont switch.
Post by: esgeroth on Apr 25, 2018, 05:04 pm
If your comment:
was that useful, then why did it take 39 posts (54-15) to find the problem ?


Because of people posting a rather considerable amount of irrelevant information.
Your point stands though, a pull down resistor or just changing arduino pins would have found the answer sooner. I just didn't expect my otherwise working atmega chip might have a bad pin.
And to answer your other question, yes the irf3205 is switching perfectly now when connected to the output of the TC4427 with 12v on Vdd.
Title: Re: Arduino controlled mosfet driverwont switch.
Post by: raschemmel on Apr 25, 2018, 05:45 pm
Great.
Glad to hear everything is up and running.
In the future , you mght expedite things by including "Troubleshooting procedures performed so far..."
and list the measurements you've taken in your OP . (along with any relavant schematics)