HELP: 2pe Cant Operate Pin Like Basic Stamp 2 does with same routine, HOW DO I FIX?
MiddleSchooler
Posts: 10
UPDATE 1/17/13 - SOLVED THANKS FOR YOUR HELP : )
I have two Basic stamps that I am using in my project. Fist a Board of Education USB Kit with BasicStamp 2 ("Bd of Ed"). Secondis the 2pe Motherboard ("2pe"). I am using both microcontrollers to do different tings, but the 2pe justdoes not do what the Bd of Ed does, so I need some help, I cant believe the moreexpensive 2pe is less useful the Stamp 2 in Bd of Ed.
Here is what I am doing: I have a sensor and when it is tripped, I want a little buzzer micromotor to spin a few hundredths of a second. For example, when an object is detected at more than 12 inches, the stampis to activate the micro motor. I use Stamp2 in Bd of Ed, and this works perfectly!! No relay needed, when the sensor detects and object, a GOTO in my softwaresend it to a subroutine:
PAUSE 5
LOW 9 (these two lines are at the top of the program, beforeusing the sensor. I want to make sure themotor does not buzz when the program boots, before the sensor detects the object.)
.
' Subroutine for after object detected
' I use Pin 9and Vss on Stamp 2 Bd of Ed
HIGH 9
PAUSE 88
LOW 9
PAUSE 500
HIGH 9
PAUSE 88
LOW 9
DEBUG "Object Found"
END
' the above makes the micro low voltage low amp buzzer motorspin for 88/1000 of a second, pause and the respect the buzz.
The above subroutine WORKS GREAT! No problem in Bd of Ed!!!
BUT HERE IS THE PROBLEM:
Using another sensor and 2pe Motherboard, I have the sensor attachedto Socket B
When the sensor is tripped, I want the buzzer/motor to runjust like it does with Stamp 2 above.
So I use Pin 9 and Gnd on Socket B (there is no Vss listed, instead on 2pe Pin 2 is called Gnd, and then below it are Pin 3, and then Pin 9.)
So I use this subroutine, the same as I used in Stamp 2 above (both units are operating independently, independent ally powered, etc.) I use Gnd and Pin 9
' Subroutine for after object detected
' I use Pin 9and Gnd on 2pe Mothorboard
HIGH 9
PAUSE 88
LOW 9
PAUSE 500
HIGH 9
PAUSE 88
LOW 9
DEBUG "Object Found"
END
BUT THE MOTOR DOES NOT ACTIVATE. I hear a little sound, real weak sometimes, but not all the time,it basically does nothing! But, the samesubroutine works great in Stamp 2 Bd of Ed.
Can someone please tell me what I am doing wrong? And how can I get the 2pe to run my micromotor/buzzer? I know I don't need a relay, Stamp 2 runs itperfectly?
Maybe trash the pe2 (which otherwise works perfect, and othersocket A pins work perfect because I use Pin 8 for moments in the initial part ofthe program to detect a button pushed, and it works) so sholud I buy another Stemp2 and trash the 2pe?
PLEASE HELP????
Thank you.
I have two Basic stamps that I am using in my project. Fist a Board of Education USB Kit with BasicStamp 2 ("Bd of Ed"). Secondis the 2pe Motherboard ("2pe"). I am using both microcontrollers to do different tings, but the 2pe justdoes not do what the Bd of Ed does, so I need some help, I cant believe the moreexpensive 2pe is less useful the Stamp 2 in Bd of Ed.
Here is what I am doing: I have a sensor and when it is tripped, I want a little buzzer micromotor to spin a few hundredths of a second. For example, when an object is detected at more than 12 inches, the stampis to activate the micro motor. I use Stamp2 in Bd of Ed, and this works perfectly!! No relay needed, when the sensor detects and object, a GOTO in my softwaresend it to a subroutine:
PAUSE 5
LOW 9 (these two lines are at the top of the program, beforeusing the sensor. I want to make sure themotor does not buzz when the program boots, before the sensor detects the object.)
.
' Subroutine for after object detected
' I use Pin 9and Vss on Stamp 2 Bd of Ed
HIGH 9
PAUSE 88
LOW 9
PAUSE 500
HIGH 9
PAUSE 88
LOW 9
DEBUG "Object Found"
END
' the above makes the micro low voltage low amp buzzer motorspin for 88/1000 of a second, pause and the respect the buzz.
The above subroutine WORKS GREAT! No problem in Bd of Ed!!!
BUT HERE IS THE PROBLEM:
Using another sensor and 2pe Motherboard, I have the sensor attachedto Socket B
When the sensor is tripped, I want the buzzer/motor to runjust like it does with Stamp 2 above.
So I use Pin 9 and Gnd on Socket B (there is no Vss listed, instead on 2pe Pin 2 is called Gnd, and then below it are Pin 3, and then Pin 9.)
So I use this subroutine, the same as I used in Stamp 2 above (both units are operating independently, independent ally powered, etc.) I use Gnd and Pin 9
' Subroutine for after object detected
' I use Pin 9and Gnd on 2pe Mothorboard
HIGH 9
PAUSE 88
LOW 9
PAUSE 500
HIGH 9
PAUSE 88
LOW 9
DEBUG "Object Found"
END
BUT THE MOTOR DOES NOT ACTIVATE. I hear a little sound, real weak sometimes, but not all the time,it basically does nothing! But, the samesubroutine works great in Stamp 2 Bd of Ed.
Can someone please tell me what I am doing wrong? And how can I get the 2pe to run my micromotor/buzzer? I know I don't need a relay, Stamp 2 runs itperfectly?
Maybe trash the pe2 (which otherwise works perfect, and othersocket A pins work perfect because I use Pin 8 for moments in the initial part ofthe program to detect a button pushed, and it works) so sholud I buy another Stemp2 and trash the 2pe?
PLEASE HELP????
Thank you.
Comments
Whether you're using the BS2 or BS2pe, you should not drive a motor directly from a Stamp pin anyway, at the risk of damaging the Stamp. Use a transistor driver and a protection diode across the motor leads, and you'll be good to go.
-Phil
-Phil
-Phil
My 2pe was not malfunctioning, the pins on it are protected. Thank you again!
A NEW QUESTION PLEASE : Can I send a signal via Gnd and Pin9 on my 2pe to the Pin 10 on my Basic Stamp 2 Bd of Ed, and the Stamp 2 would knowif it got a signal from the 2pe? Anyidea of how I would code that, if such was possible?
-Phil