Go Down

Topic: powering multiple phototransistors (Read 870 times) previous topic - next topic

kevind2010

Hello again, Arduino forums. I've been working with phototransistors in the past few weeks and I just had a quick question about using many of them at once. I've been using a setup with a 22Kohm resistor that looks like this:

PWR------22K resistor----Analog in ----- phototransistor ---- GND

Is it possible to power a bunch of phototransistors simultaneously from the 5V pin on the Arduino? Like, oh, sixteen of them? Or do they each have to be hooked up to their own specific pins that provide power for each phototransistor? My wiring will be greatly simplified if it's possible to run just one pin with a resistor in front of it for power, though my gut tells me that this probably won't work.

Thanks,

Kevin

dc42

Yes you can power many phototransistors from the +5v pin as KE7GKP says. But if you want to read 16 of them independently, you will need an external multiplexer, since the Arduino has only 6 analog inputs.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Anachrocomputer


My wiring will be greatly simplified if it's possible to run just one pin with a resistor in front of it for power, though my gut tells me that this probably won't work.


It won't work if you have only one resistor, but it will work with one 5V power supply (from the 5V power pin, not an Arduino output pin) and 16 separate resistors. If you think about it, with a single resistor, all the analog inputs will be connected together (draw out a circuit with, say, three phototransistors). As others have mentioned, you'll need an analog multiplexer to get 16 analog inputs into an Arduino.

retrolefty

Quote
As others have mentioned, you'll need an analog multiplexer to get 16 analog inputs into an Arduino.


Unless it's a Arduino Mega board which does have 16 analog inputs.

Lefty


Anachrocomputer


Unless it's a Arduino Mega board which does have 16 analog inputs.


Good point!  I always forget that!

kevind2010

Thanks for the help everybody! I've been wiring some other parts of the system today and I'll be working with wiring in the phototransistors later in the day.

... and yes, it is a Mega ;) I got that specifically so I could just use a bunch of sensors directly off the board.

Go Up