Author Topic: High voltage difference across PWM lines when driving 2 MOSFETs.  (Read 657 times)

0 Members and 1 Guest are viewing this topic.

Offline rainbainTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Hello, I currently have a design put together with 2 D4184 MOSFETS in parallel driving a motor. Taking what I believe to be the proper design choices there is a 1N4001 diode across the 2 motor terminals to prevent a lot of flybacks. On the gate pins of the MOSFETs there is a 1.001 voltage division on the gate input, as well as a 100-ohm resistor currently across it to measure the voltage difference on my oscilloscope. The grounds of the 2 power rails are connected but there is no other connection between the voltage rail for the MOSFETs and the power going to the microcontroller. The gate is being driven at 3.3V and what I believe to be a large current spike across the gate line that is crashing and possibly damaging the microcontroller. Measuring the source of this signal, I believe it to be either flyback from the motor or the charging of the gate of the MOSFET. Despite that, with the motor disconnected or a lowered voltage rail going into it causes it to become more stable and crash less often. All the voltage rails appear to be stable assuming my ground point is good. I measured ground from a few different points to try and find anything there and that side of the system appears stable. This image is taken with the oscilloscope ground on the microcontroller side and the probe past the 100-ohm resistor and at the gate line. Also note I can't be too sure if this one is actually 100 ohms as it was taken from a box of badly marked resistors. All help is greatly apricated as I have been very unsure what is the current cause of this issue. Whatever it may be seems like it would be something very good to note in the future as this seems like a very simple setup and should not have too much to go wrong.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19531
  • Country: gb
  • 0999
Re: High voltage difference across PWM lines when driving 2 MOSFETs.
« Reply #1 on: June 26, 2022, 07:57:02 pm »
What's the motor current and PWM frequency?

Please post a schematic and photograph of the layout.

A few points from your wall of text:

3.3V is marginal for the D4184.

A microcontroller is not designed to drive a MOSFET, which will take huge current surges from the output pin.

The 1N4001 is probably too slow and only rated to 1A.
 

Offline rainbainTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: High voltage difference across PWM lines when driving 2 MOSFETs.
« Reply #2 on: June 26, 2022, 09:10:11 pm »
Alright, here is a schematic I just put together due to a lot of these parts being thrown together because this is all made out of spare modules I had. As for debugging only one motor and motor driver is connected.
PWM is at 2.5 KHz. You reminded me of a few other tests I had done a week back, I had also tried driving it at much lower PWM speeds, all the way down to 10 hertz, the current 3.3V is temporary as had been tested with similar results at 8+ volts, just with more crashing and concerns.
XT60 connector as seen in the picture does not mean this is being driven from a battery, was just installed out of convenience.
Motors peak out at 1.8A and while running with a bit of a load pull 0.8A at 3.3V.
With the flyback diode installed voltage rails still appear stable all the way up to 8+ volts.
I am aware that internal charge current on the MOSFET's field may be quite large and if you think that is the issue I will just move on to using a much better motor driver I had plans for a while now as compared to just putting something to drive the MOSFET as there is a lot of other issues and features id want in a newer one as these cheap motors are just temporary as well as a lot of the other prototyping things. Just wanted to try and get this version working.
Any issues regarding the microcontroller's firmware have been worked out and operates perfectly fine as long as it's not connected to the MOSFETs. Due to this I am very certain it's a current or overvoltage on the gate signal. It seems weird that it would become increasing more unstable at higher voltages if it was an issue regarding the gate pin making me thing that there must be flyback leakage reaching the gate pin or driving the ground signal a bit too high, despite that I've tried a lot of filtering with some of the best capacitors I have with no improvement at all making me lost as to where the issue is. Another issue that may point to an issue on the ground line (I may have failed to measure on the oscilloscope due to it being grounded to it as well) was that I was noticing the USB interface was more likely to go down when under this load than the radio. These cheap microcontroller board I have been using have proven to have an unstable USB connection in the first place.
« Last Edit: June 26, 2022, 09:24:34 pm by rainbain »
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 383
  • Country: se
Re: High voltage difference across PWM lines when driving 2 MOSFETs.
« Reply #3 on: June 26, 2022, 09:19:38 pm »
Wait, where is the ground!? Are you grounding everything via your PWM pin?
 

Offline rainbainTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: High voltage difference across PWM lines when driving 2 MOSFETs.
« Reply #4 on: June 26, 2022, 09:23:49 pm »
No sorry for the confusion. Here is the corrected schematic. For the physical one the ground of the new schematic goes to the ground connection of the XT60 where a ground connection out of that goes to the controller. All grounds branch from the input to give the least net resistance.
« Last Edit: June 26, 2022, 09:25:38 pm by rainbain »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5913
  • Country: es
Re: High voltage difference across PWM lines when driving 2 MOSFETs.
« Reply #5 on: June 27, 2022, 08:52:04 am »
Try adding a small snubber to reduce spikes, ex. 10nF/10Ohms in series, parallel with the motor.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19531
  • Country: gb
  • 0999
Re: High voltage difference across PWM lines when driving 2 MOSFETs.
« Reply #6 on: June 27, 2022, 10:55:06 am »
Why are you using two D4184 MOSFETs to drive such a small motor? A single one will do. Using two is probably making things worse, because you've got double the gate charge.

Drive the gates with at least 5V, using a proper gate driver.

Reduce the gate resistance to something more sensible such as 22R.

Use a faster freewheeling diode such as the 1N5820, which also has a lower forward voltage, being a Schottky diode.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf