Shop OBEX P1 Docs P2 Docs Learn Events
Parallax HB-25 motor controller doesn't work? — Parallax Forums

Parallax HB-25 motor controller doesn't work?

Kris CardoenKris Cardoen Posts: 46
edited 2012-03-18 12:53 in Robotics
Hi,

I have tested the following test setup, but for some reason it doesn't work as it should:

- Micro controller : Basic stamp2 board of education
- Motor controller : Parallax HB-25
- Battery pack : Battery holder 6 x AA 1,5(2500mA) rechargable


Test actions
- I connected the battery pack to the HB-25 with the fuse removed

- Green light so correctly connected. I remove power put the fuse in and connect the power again.

- The HB-25 starts up (fan working).

- I connect the stamp2 board to the HB-25 on the servo port 15 with a standard servo cable (B/R/W)

- I startup the basic stamp an load the code (see below). The code has been modified (some lines put into comment)because I'm
only testing one motor, program was written for 2

- I reconnect power to the HB-25 which starts, but no current on the output of the HB-25

- Resetting the stamp board doesn't solve anything

Has anyone an idea of what I'm doing wrong? If a read de documentation I can just send one pulse to the HB-25 and the motor should keep running.

Any help would be appriciated!!!

Here is the code I'm using

' =========================================================================
' File...... HB-25 Motor Test.bs2
' Purpose... Tests One Or Two HB-25's Connected To P15
' Author.... Parallax, Inc.
' E-mail.... support@parallax.com
' Updated... 01-18-2006
'
' {$STAMP BS2}
' {$PBASIC 2.5}
'
[ Program Description ]
' This program tests the HB-25 by waiting for it to power up, then pulsing
' the output to ramp the motors up in opposite directions, wait 3 seconds
' then ramp them back down to a stopped position. While the code is
' written for two HB-25/motors you can use it with just one by commenting
' out or removing the lines for the second motor, commented below. If you
' have two HB-25/motors connected, remember to remove the jumper block from
' the second HB-25.

'
[ I/O Definitions ]
HB25 PIN 15 ' I/O Pin For HB-25

'
[ Variables ]
index VAR Word ' Counter For Ramping

'
[ Initialization ]
DEBUG "starting program........waiting for HB-25 to startup",CR
DO : LOOP UNTIL HB25 = 1 ' Wait For HB-25 Power Up
LOW HB25 ' Make I/O Pin Output/Low
PAUSE 5 ' Wait For HB-25 To Initialize
DEBUG "Motorcontroller started.............................",CR
PULSOUT HB25, 750 ' Stop Motor 1
'PAUSE 1 ' 1 mS Delay
'PULSOUT HB25, 750 ' Stop Motor 2 (If Connected)
' The Above 2 Lines May Be Removed
' If You Are Using Single Mode
'
[ Program Code ]
Main:
PAUSE 20 ' Wait 20 mS Before Ramping
FOR index = 0 TO 250 ' Ramp Up To Full Speed
PULSOUT HB25, 750 + index ' Motor 1 Forward
DEBUG CRSRXY, 1, 4, "index = ", DEC index + 750
'PAUSE 1 ' 1 mS Delay For Motor 2 Pulse
'PULSOUT HB25, 750 - index ' Motor 2 Reverse
PAUSE 20 ' 20 mS Smoothing Delay
NEXT
PAUSE 9000 ' Wait 3 Seconds
FOR index = 250 TO 0 ' Ramp Back Down
PULSOUT HB25, 750 + index ' Motor 1 Forward Slowing
DEBUG CRSRXY, 1, 4, "index = ", DEC index + 750
'PAUSE 1 ' 1 mS Delay For Motor 2
'PULSOUT HB25, 750 - index ' Motor 2 Reverse Slowing
PAUSE 20 ' 20 mS Smoothing Delay
NEXT
STOP ' Use STOP To Prevent State Change

Comments

  • Tom CTom C Posts: 461
    edited 2012-03-16 04:53
    Kris,
    You need to start the BS2 first and then turn on the HB-25. Also do you have the jumper in place for single unit operation?

    Just a thought.

    Regards,
    TCIII
  • Kris CardoenKris Cardoen Posts: 46
    edited 2012-03-16 06:57
    Yes, I did it following the documentation pdf, but no change :frown:
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2012-03-16 09:55
    Just to confirm, the BASIC Stamp Module is powered before the HB-25 in this setup?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-16 10:40
    It would be good to know what motor you're using and its specs.

    Is the Stamp powered from the same battery pack?
  • Kris CardoenKris Cardoen Posts: 46
    edited 2012-03-18 12:53
    Hi,

    The stamp and the HB-25 have seperate battery packs. But indeed the batteries where the issue. I used some AA rechargable batteries but they did not provide the correct power. I have replaced them some new ones and not it works fine. Now I know that it works I can buy some more and build my new robot :smile:
    Thanks for the help!

    Regards,
    Kris
Sign In or Register to comment.