Shop OBEX P1 Docs P2 Docs Learn Events
Servo Problem, 'What's a Microcontroller? — Parallax Forums

Servo Problem, 'What's a Microcontroller?

mOses nOghbaudiemOses nOghbaudie Posts: 4
edited 2005-12-18 21:28 in Learn with BlocklyProp
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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-16 06:59
    How are you powering the unit?· It's possible that if you're using a battery, it's browing out from the current draw from the servo.· Please try a fresh battery.· If this doesn't solve your problem, please let us know.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • mOses nOghbaudiemOses nOghbaudie Posts: 4
    edited 2005-12-16 15:10
    As far as i know, this is a new battery, although i will pickup another to confirm it.

    Would the servo move with the power switch in the third position if the battery was weak?
  • dandreaedandreae Posts: 1,375
    edited 2005-12-16 17:54
    It is possible for the servo to move with a weak battery.· However, you may not see the results that you are looking for.· It always a good idea to have multimeter handy so that you can verify your power supply/battery.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • mOses nOghbaudiemOses nOghbaudie Posts: 4
    edited 2005-12-16 22:27
    i got a multimeter and a new battery as well. The 'old' battery had about 7.5 volts, the new has 9.5 volts, and both give me the same results.

    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?
  • PARPAR Posts: 285
    edited 2005-12-18 08:04
    mOses n. stated: "After following the directions ("What's a Microcontroller?" chapter 4) to configure my Revision B BOE", and·in addition·"Other information: -Mac OS X (10.4) -USB BOE".

    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
  • mOses nOghbaudiemOses nOghbaudie Posts: 4
    edited 2005-12-18 16:57
    Well, that seems to be it, although my BOE clearly says 'Rev B', it's not.

    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
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2005-12-18 18:35
    Parallax will have to confirm this, but each version of the BOE ( serial & USB ) probably has its own revision history. So BOE Serial Rev. C and BOE USB Rev. B are likely similar in function, but different in the parts kit, so they have different revision letters and histories.

    As a product line expands, it's difficult to keep track of and document all of the differences, and sometimes things get overlooked.
  • PARPAR Posts: 285
    edited 2005-12-18 21:28
    mOses nOghbaudie said...
    ...cut,cut...
    i'm assuming this book was printed before the USB version and therefore does not account for this type of BOE?
    ...cut,cut...
    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.

    ...cut...
    In any case, the manual does not explicitly identify the BOE USB Rev B (current) board in the exercises. Generally, follow the instructions for Rev C (serial) board, remembering all the while that the USB Rev B board is indeed a USB --not a serial-- connection (for when that becomes relevant during a project).
    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
    ·
Sign In or Register to comment.