I would like some help on wiring 4 limit switches 2 on each axis to the Arduino uno R3. I want to trip limit switch 2 at end of travel and return to limit switch 1 and home ready for next cycle. I am very new to this.
I have built a 3 axis wood carving cnc with 2 limit switches on each axis. The mach 4 cnc OS that i purchased was all ready set up to handle all of that. All i had to do was follow the diagrams and do what it told me to do with great success .
Arduino is new to me. my cnc is grbl.
Now i am into a solar panel build and need to know how to wire this limit switch situation.
What does the limit switches have to do with a solar panel ?
Solar panel is set up with a dual axis solar tracker . LImit switches prevent panel from traveling to far to prevent damage if the tracker were to get damaged.
There are 3 types of limit switches that are common.
The one on the left SPDT is most common.
What do you want the hardware to do with the signal coming from the limit switch ?
BTW
Suggest you have a fallback (crash) limit switch that operates in the event of switch failure on the penultimate switches.
What kind of motor moves the panel?
Switch #1 is what I have been using.
I am using 2 12 volt dc electric motors. Please explain penultimate switch,
thanks
Those can be protected by simple diode/switch combinations at each end of travel. You can make that completely independent of the entire Arduino control system.
There are three options to incorporate limit switches to stop motor operation.
- the limit switch can disrupt current flow when a certain position is been reached.
- the limit switch can send a signal to an Arduino input; when the signal is detected, the Arduino makes the motor stop by controlling a driver circuit to the motor.
- a combination of both
Penultimate is the second to the last switch as in the third option above.
Give us a Link to the motor.
An example of the first option:
The 2 relay boards i have are SRD-05VDC-SL-C
What is going to make the motor change direction to home at limit switch 1?
That should only happen under program control.
If this is your relay board, the Arduino sends control signals to IN1 and IN2.
These signals from the Arduino would be the results of a sensor, time of day etc.
Just stopping the motor i get . I need to have it return to switch 1 /homing
OK program control means i need to write a sketch ??
Yes, and sensor inputs.
What sensor inputs are you referring to?
Bear with me I am new to some of this.
- For example an LDR (light dependent resistor).
- An RTC (real time clock).
Both of those issues are incorporated into the 2 solar tracker boards controlling the north south\east and west
Then why are you talking about incorporating an UNO ?
Without the limit switches there is no protection from over extending the panel /carriage and breaking things, hence the limit switches.
My solar panel assembly is 200 miles away. I want to protect it from over extension.
Since your solar tracker boards already operate the solar panel, a version of the limit switch schematic in Post # 8 would probably suffice.
Could you supply me with a more explicit drawing on the first schematic in post #8 as you suggested. I think I could make that work.
I did not recognize some of the symbols in the schematic.
My apology for taking so long to get back to you. Lots going on right now.
Ken