Looking for any tips on achieving a Dual Pulse Width Modulator.
I understand PWM but the idea is a dual pulse width modulator where the each PWM is 180 degrees out of phase from each other. Kind of like AC but using a square wave rather than a sine wave with the ability to alter the width of each peak (frequency) while maintaining constant voltage.
analog write? on 2 pins with mills to "dephase" idk, elaborate a bit what its for...
I'm in the middle of making a fairly powerfull H-inverter so this sounds familiar, if thats your case then its kind of complex
On AVR Arduinos and probably on most others, that capability is built in to the timer that generates the PWM. Output is on two pins, with one pin the complement of the other.
The idea is for example:
You send (+) and (-) for 50% of time and then send (-) and (+) for the other 50%.
This will hold the shaft like a break at full torque.
If you drop the first to (+) and (-) to 45% and then send (-) and (+) for 55% the motor turns in one direction very slowly but still at full torque. And you would reverse the percentages to turn the motor in opposite direction. So the lower the percentage on either side makes the motor spin in that direction.
Hi,
If you use this form of control, where the motor is stationary but effectively dissipating FULL power, are you aware of the heating effect you will have on the motor.
You can also get a NOT gate to generate the other output.
But does this really work? How is it possible 50% duty is more effective than shorting the motor terminals? Of course with some external torque applied you have active braking for 50% of the time but you are actively driving the motor in the direction of the external force for rest of the time - I expect those effects cancel out and the result is the same as not driving the motor at all.
Hi Railroader, This is not a short. This is alternating power through a square wave. I used to work with a machine that used it and I would like to recreate it for a specialty tools used on a CNC.
You are not driving the motor for 50% of the time, you are driving it for 100%. At brake you drive the polarity in one direction for 50% and then in the opposite direction for the other 50%. At a certain frequency the motor acts like a brake. Extending the the time of the square wave on one side and shortening it on the other side makes the motor turn slowly in that direction slowly but at high torque.
Again: except for OP's claim I don't see any reason why this would work. Torque is proportional to current and average current is zero (with 50% duty). Thus (average) torque is zero.
As I understand it this enables a simple PWM control of the motor in both directions. It does not provide zero speed torque.
For everyone having more of an issue with whether it works or not it has been in use since at least the 90's in industrial CNC. It provides a faster spindle spin up time, more torque at lower speeds, faster reduction in speed and way more precision in position control and none of the limitations of a stepper motors. It is used in many industries so the concept is solid and established.
The issue I'm trying to get at is how to get the Arduino to generate a signal that can be used to alternate the square waves 180 degrees out of phase from each other and manage the length of the peaks in proportion to each other. So if one side drops to 45% the other side rises to 55% or any other % variable. The voltage remains constant. The power to the motors is handled through high frequency MOSFETs and position control is done through transducers.