I was fiddling around with an LDR this weekend, trying to cobble together a sensor to count revolutions (relatively slow ones -1-70 RPM, but perhaps measuring in as small as quarter rev, so up to 280 300 pulses per minute). I had left my sensors designed to do this at home, but had some LDRs, so....
Anyway, plugged it together as mentioned in the manual with a 100K resistor, but the voltage ranges were not in the range to trigger a count (always on). So I took a pot, and hooked it up as a variable resistor until I got the ratio where it looked right. Got counts - Hooray! Oops, got sometimes 8 or even 30 counts per occlusion (looked kind of like switch bounce or something).
Hookup -
v+__LDR___PIN____VR___v0
Back home now, and have the optical sensors handy (and plan to work out how to hook them up later, as they will probably work easier mechanically as well), but any thoughts on what was going on with the LDR and who to resolve it? For instance swap the position of the LDR and the VR? Add a cap in there? Get a phototransistor out of the box (not sure I had one handy, but didn't look thoroughly after I spotted the LDRs)?
Cheers,
Wreno
Anyway, plugged it together as mentioned in the manual with a 100K resistor, but the voltage ranges were not in the range to trigger a count (always on). So I took a pot, and hooked it up as a variable resistor until I got the ratio where it looked right. Got counts - Hooray! Oops, got sometimes 8 or even 30 counts per occlusion (looked kind of like switch bounce or something).
Hookup -
v+__LDR___PIN____VR___v0
Back home now, and have the optical sensors handy (and plan to work out how to hook them up later, as they will probably work easier mechanically as well), but any thoughts on what was going on with the LDR and who to resolve it? For instance swap the position of the LDR and the VR? Add a cap in there? Get a phototransistor out of the box (not sure I had one handy, but didn't look thoroughly after I spotted the LDRs)?
Cheers,
Wreno