|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Need help with circuits and photocell
For that application, you don't really need to turn the motor a definite number of rotations. You can either choose a motor that can withstand being stalled for a few seconds and drive it for a long enough time that your mechanism will reach a hard limit, or you can use a sensor that detects when the mechanism is fully retracted or fully extended to let the motor run only as long as it needs to.
There are also a couple of nifty mechanical tricks you can use to let the motor keep driving for a while without stalling, like using a lead screw with unthreaded ends and a spring-loaded stage that will be certain to reacquire the threads when the screw turns the other direction. |
|
#2
|
|||
|
|||
|
Re: Need help with circuits and photocell
Hello,
First post here. I wonder what happened with the OP? I want to do something similar. Could you use dpdt relay (or an H bridge) for this? Using a dpdt relay wired so that it is NC for one direction and the motor would move a screw and then stop when it hits a limit switch - at night time. Then using a photo resistor and a transistor to get the motor to move in opposite direction when the photo resistor has low resistance during the day and then stop when it hits a limit switch. I think that would work, but (and what I don't understand) after the motor moves during the day and stops would it stay there during the day because the coil would stay energized because of the photo resistor until night when the relay goes back to the NC position? I don't think it would be good if the coils stayed energized during the day and constantly draw current especially if using batteries? Or would it automatically move back into the night position because the relay is wired NC, and then this would keep repeating back and forth constantly during the daytime? Of course the objective would be to move one direction at night and stop at a limit switch then move a different direction during the day and stop at a limit switch and then repeat daily. I can't quite figure this out and if it would be the best way to proceed for something like this? Any help you could give me would be Greatly Appreciated...I'm stumped! Thanks, Matt |
|
#3
|
||||
|
||||
|
Re: Need help with circuits and photocell
Quote:
Motor leads go to the common terminal, the NC terminal goes to ground and the NO terminal goes to B+. You would put the limit switches in the circuit powering the coil using the Common and NC terminals. If power is applied to the forward relay's coil then that coil will supply power until the limit switch opens the coil circuit. That coil will be de-energized and that motor lead will return to ground ready for the motor to be reversed. Then when power is applied to the reverse relay's coil that motor lead will get connected to B+ until the limit switch opens the coil circuit. That lead will return to ground and the system will be reset to go in the forward direction. You will probably need a pair of transistors to supply adequate current and voltage to power the relay's coils. How you would do that is pushing the limits of my electronics knowledge. Hopefully someone else can chime in with the appropriate transistors, photo cell and photo resistor to make that work. You could use a Arduino or Raspberry PI to use a single photo resistor or photo cell to control the relays and then you could also wire the limit switches to it. |
|
#4
|
|||
|
|||
|
Re: Need help with circuits and photocell
Thanks Mr. V for your post.
Is there a reason to use two relays instead of just one dpdt relay? I think the part I'm struggling with is how to keep the motor still during the day after stopping at a limit switch. I don't want the motor to reverse until night time. Somehow using the low resistance of the photocell during the day to keep this from happening? |
|
#5
|
||||
|
||||
|
Re: Need help with circuits and photocell
A DPDT relay would allow you to reverse the motor but it wouldn't allow you to shut if off without including more components to control that.
By using two separate relays you can use limit switches to shut off the motor when the end of travel is reached and simultaneously reset it so it is ready to be turned on in the other direction. Using a pair of relays with the common terminal connected to the motor leads, the NC terminal connected to ground and the NO terminal connected to B+ is the way that a number of automobile manufactures wire their door lock motors. Unfortunately that would also mean that you would need two photo resistors, one to activate the "forward" or "up" relay and one to activate the "reverse" or "down" relay. Here is a little information on how to use a photo resistor in a voltage divider circuit to cause the output voltage to either increase as the light increases or increase as the light decreases. http://www.acroname.com/howto/photor...oresistor.html You would need to select the proper resistors to create a "dead band" to prevent the system from trying to activate the "forward" and "reverse" relays at the same time or to fluctuate between the two states. Page 3 of this document shows a circuit using a photo resistor in a voltage divider circuit to drive a transistor which switches a LED on and off based on the amount of light. http://www.engr.sjsu.edu/bjfurman/co...stor-atmel.pdf Replace the LED with the relay coil and the resistor with the limit switch wired to the NC and common terminals and you have the circuit that would activate the motor in a desired direction when the light is bright enough and then shut off the motor when the limit switch is activated. By swapping the position of the photoresistor and standard resistor in the voltage divider circuit it would activate the relay when the light dims enough. You need to select a transistor that can handle the current and voltage needed to activate the coil of the chosen relay. Last edited by Mr V : 13-11-2013 at 04:20. |
|
#6
|
|||
|
|||
|
Re: Need help with circuits and photocell
Thanks Mr. V
I had thought about the 2 photocells but was trying to stay away from going that route. And thanks for the links they were helpful. I'll try to wire something up and post what happens. |
|
#7
|
||||
|
||||
|
Re: Need help with circuits and photocell
Glad to be of help. Considering how cheap photocells are (5 pack for $3.99 at Radio Shack) it won't add that much to the cost of the project, relatively speaking.
Please do share what you come up with. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|