Go Down

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

esgeroth

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.

Wawa

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

esgeroth

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.

Wawa

#18
Apr 24, 2018, 05:01 am Last Edit: Apr 24, 2018, 05:06 am by Wawa
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)

TomGeorge

Hi,
OPs Picture;


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

esgeroth

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
}

TomGeorge

#21
Apr 24, 2018, 06:54 am Last Edit: Apr 24, 2018, 06:55 am by TomGeorge
Hi
Code: [Select]
delay(50);
is 50ms.

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

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

Wawa

As Tom said.

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

Leo..

esgeroth

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.

Wawa

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

esgeroth

#25
Apr 24, 2018, 08:43 am Last Edit: Apr 24, 2018, 08:45 am by esgeroth
The on/off period is 100ms. Not 20ms.

Wawa

Sorry, read it wrong. 10Hz can be seen.
Leo..

MarkT

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.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

raschemmel

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

ReverseEMF

#29
Apr 24, 2018, 04:58 pm Last Edit: Apr 24, 2018, 04:58 pm by ReverseEMF
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'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.

Go Up