Conversational module for lathe #959
Replies: 23 comments 90 replies
-
|
Looking awesome 👀 |
Beta Was this translation helpful? Give feedback.
-
|
I am got a challenge to solve. I try to offload core1 as much possible, especially on sending blocking jobs like spi for display, but now after putting it all together conversational - i can't find a good solution to for working file. I tried to use two separate places - flash card (as is for core1) and internal flash chip (for core0). Many configs later - they do not want to work together. tied both via file_system, no luck. But i do have seen usage of internal flash on wifi setup. Which on its own sits on separated core / task. Plan B - will be to move all conversational stuff (editing + g code generation) and i2c keyboard back to core1, and left core0 only for graphic display. On cam i need ability to list folder, open file, append to it. Edit. Any ideas are welcomed. |
Beta Was this translation helpful? Give feedback.
-
|
Sort of milestone: |
Beta Was this translation helpful? Give feedback.
-
|
added bte to draw in hidden ram area, now image is sharp. |
Beta Was this translation helpful? Give feedback.
-
|
Added windows version to play with. https://github.com/staskaaa-netizen/uCNC/pull/new/leancam-win-tool
|
Beta Was this translation helpful? Give feedback.
-
|
Added live run - so lcam code is translated to g code and streamed to core, and drawing is done using real x/z coordinates. Triple buffered. Tried to add chamfer/rnd feature to od turning, and i am puzzled with G7/G8 mode and this code
Do not multiply after motion. Parser look ahead is wrong ? Or its got confused ? And of course without multiply my g0 goes to x18.5 instead of 37. G code below:
|
Beta Was this translation helpful? Give feedback.
-
|
Got it. So for g18 and diameter mode target b should divided by 2. No idea how to pass diameter mode to parser. now it looks only to live in g/_g8 module : |
Beta Was this translation helpful? Give feedback.
-
My first thought about this was a digital PLL although it will not be so simple. Linux CNC probably has a provision for this so reinventing the wheel is not needed.
10+ years ago I build a motor driving a 8 PPR encoder. For uCNC I used an ESP32-C3 to simulate index and sync pulses. I added a logic level converter board to connect 5V and 3V3 processors. If you need, I can upload the eagle files also. |
Beta Was this translation helpful? Give feedback.
-
|
Did. #define ENCODERS 1 #define ENC0_TYPE ENC_TYPE_PCNT #define ENC0_PULSE_GPIO 36 // A #define ENC0_IS_INCREMENTAL |
Beta Was this translation helpful? Give feedback.
-
There are more implementations for "conversational lathe programming". Arie Kabaalstra has made a GUI for EdingCNC. I have made a program for grbl, grblGRU can do lathe work and there are a lot more. |
Beta Was this translation helpful? Give feedback.
-
I think the cheapest commonly available hardware would be an android tablet.
I love my 10" tablet on the lathe.
The mechanical keyboard on my CNC router (12" touch laptop) has problems with the chips. So many users, so many preferences. |
Beta Was this translation helpful? Give feedback.
-
|
My tablet screen isn't clean but seems to have no problem with my dirty hands. Of course I only need to set a few parameters to get started and do this as a hobby so most of the time the lathe is switched off. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
I cant get isr firing on my encoder index pin. or it is wrong idea in ucnc world ? |
Beta Was this translation helpful? Give feedback.
-
|
I have checked the available pins on my ESP32 carrier board. I think I can add the level shifter module and do a real test on the lathe. I hope to get this done within 24 hours. |
Beta Was this translation helpful? Give feedback.
-
No, it uses an index pulse to synchronize the start position and synchronization pulses to keep the z-axis position in sync with the spindle position. |
Beta Was this translation helpful? Give feedback.
-
Ofcourse if you reduce the ISR calls and count in hardware. Nothing wrong with that.
I haven't looked at your code yet but my worries are that the stepper has to speed up/down beyond it's capabilities. On a heavy geared lathe or a servo driven spindle you probably don't have to worry about that once synchronization is establised. If the spindle speed of my lathe was stable during threading, I would prefer doing it this way. There is also nothing wrong having different g33 modules depending on the situation. Once you have your module up and running, I will test it on my lathe. I am curious about the results and maybe I am way to pessimistic about my lathe stepper capabilities. |
Beta Was this translation helpful? Give feedback.
-
Actually, I can switch between my low on torque at low RPM brushed DC motor (original) or a servo so I can test both situations. I target the starting hobby user who wants to spend as less as possible on his first CNC conversion and doesn't have the means to change a lot on his lathe. |
Beta Was this translation helpful? Give feedback.
-
|
On translators - i think one can also use this shmidt trigger and translator ic SN74LV6T14. |
Beta Was this translation helpful? Give feedback.
-
|
Added spindle tester / emulator. G33 with els part will need more work. now it is definitely pushing non uniform impulses : https://www.youtube.com/watch?v=Ytp9_oxqTzM While current realization of g33 seems to work nice with pcnt encoder implementation : https://www.youtube.com/watch?v=kYqTKlAt59Y Still - will try to find a way how to get this more dynamic response to current pcnt counter. |
Beta Was this translation helpful? Give feedback.
-
|
Correct me if I am wrong, but if I remember right, at the start you wanted to generate a step pulse every xx encoder pulses. Now you generate an synchronization pulse every xx encoder pulses and trigger the (modified) g33 module to do the synchronization. I think I found a solution to temporarily mount an encoder to my lathe spindle. I attach an extension at the threaded end of my spindle so that it sticks out the gearbox. On that extension I can mount a timing belt connected to an encoder. The encode can be mounted to the gearbox cover using magnets. |
Beta Was this translation helpful? Give feedback.
-
|
Busy times. But still some time was found to play around. lvds is very nice too, it needed some more rework of code but now giving sort of 50 fps easily. And encoder stuff with multiple virtual hooks is migrated too. And it is rock solid. The most important thing - i was able to make lvds renderer static machine - it sits on its own core1 in while (1), and doing scan line things from screen buffer without any interrupts at all. https://github.com/staskaaa-netizen/uCNC/pull/new/rp2350_lvds |
Beta Was this translation helpful? Give feedback.













Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. First - big thank for making this uCNC. I am in a way of adding simple conversational for lathe on top of it. Highly inspired by heidenhain/ gildermeister pilot things. And mazatrol too. On its own display, not as yet another grbl sender thing. So for now- display is on ra8876 chip and it is connected, keyboard is on i2c and it is connected. It does take some time to proper config pinouts if not using standart ones for spi / i2c. but now it is ok. All is implemented as separate modules. The only one trouble is taking current g code lines does make esp32 to panic. And yes, now it is on tinybee by mks. All fits, no extra wires, exp1 for display connector, exp2 for keyboard. th1/th2 for cs / hold buttons.
This is progress so far.
https://www.youtube.com/watch?v=yRCTqcnAhGE&feature=youtu.be
G code is generated on the fly from conversational block, and is send to grbl stream. And i was able to add a sim for it.
At the end I will also have a g41/g42 added to core. But this is long term one.
Cheers.
Beta Was this translation helpful? Give feedback.
All reactions