Managed to get the X axis connected. So now I have X,Y and Z axises.
I also managed to get the electricals together.
I managed to wire everything up. Just a few more connections then the programming begins!
Don’t forget to post a video of it in action.
Cool project! Thanks for the updates
After much fussing with the wiring, I manage to get all the steppers to turn. The torque on them is so strong that I can’t turn the lead screws when they are stopped!
Problem: I’m having that age old problem of trying to connect a switch to a micro controller (yes i’m embarrassed). How do you connect multiple switches to a micro controller? (See the image for the wiring details).
The situation is that switch 1 will trigger but switch 2 won’t.
Use the built in pull up resistors, and have the switch connected to digital input and ground.
Wait for a edge up interrupt when the NC switch is depressed.
@ Mike, yea actually that would make more sense. Thanks much!
Now I can write the homing procedure…
Well that didn’t work either.
Strange problem: The measured resistance of the switches and wire is 0.6 Ohms. When I check the voltage across the GND and interrupt pin for the z and y axis when the Normal Closed switch is pressed, I get 2.1 Volts. When I press the one for the X axis I get 1.2 Volts. How is this possible? Note I am using twisted pair Ethernet wire. Could the induction or capacitance of the wire have anything to do with it?
1.2v sounds like a floating pin to me. Try swapping your wires and see whether that makes a difference, if it’s a floater then you’ll likely see the 1.2v stay on the same pin but move to a different switch…
are you using the pins that support SPI as digital inputs with an internal pull down resistor?
@ Mike - i’m not using the SPI pins. I’m using IO14, IO2 and IO9. None have SPI as a secondary function.
@ Brett - Tried swapping it’s not the pin but the switch.
Its like when I disconnect the switch current is still somehow flowing in the wires albeit at a high resistance. The only difference between the x and other axis limit switches is that the x wires are longer. All the switches are twisted pair Ethernet and they are all from the same part bin
Swap the switch out (same part bin doesn’t mean it’s not faulty ). Measure the resistance in open and closed on the bad one and another one, and see if there’s anything dodgy there…
@ Brett, tried that. The switches seem to work perfectly. The only ? left is the wire; which should be an impossibility.
I went out and purchased new switches and different wire (stranded telephone wire). Now we will know for sure.
Oh my gosh guys does solder flux conduct!???! Could my problem be that there is to much flux paste left on the terminals!?
It is always a good practice to clean the board of any remaining flux or post soldering mess.
Oh wow… I just cleaned off the flux and the limit switches started to work! I’ve included a pic of the flux that I use. (I know it says paste but ignore that)
If you’re not using a rosin core solder and just using that paste, if you use a lot then yes you definetely need to clean up. If you’re just using rosin core solder then you are usually OK because the flux does it’s job and not spatter too much around the place. If you’re using that flux paste with rosin core, you’re probably overdoing the flux thing
Well the switches work. But now I seem to have a new problem. When the steppers are turning I keep getting the interrupt event handler firing. It’s not the vibration of the machine (I think). Could it be EMI between the stepper wires and the limit switch wires or some other sort of on board interference?