Shop OBEX P1 Docs P2 Docs Learn Events
Some prop. questions — Parallax Forums

Some prop. questions

A.C. fishingA.C. fishing Posts: 262
edited 2008-01-23 03:55 in Propeller 1
Howdy!
Its been a loooooooooong time since I've done any work here on the forums, or, with my prop./BS2, but now I've found some time to work on a project. jumpin.gif

I just have some quick prop. questions, excuse my rusty brain...

Is it possible to run the propellor off of a few 9 Volt batteries? I would just need portable power for a short period of time.

How can I control a Parallax con. servo with the propellor? Anyone got some example code?

How can I control a cheap DC motor with the propellor?

thanks,
A. C. fishing.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Somebody said...
-Never Underestimate the power of human stupidity.
·

Comments

  • Spork FrogSpork Frog Posts: 212
    edited 2008-01-23 02:26
    9v batteries do seem to work fine for a short time in conjunction with the proper voltage regulators (as like the ones on the Parallax boards.)

    I believe servo objects are available in the Prop Object Excange.

    You could run a motor with any one of Parallax's motor controllers, or probably just a simple transistor setup of some kind. I've never done it, so I wouldn't know.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-23 02:29
    1) You need a voltage regulator. If you're just running the Propeller and an LED or two and some switches, you could run it off a 9V battery for a couple of hours. 9Vs are terrible sources of power because of their low capacity. You'd be better off with a 4 x AA cell battery holder, but a 9V would work.

    2) There are several servo drivers downloadable from the Propeller Object Exchange. See the link from Parallax's main Propeller webpage.

    3) If you just want to turn the motor on and off, a transistor switch would work fine. The examples in the StampWorks manual would work. You could use an IRL510 FET and a 1N4001 diode (make sure it's an IRL510, not an IRF510) or any switching transistor with a high enough current rating (and the diode). The base series resistor with the switching transistor would have to be chosen to give a base current of 10-20ma with the lower output voltage of the Propeller (3.3V vs 5V for the Stamp). A 270 ohm resistor would give a roughly 10ma base current. With a transistor gain of 50, that would let you switch 1/2 A.
  • rjo_rjo_ Posts: 1,825
    edited 2008-01-23 03:55
    for your servo, use an external power supply[noparse]:)[/noparse] and put something between your servo and your prop on the signal line... the other problem with using batteries is that a little motion can cause enough of a spike to burn up your prop... unless you think about it ahead of time... which I didn't[noparse]:)[/noparse] I hacked my own continuous rotation servo... so I can't really comment for sure, but if the Parallax unit operates pretty much the same as the web hack that I used, then you can control direction and velocity with the same PWM that you use for the standard servo... but I don't know how to compute the values.

    I had some problems, which I never did figure out with the posted servo objects but the code is so simple that you can roll your own very easily. The source documentation about servos is great... but you can also google the subject and get the same info.

    For the dc motor control, I absolutely love the HB-25. The documentation and sample code are crystal clear and it works beautifully... and you can control anything up to 14 volts... its a little pricey, but a real joy to work with.
Sign In or Register to comment.