Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: airman00 on December 09, 2007, 09:06:37 AM

Title: Sharing resistors
Post by: airman00 on December 09, 2007, 09:06:37 AM
Two quick questions:

If I have 5 LEDs, can I put one resistor for all of them or does each LED need its own separate resistor???
( one resistor from power to all the LEDs positive terminal )

also
for a qrb1134 IR reflective sensor it needs a pull up resistor on one of the pins. Right now I'm giving each sensor's pin its own pull up resistor. Can I just put one pull up resistor for all the sensors???

Thanks
Title: Re: Sharing resistors
Post by: paulstreats on December 09, 2007, 09:34:10 AM
it depends on how you want them to connect, if all of the led's are connected in series so they all light up together, then you probably wont need a resistor at all (depending what your power source is.).

For the sensors, you can use just one pull up resistor if you like, but if you have each sensor connected to a different pin on the mcu, then seperate ones are probably better.
Title: Re: Sharing resistors
Post by: airman00 on December 09, 2007, 11:08:49 AM
I have 5 LEDs in parallel, can i have one resistor provide the 5V for the LEDs . ( well not really provide ,but resist the 5V for all the LEDs)

So for the pull up resistors , can I have only one for 5 sensors, or does each individual need its own. 

@ paulstreats
How would it be better if each got their own, or if they all shared one?
Title: Re: Sharing resistors
Post by: paulstreats on December 09, 2007, 12:31:06 PM
you can use just 1 resistor for the led's in paralel.

The sensor setup depends on wether you will be monitoring each sensor individually, or if you are using them all connected to 1 input pin.

If they are all connected to just 1 common input pin, then you can use 1 pull up resistor. But if you are monitoring them all individually on seperate pins on the mcu, using 1 pull up resistor will join all of sensors together so if 1 pulls low, they all appear to pull low