Controlling DC motor directing using LDR.

Thread Starter

BjorkElec

Joined Nov 28, 2024
37
Hello! I’m using two photoresistors to control a motor's direction based on which one receives more light. With two motors, I have it set up so the right motor spins when the right LDR gets more light, and the left motor spins when the left LDR gets more light.

I've made that using two 2N2222 NPN transistors and 2 LDRs.

Now, I’m trying to control one motor instead, where the motor spins right if the right LDR gets more light, and left if the left LDR gets more light. I know an H-Bridge or microcontroller could work, but that's not very challenging.

All my attempts have failed so far.. any suggestions?

Thanks!
 

WBahn

Joined Mar 31, 2012
32,702
So... you know that something as simple as an H-bridge could work, but you don't want to use it because it's not very challenging. Instead, you want someone to suggest a challenging way to do something simple? Just how Rube Goldberg do you need to get for it to be acceptably challenging?
 

panic mode

Joined Oct 10, 2011
4,864
judging by the 2N2222, this is all very low power. instead of using H-bridge, perhaps some jelly beans from the spare parts drawer could do.... like 555... lookup PWM schematics for 555 and place your LDRs in place of potentiometer. then use split power supply (or batteries) or use a pair of transistors or an amp to create virtual ground.
 

Thread Starter

BjorkElec

Joined Nov 28, 2024
37
or something like this (assuming amp is able to drive your motor).
View attachment 336890
or boost it with some transistors
View attachment 336891
Thanks so much for your comment. You are really helpful!
I'm currently trying to implement your 555 timers suggestion.
And changing the potentiometers changes the direction correctly.
1732825567031.png
However, I'm trying to use LDRs, but it doesn't work.
Would you please tell me where to place the LDRs exactly?
Sorry if it's a noob question, i'm really really new to circuits.
Thanks again :)
 

panic mode

Joined Oct 10, 2011
4,864
when 555 is used for PWM, potentiometer is connected to pair of diodes.
replacing each half of the potentiometer by an LDR should create the same effect1732828677781.png
 
Last edited:

panic mode

Joined Oct 10, 2011
4,864
that would stay as is... only trigger circuit is modified.
1732829955342.png

what you are after is basically a solar tracker. there is tons of circuits for it so you don't have to develop...
 
Last edited:

Thread Starter

BjorkElec

Joined Nov 28, 2024
37
that would stay as is... only trigger circuit is modified.

what you are after is basically a solar tracker. there is tons of circuits for it so you don't have to develop...
Lol you're right. Searched "Solar Tracker Circuit" and the first result was the solution for my issue.
I really appreciate your help, kind person :) <3
 
Top