Conflict with GPS receiver and PSC?
skatj
Posts: 88
I'm working on a project that involves both the parallax servo controller and the parallax GPS receiver. I just finished drafting the code and have begun testing it, but I keep running into a problem.
It seems that whenever I have the GPS receiver and the servo controller plugged in at the same time, the servo controller does not work.
What's weird is that, like all my other problems, this began to happen all of a sudden for no apparent reason. I've used both of them at the same time many times before this.
When I have the servo controller and the GPS receiver plugged in, I can power up the stamp and the PSC will automatically center all servos but I can easily move them with my hand, and apparently it is not sending any signals since the green LED does not blink (The red LED is lit). I also am unable to download programs when this is happening, since the Basic Stamp Editor is unable to detect the Stamp (it works fine if the power switch is set to 1, i.e. no power to servos/gps, and when the GPS receiver is not plugged in).
When I have just the servo controller plugged in, everything works as normal.
I'm using two programs to try and debug this problem, the following code is what I use to run the servos, and I've attached the program I'm trying to get to work in the post. In both programs, the PSC behaves as described above.
Any ideas as to what's wrong?
It seems that whenever I have the GPS receiver and the servo controller plugged in at the same time, the servo controller does not work.
What's weird is that, like all my other problems, this began to happen all of a sudden for no apparent reason. I've used both of them at the same time many times before this.
When I have the servo controller and the GPS receiver plugged in, I can power up the stamp and the PSC will automatically center all servos but I can easily move them with my hand, and apparently it is not sending any signals since the green LED does not blink (The red LED is lit). I also am unable to download programs when this is happening, since the Basic Stamp Editor is unable to detect the Stamp (it works fine if the power switch is set to 1, i.e. no power to servos/gps, and when the GPS receiver is not plugged in).
When I have just the servo controller plugged in, everything works as normal.
I'm using two programs to try and debug this problem, the following code is what I use to run the servos, and I've attached the program I'm trying to get to work in the post. In both programs, the PSC behaves as described above.
' {$STAMP BS2} ' {$PBASIC 2.5} Sdat CON 12 baud CON 396 ServoPos1 VAR Word ServoPos2 VAR Word ServoPos3 VAR Word CameraPos VAR Word counter VAR Nib DO PAUSE 3000 ServoPos1 = 1250 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 5, 1, servoPos1.LOWBYTE, servoPos1.HIGHBYTE, CR] ServoPos2 = 500 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 13, 1, servoPos2.LOWBYTE, servoPos2.HIGHBYTE, CR] CameraPos = 300 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 12, 1, CameraPos.LOWBYTE, CameraPos.HIGHBYTE, CR] PAUSE 500 ServoPos3 = 350 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 2, 1, servoPos3.LOWBYTE, servoPos3.HIGHBYTE, CR] GOSUB Shutter_Button PAUSE 2500 ServoPos3 = 1050 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 2, 1, servoPos3.LOWBYTE, servoPos3.HIGHBYTE, CR] GOSUB Shutter_Button Shutter_Button: CameraPos = 1250 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 12, 1, CameraPos.LOWBYTE, CameraPos.HIGHBYTE, CR] PAUSE 1000 CameraPos = 300 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", 12, 1, CameraPos.LOWBYTE, CameraPos.HIGHBYTE, CR] RETURN LOOP END
Any ideas as to what's wrong?
Comments
Thanks Mike.
edit: btw, if this turns out to be the cause of the problem, do you still advise I run the same setup, as long as I change out batteries every so often, or is this harmful to the Stamp somehow?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
How can I wire a battery back to the Stamp's power terminals?
Would I solder something like this http://www.radioshack.com/product/index.jsp?productId=2062219&cp=2032058.2032230.2032264&parentPage=family to the battery back wires and snap it on the Stamp?
I also noticed some people who had a battery pack with a cable that plugged right into the Stamp, but I am not sure what they are called/where to get them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Mike Green is correct about the leads being reversed when the battery snap is taking the place of the battery.
If you wire it red to red and black to black, you will smoke the BOE.
Just a thought.
Regards,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!