Shop OBEX P1 Docs P2 Docs Learn Events
HB-25 Keeps Timing Out ! — Parallax Forums

HB-25 Keeps Timing Out !

kenwtnkenwtn Posts: 250
edited 2008-06-09 14:37 in BASIC Stamp
Hi All,
··········· I have a single HB-25 and I would like to send the command to it and not worry about refreshing, but I have tried to change it from the timeout mode to non-timeout mode using the procedure below without success. Can someone give me a clearer explanation? The jumper is installed. I disconnected servo cable. Then powered up, I removed the jumper and re-applied power. That did not work so I repeated the below only this time the jumper was off so in step 3 I re-installed the jumper. Still timing out.
·
The Timeout mode can be toggled on and off by following the procedure below. The current state is
stored in an on-board EEPROM and will remain until you toggle it again.
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.

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2008-06-08 17:23
    The HB-25's default state is to not need refreshing. Give it a pulse of the required width and it will stay that way until the stamp issues another command.

    As for the instructions, remove the signal cable and apply power. While powered up, remove or install the jumper. (do only one or the other!).
    Remove power for a few seconds then power up.

    Are you sure the behaviour you're seeing is not caused by the stamp program? Perhaps post it and we can have a look.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • kenwtnkenwtn Posts: 250
    edited 2008-06-08 22:51
    This is the code sub-routine to send commands to the HB-25. If I don't send back to back PULSOUT nothing happens.

    Motor_SR:
    PULSOUT HB25, M_Speed
    PAUSE 20
    PULSOUT HB25, M_Speed
    PAUSE 20
    RETURN
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-08 23:33
    PULSOUT puts out a pulse by toggling the current state of the I/O pin. If somehow the I/O pin (HB25) was last set to HIGH, that's the resting state that will be toggled. You want the pin to be LOW.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-08 23:36
    How do I do that? The coding example uses PULSOUT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-09 00:35
    Read the PBasic manual chapter on the PULSOUT statement, but basically, you need to initialize that pin to LOW. A LOW HB25 statement at some point prior to the first call to Motor_SR should work.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-09 00:39
    I miss understood your previous post. At start up I do this but only at the beginning of the program.

    DO : LOOP UNTIL HB25 = 1
    LOW HB25
    PAUSE 200
  • kenwtnkenwtn Posts: 250
    edited 2008-06-09 01:33
    · I have attached a copy of my program. Understand it is work in progress and is not complete.
  • stamptrolstamptrol Posts: 1,731
    edited 2008-06-09 12:29
    Nicely documented program.

    I think there may be a situation where the M_speed variable doesn't change from the M_stop value. Perhaps put a debug in the motor subroutine to check.

    Alternatively, setup a very small program that controls only the HB-25 and send it some hard values for reverse, stop, forward.
    That will allow you to concentrate on getting the HB-25 to behave.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • kenwtnkenwtn Posts: 250
    edited 2008-06-09 13:44
    Hi,
    Thanks for all the suggestions. I tried hard coding 750 which is stop, then 850 which turns the motor forward and then 650 gave me reverse, but still the HB-25 times out after a few seconds.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-09 14:37
    You DO have a common ground connecting Vss and the HB-25, right?

    Some people have installed a 10 Kohm "pull-down" resistor between the data terminal and ground -- but that's to prevent BS2 transients on the line when the BS2 is powered off.

    Edit:· That really is a very nicely documented and formatted program, well done.

    On a quick viewing, it looks like you're properly setting the port to an output, and properly controlling the HB25 with PULSOUT.
    All I'm left with is either a power problem (your power supply might lack the 10 amps necessary to drive the HB25's, and brown-out reset)
    or some logic problem which is resulting in sending resets to the HB-25.

    Many people put a:

    · SEROUT 16, 16468, [noparse][[/noparse]" Reset! ", CR]

    at the start of their program.· This will then let you monitor the "programming port" in the IDE,
    to see if your program is resetting.

    Post Edited (allanlane5) : 6/9/2008 3:04:11 PM GMT
Sign In or Register to comment.