SX48 Microcontroller and the HB25 Motor Controller
Kevin Dolese
Posts: 1
I am having a trouble with the HB25 motor controller and the SX48 microprocessor. I have followed by the user manual until i cam across some discrepancies. In the user manual it says the following:
HB 25 Motor Controller
Pulse Input
1.0 ms Full Reverse
1.5 ms Neutral (Off)
2.0 ms Full Forward
When you evalute the source code provided for the Basic Stamp Microprocessors, they use 500ms, 750ms, and 1000ms. My source code for the SX48 is as follows:
DO WHILE HB_25 = 0 ' Wait For HB-25 Power Up
LOOP
LOW HB_25 ' Make I/O Pin Output/Low
PAUSE 10 ' Wait For HB-25 To Initialize
PULSOUT HB_25, 750, 1 ' Stop Motor 1
PAUSE 1
PULSOUT HB_25, 750, 1 ' Stop Motor 2 (If Connected)
Main:
FOR index = 0 to 250
·motor_forward = 750 + index
·motor_reverse = 1500 - index
·PULSOUT RE.6, motor_forward, 1
·PAUSE·1
·PULSOUT RE.6, motor_forward, 1
·PAUSE·6
NEXT
If anyone can help me, I would really appreciate it. In the mean time I will continue messing around with it until I figure it all out.
Thanks,
Kevin
HB 25 Motor Controller
Pulse Input
1.0 ms Full Reverse
1.5 ms Neutral (Off)
2.0 ms Full Forward
When you evalute the source code provided for the Basic Stamp Microprocessors, they use 500ms, 750ms, and 1000ms. My source code for the SX48 is as follows:
DO WHILE HB_25 = 0 ' Wait For HB-25 Power Up
LOOP
LOW HB_25 ' Make I/O Pin Output/Low
PAUSE 10 ' Wait For HB-25 To Initialize
PULSOUT HB_25, 750, 1 ' Stop Motor 1
PAUSE 1
PULSOUT HB_25, 750, 1 ' Stop Motor 2 (If Connected)
Main:
FOR index = 0 to 250
·motor_forward = 750 + index
·motor_reverse = 1500 - index
·PULSOUT RE.6, motor_forward, 1
·PAUSE·1
·PULSOUT RE.6, motor_forward, 1
·PAUSE·6
NEXT
If anyone can help me, I would really appreciate it. In the mean time I will continue messing around with it until I figure it all out.
Thanks,
Kevin
Comments
or...
Post Edited (JonnyMac) : 7/13/2008 5:25:38 PM GMT
I have not used the HB25 motor controller. However, it sounds like it operates very similar to hobby servo motors. I have used several of those! They tend to like a nice steady pulse train. The pulse ON time is important but so is the pulse OFF time. It did not have to be exact in my experience; but try to make it as close as you can when starting out.
It is true that in the case of the hobby servos I have used I was able to obtain satisfactory performance out of them using a multiple of the specified timing durations. However, the HB25 may need the pulse train to be very close. I do not know.
I suggest trying to make the pulse train close to what is stated in the motor controller manual and give it a steady and fixed pulse train to start out. Then once you have the motor moving at some constant speed you can experiment with varying the pulse characteristics.
- Sparks