Shop OBEX P1 Docs P2 Docs Learn Events
HB25 Trouble... — Parallax Forums

HB25 Trouble...

jssherrardjssherrard Posts: 10
edited 2008-08-28 04:24 in BASIC Stamp
Hi!

I have an HB25 controlling a Monster Guts motor off an EFX-TEK Prop-1 (BS1) controller. The Prop-1·and Motor are working fine independently.

Here is the simple·code:


' =========================================================================
'
'· ·File...... HB-25.BS1
'
'· ·{$STAMP BS1}
'· ·{$PBASIC 1.0}
'
' =========================================================================


'
[noparse][[/noparse] I/O Definitions ]


SYMBOL· HB25Chk· · · · ·= PIN7· · · · · · · · · ' P7 in - no SETUP jumper

'
[noparse][[/noparse] Constants ]


SYMBOL· HB25· · · · · · = 7· · · · · · · · · · ·' P7 control


'
[noparse][[/noparse] Variables ]

SYMBOL· speed· · · · · ·= B2· · · · · · · · · · ' 100 to 200


'
[noparse][[/noparse] Initialization ]

Check_Motor:
· IF HB25Chk = 0 THEN Check_Motor· · · · · · · ·' allow HB25 to initialize
· LOW HB25· · · · · · · · · · · · · · · · · · · ' set for PULSOUT
· GOSUB Stop_Motor

'
[noparse][[/noparse] Program Code ]

Main:

· speed = 180
· GOSUB Set_Motor_Speed
· PAUSE 2000

· GOSUB Stop_Motor
· PAUSE 2000

· GOTO Main


'
[noparse][[/noparse] Subroutines ]

Stop_Motor:
· PAUSE 6· · · · · · · · · · · · · · · · · · · ·' command hold-off
· PULSOUT HB25, 150· · · · · · · · · · · · · · ·' center = stop
· PAUSE 6· · · · · · · · · · · · · · · · · · · ·' command hold-off
· PULSOUT HB25, 150· · · · · · · · · · · · · · ·' insurance command
· RETURN

'

Set_Motor_Speed:
· PAUSE 6· · · · · · · · · · · · · · · · · · · ·' command hold-off
· PULSOUT HB25, speed· · · · · · · · · · · · · ·' set speed/direction
· RETURN


' =========================================================================


The motor should run for two seconds, stop for two second, repeat;·however, every·time the HB25 receives the "PULSOUT HB25, speed" (speed=180) command the motor simply moves a tiny click forward and then immediately stops...

?

I cannot seem to figure out what I am doing wrong! Is it possible I received a bad HB25???



Post Edited By Moderator (Chris Savage (Parallax)) : 8/27/2008 11:05:42 PM GMT

