Quote:
Originally Posted by New User Matt
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
|
You could do it with a pair of relays.
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.