Trouble running duel relay boards with a BS1 Project Board.
BrianM
Posts: 3
Hi,
Newby here. Not sure if this is my hook-up, my code, or if I fried the BS1
I have a BS1 project board connected directly to a pair of duel relay board using servo like jumpers on the servo pins on the BS1 board.
The duel relay boards works perfectly on their own, but when I hook them up to the BS1 and run this code:
SYMBOL RLY1=PIN0
SYMBOL RLY2=PIN1
SYMBOL RLY3=PIN2
SYMBOL RLY4=PIN4
Main:
HIGH RLY1
PAUSE 1000
HIGH RLY2
PAUSE 1000
LOW RLY1
LOW RLY2
PAUSE 1000
HIGH RLY3
PAUSE 1000
HIGH RLY4
PAUSE 1000
LOW RLY3
LOW RLY4
GOTO Main
Only the first relay closes and opens. The rest do not. Am I missing a pull down resistor or something?
Help,
Brian
Newby here. Not sure if this is my hook-up, my code, or if I fried the BS1
I have a BS1 project board connected directly to a pair of duel relay board using servo like jumpers on the servo pins on the BS1 board.
The duel relay boards works perfectly on their own, but when I hook them up to the BS1 and run this code:
SYMBOL RLY1=PIN0
SYMBOL RLY2=PIN1
SYMBOL RLY3=PIN2
SYMBOL RLY4=PIN4
Main:
HIGH RLY1
PAUSE 1000
HIGH RLY2
PAUSE 1000
LOW RLY1
LOW RLY2
PAUSE 1000
HIGH RLY3
PAUSE 1000
HIGH RLY4
PAUSE 1000
LOW RLY3
LOW RLY4
GOTO Main
Only the first relay closes and opens. The rest do not. Am I missing a pull down resistor or something?
Help,
Brian
Comments
Welcome to the forum!! Feel free to ask any of your questions here.
It's been awhile since I programmed a BS1 but I think your problem has something to do with how you are defining the SYMBOL.
Try this instead...
...If that still does not work, then try moving to some other pins to rule out that the BS1 is not fried.
SYMBOL RLY1=PIN0
SYMBOL RLY2=PIN1
SYMBOL RLY3=PIN2
SYMBOL RLY4=PIN4
Also, do you have a seperate power supply or battery for the relay board? The Stamp's 9V battery and 5V regulator are probably not up to powering the relays too.
But I did drop from 12% memory full to 10% by using variable W1 in the PAUSE statements instead of 1000. It's something!
Thanks all for your help, lots of good debugging tips.
would save on power requirements for driving coils.
BTW. How do I change the "Unsolved" to "Solved"?
Hi BrianM,
Edit your original (1st) post, go into "Advanced" and then set the "Prefix" box to "Solved".
Save your change, and you're done!
Constants and Labels don't take up memory. They're just reference values for the compiler. Labels get converted directly to an address while constants used in the code are replaced with the assigned value. Unused constants aren't replaced (no reference) which is why defining unused constants doesn't take up memory on the BASIC Stamp Modules.