Servo Problem, 'What's a Microcontroller?
mOses nOghbaudie
Posts: 4
After following the directions ("What's a Microcontroller?" chapter 4) to configure my Revision B BOE, i hooked up my servo, resistor and LED as indicated, entered the code and uploaded it to my stamp.
The LED did indeed flicker in the manner intended, but the servo did nothing. Testing out a theory i switched the power switch to the third position, and the servo moved, although not in the manner intended. Also, with the switch in the third position the code in the debug window was running erratically.
My servo is a Parallax Standard Servo.
Any suggestions? All projects till this one have worked with no issues.
Other information:
-Mac OS X (10.4)
-USB BOE
Here's the code i'm using:
'{$STAMP BS2}
'{$PBASIC 2.5}
counter VAR WORD
DEBUG "Counterclockwise 10 o'clock",CR
FOR counter = 1 TO 150
PULSOUT 14, 1000
PAUSE 20
NEXT
DEBUG "Clockwise 2 o'clock",CR
FOR counter = 1 TO 150
PULSOUT 14, 500
PAUSE 20
NEXT
DEBUG "Center 12 o'clock",CR
FOR counter = 1 TO 150
PULSOUT 14, 750
PAUSE 20
NEXT
DEBUG "All done."
END
The LED did indeed flicker in the manner intended, but the servo did nothing. Testing out a theory i switched the power switch to the third position, and the servo moved, although not in the manner intended. Also, with the switch in the third position the code in the debug window was running erratically.
My servo is a Parallax Standard Servo.
Any suggestions? All projects till this one have worked with no issues.
Other information:
-Mac OS X (10.4)
-USB BOE
Here's the code i'm using:
'{$STAMP BS2}
'{$PBASIC 2.5}
counter VAR WORD
DEBUG "Counterclockwise 10 o'clock",CR
FOR counter = 1 TO 150
PULSOUT 14, 1000
PAUSE 20
NEXT
DEBUG "Clockwise 2 o'clock",CR
FOR counter = 1 TO 150
PULSOUT 14, 500
PAUSE 20
NEXT
DEBUG "Center 12 o'clock",CR
FOR counter = 1 TO 150
PULSOUT 14, 750
PAUSE 20
NEXT
DEBUG "All done."
END
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Would the servo move with the power switch in the third position if the battery was weak?
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
Http://www.parallax.com
·
The motor moves a little erratically in position 3, not at all in position 2. The LED works as intended, as does the Debug commands.
Bad servo?
You state that your BOE board is a "Board of Education",·"Rev B", "USB" version.
You should be following the instructions for "Rev C", which are the instructions for the (serial) version of the BOE that has a jumper to select the power source for the servos, and has the 3-position ON switch, and incidentally in your case has the USB connector. Your USB, Rev B·BOE has the jumper and 3-pos. switch, and that's why you need to follow the·manual instructions for "Rev C".·(In other words, the manual doesn't explicitly identify the BOE USB Rev B board.)
There is a ·jumper which is located between the two servo-connector banks, X4/X5; is it·positioned correctly for your ·power supply?
PAR
i'm assuming this book was printed before the USB version and therefore does not account for this type of BOE?
In either case it seems that by loading the code in position 2 caused weirdness in the execution when in position 3. By reloading the code in position 3 and running it worked fine, the servo moved, the lights blinked and the code executed normally.
So as i progress through the book i should keep in mind that this is actually a Rev C for all future projects? If so, this is something which should be corrected by Parallax as it would be easy from someone to fry their BOE/Stamp/servo by following faulty instructions and labels.
Thanks for the help!
mOses
As a product line expands, it's difficult to keep track of and document all of the differences, and sometimes things get overlooked.
You can do an "advanced search" of the Parallax Forums and·web site·for these terms: "boe usb serial rev", at http://search.parallax.com/
You'll find some of the 'hits' are related to this discussion (i.e., Parallax is aware of the discrepancy).
PAR
·