I will show you how I create a DC motor controller. It will allow me to change the speed and direction of the motor.
This drawing here shows you the basic structure of the project. The potentiometer controls the PWM generator to change the duty cycle. This signal then goes to a h-bridge made of two IR2110 mosfet drivers and four mosfets. The switch controls which combination of mosfets get the PWM signal and by doing so determines the direction of the motors rotation.
Power will be provided by a 12 volt power brick. A linear regulator will be added to provide 5 volt for the circuits logic. Both voltage rails are now ready to be used.
The PWM generator consists of two op-amps being used as comparators. The first on the left is a square wave generator. The timing capacitor however follows a triangle wave pattern. This signal is compared by the second op-amp against a voltage set by the potentiomer. And so it creates a PWM signal with a variable duty cycle.
This image shows you both of the states the op-amp switches back and forth into.
This is the circuit with both of the op-amps wired up. Then I will check the triangle wave signal on the left side of the IC and the pwm signal on the right side.
Our triangle wave is there! Its also very ugly but thats OK. And running at 1.5 kilo-hertz and an amplitude of 1 volt.
The PWM signal also is present and changes when I turn the potentiometer.
These are instructions on how to wire-up the IR2110 dual mosfet driver. If have made it a simplified version compared to the confusing one in the official datasheet. The only capacitor is the bootstrap-capacitor. This circuit assumes you setup up both 5V and 12V power supply with their own capacitors.
Here you see both of the IR2110 IC’s wired up aswell.
Lets see what happens at the gate of a high side mosfet.
Looks good. Very square wave and also the amplitude of 13.3 volts is more than enough.
I hot-glued a platform together for the tiny DC motor and put a ‘thing’ on top to see it spin.
And I add a switch to the circuit.
Rotation in one way is a little hickey and I can’t figure out why that is yet. I suspect it is because of it all being on a breadboard an all. But for now I am happy with the result so far.