Servos and Pir''s
Archiver
Posts: 46,084
> > I have just found a schematic that showed that when a servo is connected to
> > the basic stamp2 I/O it should go through a 10K resistor, and also diodes
> > should also be put between the v+ and data, and Gnd and data. However, the
> > BasicStamp book shows a direct connection without any diodes or resistor. I
> > presently am using it without any and it seems to work fine !!
If it's an R/C servo, you do not need any external components to drive it.
A BASIC STAMP can directly drive the servo satisfactory.
>
> I am also looking to use a Pir (from an alarm system) to detect movement in a
> area.
> I intend to connect the common connection on the PIR switch to +5V and the NO
> side to one of the input pins and use the Input comand to determine if the
> signal is present. Is this correct ??? Do I need a resistor to keep the pin
to
> Gnd, if so what size
You need a pull-up or a pull-down resistor (depending on your configuration)
to make the Stamp sense its input status reliably.
> I also am going to drive two pins high to control two relays, using the high
> command. I realize that I need to go through another device to allow for the
> high current draw, but still have not decited what to do.
Use a transistor to drive the relay and don't forget to put a diode across
the coil of the relay (cathode connected to the positive supply and anode
to the collector) if you do not want to fry the transistor.
Regards
Gary
DIY Electronics
Website : http://www.diyelectronics.com
Email : Gary.Chung@d...
> > the basic stamp2 I/O it should go through a 10K resistor, and also diodes
> > should also be put between the v+ and data, and Gnd and data. However, the
> > BasicStamp book shows a direct connection without any diodes or resistor. I
> > presently am using it without any and it seems to work fine !!
If it's an R/C servo, you do not need any external components to drive it.
A BASIC STAMP can directly drive the servo satisfactory.
>
> I am also looking to use a Pir (from an alarm system) to detect movement in a
> area.
> I intend to connect the common connection on the PIR switch to +5V and the NO
> side to one of the input pins and use the Input comand to determine if the
> signal is present. Is this correct ??? Do I need a resistor to keep the pin
to
> Gnd, if so what size
You need a pull-up or a pull-down resistor (depending on your configuration)
to make the Stamp sense its input status reliably.
> I also am going to drive two pins high to control two relays, using the high
> command. I realize that I need to go through another device to allow for the
> high current draw, but still have not decited what to do.
Use a transistor to drive the relay and don't forget to put a diode across
the coil of the relay (cathode connected to the positive supply and anode
to the collector) if you do not want to fry the transistor.
Regards
Gary
DIY Electronics
Website : http://www.diyelectronics.com
Email : Gary.Chung@d...