Hello guys, I currently finding some auto switch that can automatically ON and OFF when the program tell it to. Is these type of switches exist? I want to use it in these condition, for eg: if now is 8pm, the switch will switch on to let the motor back to its own position till next day. Like this. Any recommendation?
Are you thinking about a relay?
@@ yes. Can relay do that? Actually I just wanted to simple switch ON and OFF.
You should give as much detail as you can about what it is you want to switch on and off.
A relay is an electrically controlled on/off switch.
...R
But then so is a transistor.
Robin2:
You should give as much detail as you can about what it is you want to switch on and off.A relay is an electrically controlled on/off switch.
...R
Actually I want to control the direction of stepper motor. Is like when there is no more sunlight, the switch will toggle ON and the stepper motor will go back to it own home position.
menloon:
Actually I want to control the direction of stepper motor. Is like when there is no more sunlight, the switch will toggle ON and the stepper motor will go back to it own home position.
Well now we know a whole lot more about what you really want to do. If you have even more information please share it, That way we can provide better advice.
Is the Arduino controlling the movement of the stepper motor? If so, what stepper motor driver are you using? Most stepper drivers have a Direction pin that the Arduino can set HIGH or LOW to control the direction.
...R
Robin2:
Well now we know a whole lot more about what you really want to do. If you have even more information please share it, That way we can provide better advice.Is the Arduino controlling the movement of the stepper motor? If so, what stepper motor driver are you using? Most stepper drivers have a Direction pin that the Arduino can set HIGH or LOW to control the direction.
...R
I'm using a low cost stepper motor 28byj-48 stepper motor to drive a solar panel, the panel is not a very big panel. I'm connecting my motor to ULN2003 and using arduino to control it. Well, I kinda wanted to use a relay to "tell" the motor when to go back to home position something like that. I'm sure it work or not and so I try to ask here. Thanks for helping me out. =)
A stepper motor doesn't have a natural "home" position.
What you can tell the stepper is things like "move 10 steps cw" or "move 30 steps ccw" in code and using proper stepper driver hardware. You will have to keep track of the motor's position in software.
Most stepper applications will have a "home" position which means a microswitch is pressed or a break beam sensor is triggered, something like that. This so upon startup you can move your stepper in a certain direction until the sensor detects the object. That you then call your home position, and count steps from there.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
What are you using to determine the direction of the panel?
What model Arduino are you using?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
You will not need a relay, you can code the return to the morning positon and have a limit switch at the start position.
Can you please tell us your electronics, programming, Arduino, hardware experience?
Thanks.. Tom..
TomGeorge:
Hi,
Welcome to the forum.Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.What are you using to determine the direction of the panel?
What model Arduino are you using?Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
You will not need a relay, you can code the return to the morning positon and have a limit switch at the start position.
Can you please tell us your electronics, programming, Arduino, hardware experience?
Thanks.. Tom..
Well, this is just my idea. I'm using arduino uno and I came here just asking if this is possible to achieve or there is another easy way to achieve this. I haven't code it yet. When I get the item, I will try to post it here.
menloon:
I'm using a low cost stepper motor 28byj-48 stepper motor to drive a solar panel, the panel is not a very big panel. I'm connecting my motor to ULN2003 and using arduino to control it. Well, I kinda wanted to use a relay to "tell" the motor when to go back to home position something like that. I'm sure it work or not and so I try to ask here. Thanks for helping me out. =)
I think you are confused about how to control a stepper motor.
There is no need for a relay or anything extra in addition to the ULN2003. Using the ULN2003 the Arduino can control the motor in either direction.
If you can't get your program to do what you want then please post the code that represents your best attempt and tell us exactly what it actually does and what you want it to do that is different.
...R
Another option for your application may be a servo, as those you can set to an absolute position. Servos typically can do no more than 180° of rotation, which for a solar panel may be enough. That way you can indeed tell your motor to go "home" (e.g. the 90° position), without knowing where you are.
Robin2:
I think you are confused about how to control a stepper motor.There is no need for a relay or anything extra in addition to the ULN2003. Using the ULN2003 the Arduino can control the motor in either direction.
If you can't get your program to do what you want then please post the code that represents your best attempt and tell us exactly what it actually does and what you want it to do that is different.
...R
Okay, guess I have to try it first.
wvmarle:
Another option for your application may be a servo, as those you can set to an absolute position. Servos typically can do no more than 180° of rotation, which for a solar panel may be enough. That way you can indeed tell your motor to go "home" (e.g. the 90° position), without knowing where you are.
I think of servo before but I wanted the motor to rotate more than 180 degree, so it won't help.