Comments

  • DgswanerDgswaner Posts: 795
    edited 2008-08-12 19:43
    are you powering up your HB-25 a second or 2 after your BS1? you need to.

    does the sample code work?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • jssherrardjssherrard Posts: 10
    edited 2008-08-12 20:00
    Yes, the HB-25 is powered after the BS1. The sample code does not work for me. Again, whenever the HB-25 receives the PULSOUT command, it sends power to the motor for just the slightest fraction of a second...

    I am wondering if the HB-25 might be faulty???
  • DgswanerDgswaner Posts: 795
    edited 2008-08-12 20:10
    your sure you have them wired correctly and the jumper(s) set correct?

    double check the power to your BS1. if it's not properly powered it could cause issues.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • jssherrardjssherrard Posts: 10
    edited 2008-08-12 20:35
    My BS1 is part of the Prop-1 and is powered by the EFX-TEK supplied power supply. It has no problem controlling servos, PIR Sensor, VMusic1, etc... I believe the BS1 is working fine.

    The HB-25 has only one jumper and it is connected. The HB-25 is connected to P7 on the Prop-1 and I am using the ULN2003. The Green power light comes on and the fan turns.

    Again, the motor and the Prop-1 (BS1) are working fine independent of the HB-25...

    I am at a loss...

    [noparse]:([/noparse]
  • DgswanerDgswaner Posts: 795
    edited 2008-08-12 21:07
    do you have a schematic? where does the ULN2003 connect? is that switching on the HB-25?

    are your grounds connected. If the demo code doesn't work, then I'd say you either have a bad HB-25 or most likely and sorry to say, something isn't connected correctly. I'd download the Prop demo code, connect it to one of the servo connections and try it. that will tell you if your dealing with a defective unit or a connection issue.

    do you have an oscilloscope? you could check the output and see if your getting the proper signal.


    added:
    Oppppppssssss ok I just realized your not talking about a propeller but the prop-1. do you have another way of stand alone testing the HB-25? I'd agree if it will run a servo it should run the HB-25. I would try a different pin tho.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner

    Post Edited (Dgswaner) : 8/12/2008 9:29:13 PM GMT
  • jssherrardjssherrard Posts: 10
    edited 2008-08-12 22:27
    No schematic, but I can easily explain the connection:

    HB-25 + connected to Prop-1 V+
    HB-25 - connected to Prop-1 GND
    HB-25 M1 & M2 connected to motor
    HB-25 serial (wrb) connected to Prop-1 Pin7
    HB-25 jumper connected
    no setup jumper on Prop-1 Pin7

    Pin7 is used because the ULN2003 cannot interfere with Pin7

    The green light and the fan both work on the HB-25.

    I would LOVE IT if I have simply made a bone-head connection error! Much easier than replacing the HB-25...
  • jssherrardjssherrard Posts: 10
    edited 2008-08-15 01:29
    A beefier power supply is on its way. I will post the results after it arrives. Thanks for the help thus far!

    [noparse]:)[/noparse]
  • jssherrardjssherrard Posts: 10
    edited 2008-08-22 23:37
    OK, first I want to say THANK YOU for all the help so far...

    [noparse]:)[/noparse]

    Here is the current situation: I received and connected an appropriate power supply to the HB-25. This solved the previous issue. Good so far. I then realized my HB-25 was in "Timeout Mode" so I fixed that as well. Sadly, I still have a problem...

    Whenever I send a "PULSOUT" command to the HB-25, the motor only runs at two speeds: on or off.

    Any value greater than 150 = FULL ON, any value of 150 or less = OFF.

    ???

    What am I doing wrong now?!?

    Here is a brief code example:


    - - - - - -


    ' {$STAMP BS1}
    ' {$PBASIC 1.0}

    SYMBOL HB25 = 7

    Startup:

    IF PIN7 = 0 THEN Startup
    LET DIRS = %10000000
    PAUSE 50
    PULSOUT HB25, 150
    PAUSE 50

    Main:

    PULSOUT HB25, 160
    PAUSE 2000

    PULSOUT HB25, 175
    PAUSE 2000

    PULSOUT HB25, 190
    PAUSE 2000

    PULSOUT HB25, 150
    PAUSE 4000

    GOTO Main


    - - - - - -


    Oddly, this results in 6 seconds of movement at THE SAME SPEED and 4 seconds of no movement... Again, any value less that 150 results in no movement instead of the expected reverse direction.

    Please help, I am at a loss here and don't know how to proceed...

    Thanks!!!
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2008-08-23 02:58
    jssherrard,

    What is your power supply right now, and what if any kind of load do you have on the motor?

    If there is no load on the motor, then 160,175,and 190 might seem to run at the same speed.

    150 should stop the motor.... try something like 140, to 100 to reverse the direction.


    Also, what kind of motor are you using?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • jssherrardjssherrard Posts: 10
    edited 2008-08-23 03:17
    Power supply: 12vdc 5amp

    Motor: MonsterGuts type Wiper Motor

    Very minimal load. This motor isn't designed to move particularly fast even at its fastest and the speed differences should be obvious; however, all values over 150 result in the same (full) speed. The motor stops at 150 and there is absolutely no movement whatsoever at any value below 150. This particular type of motor is frequently used in prop building and mine works fine in both forward and reverse when tested independant of the HB-25...
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2008-08-23 03:25
    jssherrard,

    Are you still using a ULN2003 in your design? How are things connected? Can you provide a schematic and/or picture?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • jssherrardjssherrard Posts: 10
    edited 2008-08-23 03:39
    The BASIC Stamp 1 (EFX-TEK Prop-1) and the HB-25 each have their own designated power supplies.

    Here are my current HB-25 connections:

    HB-25 + and - connected to 12vdc 5amp power supply
    HB-25 M1 & M2 connected to motor
    HB-25 serial (wrb) connected to Prop-1 Pin7
    HB-25 jumper connected

    no setup jumper on Prop-1 Pin7. Pin7 is used because the ULN2003 cannot interfere with Pin7

    The green light and the fan both work on the HB-25.

    That's it, there is nothing else connected right now. The HB-25 clearly receives the PULSOUT commands; however, it is only acting like a switch. ON and OFF with no speed control.

    I am uploading two·images of a PREVIOUS ITERATION of my setup. As you will see the HB-25 HAD BEEN·connected to the V+ and GND on the Prop-1; however, that is no longer the case as·the Prop-1 is incapable of supplying the necessary amps.·The HB-25 now has its own 12vdc 5amp·power supply. Although you can see other bits of hardware in the image (VMusic2, audio amp, etc...), I assure you that nothing else is in any way even remotely connected to either the HB-25 or the Prop-1.

    I apologize for the less-than-current images. Sadly, my digital camera decided to take·a·permament vacation to the·electronics cemetery...


    Post Edited (jssherrard) : 8/23/2008 4:09:21 AM GMT
    400 x 600 - 294K
    600 x 400 - 262K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-08-27 04:00
    Your duplicate post in the BASIC Stamp Forum was removed. If you want this thread moved, that can be done. But cross-posting is not allowed. Please indicate in this thread if you would like it moved. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • jssherrardjssherrard Posts: 10
    edited 2008-08-27 04:22
    Thanks Chris. Yes, please move to the BASIC Stamp Forum...
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2008-08-27 14:55
    jssherrard,

    Check out page 2 of the PDF... http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/HB-25MotorController-V1.2.pdf

    For Mode 1 (Jumper in place) there is a 5ms hold-off time before you can send the next pulse.... In your code your only waiting 2ms and 4ms which isn't quite enough time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • jssherrardjssherrard Posts: 10
    edited 2008-08-27 19:12
    On the BASIC Stamp 1 (EFX-TEK Prop-1) a PAUSE 2000 = 2 seconds and PAUSE 4000 = 4 seconds. More than enough time...
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-08-27 23:02
    This thread is being moved to the BASIC Stamp Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2008-08-28 04:24
    jssherrard,

    Hmmmm ... Have you tried the demo code? what does it do?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.