Gramps
Senior Member
;This is Test circuit for the DC Motor Driver MD20A copied from page 173 in Manual 2 covering the pwmduty command
;C.4 connects to direction pin on MD20A
;C.2 connects to PWM pin on MD20A
;pmduty is 0 to 1023
Here is the link to the video test.
We're pretty happy with the test. It actually works!
Here we want to change up to a 28X2...........
Pictured below is the 5k slave pot mounted at the pivot point of the large gear. The three leads can also be seen;
With 5 volts across the slave pot, the wiper reads 1.2 volts (1.12k) full left side, 2.5 volts (2.41k) center, and 3.7 volts (3.65k) to the far right side.
The plan is to move the slave pot (B.0) with a 5k control pot (B.1) using a pwmduty command to the MD20A motor driver (C.1)
The MD20A also has a direction pin (B.7) which is high for CCW and low for CW rotation.
;C.4 connects to direction pin on MD20A
;C.2 connects to PWM pin on MD20A
;pmduty is 0 to 1023
Code:
#picaxe 08m2
#no_data
init: pwmout C.2,100,150 ; start pwm
main: high C.4 ;CCW Rotation
pwmduty C.2,300 ; set pwm duty
pause 3000 ; pause 3 s
low C.4 ;CW Rotation
pause 3000 ; pause 3 s
goto main ; loop back to start
We're pretty happy with the test. It actually works!
Here we want to change up to a 28X2...........
Pictured below is the 5k slave pot mounted at the pivot point of the large gear. The three leads can also be seen;
With 5 volts across the slave pot, the wiper reads 1.2 volts (1.12k) full left side, 2.5 volts (2.41k) center, and 3.7 volts (3.65k) to the far right side.
The plan is to move the slave pot (B.0) with a 5k control pot (B.1) using a pwmduty command to the MD20A motor driver (C.1)
The MD20A also has a direction pin (B.7) which is high for CCW and low for CW rotation.
Last edited: