Shop OBEX P1 Docs P2 Docs Learn Events
[[basicstamps] Pulsout to light LEDs] — Parallax Forums

[[basicstamps] Pulsout to light LEDs]

ArchiverArchiver Posts: 46,084
edited 2003-03-12 19:55 in General Discussion
I would recommend using a buffer/driver so the servo power isn't reduced by a
simple resister/LED combo. But if it's just for prototyping, this may work
fine. I actually tend to use 1K resistors for current limiting with my LED
circuits with 5V. V=IR, 5=I*1000, I=5/1K=5ma.

Fun with ASCII art: anode ---|>|--- cathode

I/O pin -> 1000 ohm resistor -> anode of LED, cathode of LED -> gnd

Or:

I/O pin -> 1000 ohm resistor -> cathode of LED, anode of LED -> +5vdc.

(The resistor and LED can be wired in either order of course; I tend to
connect resistors to the power rails, but it's just a habit.)

The second arrangement results in an inverted output, but the I/O pin and
hence the Basic Stamp is supplying current from its power source in the first
arrangement. (On the Tab Robotics Sumo, for example, the regulated power to
the BS2 is very limited.) Sometimes it's better for the I/O pin to sink
current to ground. The second arrangement would also be convenient for an
inverting buffer of some kind (1/6 74xx04, or simple transistor circuit).

"kiltjim" <kiltjim@a...> wrote:
> Alright, I am pulsing servos with a BS2. With this in mind, I want
> to know which servos I am using a particular moment. So using a
> pulsout line that is also going to a servo...How can I light an LED
> with this same I/O pin?
>
> Thanks, Jim
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Sign In or Register to comment.