Hi
I want to convert the LDR value to voltage with an input of 5V.
Can anyone let me know the formula to go from LDR value to Voltage?
Hi
I want to convert the LDR value to voltage with an input of 5V.
Can anyone let me know the formula to go from LDR value to Voltage?
For the, we at least need to know how everything is wired...
And do you want to let the Arduino output a variable voltage? If so, you will need an Arduino capable of that (one that has a DAC). The standard Arduino's can not. They can however output a PWM signal which is fine (even better) to proportional control something like a LED or motor.
Hi
So what i'm trying to do is:
I have an LDR, if its at a certain value (for example: 2V) i want to turn on a 5V DC motor at pin 11 (PWM)
Also before the motor turns on there is a indicator light that turns on for 5 seconds.
I know how to do it with a potentiometer, but not with a LDR.
Still forgot the most important part.
But really, don't try to go to voltage for that. Voltage with a LDR is a meanings value anyway. And with the standard LDR-resistor voltage divider it's not even linear. Just pick a threshold value straight with the ADC value
Ok thanks!
I suspect OP is looking for a simple voltage divider between 5V and 0V, then use an analog input to read the value and then make decision for the motor on pin 11
Remember, at the very least you’ll need a transistor and diode to drive that ‘motor’
Then you need to be sure that your power supply is able to hold all this up.