I am trying to make a musical instrument. I would like it if the instrument could play different notes depending on the light it gets. The problem is that I have one photoresistor that is not sensitive enough and one that is way too sensitive. I was wondering if there is a way to lower the sensitivity or increase the sensitivity of a photoresistor.
To be read by an Arduino the photoresistor must be part of a resistor voltage divider. Try different values of the second resistor and see if you can get the response that you want.
Adafruit has a tutorial here. Alas it's error 500-ing right now but perhaps back later?
Afaicr, you can play with the resistor you have in series with the cell as a voltage divider. Can't recall the details so here's hoping the site comes back. edit..... site seems to be ok now
(You do have your photocell in a voltage divider, yes?)
Great minds blah blah...
200742:
I was wondering if there is a way to lower the sensitivity or increase the sensitivity of a photoresistor.
The sensitivity varies greatly from model to model, and even within different examples of the same model. LDRs are often not linear with respect to illumination received, and may also respond better to specific light colours (check for a graph in the datasheet for your part to see how it reacts). The responsiveness of LDRs is also quite slow in comparison to other light sensors and may be asymetric, with different time to change from light-dark as to dark-light transitions. This has led to the Vactrol (wikipedia) which comprises a light source and LDR facing each other in a tube. That is often used in synthesisers and older sustain/compression guitar fx pedals.
I found one LDR I bought on eBay or somewhere takes almost a second to register a light-dark transition, which is fine for dimming a display at nightfall but probably a bit slow for what you're considering.
Since you're feeding this into a microcontroller you can also reduce the responsiveness in your code by smoothing (Arduino tutorial example) or simply by playing with the threshold you trigger your code change at.
Sounds like a fun project,
Geoff
Photo resistors are slow (some are 100's of milliseconds). Photodiodes may be needed.