andyquirot
Member
I have built a speed controler board using an 08M Picaxe chip and the Program bellow
symbol DEAD_BAND = 3
symbol REVERSE_DEAD_ZONE = 150 + DEAD_BAND
symbol FORWARD_DEAD_ZONE = 150 - DEAD_BAND
symbol MOTOR_OUT = 2
symbol RELAY = 1
symbol TIME_PERIOD = 40 'do pwm in the input pwm space period (18ms)
start:
w2 = 0
pulsin 3,1,w0 'working range 58-250 with 150 being equivalent to a 1.5ms PWM input
if w0 = 0 then start
if w0 >= 153 then REV '60 - 250
if w0 <= 147 then FWD '58 - 140
goto start
FWD:
LOW RELAY 'reverse relay on
w2 = 147 - w0 'proportional magnitude value
w3 = w2 * TIME_PERIOD 'ime period as a proportion of control input
pulsout 2,w3
goto start
REV:
HIGH RELAY 'reverse relay off
w2 = w0-153 'proportional magnitude value
w3 = w2 * TIME_PERIOD 'time period as a proportion of control input
pulsout 2,w3
goto start
Not my program buy the way.. I am getting some odd thinks happen
1. When i move my stick from centre to th forward possion the motor will speed up and as i get to the full forward position the motor will start to decreese speed. only get full (ISH) speed at 3/4 position????????????????
2. When starting the motor under a slight load the botor will just vibrate / buzz will not move ????????
Any help will be welcome
Regards Andy Quirot
symbol DEAD_BAND = 3
symbol REVERSE_DEAD_ZONE = 150 + DEAD_BAND
symbol FORWARD_DEAD_ZONE = 150 - DEAD_BAND
symbol MOTOR_OUT = 2
symbol RELAY = 1
symbol TIME_PERIOD = 40 'do pwm in the input pwm space period (18ms)
start:
w2 = 0
pulsin 3,1,w0 'working range 58-250 with 150 being equivalent to a 1.5ms PWM input
if w0 = 0 then start
if w0 >= 153 then REV '60 - 250
if w0 <= 147 then FWD '58 - 140
goto start
FWD:
LOW RELAY 'reverse relay on
w2 = 147 - w0 'proportional magnitude value
w3 = w2 * TIME_PERIOD 'ime period as a proportion of control input
pulsout 2,w3
goto start
REV:
HIGH RELAY 'reverse relay off
w2 = w0-153 'proportional magnitude value
w3 = w2 * TIME_PERIOD 'time period as a proportion of control input
pulsout 2,w3
goto start
Not my program buy the way.. I am getting some odd thinks happen
1. When i move my stick from centre to th forward possion the motor will speed up and as i get to the full forward position the motor will start to decreese speed. only get full (ISH) speed at 3/4 position????????????????
2. When starting the motor under a slight load the botor will just vibrate / buzz will not move ????????
Any help will be welcome
Regards Andy Quirot