My problems with limit switches - my assembly progress

majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

My problems with limit switches - my assembly progress

Post by majsta »

Hi, either I am idiot who knows how to solder 2 wires or something is wrong:

Code: Select all

{"r":{},"f":[1,0,20,100]}
{"sr":{"posy":270.000,"vel":0.75,"stat":5}}
{"qr":31,"qi":1,"qo":0}
{"sr":{"posy":276.281,"vel":5615.00}}
{"sr":{"posy":304.890,"vel":10000.00}}
{"sr":{"posy":337.561}}
{"er":{"fb":440.20,"st":204,"msg":"Limit switch hit - Shutdown occurred"}}
{"qr":30,"qi":1,"qo":0}
CNC_XY_m ok
So far I have tested only Y motor and 2 switches connected to Ymin and Ymax. So probably I don't know how to connect limit switches to TinyG, interesting :)
Anyway this happens when I hit Test Y in the software and instantly when it hits switch TinyG crashes and software says that it may require reset. Spdir keeps blinking after this. I don't know what more information's should I provide.
Last edited by majsta on Thu Jul 07, 2016 12:51 pm, edited 1 time in total.
Danal
Posts: 43
Joined: Fri May 29, 2015 11:07 am
Location: Fairview, TX
Contact:

Re: My problems with limit switches

Post by Danal »

What you are seeing is correct behavior (assuming the TinyG halt/error occurs on the MAX switch and not on the MIN switch).

In normal operation, including to some extent setup and calibration of the machine, the X and Y "Max" switches are just a safety net. That is, the machine should hit the Min switches while homing, and the "Machine Size: " setting dialog boxes should keep it from ever hitting the Max switches. That's important enough to repeat: The machine should never touch the Max switches; if it does, it will halt/error.

To expand a bit on "... to some extent setup and calibration ...". You might intentionally hit the Max X or Max Y while calibrating. This WILL cause the TinyG to halt (and open an error dialog on LitePlacer on the PC). Because the TinyG is now halted, you must reset the TinyG (or power cycle it, if you did not wire up an external reset switch), then reconnect LitePlacer via "Clear Error", and you should be going again. Occasionally, I have to exit LitePlacer and restart it. Anyway, error/halt is the "successful conclusion of the test" if the test was to run the machine into the Max X or Max Y.


Max limits are a good thing to test once or twice. After you are sure Max X and Max Y are functioning correctly, stopping the machine, stopping the machine hard, then just ignore them. They should never happen again. If you do hit them in normal operation, stop and figure out why. Did you forget to home? Did a belt slip? etc.



Side Note: MinZ and MaxZ are very different from X and Y... I'm not going to discuss Z here to avoid confusing things. Play with X and Y for a while before tackling Z.
JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: My problems with limit switches

Post by JuKu »

As Danal said, the behaviour is correct, you should not hit the limit switch.

> when I hit Test Y in the software and instantly when it hits switch TinyG crashes and software says that it may require reset.

The Test X/Y/Z buttons are for testing the movement and ensuring your speed and acceleration settings and motor current allow full range of movement. Using these assume that you have set the machine size correctly and have homed the axis.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches

Post by majsta »

Ha tnx, crucial info here for me was that limit switches don't need to be touched. I was under impression that each and every time machine should hit them.
Situation right now for Y is that test is going well not touching switches, homing on Y acts like you told me so it touches Ymin, triggers it and after some time(one second or so) goes few steps towards back side of the machine. So far so good. I don't have any kind of experience with this, let's say that I have heard about TinyG 3 days ago when I unpacked it from LitePlacer package. I ll write in detail about LitePlacer over my site, doing review but for now I must say that this is ultimate toy for any person who does not have sex life :)

One more thing, for cables I have build my own, well most of them by using aluminum foil(for kitchen) and those heat shrink tubes. Also I have found out that there are cables used for warning systems, alarms etc are also good. Maybe best cables are from FireWire 1394. I m mentioning this since I couldn't find proper cables in my town for this.
Danal
Posts: 43
Joined: Fri May 29, 2015 11:07 am
Location: Fairview, TX
Contact:

