HB-25 Speed Control
Hello everyone,
I am working with a HB-25 controller and am have having trouble controlling speed.· I need the controller to be able to run at full speed forward, ~1/2 speed forward, full reverse and ~1/2 speed reverse.· I am using a·BS2 to control the controller.· It is my understanding that·a pulse of 1000 is full speed ahead, 750 is stop, and 500 is full reverse.· My problem is I am getting only full forward and full reverse (I am just measuring voltage, I do not have a motor connected), reguardless of the pulse width I put in the code.· What am I missing?· My code is below:
'·· {$STAMP BS2}
'·· {$PBASIC 2.5}
'
[noparse][[/noparse] I/O Definitions ]
HB25··········· PIN···· 12············· ' I/O Pin For HB-25
'
[noparse][[/noparse] Initialization ]
DO : LOOP UNTIL HB25 = 1··············· ' Wait For HB-25 Power Up
LOW HB25······························· ' Make I/O Pin Output/Low
PAUSE 5································ ' Wait For HB-25 To Initialize
PULSOUT HB25, 750······················ ' Stop Motor 1
'Program Code
PAUSE 2000
MAIN:
· PULSOUT hb25, 1000···················· 'Run motor at full speed
· PAUSE 5000···························· 'Run at speed above for 5 sec
· PULSOUT hb25, 750····················· 'Turn motor off
· PAUSE 3000···························· 'Leave off for 3 sec
· PULSOUT hb25, 875····················· 'Turn motor on at ~1/2 speed
· PAUSE 5000···························· 'Run at speed above for 5 sec
GOTO MAIN······························· 'Repeat
STOP
THANKS!
I am working with a HB-25 controller and am have having trouble controlling speed.· I need the controller to be able to run at full speed forward, ~1/2 speed forward, full reverse and ~1/2 speed reverse.· I am using a·BS2 to control the controller.· It is my understanding that·a pulse of 1000 is full speed ahead, 750 is stop, and 500 is full reverse.· My problem is I am getting only full forward and full reverse (I am just measuring voltage, I do not have a motor connected), reguardless of the pulse width I put in the code.· What am I missing?· My code is below:
'·· {$STAMP BS2}
'·· {$PBASIC 2.5}
'
[noparse][[/noparse] I/O Definitions ]
HB25··········· PIN···· 12············· ' I/O Pin For HB-25
'
[noparse][[/noparse] Initialization ]
DO : LOOP UNTIL HB25 = 1··············· ' Wait For HB-25 Power Up
LOW HB25······························· ' Make I/O Pin Output/Low
PAUSE 5································ ' Wait For HB-25 To Initialize
PULSOUT HB25, 750······················ ' Stop Motor 1
'Program Code
PAUSE 2000
MAIN:
· PULSOUT hb25, 1000···················· 'Run motor at full speed
· PAUSE 5000···························· 'Run at speed above for 5 sec
· PULSOUT hb25, 750····················· 'Turn motor off
· PAUSE 3000···························· 'Leave off for 3 sec
· PULSOUT hb25, 875····················· 'Turn motor on at ~1/2 speed
· PAUSE 5000···························· 'Run at speed above for 5 sec
GOTO MAIN······························· 'Repeat
STOP
THANKS!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thank you for the reply. I pulled out the reverse part and tried just reducing the forward speed (875 pulse). I have been able to make the controller ouput a reversed polarity max voltage, but it does this for pretty much any pulse value between 500 and 750. It outputs a max foward polarity for just about every voltage bewtween 750 and 1000. The only difference is when I get very close to 750, say 750-760.
Is there not a linear relationship between speed and pulse? i.e., for 1/2 forward speed, is it [noparse][[/noparse]1000-750]/2+750=875? Or, for reverse 1/2 speed [noparse][[/noparse]500-750]/2+750=625?
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thank you again for the reply. For the test I have run today, I do not have a motor attached, I am simply reading the voltage across the terminals of the controller. I am using a power supply (parallax supply to controller via EFX DC-16) that is supplying right at 15V. I expected the voltage to read ~7.5 when the pulse was set to 875 and ~-7.5 when set to 625.
Does a motor NEED to be connected to see the voltage difference? If so, I'll need to power it differently because the board I am running it through isn't rated for high current.
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
That worked beautifully. The controller is working as I expected.
Thanks!