Problem with usings keyboard input and servos on BOE and PSC
abdulsiddiqui
Posts: 4
Hi All,
This is a school project to help make a Robot arm with the parts from my old BOE Bot and a new PSC board.
The laptop keyboard is used to control the servos that are connected to the BOE and the PSC.
I have attached the bs2 file for review. The problems starts when we attach the second or third servo to the PSC
All the servos of the PSC start acting up and dont stay still when left idle.
Please help
This is a school project to help make a Robot arm with the parts from my old BOE Bot and a new PSC board.
The laptop keyboard is used to control the servos that are connected to the BOE and the PSC.
I have attached the bs2 file for review. The problems starts when we attach the second or third servo to the PSC
All the servos of the PSC start acting up and dont stay still when left idle.
Please help
Comments
I would also recommend trying a simple test program that moves one servo from one position to another and back with a 1-2 second pause. If that works, try two servos, first one, then the other, just moving back and forth. If that works, try moving two servos at the same time. If that works, try 3 servos.
Please review the code to see if I need tofix the SIRIN command or add pauses or change the baud rates...
I uploaded a vid of what is happning. Please advise with any other recommendations
http://www.youtube.com/watch?v=nZvKt16XiKE
Consider what Mike said about all the serial communication in your application making delays between control pulses to servos connected to the BASIC Stamp. He said those delays are too long. Servos need control pulses repeated 50 times per second to keep them steady. What can you do about that? Probably the best approach would be to control all the servos with the PSC. That way, the PSC does its job (controlling servos), and the BASIC Stamp is free to check for incoming serial messages from the terminal and send serial control messages to the PSC.
Mike suggested that you try controlling one servo and make sure that works. Then, add a second one, and so on... That's definitely the right approach. Make sure to connect each servo to the PSC, not the BASIC Stamp. You might also want to use really simple code that's only for one servo to rule out program bugs too. Then, add a second servo to the PSC and expand your program for two servos. Keep going until you get them all running.
Andy