Shop OBEX P1 Docs P2 Docs Learn Events
HB 25's — Parallax Forums

HB 25's

JockJock Posts: 8
edited 2007-03-18 01:37 in BASIC Stamp
Hi

I am trying to use 10 HB25's to drive 10 Linear actuators. I have successfully done this with 8 but I have had issues since adding the next 2.

It appears that the 'initialisation' of the HB25's seems to be the trouble? If I remove the code for any 3 of the HB25's it seems to work fine.

I have include the code I have used below.

Any help would be appreciated, Thanks in advance, Richard.


' {$STAMP BS2}
' {$PBASIC 2.5}
'
SET UP VARIABLES
RAM1· PIN 6
RAM2· PIN 7
RAM3· PIN 8
RAM4· PIN 9
RAM5· PIN 10
RAM6· PIN 11
RAM7· PIN 12
RAM8· PIN 13
RAM9· PIN 14
RAM10· PIN 15
'
WAIT FOR MOTOR CONTROLLERS TO POWER UP
DO : LOOP UNTIL RAM1 = 1
LOW RAM1
PAUSE 5
PULSOUT RAM1,750
DO : LOOP UNTIL RAM2 = 1
LOW RAM2
PAUSE 5
PULSOUT RAM2,750
DO : LOOP UNTIL RAM3 = 1
LOW RAM3
PAUSE 5
PULSOUT RAM3,750
DO : LOOP UNTIL RAM4 = 1
LOW RAM4
PAUSE 5
PULSOUT RAM4,750
DO : LOOP UNTIL RAM5 = 1
LOW RAM5
PAUSE 5
PULSOUT RAM5,750
DO : LOOP UNTIL RAM6 = 1
LOW RAM6
PAUSE 5
PULSOUT RAM6,750
DO : LOOP UNTIL RAM7 = 1
LOW RAM7
PAUSE 5
PULSOUT RAM7,750
DO : LOOP UNTIL RAM8 = 1
LOW RAM8
PAUSE 5
PULSOUT RAM8,750
DO : LOOP UNTIL RAM9 = 1
LOW RAM9
PAUSE 5
PULSOUT RAM9,750
DO : LOOP UNTIL RAM10 = 1
LOW RAM10
PAUSE 5
PULSOUT RAM10,750
PAUSE 200
'
MAIN CODE
CHECK:
'check ram 1
PULSOUT RAM1,900
PAUSE 600
PULSOUT RAM1,750
LOW RAM1
PAUSE 600
PULSOUT RAM1,600
PAUSE 600
PULSOUT RAM1,750
LOW RAM1
'check ram 2
PULSOUT RAM2,900
PAUSE 600
PULSOUT RAM2,750
LOW RAM2
PAUSE 600
PULSOUT RAM2,600
PAUSE 600
PULSOUT RAM2,750
LOW RAM2
'check ram 3
PULSOUT RAM3,900
PAUSE 600
PULSOUT RAM3,750
LOW RAM3
PAUSE 600
PULSOUT RAM3,600
PAUSE 600
PULSOUT RAM3,750
LOW RAM3
'check ram 4
PULSOUT RAM4,900
PAUSE 600
PULSOUT RAM4,750
LOW RAM4
PAUSE 600
PULSOUT RAM4,600
PAUSE 600
PULSOUT RAM4,750
LOW RAM4
'check ram 5
PULSOUT RAM5,900
PAUSE 600
PULSOUT RAM5,750
LOW RAM5
PAUSE 600
PULSOUT RAM5,600
PAUSE 600
PULSOUT RAM5,750
LOW RAM5
'check ram 6
PULSOUT RAM6,900
PAUSE 600
PULSOUT RAM6,750
LOW RAM6
PAUSE 600
PULSOUT RAM6,600
PAUSE 600
PULSOUT RAM6,750
LOW RAM6
'check ram 7
PULSOUT RAM7,900
PAUSE 600
PULSOUT RAM7,750
LOW RAM7
PAUSE 600
PULSOUT RAM7,600
PAUSE 600
PULSOUT RAM7,750
LOW RAM7
'check ram 8
PULSOUT RAM8,900
PAUSE 600
PULSOUT RAM8,750
LOW RAM8
PAUSE 600
PULSOUT RAM8,600
PAUSE 600
PULSOUT RAM8,750
LOW RAM8
'check ram 9
PULSOUT RAM9,900
PAUSE 600
PULSOUT RAM9,750
LOW RAM9
PAUSE 600
PULSOUT RAM9,600
PAUSE 600
PULSOUT RAM9,750
LOW RAM9
'check ram 10
PULSOUT RAM10,900
PAUSE 600
PULSOUT RAM10,750
LOW RAM10
PAUSE 600
PULSOUT RAM10,600
PAUSE 600
PULSOUT RAM10,750
LOW RAM10
STOP
END

Comments

  • slamerslamer Posts: 52
    edited 2007-03-15 00:13
    Wow! You might want to add a servo control board. Your poor stamp·has a lot on it's mind.·A servo control board will help get rid of all of those darn pauses which are just a waste of processor time.· Actually the PSC boards are easy to use and they solve a lot of difficult timing problems as well.

    Free your mind and the rest will follow.....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    undefinedundefinedundefinedundefinedSteven Kirk Nelson (slamer)

    Team K.I.S.S
    Build Safe, Build Mean, Build Strong!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-03-15 05:52
    Richard,

    All of those lines are not necessary...The line that waits for a 1 is a convenience feature to detect when the HB-25 is powered on. In reality in a system like this you'll want to make all connected pins LOW/OUTPUT and then power up the HB-25 Modules connected. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-03-15 06:23
    Richard -

    You don't mention the exact symptom of the problem you're having.

    What are you using to power the HB-25's?

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 3/15/2007 6:56:01 AM GMT
  • JockJock Posts: 8
    edited 2007-03-18 01:34
    Thanks for that Chris
  • JockJock Posts: 8
    edited 2007-03-18 01:37
    Hi Bruce

    the symptom was that the last 2 or 3 HB25's in the list above simply didnt work. I am powering the stamp and the HB25s of the same 12v battery so all power up at once, seems like from chris's answer above I should power up the stamp first?

    Thanks & regards
    Richard
Sign In or Register to comment.