Go Down

Topic: Arduino controlled mosfet driverwont switch. (Read 4095 times) previous topic - next topic

esgeroth

#45
Apr 25, 2018, 02:50 am Last Edit: Apr 25, 2018, 02:56 am by esgeroth
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.


raschemmel

#46
Apr 25, 2018, 03:00 am Last Edit: Apr 25, 2018, 03:01 am by raschemmel
post the datasheet

Relative to the gate of course.

esgeroth

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?

TomGeorge

#48
Apr 25, 2018, 03:43 am Last Edit: Apr 25, 2018, 03:44 am by TomGeorge
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.


Thanks.. Tom,, :)
Everything runs on smoke, let the smoke out, it stops running....

tinman13kup

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.
Tom
It's not a hobby if you're not having fun doing it. Step back and breathe

raschemmel

#50
Apr 25, 2018, 03:55 am Last Edit: Apr 25, 2018, 03:56 am by raschemmel
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.

esgeroth

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.

Wawa

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..

TomGeorge

Hi,
Try your code from another PWM pin on the UNO without the pulldown.

Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

esgeroth

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.

ReverseEMF

#55
Apr 25, 2018, 06:59 am Last Edit: Apr 25, 2018, 07:01 am by ReverseEMF
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. 




"It's a big galaxy, Mr. Scott"

Please DON'T PM me regarding what should be part of the Public Conversation -- Let it ALL hang out!!
Unless, of course, it's to notify me of a mistake.

TomGeorge

#56
Apr 25, 2018, 10:18 am Last Edit: Apr 25, 2018, 10:21 am by TomGeorge
Hi,
328 Output circuit;


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... :)
Everything runs on smoke, let the smoke out, it stops running....

raschemmel

#57
Apr 25, 2018, 03:32 pm Last Edit: Apr 25, 2018, 04:11 pm by raschemmel
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
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 ?


ReverseEMF

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.
"It's a big galaxy, Mr. Scott"

Please DON'T PM me regarding what should be part of the Public Conversation -- Let it ALL hang out!!
Unless, of course, it's to notify me of a mistake.

raschemmel

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 ?


Go Up