Shop OBEX P1 Docs P2 Docs Learn Events
HB-25 Problems — Parallax Forums

HB-25 Problems

John AbshierJohn Abshier Posts: 1,116
edited 2006-09-29 01:37 in Propeller 1
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.

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-09-18 15:19
    Can you post your entire code?

    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.
  • ALIBEALIBE Posts: 299
    edited 2006-09-18 17:12
    I was not aware that there was a HB-25 object already released. Can someone point me to it please!!

    thanks , Nagi

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-09-18 18:16
    ALIBE,

    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.
  • John AbshierJohn Abshier Posts: 1,116
    edited 2006-09-18 20:30
    Full code is attached.· I start with the HB-25 on and then apply power to the Propeller board.· Then I download the program to ram.· If I do nothing else, the motor does not run.· If I cycle power (from on to off back to on) to the HB-25, the motors work.·
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-09-18 21:04
    John,

    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.
  • John AbshierJohn Abshier Posts: 1,116
    edited 2006-09-19 20:57
    Beau, attached is a minimal progam to illustrate the problem.· Just run the program-the motor doesn't run.· Run the program and cycle power in Init-the motor runs.
  • John AbshierJohn Abshier Posts: 1,116
    edited 2006-09-19 21:16
    Good outcome, but totally confusing. If I download Test.spin to EEPROM, the motor runs without cycling power.
  • ALIBEALIBE Posts: 299
    edited 2006-09-28 18:19
    Beau, and all @ Parallax;

    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/
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-28 21:25
    Nagi,
    ·
    ·· 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
  • CJCJ Posts: 470
    edited 2006-09-28 22:38
    I may take a crack at it tonight, need a break from my ps2 controller work, though I don't have any hardware to test it with.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • CJCJ Posts: 470
    edited 2006-09-28 23:17
    looking at the docs, am I correct in saying that there is a pullup on the signal line to the logic supply on the unit to signal power state?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-29 01:37
    CJ,
    ·
    ·· 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
Sign In or Register to comment.