Electronic – Designing a Light/Dark Sensor for motors, using Transistor and and LDR

ldrlight-sensortransistors

I am working on some project for which I need to turn off a motor whenever it's dark. I looked around and found some light/dark sensing circuits. However, most of these circuits use an LED that switches on whenever is light or dark, depending upon application. I was wondering if someone could help me to modify the circuit(resistor values) to replace the LED with a motor, as shown in the figure below.

Light/Dark Sensing Circuit with Motor

It would be helpful if you can show the respective calculations 🙂

Best Answer

I need to turn off a motor whenever it's dark

The problem with your circuit is that it doesn't switch on or off the motor as a certain level of darkness/light is reached. Instead it gradually slows down the motor as the light fades and the reverse as the light increases.

Ideally you should use a comparator to produce a digital on/off output when the LDR reaches a certain resistance. This can be made programmable by using a potentiometer that sets a threshold voltage for the comparator.

After the comparator you'll use something like an N channel MOSFET to activate the motor. Something like this: -

enter image description here

The above is designed to switch on and off a motor pump when certain water temperature is reached - see the sensor LM335 - this can be replaced (pot and all) with an LDR. You don't need both channels of sensing so I'd just get rid of one of them and leave the pot intact to set the threshold.

This is the link to the page where the circuit diagram lives.