2020-12-15, 06:29 PM
the arduino has limited drive capabilities and should have a 240 ohm resistor on the gate of a mosfet which limits the switching speed but if you use a mosfet with smaller gate charge it can work...
It is already wired to timer2's pwm output so it's a matter of setting a register to get pwm output on the clutch, and it won't affect the operation of the other timer (which uses software pwm to generate deadtime) The mosfet with 20milliohm on resistance should be fine and could drive 3-4 amps, but depending on the current needed you may overheat this, I don't really know what currents the neco drive needs
The only real issue is the timer is set to 4khz so it may make an audible tone with pwm. Maybe you can increase the frequency but it would require other code modifications, and higher frequency may also need different mosfets. I intend to support varying the clutch duty cycle with a servo setting in pypilot but I have not gotten around to testing this and verifying it yet.
It is already wired to timer2's pwm output so it's a matter of setting a register to get pwm output on the clutch, and it won't affect the operation of the other timer (which uses software pwm to generate deadtime) The mosfet with 20milliohm on resistance should be fine and could drive 3-4 amps, but depending on the current needed you may overheat this, I don't really know what currents the neco drive needs
The only real issue is the timer is set to 4khz so it may make an audible tone with pwm. Maybe you can increase the frequency but it would require other code modifications, and higher frequency may also need different mosfets. I intend to support varying the clutch duty cycle with a servo setting in pypilot but I have not gotten around to testing this and verifying it yet.