HOMING PROBLEMS...

Talk about all things CNC
Bilbo
Posts: 51
Joined: Sun Jul 29, 2012 1:13 pm
Location: York, UK

HOMING PROBLEMS...

Post by Bilbo » Thu Dec 19, 2013 7:39 pm

Homing problems

Upon $H command, steppers drive the correct direction, hit and closes the home switch, then reverses until the home switch opens and then stops. Looks good so far.
However it does not reverse a fixed amount as you'd expect from the $22 setting in mm.

Here's the real problem, after the final stop the arduino will not take any commands at all. Have tried a soft reset and a Grbl unlock with no change.

Stranger still is that after a wait of over a minute (haven't timed it yet) the system comes back with "Bad command: $H" and repeats this cycle every few minutes.

Here are the settings: $16=1, $17=1, $18=0, $19=25 mm/min, $20=250 mm/min, $21=100ms, $22=100mm (The pull off is large during testing so it can be seen)

Any help would be greatly appreciated.

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: HOMING PROBLEMS...

Post by danimal » Fri Dec 27, 2013 4:53 am

I am very interested in this. I am just about done with my limit switches and should be putting them on soon. It has taken me way too long to get them finished, but I will be at the same step as you here soon. What kind of switches are you using? Mechanical switches can give a bad quality signal to the arduino. I'm not sure if that alone can be attributed to what you are seeing because it looks like there is something else going on there.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

Bilbo
Posts: 51
Joined: Sun Jul 29, 2012 1:13 pm
Location: York, UK

Re: HOMING PROBLEMS...

Post by Bilbo » Fri Dec 27, 2013 3:57 pm

danimal, Looks like we have the same system configuration, Dual X axis, Dual Y Drive y axis, and X&Y extended to 1000mm, ACME z axis is also upgraded.

For stop and home, I am using optical switches, which appear to be operating very well. However, after finding this problem, I took the optical switches out of the system and simulated them with a simple panel of three momentary-open push buttons wired to ground and located very close to the arduino. I could then start the drives and simulate the axis home/stop signal from each axis in any order I choose. With this simulator and measuring the voltages on pins 9, 10, 11 as correct, the system still failed to work correctly. I've moved on from this problem for the time being and am running the system without stops or homing sensors. I am able to successfully run the system this way and do some real work, it just requires great care in the planning so you don't crash the drives. After I'm done satisfying myself that the other parts of the system are good, I will revisit the homing problem. In the meantime, I hope that someone will be able to shed some light on the problem.

I'll keep you informed of any progress on this problem and hope you'll do the same

Cheers

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: HOMING PROBLEMS...

Post by danimal » Sun Dec 29, 2013 1:51 am

That sounds just like what I was doing. I have a thread around here somewhere where I got them working, but doing a couple quick calculations I saw that the electrical load was going to be to high to be carried by the Arduino alone so I went back to the drawing board and have not had time to finish up. After reading your last post, depending on how you have everything wired it might be overloading your arduino and causing a voltage problem? I really do not have enough information to say with any certainty what symptoms would develop if that were the case, but it might be worth looking into. I remember when I calculated the load of my setup it was very close to the max loading to use the arduino as the supply for the LED supply with 15k ohm current limiting resistors.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: HOMING PROBLEMS...

Post by danimal » Sun Dec 29, 2013 1:59 am

Here is the limit switch thread that I was talking about. I need to update it with my drawings and a couple other design ideas that I have had since then, but is exactly how I plan on configuring my limit switches and the calculations that I did at the time.

http://www.shapeoko.com/forum/viewtopic ... mit+switch
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

Bilbo
Posts: 51
Joined: Sun Jul 29, 2012 1:13 pm
Location: York, UK

Re: HOMING PROBLEMS...

Post by Bilbo » Sun Dec 29, 2013 11:45 am

Thanks for the input. As I mentioned, the optical home/stop sensors are working very well, relatively noise free. I have two power supplies in the system, one 24vdc, 6.5a for the stepper motor drivers and one 7.5vdc 1a that powers the Arduino directly and the optical circuits indirectly through a LS7805 5vdc regulator. They are well regulated with plenty of power. I do not use USB power from my computer. I have used twisted-pair shielded USB cabling to wire the optical sensors to the arduino and these cables are well separated from the stepper power leads.

The optical circuits are disconnected while my simulator home/stop switch panel is used and the switch simulator exhibited the same problems. I plan on running some more tests this week and I'll let you know if I find anything.

BTW: I only use three optical sensors, one for each axis mounted on the moving part of the axis. I use two tabs on each axis on the non-moving parts. Works well, Accuracy remains the same but at half the price and complexity.

If you'd like to see my circuits, let me know.

Thanks

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: HOMING PROBLEMS...

Post by danimal » Thu Jan 09, 2014 6:13 am

I finally finished my limit switches. I decided to take a step back and simplify a little to three switches like you did. I like the simplicity of it, and I got it wired up and working in a couple hours. The seem to work well, but I still need to attach more permanent tabs to the end plates for better tune-able accuracy. I have not tried homing just yet for this reason. Bilbo, I don't suppose that you could snap a picture of your tabs so I could find a simpler way of doing them. My way is a little complex, and I fear could shift a little with machine operation.

My mind is going a little numb after today because I took this opportunity to strip my Shapeoko down all the way to tune, tighten and clean everything and build up level and square. That used to be such an easy task, but now it is becoming a very tedious task as I add more and more to my build.

Have you had any luck with your homing issue? I plan on playing with my homing tomorrow and see if there are any problems. So far the limit switch function is working perfectly so my hopes are high that it will just work as it is supposed to.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

Bilbo
Posts: 51
Joined: Sun Jul 29, 2012 1:13 pm
Location: York, UK

Re: HOMING PROBLEMS...

Post by Bilbo » Thu Jan 09, 2014 5:43 pm

Danimal, I haven't gotten back to solving my home sensor problem. I've gone ahead and started making some test cutting with the router without the benefit of stop switches. You just have to be very careful. I enclosed some photos of my stop/home sensor setup. You'll notice that the Z and Y axis were relatively easy, but I had to add a piece of aluminum angle across the x-axis bridge in order to have a steady place to put the tabs. Also included is a picture of my rather technically sophisticated stop switch simulator.

Let me know if you'd like to see anything else. Also when you're finished I would love to see some pictures of your rig.

Cheers, Bilbo
Attachments
Z-axis.JPG
Z-axis.JPG (63.71 KiB) Viewed 6499 times
Y-axis.JPG
Y-axis.JPG (68.27 KiB) Viewed 6499 times
X-axis.JPG
X-axis.JPG (71.46 KiB) Viewed 6499 times

Bilbo
Posts: 51
Joined: Sun Jul 29, 2012 1:13 pm
Location: York, UK

Re: HOMING PROBLEMS...

Post by Bilbo » Thu Jan 09, 2014 5:47 pm

These messages may be out of order, see the next.

Here's a couple more photos
Attachments
Test Rig.JPG
Test Rig.JPG (47.68 KiB) Viewed 6499 times
Z,Y axis.JPG
Z,Y axis.JPG (81.9 KiB) Viewed 6499 times

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: HOMING PROBLEMS...

Post by danimal » Thu Jan 09, 2014 7:28 pm

Looks good, I got my system all together after building a new back plate for my enclosure that would incorporate the limit switch cord and now I am having problems. Mine is definitely caused by cable interference. I used shielded cable, but it looks like I might need to do a little more being that I incorporated my spindle speed controller into my enclosure. It looks sharp but it is not reliable at all. I see the capacitors on your setup, that is for debouching the switch, yes?
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

Post Reply