HB-25 Motor control won't stay on.
offlanders
Posts: 9
I recently acquired 2 HB-25 motor controllers. I got them all hooked up, and they seem to work with the test program on parallax's documentation. But when try them in even a simple program I wrote they will work for about 1.5 seconds and then shut off. My understaning from the documentation was they were "like" a servo in that you can set it and forget it.
Here is a copy of the program I made
LOW 15
PAUSE 200
PULSOUT 15,750
Main:
PULSOUT 15,1200
PAUSE 9000
STOP
Here is a copy of the program I made
LOW 15
PAUSE 200
PULSOUT 15,750
Main:
PULSOUT 15,1200
PAUSE 9000
STOP
Comments
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Parallax Tech Support·
http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/HB-25MotorController-V1.2.pdf
In there they do mention the ability to keep the motor going with a single pulse (no timeout ) but it might have to·be enabled by doing a few steps. Please read the docs.
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Parallax Tech Support
Post Edited (Dave Andreae (Parallax)) : 2/20/2009 9:49:32 PM GMT
As for the "do" and "for" loops, am I was under the impression that you could issue a single pulse to the HB-25 and it would run indefinitely (or at least 4 seconds if you have auto shut off)
I tried a different PULSOUT to deal with SRLM comment, I used PULSOUT 15,900, and was met with the same results, breif motion and then nothing.
I have two of these units and they both are exibiting the same problem, I would guess that the odds of both of them failing in the same way are remote.
To toggle the state of the Timeout mode:
1. Disconnect the servo input cable from the HB-25. If there is a daisy-chained cable to a
second unit remove it as well. It makes no difference whether the Mode Jumper (J) is
installed.
2. Apply power to the HB-25.
3. With the power on change the state of the Mode Jumper by installing the jumper if it is
removed or removing it if it is installed.
4. Remove and re-apply power.
The timeout state should now be toggled. To change it back, repeat the above steps.
Post Edited (Propability) : 2/20/2009 11:28:51 PM GMT
Are you using a BS2? Your "stop" command implies a BS2. However, if you are using a different speed Stamp, the pulses are different. Additionally, when using a BS2, nothing over 1000 is valid. (It is on faster Stamps, however.)
The HB-25 is a great motor controller. I use them a lot. They work as advertised. And, yes, you can "fire and forget" it by giving it a command then allowing your program to wander off and do whatever you want it to. There is no need to refresh the HB-25 until you want to change what you told it to do.
Just for your information, when using a BS2, the valid PULSEOUT values are from 500 to 1000. However, this range is split into two halves with 750 as the mid-point. Anything below 750 causes the HB-25 to use one polarity, thus, motor direction and anything over 750 causes the HB-25 to send the other polarity, thus, motor direction. The PULSEOUT numbers from 749 to 500 cause the motor to run very slow at 749 (in fact, it probably won't even move) to full speed at 500.
The reverse is true for the PULSEOUT numbers from 751 to 1000; 751 will cause the motor to move very slowly and in the opposite direction of 749. Like 749, the motor will probably not even move at 751. 1000 causes the motor to move as fast as 500, but in the other direction. (Of course, 750 is causes the motor to stop.)
The HB-25 was certainly the answer for a motor controller for me. The only thing I would love to see Parallax do to improve on the HB-25 is create an HB-50.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
You should put a PAUSE statement after each PULSOUT statement directed at the HB-25. This allow the HB-25 to "settle down" and get its head on straight before execution. (Gee. That sounds kinda grim.) I notice that you have no PAUSE statement after the PULSOUT 15,750.
I would have put·a PAUSE 20 after the PULSOUT 15, 750 statement.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
How are your HB-25 issues working out? Did that code I sent via PM give you any clues?
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
' {$STAMP BS2}
' {$PBASIC 2.5}
'--Initilizaion--
HB25 PIN 7
Start:
DO : LOOP UNTIL HB25 = 1
LOW HB25 ' Make I/O Pins Output/Low
PAUSE 20 ' Wait For HB-25s To Initialize
PULSOUT HB25, 750 ' Stop the motor
'--Program--
Main:
PULSOUT HB25, 450
PAUSE 20
GOTO Main
This will keep it running, but whenever I leave the loop and try to get the BS2 to execute a different part of the program it won't keep the motor running. And by that I mean, i have already tried the failsafe part of the HB-25 controler. Any thoughts?
Offlanders
Your description of the problem meets the exact diagnosis I would give if I really knew anything about the HB-25's "timeout" mode. I BELIEVE this is·the mode in which the HB-25 needs to be refreshed, just like or much like,·a servo. By keeping it in the loop, you are doing the required refreshing.
Take a careful look at the documentation again. Make sure the HB-25s are not in the "timeout" mode . . . I think that is what it is called.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
The problem was in giving the right pulsout.
Thanks again for the input
Offlanders
Great!!!
And, thanks for letting everyone know.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.