Hi All
Attached an simple code that runs a DC motor with the Power Control PWM module on a PIC Micro Controller speed control mode with Forward and reverse direction (2 quadrant mode).
Note this code is not production ready code it is a simple code that demonstrate how to us the Power control module in FC with a few lines of C code.
The code check two buttons for selecting Forward or reverse Drive this button routine is also not optimized for 100% stable operation. AN4 is used to control the speed of the motor.
The attached schematic shows only the pin connections ,circuit component values does not represent the real live values see the Matrix EB022 datasheet for circuit values
The hardware used are a PIC18F4431 and the EB022 Motor Driver board from Matrix ,The Power Control module can generate complex PWM signals to drive various motors DC Brushed/DC Brush less(PMSM Motors)/Ac induction motors and Universal power supplies .
Running Dc Motor with Advanced PWM Module
Moderator: Benj
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Running Dc Motor with Advanced PWM Module
- Attachments
-
- 6.jpg (101.65 KiB) Viewed 7924 times
-
- DCMotor_P184431.zip
- (246.61 KiB) Downloaded 470 times
-
- 2.jpg
- (186.48 KiB) Downloaded 1178 times
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: Running Dc Motor with Advanced PWM Module
If there is some one like me which love SPICE and Mixed Mode simulation you can PM me and I will supply you the model
The model runs the FC code and the L298 hardware as you will see in the below pictures the DC motor running positive and Negative speeds
The model runs the FC code and the L298 hardware as you will see in the below pictures the DC motor running positive and Negative speeds
- Attachments
-
- 5.jpg
- (184.99 KiB) Downloaded 1168 times
-
- 4.jpg (108.16 KiB) Viewed 7924 times
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR