Pages: [1]   Go Down
Author Topic: powering multiple phototransistors  (Read 640 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Bristol, UK
Offline Offline
Edison Member
*
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Good point!  I always forget that!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink I got that specifically so I could just use a bunch of sensors directly off the board.
Logged

Pages: [1]   Go Up
Jump to: