GithubHelp home page GithubHelp logo

kachurovskiy / nanoels Goto Github PK

View Code? Open in Web Editor NEW
133.0 21.0 42.0 58.48 MB

Electronic Lead Screw for metal lathe

License: MIT License

C++ 95.64% HTML 4.36%
arduino-nano atmega atmega328 cnc diy lathe-leadscrew

nanoels's People

Contributors

akmedi9 avatar kachurovskiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanoels's Issues

RPM gets stuck sometimes

Hi, I'm not quite sure under what circumstances this happens, but sometimes my RPM display gets stuck. It shows 0 rpm when stopped, and when running it goes to the last set RPM, even if I change rpm. It stops updating. I need to power cycle the system to get it to respond again.

Is this a known issue?

Speed display

Hello Maxim,

I have noticed that sometimes 0 rpm is displayed for the speed, but when I switch to angle, the angle is displayed correctly and the thread cutting also works.
So it can't be the encoder, do you have an explanation?

Regards,
Stefan

Carriage stops moving

Sometimes the carriage stops moving. Auto modes no starting (shows "step 0"). Manual moves not starting too. It just start humming by stepper, but no move. I'm using "need rest" option, so steppers disabled at idle.
Hard to tell how to reproduce. Like make some moves, and then keep system powered on for long time (1hr 11 min, i guess :) without steppers activity).
I think it's here it not overflow-proof. Not sure, tho, is it only my branch affected, or the main too.
in the void moveAxis(Axis* a)
my branch:

...
  unsigned long nowUs = micros();
  float delayUs = 1000000.0 / a->speed;
  if ((nowUs - a->stepStartUs < delayUs - 5)||
      ((a->posByDRO && a->backlashByDRO && a->needsDROBacklashCompensation) &&
       (a->stepStartUs + DRO_READ_PERIOD_MS * 1000 > nowUs)) ){
    // Not enough time has passed to issue this step.
    return;
  }
 ... 

main:

...
  unsigned long nowUs = micros();
  float delayUs = 1000000.0 / a->speed;
  if (nowUs - a->stepStartUs < delayUs - 5) {
    // Not enough time has passed to issue this step.
    return;
  }
...

micros() rotating aroung 1hr 11min, so if last 'stepStartUs' taken too long ago, it can became significantly bigger then 'nowUs'.
I suppose both branches may be affected, but I'm not very good in the overflow handle programmin. If it only mine, I'll be glad to have some advices how to fix.

some doubts regarding the project

hello! I have seen your ELS project and I have some doubts... and I would like if you can answer them before I start buying the components.

The first is the use of a 4-layer PCB, is this for any specific reason? (signal shielding?) Can only two layers be used?

The second is if you have thought about or are going to put a color LCD screen with graphics, in that case could the same PCB be used or would it be new?

Thank you very much for creating this project!!

Facing and Cut-off issues

Hi Maxim,
The X axis when is controlled by the rotation of the spindle ( facing or cutoff) moves the cross-slide about 2/3 of what should per spindle rotation. The return movement, moving the cross-slide with the arrows is OK. No issues with Z axis, turning works well.

For example, if I do facing in 1 steps on 20mm diameter, the cross-slide (X axis) moves 6.29mm instead of 10mm then returns 10mm.
On the X axis I use the DM556Y motor driver and is set for 800 steps. I have the 1:3 belt drive connection to the cross-slide screw that has 1mm pitch.

Not sure if there is a correlation error between the encoder and the X axis movement or I'm
doing something wrong.
Let me know what you think.
Thank you,
Lorand

Word of caution for older mini-lathes

In your readme you allude to lathe main board (speed controller) failure associated with a short to the case from the control panel. I was, therefore, very careful never to run the lathe when the panel was 'floating'. However - once the project was finished and everything was working perfectly (amazing, by the way - another post with pics of the finished article will follow) I gave in to the obvious temptation to 'see what it could do' ie. took the lathe speed up to the max. That is what blew up my (rather old) control board. The mode of failure was interesting (a pair of diodes across the supply failed short circuit) but it had nothing to do with NanoELS it is just that I had almost never run the lathe at top speed and the ageing control electronics wasn't up to it. Still, it was an interesting fault finding mission and I learned something about SCRs as high voltage DC speed controllers along the way.

Stepper mount with a pinch bolt

Just a tiny tweak - added an M2 pinch bolt to hold the collar a little more securely

https://www.thingiverse.com/thing:5156265

PS Really enjoying this build, thank you. Was interested in Clough42's solution but that was waaaaay more that I needed for my little lathe. I'm excited to have a power feed with sensible feed rate as well as threading without messing in the gear box.

Fitting to WM180

I am planning on fitting this to the WM180 lathe. The cross slide is identical so there is no issue there. However, the lathe spindle has a gear with only 40 teeth for the encoder. As a result neither this or the alternative gear wheels are suitable. Do you have suggestions for a suitable alternative please?

[Feature Request] Support thread cutting in Gcode

I've been using the Nano ELS via the gcode function more and more and I think it would be nice to support threading operations through it.

Since we cant set the speed of the spindle in gcode we could instead read the RPM and adjust the feedrate as needed.

So something like G32 Z15.0 would need to work out a base feedrate and adjust that based on the RPM. I guess you did something similar with the automatic threading function on the controller.

Ive made quite a bit of progress on the Ui im building so it would be nice to have this function there.

Encoder atomic operation improvement, Request for comments

Hi Maxim, any interest in me making a PR for this? I did a small scale test and it seems to be an improvement, but I'm planning on doing a full multi-hour smoke test before submitting a PR, but wanted to ask if you would like me to do this, or do it yourself, or not bother with either?

2d94347

Turning off interrupts to process critical flows without memory corruption from an interrupt is common practice in the arduino space, particularly where interrupts are used in low speed (human scale speed) and non-critical operations like UI encoders. It's a common way to do it in the arduino space particularly since AVR doesn't support atomic operations larger than 1 byte. The issue I'm solving is there is a non-zero chance that a pulse interrupt is missed in that time. It's actually quite measurable on my machine with a much coarser leadscrew than the reference lathe, and gets worse with higher RPMs.

Considering the esp32/xtensia architecture does support C++11 atomic operations properly, I made a small quick change to use them for the critical variables, and removed the sections turning off and then on again the interrupts.

I've done some light testing on my bench rig but I plan on doing a complete test plan showing the before and after results, using an additional esp32 to emulate an encoder. At the end of a several day long run, the nanoels pulse count and the simulator pulse count should match within 1 interrupt edge.

Nano ELS

Hi
I put all the components together and it seems to work. But as a beginner I have a problem with setting up hardware and software. Which lines of code should be aligned and to which values and how to set the DIP switches on the stepper driver. The stepper is directly connected to the leading spindle with a pitch of 2.5 mm. Equipment specification attached.

Thanking you in advance.

Equipment for ELS.pdf

NanoELS - try first

I need help
Everything is connected. (see pictures) The encoder makes a full circle on the display and shows an angle of 360°. Correct.
The problem is that the stepper does not start.
No matter what I do, the stepper stops.
Where am I wrong.

[Greeting

IMG_0968
IMG_0969
IMG_0970
IMG_0971

Linear scales, DRO

Hello! Is it possible to make it use linear scales on A1/A2 gates? I.e. for resyncing positions after jogging axes manually (by flywheel).

Slotting mode idea

How hard would it be to add a slotting mode? For example, for broaching an internal keyway using tiny infeeds of the cross slide, and moving the carriage left and right.

Example:
https://youtu.be/vk6msRj_tcQ?si=Dp1TDIgzHQsS9AoH&t=264

The way I do it on my 10x32" lathe is by barely touching, then move the carriage left to scrape one cut, then go to the start, feed in another .0005" (inch lathe) or .001" depending on how wide the slot is, and move it again. It would be nice to automate this with the H4, so I can say cut the slot to my X limit, and define the depth of each pass., and with a configurable left and right speed. The right speed can be much faster than the left speed due to the smaller torque requirement.

The difference with the turning mode is that the spindle obviously must not be turning, otherwise the automatic turning mode would do the job.

There is one complication for a blind slot (a slot that does not extend through the part entirely), the chips will pile up in the hole and prevent the tool from cutting the full depth. So I manually stop short as I'm progressing. For example, if my depth of cut is 0.0005, then the next pass must stop 0.0005" short of the left stop. If it's a through hole, that's not required though.

Just an idea. I was going to do a PR and implement it myself, but finding the time to dedicate to that is difficult for me at the moment. And I'm able to slot manually using the left and right moves anyway.

An 80T encoder gear for 40T spindle gear

Another remix - my spindle has a tiny 40T gear so this is needed to fit in under the pulleys. Reduced pulses per revolution but cheaper and quicker than trying to source a new spindle gear. Just #define ENCODER_STEPS to half of the value for the encoder used (2:1 reduction). The axle bore is a pilot size as I found it best to drill to size on the lathe to improve concentricity.

https://www.thingiverse.com/thing:5156106

Adaption for Mach4

Hi Maxim,

what a hell of great ideas!

I´ve just ordered my lathe and will adapt it to Mach4 as I did with my mill.

Those motor holders of your´s are well designed, but i´m quite familiar with that heated up nema steppers on plastic holders problem ;) Milled some aluminum holders for my 3d printer to get rid of all this ongoing deformations not only from temperature but from pressure and load change. So for the lathe too, there will be aluminium ones. Therefore I´ll need to make some adaptions on your sketches to make it millable and maybe suitable for closed circuit steppers with different form factors. Could you hand over those sketches as f3d files too? Only found STL.

One off the main problems left will be to adapt the rotary encoder to my PoKeys57CNC board. Any advice in this? You´ve realized a degree readout for the chuck - what is the smallest subdevision you can get out of this?

Second open question is to have chuck rpm programmable. Any idea if motor is adaptable to a normal VFD Inverter that´s triggered buy 0 to 10V?

Maybe a closed loop servo to drive the chuck might be the better solution for those two open questions - how you feel about it?

Reg. Charly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.