So i'm playing robotroom's PWM circuit and turned it into this:
using one half of the duty cycle on each motor by inverting the signal for the 2nd motor.
so far it works, but i am stuck on how to implement phototropy.
here i have placed LDR's parallel with each side of the potentiometer, but makes a very short range of detection.
basically it refuses to react in any way unless it gets at least 100 lumens or so, and then i seem to get maximum
effect on the motors. (the same effect as turning the pot fully to one side.)
the transistors are 2N3904
i tried it with PN2222 but that didn't work for some reason.
the LDR has a range of about 200 Ohm to 2M
so like, now what?
does anybody have a good link on manipulating the behavior of LDR's?
also, is that where the problem lies, or am i missing something else?
You may want to connect pin
You may want to connect pin 5 (input to 3rd inverter) to pin 4 (output of 2nd inverter), rather than where you have it. The first inverter helps clean up and buffer the signal.
Regarding the LDRs:
- Make sure they are spread as far apart as possible.
- You can shield each LDR with a piece of heat shrink tubing, so that it doesn’t get light except from where you want it to.
- You can eliminate the potentiometer, or keep it as a trim pot; be aware that minimum resistance with the pot set mid-way is about 5.2k (5k for the pot and about 200 for the LDR). So you never get to the point where one side of the voltage divider is nearly zero. Using a smaller value pot should allow for fine tuning, but I’d suggest you try to elminate it entirely let the LDRs dictate the output. Think of the two LDRs connected together as a potentiometer. The connection point between them is like the variable arm of the pot.