1 Attachment(s)
Newbie with photoresistor problem
The following is a very simple circuit that uses a photoresistor as a switch to run a motor using a battery pack. But for some reason no matter how much light i expose the photoresistor to it does no conduct. The general resistance without any light is 200, 000 ohm. and using a torch it is 440 ohm. HELP.
LDR is a SENSOR - not a controller
The Light Dependent Resistor is a sensor. Its resistance is way too high to drive any conventional low cost motor. In darkness the LDR will be several megohms. In bright light it will be under 1000 ohms, depending on make and model.
You need to measure the LDR with either the POT command or an ADC and then convert that to a PWM signal to drive the motor.
HTH
BrianT
Perhaps add more check to the sensor
Look at the circuit I posted here
http://www.picbasic.co.uk/forum/show...4777#post84777
You can actually add this functionality to to a PIC timer (one that acts as a timer using timer0 and/or timer1) and does not use an RTC , your choice though).
By adding the timer to it you could do something like :
Code:
IF daylight AND time is daytime THEN motor_pin OFF
You could also go on to add things like a temperature controller and humidity sensor.
All of these combined could determine whether it is dark outside because of rain or a storm or a passing aeroplane or bird or insect on the sendor :-)
So our light sensor becomes quite a smart device.
Anyways , just a thought :-)
Kind regards
Dennis
Re: Seems to work in reverse
How much voltage do I apply for running that motor?