Arduino Leonardo and linears encoders.
![:) :)](/media/kunena/emoticons/smile.png)
I have retrofit a manual mill using linuxcnc as control, it works great! Now i want to do a Pendant to aproximate the mill and set zeros to the axis. I have been testing with a joypad and it works too. But i want to make my own pendant with an arduino. The thing is that recently is been released a new version of arduino called Leonardo, i have read that this new version works better and have more digital I/O. I´m no informatic and my knowledge about programming is not very impressive, so my question is if i buy a Leonardo will i been able to program it with the same sketchs of the Arduino One?? if i have just to change little things doesn´t mind....
Other thing i want to do is to make a closed loop with linear encoders, actually my system is been done with servos, they have his own closed loop, but i want to read the real position of the tables with linears encoders. The linear encoder chosen by me is the mitutoyo AT 216 T.
pdf.directindustry.com/pdf/mitutoyo/scale/4906-14503-_6.html
In this PDF, in page 6 and page 14 are related its features. Do you know if this linear encoder will fit with linuxcnc??
Thank you very much!!
Please Log in or Create an account to join the conversation.
I am fairly sure that there will be no problem at all.if i buy a Leonardo will i been able to program it with the same sketchs of the Arduino One?? if i have just to change little things doesn´t mind….
[Do you know if this linear encoder will fit with linuxcnc??]It says "square wave output" so it sounds like it should. The only problem will be counting the quadrature pulses at high table speeds. What is the resolution of the encoder? How fast does your machine move? What are you using to control the machine at the moment? Parallel port or something more advanced?
Please Log in or Create an account to join the conversation.
The resolution of the encoder is 5um = 0.005 mm.
Mi machine speeds up to 1000 mm/min more or less, it has encoders with 2000 pulses per revolution, and each pulse moves around 0.00035 mm.
Is still being a good choice the mitutoyo AT 216T??
Im using parallel port, but in the future when i put the 3 linear encoders i´m going to need more digital inputs so i think i will have to but a I/O card, can i have usable I/O inputs with an arduino connecting it to the paralel port instead USB, o i need to buy a MESA card or similar??
Thank you very much.
Please Log in or Create an account to join the conversation.
Other thing i want to do is to make a closed loop with linear encoders, actually my system is been done with servos, they have his own closed loop, but i want to read the real position of the tables with linears encoders
Im using parallel port, but in the future when i put the 3 linear encoders i´m going to need more digital inputs so i think i will have to but a I/O card, can i have usable I/O inputs with an arduino connecting it to the paralel port instead USB, o i need to buy a MESA card or similar??
Whilst I am a fan of Arduino boards you just have to accept their limitations. You are potentially talking about 6 encoders here.
The set up you are talking about would be far better served by using the Mesa cards that are designed to handle encoders, plus all the other inputs required.
The only way you could use an Arduino with a parallel port that I can immediately think of, would take a LOT of wiring and probably most of its IO just to implement, for what purpose - simply to use an Arduino?
regards
Please Log in or Create an account to join the conversation.
My system will have 6 encoders, but just 3 will "talk" to Linuxcnc, the other 3 ones will be part of the closed loop that the Drivers-Servos make. And linuxcnc doesn´t mind about that closed loop.
To make this system ( 3 axis with linear encoders) which MESA card do you recomend me or another brand that works fine with linuxcnc.??
Thank you very much.
Please Log in or Create an account to join the conversation.
If you write the code correctly (and you might need to use the Aduino hardware interrupts) then you should have no trouble getting a few 100kHz. Much faster than a parallel port, but nothing like the 10MHz of a Pico or Mesa card. But then you don't need that.What i don´t know is if the Mhz of the clock of the arduino will be enough or similar to Parallel Port, or even similar to a MESA card.
Your system sounds like a step-output encoder-input system, and that is a bit of a hybrid. Mesa sell the 5i25 / 7i76 combo ($200) for steppers and the 5i25 / 7i77 combo ($239) for servos/ The 7i76 has step-dir outputs and only one encoder (for the spindle) whereas the 7i77 has lots of encoder inputs, but the outputs are analogue voltage, not step-dir. If your servo drives can work on analogue-voltage control (velocity or torque mode) then the 7i77 is the one to go for. It looks like the best fit for your system would be the 5i25 + 7i85S (which is an encoder + step/dir board) but that seems a bit short of other IO. However it is only $69 so perhaps you could use 5i25 + 7i85S + 7i75 Which comes to $203. www.mesanet.com/aiodaughter.htmlTo make this system ( 3 axis with linear encoders) which MESA card do you recomend me or another brand that works fine with linuxcnc.??
(You need to navigate via the mesanet home page to find the other boards and the price list, www.mesanet.com)
You can add a 7i73 on the end of an RJ45 cable to any of these combinations for $49. (Which is comparable to the Arduino and a lot less bother to program. picasaweb.google.com/lh/photo/fCc5K4YxIL...pFm0?feat=directlink
For step-dir servo control (which is what it sounds like you have) you might find the Pico PPMC to be a better fit (especially if you don't have a free PCI port).
pico-systems.com/osc2.5/catalog/product_...ath=4&products_id=30
That connects to a parallel port but only uses the parallel port as a _data_ link. It generates step pulses and counts encoders using onboard hardware.
Please Log in or Create an account to join the conversation.
Sorry for the time to response, i´ve been looking the options you have suggested to me.
I explain you what i have and what i want. My system is based in servos, but this servos are digital and they just work with step/direction inputs. Right now i don´t have linear encoders, but my idea is put one for each axis (X, Y, Z). Right now i do my digital outputs with the paralell port of the computer, but the number of digital inputs (for the linear encoders) is low, and i can´t reach the total of digital inputs i need with the paralell port. I want to put too limit switch´s for axis, but i think with one digital input it will be enough ( for the 6 limit switch´s) .
The linear encoders i´ve seen on internet is Mitutoyo 216 T
pdf.directindustry.com/pdf/incat/216-t-4906-14503-_14.html Page 14.
Those linear encoders are incremental digital, they have two digital outputs to read 2 phase cuadrature signals, i think they will fit with linuxcnc but i don ´t really know.
So making a recount what i need is:
Digital outputs -> 6 ( 2 per axis for step/direction)
Digital Inputs -> 7 ( 2 per linear encoder, one per phase and 1 to the switch limit )
I would prefer to have more I/O digitals for if in the future i want to put more things.
Do you think the combo 5i25 + 7i85S it will be suitable or is preferred the 5i25 + 7i85S + 7i75?? The money is not a big issue.
I havent been able to see the pico characterics in the web. My english is very poor. Sorry
A lot of thanks to you. This helps me a lot.
Regards.
Please Log in or Create an account to join the conversation.
Is there an option to control them with analogue voltages? Do you have a link to a datasheet?I explain you what i have and what i want. My system is based in servos, but this servos are digital and they just work with step/direction inputs.
It would actually be fairly unusual to have servos with encoders and linear scales. It can be done, but you might have to do some moderately complex stuff in HAL to make it all work.Right now i don´t have linear encoders, but my idea is put one for each axis (X, Y, Z).
Yes, those will work perfectly well with any of the LinuxCNC encoder options.pdf.directindustry.com/pdf/incat/216-t-4906-14503-_14.html
Those linear encoders are incremental digital, they have two digital outputs to read 2 phase cuadrature signals, i think they will fit with linuxcnc but i don ´t really know.
Here is a link: www.pico-systems.com/motion.htmlI havent been able to see the pico characterics in the web.
Please Log in or Create an account to join the conversation.
industrial.omron.es/es/products/catalogu...artstep/default.html
Ok, actually my system works with step/direction signal output from linuxcnc to the drivers, and they are who do the closed loop(with the rotary encoder that the servomotor has). Linuxcnc just don´t mind about the closed loop, because it is done by the drivers. Linuxcnc works just as an emitter of pulses, but it doesn´t recieve any information from the movement.
Ok, so now i want Linuxcnc recieve information of the movement with another extras linear encoders, leting linuxcnc to make a closed loop ( Pulses sent to my drivers, and pulses recieved from the linear encoders). I Think doing it like this i will have 0 error (talking in 0.01 mm) in the position. Right now i have more or less 0.02 mm of error due to the mechanichs.
The problem here is i´m going to have 2 closed loops, one from linuxcnc ( linear encoders) and one from Smartstep (rotary encoders). But it should not to be a problem since linuxcnc is only going to manage and have knowledge of one closed loop ( linear encoders). Of course i have to calibrate the accuracy of one pulse in my servos to the accuracy of the linear encoder for not creating a infinite bucle.
Working like this linuxcnc is going to work with a normal configuration of step/dir and linear encoders feedback, isn´t it? Like Step by Step motors.
I´ve been reading and i think the configuration 5i25 + 7i85S + 7i75 is the best choice for me, but i have doubts. In the page of mesa www.mesanet.com they say that the 7i85 card allows linear encoders inputs in TTL o RS-422. Are that inputs suitables for the encoder mitutoyo 216T i put two threads before??
Another thing is you know if mesa works with europe, i have sent them an email with my doubts but they haven ´t response me.
Again, a lot of thanks!!
Regards.
Please Log in or Create an account to join the conversation.
Reading the data sheet it does appear that that is the case.I´ve been reading the datasheet of my drivers (for the servos) and i think they have only the digital option to recieve the input signal.
It is possible for LinuxCNC to share the motor encoders.Ok, so now i want Linuxcnc recieve information of the movement with another extras linear encoders, leting linuxcnc to make a closed loop
However, if you do want to use the linear scales then the solution is to use velocity-mode stepgens. Then the output from the LinuxCNC PID is a pulse rate command (not a pulse count command) and the pulse train is effectively equivalent to an analogue velocity request.
The output appears to be 5V TTL level, (looking at www.mitutoyo.com/pdf/E13005_LinearScale.pdf ) so should work.I´ve been reading and i think the configuration 5i25 + 7i85S + 7i75 is the best choice for me, but i have doubts. In the page of mesa www.mesanet.com they say that the 7i85 card allows linear encoders inputs in TTL o RS-422. Are that inputs suitables for the encoder mitutoyo 216T i put two threads before??
I have dealt direct in the past, but it might be simpler to buy through an EU distributor. It doesn't look like Duzi have any in stock ( www.duzi.cz/shop_cnc/index.php?main_page=index&cPath=1 ) nor can I see the cards you want at Retrofit+ (www.retrofit-plus.at/en/MESA/)Another thing is you know if mesa works with europe, i have sent them an email with my doubts but they haven ´t response me.
It looks like you might have to deal direct with Mesa.
I am surprised that they didn't answer your email.
Please Log in or Create an account to join the conversation.