HB25 Trouble...
jssherrard
Posts: 10
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
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
does the sample code work?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
I am wondering if the HB-25 might be faulty???
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
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]
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
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...
[noparse]:)[/noparse]
[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!!!
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.
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...
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.
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
Hmmmm ... Have you tried the demo code? what does it do?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.