Wiring many ir phototransistors to arduino

Hi,

I’m attempting to learn basic electronics and I have project that I want to do, but am not sure how to approach it.

The idea is to wire approximately 50 phototransistors to the arduino. I have read various tutorials on wiring in a series and parallel, but I think the common issue when searching this topic is insufficient power; so it is not as simple as wiring them sharing the same power rail.

Are there any particular guides or posts people recommend that explain some of the concepts needed to achieve such a project?

Thanks

adamatronix:
so it is not as simple as wiring them sharing the same power rail.

Yes it is.

Sorry let me rephrase, using the usb 5v.

Assuming you are using standard IR phototransistors for object detection/communication, etc and not trying to drive a load directly, you’ll be fine. Each one can be biased to take less than a milliamp each from the supply. i.e., put a 10k ohm resistor between the collector and +5V.

First, is the problem supplying power to 50 IR LEDs emiting IR light, or 50 infrared receiving phototransistors?

Once that is answered and you mean photo transistors receiving light:

How do you intend to monitor those 50 different output signals to a device that (in the case of the largest: an Arduino Mega) barely has enough pins to monitor them individually. What sort of signals are you expecting to receive from the phototransistors? Digital on/off? PWM? Analog? Describe the sensing part of your project a bit more in detail.

They will be receiving light. I want to detect whether the transistor is being touched. so on or off. Could this be problematic if encased in something, making ambient light already extremely dark?

I did intend on using a mega, to avoid multiplexing, but maybe this is the way to go. I am not sure how to implement that.

They will be receiving light. I want to detect whether the transistor is being touched. so on or off. Could this be problematic if encased in something, making ambient light already extremely dark?

The exact design of the sensor will depend very strongly on the details of the environment, especially the ambient lighting, how the transistor is mounted, how well the finger “covers” the phototransistor, which will in turn lead to design decisions regarding the best choice of collector load resistor, program constants, etc.

Did you know that fingers are semitransparent to IR light?

So, get your project working as well as possible with 1 phototransistor before considering adding 49 more. If you run into trouble, post your circuit and code, along with the details.

https://image.ibb.co/djFThc/qrd1114_test_bb.jpg

This is what I have so far. I know it may be messy, but is it technically correct?

Who can tell from a “Fritzing for complete idiots” diagram? Please post an image of a hand drawn schematic.

What is the part number for the “phototransistor”? From the diagram, it looks like you have a photointerruptor (phototransistor and LED in one package). If that’s the case, it looks like you have the resistors swapped.

/mike

Well, if it is indeed a QRD1114 then Sparkfun has a Hookup-guide for it:

https://learn.sparkfun.com/tutorials/qr … okup-guide

(and it turns out to be both a led and a phototransistor!)

The question now is how in that fritzing diagram are the 4 pins aranged. In order of 1,2,3,4, or swaped in a irregular order.

Better yet, if you want to detect touch, use a [touch sensor!](Arduino Playground - HomePage)

yea the sparkfun fritzing diagram’s qrd1114 has the pins in a different position, so I was thrown off.

Ok, now we know what IR photoreflector sensor you are talking about, how do they need to be activated? Powering, or rather pulling up, 50 phototransistors is not a very high power drain. Making each of those leds emit is however. If each is required to be fed with 20 mA then you’ll need to supply them with 1 A total worst case. Must they all be operating simultaneously? In groups? Individually one at a time? Or individually randomly?

Pulsing instead of continously lighting them up is better to filter out ambient light levels. This can help reduce the instantaneous current draw. But could also introduce noise on the powersupply which might disturb other parts of your project.

correction: “instantaneous” must be “average”.

I wont be needing the leds to emit light. I just want to use the phototransistors to detect a tap or touch using an object. A mechanical arm will come down to tap the transistor or ‘cover’ it.

Been busy. Will try to wire a single phototransistor this weekend to test. Will let you guys know if I have any questions.

Then why bother with these? Surely there are also true (IR) phototransistors without the led element.

Sure, any recommendations? I think I just searched sparkfun not knowing exactly what I needed. This particular model comes up.

Well, not any in particular. I don’t have a partnumber-fetish. Search google for a local electronics shop. Or search other webshops for IR-phototransistor. There are some that look like regular leds with clear white plastic shell. Some have a rectangular body with a focusing lens on the side. Others have a pinkish color. Since you intend to rely on ambient IR brightness levels I have no idea what wavelength or sensitivity parameters you need to search for. But if infrared isn’t a hard requirement then a simple (visible) light sensitive resistor (LDR) might also work for you purpose:

something like

https://www.sparkfun.com/products/9088