# Reading photodiodes

**URL:** <https://forum.arduino.cc/t/reading-photodiodes/499699>\
**Category:** Sensors\
**Created:** [January 1, 2018, 8:46pm UTC](https://forum.arduino.cc/t/reading-photodiodes/499699 "2018-01-01T20:46:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harm89](https://avatars.discourse-cdn.com/v4/letter/h/f19dbf/32.png) [@Harm89](https://forum.arduino.cc/u/Harm89)\
**Post date:** [January 1, 2018, 8:46pm UTC](https://forum.arduino.cc/t/reading-photodiodes/499699/1 "2018-01-01T20:46:28Z")

</div>

Hi all,

Background: I'm building a laser-projector using the arms of a hard disk. Because there is no encoder in these arms, I want to measure orientation of the arm using a LED and a photodiode (the arm will have a mirror for the laser, which I can then also use for the angular measurement). I got some photodiodes which a colleague gave me but I didn't know their type and had trouble connecting them, so I bought some BPW34s, but I'm having the same issues.

I connect the photodiode as in [this](https://diy-engineer.com/wp-content/uploads/2018/01/photodiode_arduino-1-251x300.png) scheme using a 0.5 MOhm resistor and connect the ADC-wire to the analog in A0 of the Arduino. When I read the pin (in my room, medium light), I get values around 910-940 (4.38 V when measured with my multimeter). When I cover the sensor the values increase to around 1000 (4.66 V with multimeter).

Can anyone tell me what I'm doing wrong? Can it be related to the fact that I'm using a too low-valued resistor? Thanks!

Harm

---

<div class="post-metadata">

**Author:** ![MasterT](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@MasterT](https://forum.arduino.cc/u/MasterT)\
**Post date:** [January 1, 2018, 9:10pm UTC](https://forum.arduino.cc/t/reading-photodiodes/499699/2 "2018-01-01T21:10:41Z")

</div>

Increase R1.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [January 1, 2018, 9:19pm UTC](https://forum.arduino.cc/t/reading-photodiodes/499699/3 "2018-01-01T21:19:54Z")

</div>

Agreed, increase R1. But you can do better. See this overview on the topic: [http://edge.rit.edu/edge/P09051/public/photodiodeamplifers.pdf](http://edge.rit.edu/edge/P09051/public/photodiodeamplifers.pdf)

---

<div class="post-metadata">

**Author:** ![MarkT](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MarkT](https://forum.arduino.cc/u/MarkT)\
**Post date:** [January 1, 2018, 10:31pm UTC](https://forum.arduino.cc/t/reading-photodiodes/499699/4 "2018-01-01T22:31:49Z")

</div>

Firstly test it with the correct illumination in order to determine the resistor.

If the illumination is poor the photo current will be small and the sensor will be somewhat slow to respond  
due to the high impedances involved, but I've no idea how fast you want it to respond.

---

<div class="post-metadata">

**Author:** ![Harm89](https://avatars.discourse-cdn.com/v4/letter/h/f19dbf/32.png) [@Harm89](https://forum.arduino.cc/u/Harm89)\
**Post date:** [January 3, 2018, 7:20pm UTC](https://forum.arduino.cc/t/reading-photodiodes/499699/5 "2018-01-03T19:20:10Z")

</div>

Hi,

Thank you for the replies! What I didn't get, was that the voltage decreased with more light. But I now understand that the photovoltaic current flows in opposite direction (c to a) of the conventional current (a to c). That explains why the voltage drops. Using a larger resistor, the drop can be increased.

Do I understand this correctly?

Regards,  
Harm

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [January 3, 2018, 8:36pm UTC](https://forum.arduino.cc/t/reading-photodiodes/499699/6 "2018-01-03T20:36:21Z")

</div>

Correct.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 10:19am UTC](https://forum.arduino.cc/t/reading-photodiodes/499699/7 "2021-05-06T10:19:56Z")

</div>

Closed on May 6, 2021, 10:19am UTC