Re: My problems with limit switches

Post by Danal »

Yep, "Homing" finds the Min switch by moving at a medium speed, backs off, finds it again at a slower speed for more accuracy, and then backs off a little bit so the switch is not clicked, and that is "Zero" on that axis. This sequence is fairly standard for any mechanical CNC device, and is therefore built into the TinyG.

Unique to LIteplacer: After mechanical homing, it optically homes on the "dot". This becomes actual coordinate system 0,0.

And.... In a later step, you will set board origin. Every measurement in the file that comes from your board cad system is relative to THAT zero, board, zero, not to Liteplacer "dot" zero. :)
JuKu
Site Admin
Posts: 1114
Joined: Thu Feb 14, 2013 3:06 pm
Location: Tampere, Finland
Contact:

Re: My problems with limit switches

Post by JuKu »

Correct. You need to set the board origin so that the machine knows where to look for fiducials. Usually the board origin is the lower left corner, but you can put in an offset if the cad system data has the origin somewhere else. In the board measurement step, the software looks for the fiducials, measures their location in machine coordinates and from the nominal (cad data) coordinates of the fiducials and their measured machine coordinates locations, calculates the position of all the other components in machine coordinates. All operations are done in squareness corrected machine coordinates.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches

Post by majsta »

Ok I ll write about my progress here and potential problem. Assembly takes so long because I have so much fun lately testing LitePlacer :) Now XY Homing and tests works nicely(so limit switches are all set properly so far) only thing I must say here is that without drag chains this is nearly impossible to assembly machine looking professional. There is just too many cables. I have tried to use 6 wires cables, that's why I reduced number of them. Also I have connected limit switches differently with sharing GND for XYZ switches. So like I said I m close to finish this but somehow I don't want to be in a hurry. I m having fun by pressing Shift+Alt+F* keys :)
Last edited by majsta on Wed Jul 06, 2016 9:34 pm, edited 1 time in total.
Danal
Posts: 43
Joined: Fri May 29, 2015 11:07 am
Location: Fairview, TX
Contact:

Re: My problems with limit switches

Post by Danal »

I also had a LOT of fun as I got each axis moving. I would play with the machine a lot on that axis before doing the work for the next set of switches or whatever.

It is absolutely great to see it moving.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches

Post by majsta »

Motor A is too hot even with lowest possible trim position on TinyG. I have measured temperatures with infrared thermometer and this motor is 10 degrees hotter than others. Also motor does not work good, I ll do more testings today to see what is wrong because it does not rotate properly.
Edit:
It is not because of the motor just tested it on its own. So it must be something related to pickup tube or tube bearings.
Edit 2:
Problem solved by adding some mechanical oil into tube bearings and adjusting tube bearings. Turns out that motor was too hot because too much friction because bearings were misaligned stopping tube from moving freely. Temperature of Motor A (Nema 14) is now 27 degrees Celsius like on other motors.
Last edited by majsta on Thu Jul 07, 2016 1:28 pm, edited 1 time in total.
majsta
Posts: 29
Joined: Sun Jun 19, 2016 9:39 pm

Re: My problems with limit switches

Post by majsta »

Motor Z I have received and tutorial stated at "Wiring the motors at liteplacer.com website" have different colors of wires. I don't see yellow wire on my motor just red,green,black,blue so no yellow as listed in tutorial.
Edit:
By measuring resistance of this motor(bipolar) here is how its connected working good:
Not good:
green A1
black A2
red B1
blue B2
Edit 2:
Something is not right, by pressing Alt+F12 Z goes up instead down. It could be that pairs of the coil in the motor are connected differently to TinyG than I was thinking.
Edit 3:
Yes this should be order of the wires, now all ok. Now homing and all testings are ok.
Good:
red A1
blue A2
green B1
black B2
Last edited by majsta on Thu Jul 07, 2016 1:40 pm, edited 4 times in total.
Post Reply