0
\$\begingroup\$

My phototransistor looks like the one here, wired like this:

Diodeenter image description here

I don't know the exact model or anything like that. It came in an Arduino kit and was labeled "flame sensor". I used an arduino to connect mine and Serial.print values from 0-1023. It was pretty much a fire detector. Why is a 10k resistor needed to connect to ground? I understand why it is needed when reading the state of push buttons. Why is it needed in this case? If I remove it, the ir phototransistor reads 1023.

\$\endgroup\$
  • \$\begingroup\$ Hard to say without a schematic, link to the phototransistor data sheet and a clearer explanation of what you're doing. \$\endgroup\$ – John D Mar 24 '16 at 16:13
  • \$\begingroup\$ I don't really have a data sheet or the exact model number. I put in a link to a photo of one that looks identical to mine. My project was basically detecting a fire and making a piezo buzz. It works fine, but I just want to know why it is wired with a 10k resistor. Wiring looks like this: tinyurl.com/jsfq9dv \$\endgroup\$ – shurup Mar 24 '16 at 16:30
  • 1
    \$\begingroup\$ A phototransistor gives out current based on the light. Now, you can do whatever you want with it. But to have meaningful measurements you will need data in the form of voltages to be read by an ADXC of a microcontroller. The current through the photo transistor is measured via or using the resistor drop. This is the pull down resistor. \$\endgroup\$ – Board-Man Mar 24 '16 at 16:31
4
\$\begingroup\$

The pull down to ground is used to create a voltage divider, with the top half being the relative resistance of the Photo transistor. Without the pull down, you only have a series resistor, which results in very little if any voltage drop across it in a low impedance input setup.

As a microcontroller ADC is a voltage sensing, not a current sensing device, you require a relative voltage to read, hence the voltage divider.

It also works exactly like a push button, in that the fixed resistor provides a default state instead of leaving the pin floating. In this case, the button isn't a short to VCC, but a variable resistance. It can close a little or a lot.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ I am a total beginner. Can someone please explain what he said, but in a much simpler language? I don't understand the voltage divider part, voltage drop, and relative voltage. I now understand that a resistor must be used, but still unsure the exact function of it. Thank you all so much \$\endgroup\$ – shurup Mar 24 '16 at 17:37
  • \$\begingroup\$ @nick Google arduino voltage divider tutorial \$\endgroup\$ – Passerby Mar 24 '16 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.