HB-25 Problems
John Abshier
Posts: 1,116
I have wired a propeller through a 4.7KOhm reisitor to the white wire input of the HB-25 and to ground.· In the BS2 PBasic example (which works fine), the program loops waiting for the HB-25 to bring the signal line high.· That signal line stays low so I took that part out.· I set the line as an output, pull it low and wait 200 milliseconds,
start the servo loop and then call my main routine
· dira[noparse][[/noparse]MOTOR_SERVO]~~·········· ' set output
· outa[noparse][[/noparse]MOTOR_SERVO]~··········· ' low
· waitcnt(clkfreq/1000 * 200 + cnt)
··Servo.Set(MOTOR_SERVO, 1500)
··Servo.Start
· waitcnt(clkfreq + cnt)······· ' wait one second
· MainLoop
But the motors do not run.· After much head scratching the following is the best work around that I have found:· To cycle the power to the HB-25 after Servo.Start but but before calling MainLoop (inserted right before MainLoop):
· lcd.str(string("Cycle Power"))
· waitcnt(clkfreq * 5 + cnt)······· ' wait five seconds·
Once this is done the HB-25 works.· I can reset the Propeller, or download a new progam and the HB-25 continues to work even without cycling the power.· Has any else used Servo32 with the HB-25?· I also tried using the pulsout function in the BS2 library but did not get the HB-25 to work.
start the servo loop and then call my main routine
· dira[noparse][[/noparse]MOTOR_SERVO]~~·········· ' set output
· outa[noparse][[/noparse]MOTOR_SERVO]~··········· ' low
· waitcnt(clkfreq/1000 * 200 + cnt)
··Servo.Set(MOTOR_SERVO, 1500)
··Servo.Start
· waitcnt(clkfreq + cnt)······· ' wait one second
· MainLoop
But the motors do not run.· After much head scratching the following is the best work around that I have found:· To cycle the power to the HB-25 after Servo.Start but but before calling MainLoop (inserted right before MainLoop):
· lcd.str(string("Cycle Power"))
· waitcnt(clkfreq * 5 + cnt)······· ' wait five seconds·
Once this is done the HB-25 works.· I can reset the Propeller, or download a new progam and the HB-25 continues to work even without cycling the power.· Has any else used Servo32 with the HB-25?· I also tried using the pulsout function in the BS2 library but did not get the HB-25 to work.
Comments
I tested this without the lcd section and everything appears just fine.
Only thing I can think of, and it should not be an issue, is that in the released demo code, the _xinfreq was set to 4_000_000... the only thing this
would affect would be that a 1500uS pulse would be closer to 1200uS. Just change _xinfreq to equal 5_000_000 or whatever crystal you are using instead.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
thanks , Nagi
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot
http://fstop.crosscity.com/
http://icar.crosscity.com/
·
There isn't an object for the HB-25 that has been released.
A couple of existing objects though·should allow you to operate the HB-25.
The pulsout command from the BS2 function library should allow you to control the HB-25 in single or dual mode.
The servo32 object should allow you to control the HB-25 in single mode.
Note:
'dual mode' - the HB-25 allows a configuration mode that accepts two motors on the same signal line with independent control of each motor
'single mode' - In this mode the HB-25 responds to the input pulse stream much like a standard servo.
···
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I have run your program, and scoped pins 16,17, and 18 to which you have "TRANS_SERVO", "MOTOR_SERVO", and "STEER_SERVO" connected. Each of the pins are producing the correct waveform
of 1mS, 1.5mS,1.5mS that would be required for a servo. Chris has done much more work with the HB-25 than I have and there could be something subtle that we are missing that he might be able
to point out.
Have you tried to isolate your program to JUST run the HB-25? Perhaps that might leave a clue to help isolate the problem. I can say that I don't think it is a pin I/O discrepancy between different cogs
since the correct waveform is making it out to the correct pins.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Requesting object for hb-25.
I understand from this thread and other related that I can achieve what I need via BS2.PulseOut calls. However, I am hoping to get my work done around using the HB-25 object. The last I heard was due to resources crunch, you are unable make one available soon. I am wondering if we can help persuade you guys [noparse]:)[/noparse] and if you can give that some priority.
My project will greatly find it hepful and will appreciate the help
Thanks, Nagi
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot
http://fstop.crosscity.com/
http://icar.crosscity.com/
·
·
·· Perhaps you could be the first to write an HB-25 Object?· The HB-25 documentation completely describes both modes and this should be pretty easy to implement using previous servo objects as a reference.· Eventually we plan to have an object for this, but for the time being it is in the list.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
·
·· Yes, there is a pull-up to 5V on the signal line.· This can be used to detect the presence of the HB-25 or to just detect that it is powered-up.· You will need a 1K resistor between the Propeller I/O pin and the HB-25 signal pin.· I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support