Это видео недоступно.
Сожалеем об этом.
Lathe Electronic Leadscrew Part 1: Proof of Concept
HTML-код
- Опубликовано: 18 авг 2024
- I've always wanted an electronic leadscrew (virtual gearbox) for my lathe, but I haven't been able to find anything I like. So I'm going to build my own. Today we'll look at an overview of the project and progress so far.
Firmware on GitHub:
github.com/clo...
3D Models on Thingiverse:
www.thingivers...
Parts and tools used in this video:
*This site contains affiliate links for which I may be compensated
4-Channel logic level converter (eBay*): ebay.to/2CoENsF
8-Digit LED display module with buttons (eBay*): ebay.to/2RvCCxR
Omron 1024 p/r rotary encoder (eBay*): ebay.us/U93ceD
Rigol DP832 Triple-Output Power Supply (Amazon*): amzn.to/2FHtSfz
If you're viewing this and even remotely considering it, my advice is "GO FOR IT". I watched the entire series, made changes suitable to my machine, ordered all the bits and pieces and the project came out beautifully, even on my old Grizzly G4000. James is a brilliant engineer and indeed, a very capable teacher! Thank you Sir!!
When the phrase "so I decided to go ahead and develop one of my own" occurs in a video I am almost always compelled to subscribe, great stuff!
This video is pure gold. You deserve teacher of the year award.
A decade or more ago I built a inch/metric electronic gear box using an Animatics smart motor for my Hardinge toolroom lathe. With an external latch chip I was able to scan and read a set of thumb-wheel switches with the motor and also read the encoder with the motor. The Animatic control language was used. They a ratio encoder following function which is ideal for this application. About 40 lines of code and an hour of programming completed the job. I had no prior Smartmotor experience. Most of the code involved reading the switches. The gear box part was 2 or 3 lines. Numbers withing a practical range for inches were interpreted as inches outside of that were mm. You just set the thread pitch in the switches and it worked flawlessly. I used a large motor but still needed a 3:1 planetary to get enough torque. Don't underestimate the leadscrew torque. The issue is initial acceleration. You want instant sync and tight control. The Hardinge HLV carriage probably exceeds 100 lbs. Using an open loop (no encoder) stepper will be trouble. The only way to avoid closed loop control of the stepper is to over kill the motor size and torque. You want a high drive voltage too, 48V or more.
You VASTLY over estimate the processor chip required by many orders of magnitude. I have been doing embedded processor design in assembly for 40 years. Any 8 bit processor will do it. The code should be a few dozen lines in assembly. You don't need or want floating point. You will get no benefit from it whatsoever. Your data source, the encoder is an integer device, your output device, the stepper is an integer device too. You could calculate to 198 digits if you want but the answer is still a low resolution integer. A good programmer should write the app in a page of code in a hour or less. Think carefully about encoder resolution and motor resolution. It could make the code easy or difficult. You want use the quadrature from the encoder to drive the motor bi-directionaly so you can backup the carriage in sync. Years ago I built and still use an electronic gear hobber which does essentially the same thing with and 8 bit MPU. I took the Smartmotor off the lathe to use for something else and gave the lathe to an employee. I bought a new HLV with the inch/metric gear box so I didn't need the electronic box. The motor is on another device we use almost every day. Smart motors are convenient but expensive.
I enjoy your videos. Best of luck.
John Youngquist
I thought I was the only one left still loving assembly code!! I agree about using integer math - even double precision integer is preferable to fp if you need the accuracy. I think he did make a great choice of platform though. It is a real motor control platform with lots of support that can be leveraged over a broad application area (I've been looking at it for an EV motor control drive board). At $30 for the hardware, you can afford to "throw out" a lot of functionality, but it also provides a path for growth for more sophisticated control projects. Since software is the real development bottleneck, having a long-term, stable hardware platform like this makes a lot of sense - to me anyway.
@@blackmanops3749 The TI chip is a fine motor control and is widely used as such. A $30 demo board is certainly a magnificent value among countless similar devices available to the hobbyist. It might have larger startup inertia compared to hobby oriented boards. If that what you want to play with - have at it!
But there is not much that can be done with with an open loop stepper. The application is pulses in pulses out. Most of what the TI chip is good at goes to waste. Home building a closed loop stepper or a closed loop servo is not worth the time when you can buy a Smart Motor on ebay for a few hundred bucks. It has an encoder ratio follower function that implements this lead screw drive system in a couple of lines of code. Once you have the encoder and motor mounted you can cut your first thread in 20 minutes.
@@johnyoungquist6540 I didn't appreciate what the SmartMotor was. Thanks for sharing. And my understanding (or assumption) was that he was going to program a closed loop PI(D) algorithm.
Amen! I did this type of stuff with 1MHz 6502 processors. I used it to control a weaving machine where the spindle looping the thread needed "gearing" to the pulley drawing the thread through, setting the weave pitch. I had a loop running at 20K/sec both driving the weave and pulling motors. Loop was sufficiently fast that it was guaranteed never to be more then 1 step in one pass, so there was no need for a "present" and "desired" position. The calculation simply calculated the proper stepper drive (directly in I and Q, there were no motor controllers). Ratio was set in what I call "limited floating point" (a shift term and a mantissa), written in a few lines of assembly with a lookup table for the "barrel shifts". With those processors now running at 6MHz, this is easy. The secret to fast calculations is to use look-up tables.
Decoding an optical encoder is done the same way, reading its state so fast that you are guaranteed to never change more than 1 step in the quadrature sequence between reads. For the 4096 PPR and 2000RPM, rate is 8192000/60 = 136534/second. This could be easily done on Arduino IF you write in assembly and blow off the baggage.
The trouble with doing this with peripherals is you lose the real-time action, which you need to keep the lead screw in sync. While I think you will need more then "a few dozen lines of assembly code", not all that much more than that will be needed. (This is one of those tasks which MUST be written in "a few" lines of code in order to be fast enough!)
I also have another system that drives 2 small steppers rotating diffraction gratings up to 20,000 RPM. A laser beam passes through both, drawing "Spirograph-like" patterns. I microstep the 60 steps/turn motors in a loop 20k/sec. I also must control and limit acceleration to prevent losing sync. This is done on 6808 running at 8MHz.
Floating point maybe a better solution to maintain sufficient precision. While integer values could be enlarge to mitigate for rounding division results and ratios to integers, it will introduce error which will be cumulative.
I completely agree with your suggestion to use a servo in lieu of a stepper.
I didn't even know I needed an ELS. I came across this series in the hunt for ideas for an idea I have for my mill. I've watched many in this series in random order, ordered parts, and now to start the series again, but all of them, and in order. This is all so impressive and you've gained a new subscriber. Thank you!
I can see a lot of people wanting to use this!
My lathe is older and cheaper, no longer even made. Never had a set of change gears so I really need something like this
@@1crazypj Long as you math the gear ratios producing said gears is real easy and rather cheap as well. Your lathe is made by humans, so it can reproduced by humans and we are talking about just gearing options and producing gears, for witch you can make plank in your lathe and then make the teeth on local shop or by hand if you have motivation.
On my case i'm building my entirely DIY lathe since those cost arm and a leg around here in any reasonable size for hobbyist, that can work with large parts, so i need to make lead screw gearing from the ground up and this fits the bill pretty nicely.
@@Hellsong89 I think you miss the point. Lathe is very basic (3 speed, all hand cranked) doesn't have provision for fitting gears, just has a screw to feed carriage and all surfaces are angled ('draw' for casting).
It's probably a step up from a 'kit' lathe but not by much (no say on size or parts)
This would be a much cheaper option than buying or making gears plus fabricating all the additional parts to mount them on machine (which is something I have thought about.)
I was a motorcycle tech so could modify a motorcycle transmission to get 6 gears, clutch basket is removable from main gear so could also have a large reduction(4~5:1)
At various times I have considered making a lathe but time and material is usually a problem.
'The Concrete Lathe' can be scaled but you would have problems moving even a 4ft version so need a permanent place for it
@@Hellsong89 The cost of gears in the USA is prohibitive. The cost of this electronic system is not only cheaper, but will give you any thread, and any feed.
@@Hellsong89 Making a full set of proper change gears for a lathe would be quite an undertaking for the average hobbyist! I'd say that 90% of those who tinker never make a single gear. I'm building this ELS, with some modifications (''cuz I want a second axis) for a lathe that is all manual, no drive to the leadscrew at all.
I wish this processor was around 5 years ago. I took over a project to build a replacement stabilizer controller for a 60' motor yacht. It had 4 fins which were hydraulically driven using solenoids for control. The initial developer used variable resistor position sensors and two Arduino boards. It was a complete mess and simply didn't work. I was locked into the hardware already in place so I had to get it working as it was. I mostly succeeded, but trying to do that kind of stuff with an Arduino was torture. Using the TI board would have been a dream. Looking forward to binge watching this series. Btw, Quinn sent me.
I was directed here through a discussion on a mini lathe facebook site. Wow. It is really refreshing to see someone doing some pioneering practical application of this rather new tech on a hobby level. BRAVO. If you are wondering if there will be any interest I can do a prediction for you...YES. Not only are people going to want this in a kit form but I predict that the manufactures will be equipping new lathes and mills with this process.
Thank You for sharing this.
You're welcome. I've benefited immensely from the hobby community, and this is my chance to give something back.
Great work and a fine example of why this place (RUclips) is so darned addictive. I have lost too many days being mesmerized by so many great people sharing such amazing work. I still need to find a way to draw the line, shut it down, and go to the shop and creating some magic of my own... then I catch a glimpse of your irresistible thumbnail and the next thing I know is that I am incrementally more learned and 27:43 older.
JOHN YOUNGQUIST took me all the way back to a lecture hall in 1994 where the only thing keeping me awake was a monotone professor trying to drill through a 20 year old skull that everything CNC is (or was at the time) a game of integers, approximations, and code optimization. Draw an arbitrary straight line across a sheet of graph paper and then approximate it with the underlying squares and you find a very simple pattern emerge. Your motor steps become a function of the encoder pulse count scaled by your feed rate number (FRN). The "interpolator" was and still is the beating heart of all NC systems since MIT demonstrated the first 3-axis milling system in 1952 - decades ahead of microprocessors which we can't seem to live without anymore.
Please please please heed the sage words of MR. Richard Wells.
Suffering the abstraction of technology and sheer desire to make amazing things from these new and inexpensive resources, I find myself paying homage to the giants that paved the way for us all with whatever technologies their respective eras afforded them.
Thanks so much for sharing brother!
This is a cool idea. The problem you are gonna run into is position of Z axis to spindle position. This system will work great, but only once. You'll be able to cut one thread, but the second thread will not line up to the first one. Unless you reverse the spindle without disengaging the system. Which really isn't the way to go. You will have to get a Linear encoder and track Z position. Your understanding of programming is great, wish I was that inclined.
I don't think that is true.
You can keep track of both the spindle position and Z-axis position as long as you use the electronics to move the Z back to the starting point. This does take a bit of tinkering and extra software but on a manual lathe there is sometimes a dial attached to the lead screw and you then just manually engage the nut as soon as the dial is back at the correct position - I think it should not be too hard to make something similar with a bit of software.
I think what you are saying he needs a digital thread dial.
So, thought about this a little more. If this Only replaces the gear box, and you keep the old threading dial and leavers on slide. All this system would have to do is spin the Lead screw at the correct ratio to the spindle and keep them sync'd. You'd still thread the exact same way you do on a manual lathe. So yes this system would work well. I only recommend a servo over a stepper. Prove it would with a stepper cause they are cheap and it looks like you have one. Then upgrade to a servo.
This channel is awesome, I just left software development to go and work for my families metal Stampings company. This is a perfect blend of everything I’m into
A true Renaissance man that speaks mechanical and electrical with ease. Now subscribed. Well done.
Count me in. I've got an Atlas 6" that I changed gears on 40 years ago during my first week of ownership. Never thereafter. I've left the feed at the same speed (the slowest it will go) and never single-point threads.
I have no need for a control like this, but your ease of explanation has me considering purchasing a LaunchXL product and following along just to learn something new.
In a single word. WOW!! You are talking way over my head, but in a very easy to follow manner. On to the next videos. Thank you, for the great show, and how to.
What an awesome board!! Never in my wildest dreams could I have imagined this back in the late 1970s when I was writing WD assembler on the Alpha Micro!
Can't believe this series of videos is 2 years old and I've only just discovered your channel. So glad I did, even if I am late to the party.
Hi, Ill follow this with great interest with the aim of building one too. There is a group called the ELS group on Yahoo which uses a design which is now pretty dated but none the less is very successful and even incorporates electronic half nut control so that screw cutting can be automated. Somehow that older design manages with measuring one pulse per rev I believe. Your approach, using currently available technology and precision looks very promising. Good luck with developing this, I for one have been just itching to get rid of my change gears and plug in an ELS. I await developments in great anticipation.
This is exactly what I've been looking for. I definitely would buy a thru-hole board.
Impressed by the level of details and love the way you narrate the stuff. Lot to learn from you. Thanks for all your videos!
Looking forward to this. Back in college in the 60s, we tried to do something similar with the archaic electronics of the day, but we did away with the lead screw altogether, and replaced it with a cable system to eliminate backlash. It didn't work too well, but we had fun. Good luck.
Three of my hobbies are electronics, programming, and machining. I've pondered doing this exact project many times, but haven't got around to actually doing it yet. I'm 100% with you on all your reasoning so far. I'll definitely be keeping an eye on this project.
I say go with surface mount, but keep it in the neighborhood of 0805 for those of us without microscopes.
My job was EE.. Now software engineering. Had programming as a hobby since a young age, wanted to learn electronics, school and experience helped with that, and I want to get into machining. It's the next step..... Seems we're all in good company here, James seems to line up with me pretty well too on these interests.
Looked at a huge Sharp 1764 lathe today. Loads of threading options and I believe no change gears for any of it. Had some wear in the ways near the chuck (normal), but I couldn't measure it since there was no chuck for the tailstock (though maybe could've used my magnet mount for a less rigid solution). The center for the tailstock was a taper size or two too big... Stop bar was missing a mount, cross slide felt crunchy (backlash wasn't bad on any of these). Headstock was low on oil per the sightglass, carriage had oil in it.
Anyway, cool machine, good price if I thought I could handle all those problems. Couldn't engage the halfnut for some reason... But if I can get all the threading options I want with this, a relatively straightforward project (Already have a 3d printer too), then getting a grizzly similar to his would be a similar pricepoint, and less space. Didn't need to turn heavy stuff or have a huge 109in long machine taking up space anyway. Would've had to get a VFD for the 7.5 horse 3 phase motor too. Couldn't slide the compound in and out either but I'm sure there was a nut somewhere (maybe on the tool stock) I needed to loosen to allow it to move. Also would've been a bear to move (But I had a plan).
So you got not skeptical in the first few minutes? There are RTOS Linux Kernels, Raspberry can run bare-metal. The choice of 4096 impulses per revolution is .... debatable (0.09 degrees resolution ... is this a joke?) and many of those (denied) platforms have hardware support for exactly those encoders. Oh and NONE of the presented platforms has an industry-level-certification who wouldn't make your insurance-company gratefully say:"Okay, we are out. You pay yourself, honey!" in the case of an accident (Not everywhere in the world are that horrible health-care conditions like in the US, where my last point doesn't make sense. you pay in every case). Also: If it is of importance, that the spindle and the lead-screw are synchronized (which it is, here in this application), we use an ANGLE ENCODER[1] (like Heidenhain RCN or ROC series). That is basic engineers knowledge, which seems to be not present here. But there is nothing wrong and no problem in fixing that, as version 1 is despite some problems an impressive project for a hobbyist.
[1] Most of the hoops he had to jump through in the "RealTime Control" segment are unnecessary with the appropriate design setup. Oh ... and you get a "free lunch": Safety during a tool-crash and second: you just move on with your work after a power failure/emergency stop ... like nothing happened. Which is impossible(or impossible complicated) with the incremental quadrature encoder.
1.25 years later and you've come a long way with this. Very well done!
My group at work is converting a gear hobber machine tool to electronic gearing, using Yaskawa servo motors, Yaskawa drives and a Galil motion controller. We're essentially replacing over a dozen change gears and running purely off of servos for timing.
Much like threading, spindle (hobber, in our case) position is critical so the encoder reads the hobber shaft and varies the gear workpiece accordingly and as programmed.
In a word, electronic leadscrews is closely related to CNC and it may be worth the (possibly reasonable) expense to just go with a CNC retrofit on this lathe using the Centroid Acorn controller with Centriod drives and servos. Retrofits for this class of machinery (like small lathes / mills) have never been more affordable.
All the same, this is a very cool project.
This should be a good series. Looking forward to it.
That's a fantastic project.........I just saw another article about an ELS when I came across this one and it occurred to me that my micro lathe, that doesn't have any form of screwcutting capability, could come into the 21st century with an ELS set-up......I've wanted to do a lot of small screw cutting on it that is too fiddly on my Colchester Bantam, lathe and this solution would be totally the answer apart from not having to cut a load of gears and design a half nut system like a normal centre lathe......being a micro lathe the saddle is driven by the leadscrew for feeding by a handle on the end.......the project is over 2 years old so I'll be watching the progress on the next video.
Wonderful job explaining the process from start to finish. You have that gift.
Looks like I'm 8 months late to the party, but just wanted to say this is a really cool project. Going off to the rest of the channel to see how it's progressed.
I have the GO752G lathe and I am a beginner user. I found you via Blondihacks. This project is extremely exciting and I really thank you for developing it. What is really cool about your channel is that we have the same basic lathe. Awesome! I'm glad to see your ideas. Your teaching is top notch.
Just stumbled upon your channel. 5 minutes into the video and already very impressed by how clear and calm you explain things. Nice work!
Great video - subscribed! I'm very interested in a kit version (preferably using non-smd components). Keep rocking.
I am a software developer specializing in c/c++ particularly in the linux hardware/device driver space. All of those are PLENTY fast do to the calculations that you need. I would opt for the 32bit esp32 240mhz dual core because of cost. Trust me, with proper coding it is plenty fast.
Great! Feel free to implement it. I'm sure a lot of people would find it useful.
I really like your presentation style so easy to follow without being completely devoid of useful information. great video thanks for making it!
Been thinking of a similar idea to do gear hobbing on the mill. Use the electronic gearbox on an indexer to control work piece rotation while the spindle rotates the hob. I look forward to seeing more.
I recently put a simple DC gearmotor on my 100-yr old Dalton lathe. It works great, but it’s open loop. I love your idea(s). Past experience warns that backlash and inertia can really mess things up. Keep both in mind as you go through the design process and you’ll succeed. I would certainly pay multiple hundreds dollars for your product, should you release it. Accolades to a brilliant guy who can do electro-mechanics!
This looks like a fascinating project! I'm seeing it late, but it looks like something I'll do. Thank you.
I’m also interested in a kit. Have tried making one myself but you clearly are doing a better job
Among "Tesla generator" crap, blasting background music and double-speed recordings this video is a delight. Besides it is an excellent explanation and what you say makes a lot of sense. Thanks!
I watch the videos I order all the stuff, today I just finished the electronic leadscrew works great, it’s one of the best projects that you can do to your lathe with changing gears. Clough keeps make and improvements to the software . Also the lcd kit and control circuit that you have make is great.
Thank you very much Clough.
Interesting.
You're headed down the same path I went over 10 years ago. Back then I would have preferred to use one of the TI DSP processors but the ability to program and debug them was far more difficult than it is now. So instead I chose Microchip's 8 bit PIC. The E-Leadscrew group also wanted a price point that was affordable since the cost of CNC on a lathe is fixed regardless of the choice of an ELS or say MACH2/3. Power supplies, motors, couplers, belts, pulleys mounting and boxes all tend to cost the same and are the largest cost. Except of course your encoder E6B2-CWZ6C 1024P/R 0.5M which from Digikey lists at $614 Cdn. The Criteria for the E-Leadscrew group was the entire kit wasn't going to cost more than $200 which included a 55V 3A Stepper Motor Drive. Cheap stuff from China wasn't available at that time yet. So with initial price set at $200 as a through hole kit with the majority of parts surface mounted a single pulse per rev index sensor like MACH2/3 used was the only choice.
I still intend at some point updating my ELS to use a BeagleBone Black. With the two PRUs and quadrature encoder support plus of course a variety of screens it's ideal for an ELS. I've already run LinuxCNC in the MachineKit variant and just recently 3D printed an encoder wheel and 3 slotted sensor mount for it. Once of these days I'll get back to it but the problem is my current hardware does what it needs. The time for me to redevelop a new one just isn't there at the moment.
Looking forward to seeing the results.
Sorry. Rude of me. I'm using a youtube sign in that doesn't show my name. I also hadn't spotted the ebay link to the $25 version of the same encoder. That's a far more reasonable price. (and I have one on order) -- John Dammeyer -- www.autoartisans.com/ELS
See the links in the video description. I paid about $20 for the encoder.
I watched this on my TV this morning. I'm back to comment now. Everything was a delight for me; electronics, coding, metal lathe, well lit crystal clear video, excellent presentation, highly knowledgeable... It's no surprise I subscribed before the video even finished. Can't wait to see more details and progress on this amazing project.
Thank you for making this available. I've added it to my Harbor Freight 8 X 12 lathe. Totally transformed the machine.
Excellent presentation of a complicated subject. Really looking forward to seeing this come to life!
This is Awesome. I have been looking for this type of setup to drive my milling machine dividing head to cut course helical threads. Keen to see the development as I have no knowledge of the electronics.
I really enjoyed your video and your idea for a digitally controlled feed screw is outstanding. Your videography is excellent! I would like to make a few comments on your engineering assumptions. First let me say that I am not a machinist but I do enjoy many of the machinist RUclips channels. My profession is a Computer Software Engineer developing real-time software for military Electronic Warfare systems. In this domain processing at nanosecond times is a luxury; microseconds are an eternity. However, my favorite quote when I received specifications from a systems engineer was "OK, you measured it with a micrometer, then it will be marked with a grease pencil, and finally cut with an ax." In other words we usually over engineer systems when something much less rigorous will get the job done in much less time and expense.
Worrying about processing 4096 encoder samples/revolution attached to the spindle running at 2000 RPM is an example of over engineering. This requires your processor handle a new pulse every 7.3 microseconds. A three inch diameter part turning at 2000 RPM will move 3.14 tenths in 7.3 microseconds (not an insignificant number). However, it seems you have missed the fundamental system requirement for how fast the spindle speed must be and how fast the feed screw must move the carriage. Let's take an example of cutting a 10 TPI thread on a piece of stock. That means the spindle has to make 10 revolutions while the screw feed moves the carriage one inch. For a manual operation you probably don't want the feed to move faster than 2-3 seconds/inch. That equates to a spindle speed of 200 RPM, not 2000. And if your feed screw is 10 TPI it also must rotate at 200 RPM. The cutter speed of a 3 inch part running at 200 RPM is 157 SFM which still may be too fast for your material. All of these numbers vary slightly with your thread pitch, material and desired speed but not by a factor of 10. If your spindle speed is 200 RPM the part will only move 31 millionths in 7.3 microseconds with a cutter speed of 157 SFM. So if your spindle speed has to be in the region of 200 RPM you now have 73 microseconds to process all of the pulses coming from the encoder.
In a purely digital system controlled only by digital commands, if we are machining a 10 TPI thread on 3 inch material we would first move the material over the cutter 31 millionths of an inch in the Y direction (spindle rotation), then we would move it 24 millionths of an inch in the X direction (screw feed). This would result in a staggered (or pixelated) tool path that for all practical purposes would not be visible and would not affect the functionality (just like your 3D printer). However, we are not dealing with a digital system here, but a mechanical system with lots of mass and inertia. This means that once we get things started on a path they are not going to deviate from that path very much on their own if we do not provide a new input. We now have an analog system with the X and Y components moving on their own. So the question is how often do we need to provide a new digital "push" to the system to keep it moving at the correct rate. This will only be a function of the torque required to drive the feed screw, assuming the spindle motor has more than enough torque and inertia. And this torque will vary with the feed rate and depth of cut. The required torque can only be derived empirically through testing. Even though I cannot perform further analysis I would expect the refresh rate for the step motor to be in the millisecond range, not microseconds.
One other comment: I do not feel there is any need for the feedback loop in your concept drawing. First, as far as I can tell the current position register for the motor only reflects the previous count from the encoder. It does not reflect the actual position of the stepper motor (unless you can read the position from the motor). Insufficient torque from the stepper motor can cause its position to lag behind the desired encoder position but if you have no way of knowing this and if there is no way of increasing the torque of motor the feedback loop is irrelevant (torque control may be your biggest challenge). Second, you are not going to be randomly changing the direction of the feed while you are turning. You first have to stop the feed and then reverse the feed to reset the tool holder to the desired position for the next pass (no feedback loop required). But if you stop and reverse the feed the spindle position of the thread and the tip of the tool are no longer correlated. You would have to keep track of the pulses from the encoder and then start the feed screw again in the forward direction when the new encoder count is modulo 4096, or some number just before so you have time for the stepper motor to get up to speed. You could just push a button on your keypad and have the software automatically start the feed screw when it is in synch with the spindle. I think this might work and your software could handle this task easily. I am not familiar with the Husky lathe but if it has a split nut then there is no reason to ever change the direction of the feed screw (no feedback loop required). However, your software would still have to calculate the time to re-engage the split nut so your next pass of the thread will start at the correct time. This would require some pretty user friendly display software to get you ready to engage the split nut and signal the operator at the precise time (signal to engage some milliseconds before to account for human response time)
.
Thanks for the opportunity to express my thoughts. I have subscribed and I am looking forward to your successful completion of this project. Keep up the good work!
It's such a rare and exquisite pleasure to watch someone who is not only aware that the Raspberry Pi is absolutely not the default answer to life the universe and everything, but also knows exactly why. Very nicely done! Although I have to admit (don't laugh!) that my desktop mini mill is run by GRBL on an Arduino Uno. Well, barely. But quite adequately nonetheless... ;)
From the start, this was a very cool idea. I appreciate the concise yet thorough explanations of why you made the engineering decisions you did, for example the discussion of chosen microcontroller for the system. That TI board sounds like a very cool piece of kit, not just for this application!
I am excited to see this project. I can’t wait to see the finished result. Even gearbox lathes can benefit from this as their design and build are crude. I will watch your project with great interest! Thank you for sharing!
Thanks!
I plan to add an electric drive for the lead screw on my SB 10K, mostly to cut down on gear train noise when feeding. Looks like a real interesting project! I hope you continue with it, especially with non-sm components. Thanks for your many interesting videos!
The way you explained why the TI one is the best for your purpose is really nice.
I found someone doing that electronic leadscrew on Arduino Mega I'm very curious what James would say about that ;)
This project is under this link: ruclips.net/video/fLjJsTR2b5o/видео.html
You'll note in that video that he's constantly struggling with the max RPM that the system can handle. While this will always be a limitation of any system, I'm hoping that a much faster microcontroller can raise this limit to a much more comfortable level. My goal is to be terrified of the feed rate before the microcontroller runs out of performance. He's also generating several pulses per encoder count. That's the main reason I went with a 4096 (quadrature) count encoder--to try to smooth this out. Time will tell if these were good choices or if I will need to adjust.
@@Clough42 Thanks for explanations James, looking forward for next part of Your project :)
Count me in for a kit. I have an old Atlas 10-inch lathe. I look forward to watching your progress. You are an excellent instructor. Thanks.
This is a great idea! The only thing that would keep me from doing a project like this might be not having a lath at present. The other concerns might be slop in the equipment, and line voltage variance. I will be following your progress on this wonderful project. Thanks Jan.
This is an awesome project. I am looking forward to the next installment in this series!
Thanks! So am I. :)
Awesome! A kit would be fantastic. I have a very old South Bend 504 (Precursor to the 9") and the gear train is a work of art, but a pain in the ass!
Great project. blue pill (stm32) or esp32 seem a bit more inexpensive and common. they both have plenty of compute HP to crunch the numbers. blue pill also has hardware decoding. In any case the acceleration profile needs to be tweakable based on your stepper and stepper driver. You'll also need to add a parameter for backlash since most lathes will have pretty massive backlash that will ruin your threads if you use the motor to drive back to your start cutting position.
I've gotta deal with that backlash manual threading with metric anyway. I back out of the cut far enough before reversing.
Thankfully RUclips popped this up on my feed. Super nice work and excellent description and presentation. I have so much to learn, so I immediately subscribed and look forward to exploring all you have uploaded. Thank you for taking the time to record and share what’s happening in your shop. All the best..... Joel.
I have done this very thing. I also have an encoder on the lead screw to be positive that IF there is any steps skipped, it knows and makes up for it.
I watched a much later episode and was motivated (by curiosity) to find this. I'm now hooked - shame about all those other things I need to do.
Great video. Thanks. I have 2 suggestions for you. First I would recommend an additional encoder to be attached to the leadscrew as feedback control for the stepper motor in case it misses steps. Second I would not try to do maths on the fly but instead generate a lookup table when you enter the desired thread pitch on the keypad. The lookup table would match the stepper position to the encoder count. The lookup table should be calculated using integer arithmetic and not real numbers, so you don’t lose precision.
About 5 years ago, I took on this challenge as well. As I was frustrated with changing belts on my Wabeco D6000 lathe, I decided to see if there was a simple way to build an Arduino based Electronic Lead Screw (ELS). After a bit of experimenting I succeeded in achieving what I wanted. The system uses an Arduino Uno, an inexpensive quadrature decode chip and a LCD display. The circuitry is very simple and inexpensive. It performs three functions: 1) standard turning with three different turning pitches, 2) Imperial threading and 3) Metric threading. The different operations are selected with a simple rotary switch and built-in push button. Unlike comments made in this video, I had no difficulty using an Arduino Uno for this operation even with the lathe running at 3000 RPM. The main difference is that I used a 1024 step encoder on the spindle shaft which substantially reduces the speed needed for encoding and floating point operations. I have been using this successfully for about 5 years and my threads are accurate against a thread gauge. It has never failed me. I was urged by a friend to publish my experience which I did in two articles published in "Digital Machinist" in 2016 and 2017. The references for the first article which explains in detail how to build this to do Imperial threads for a D6000 Wabeco. This article can be found in: Digital Machinist, Volume 11, No 4, pages 6-19, 2016. The second article expands of the first article to explain how to extend threading to include metric threads and is found in Digital Machinist Volume 12, No. 3 pages 14-25, 2017. This second article explains how it can be applied to other lathes. The code for the ELS can be found at github.com/dbplewes/PELS3 along with other instructions for its completion.
This is a really good explainer on hardware selection for a very specific use case. Once you've mastered blinking an LED and move into real-time control, details about your MCU/CPU and board make a real difference. Speed is important but so is numerical accuracy, priority/latency (issues with RTOS and multiprocessing), and number/type of ports and peripherals. Conversely, having HDMI and WiFi may not be that useful if your software can't read and process position info fast enough to control the lead screw. I'm still amazed at the variety of affordable options available today; how long ago was it that it would have cost $1500 just to get started with a project like this? I'll be binge-watching this series to get up to speed...
I'm only scratching the surface of what this DSP chip can do. It's an amazing device, and in 100K volumes, they're something like $4.
Looking forward to seeing how this works! I would be a great addition to any home shop lathe providing the price point is good.
Thanks!
Sweet talk about TI F280049C. Brings 30 old memories when I worked on a Kalman filter on TI2100 👍👍👍
I am new to the machining hobby, and electronics is quickly becoming something that I feel I will need to tackle to complete some of my projects. My old South Bend's are all C models and upgrading them to A models is foolishly expensive that it was always out of my reach. I will be building two of these, and THANK YOU for covering everything from the most basic concept to the advanced. I can not say I understand everything once you are sharing, but I feel that I understand enough to give it a try! I have no words to explain how amazed I am with all of the work you are doing and willing to share with luddites like me.
I like this project, would be a very good addition to my small hobbymat lathe that lacks any form of gearbox except the changewheels. It could also go both ways, which would be a very nice addon. Certainly going to follow this project ! Thumbs up
Most interesting post. I'm looking forward to follow up posts. Thanks for sharing and keep up your great work!
Great vid. Thanks for the time you have put into sharing this. A friend of mine directed me to watch this as he is looking for this solution for his home shop. I'll be watching the other videos you have done on it.
The stm32f411 disco board also very good for this job. I programmed based on clough42 software. But i use tft instead of 7 segment display and big switches and one encoder pushbutton.
Infinitely variable gearbox. Wow! I don't need one right now, but I want to build one. Steppers are really good for low speed high torque applications like this. Good choice.
Again James, another good idea. My clone to a Grizzly G4000 has issues with the gears kicking loose under load. The adjustable arm with the large thread gears really needs some spring tension on it. I could see this getting rid of a lot of gear noise. On my lathe, to make reverse threads, I need to do a mod to add in a change gear, to change spindle direction from lead screw. This mod should have that capability,on its own. I could see a possibility of better surface finishes, by removing a lot of gears and getting a smoother feed rate. With this modification, the only variable to jerky feed rate, should be the gears in my apron.
Watching all of these to see the possibilities now.
Just found your channel because of this particular project and subscribed. I would buy a pre-made board in a heart beat. I have a mini lathe which is constantly being modded, but I think a lot of people with lathes which have finicky gear changing would be interested in a product like this. If you don't go ahead with any of it, it's great to see that the parts list and FW is available as I would not be opposed to making it out of your proto parts, either. No matter what, thanks so much for sharing all this:-)
A couple thoughts.
1) If your end product will be the full TI dev board, there's already quite a bit of real estate there so there's not much need to shrink things down on your PCB daughter board. So through-hole might be a good way to go not only so it's easy for others to build, but also because you have ample space for components anyway.
2) I've had good experiences with servo motors lately and if you were me, you'd strongly consider going that route instead of steppers. They spin faster with plenty of torque (pick appropriate size of course) and won't skip steps. I'm not sure what kind of PID might be necessary for synchronizing things (over my head), but since a servo drive usually has its own PID tuning in it as par for the course, it might simplify the firmware end of things. You can still use step/direction protocol with servos or steppers so your TI firmware wouldn't need anything different I don't think. I really do like the closed loop by far over a stepper any day, and the smooth, quiet operation is luxurious.
Also, the cost difference between servo motors and steppers used to be quite a bit more than it is these days I think and there are some fine servo/driver combos you can get for a pretty decent price. For all the time spent developing the project, the difference in price would be meaningless and no good reason to "cheap out" and use steppers if a much better alternative is right there.
3) Whether going with servo or stepper, since you're going with a significantly slower ratio between spindle and lead screw, I'd go with an appropriate small worm and worm gear to drive the lead screw. It would be driven at 90° to the lead screw axis so could tuck the motor inside the cover nicely for a more tidy installation. Also, lots of torque.
4) Be sure to pick encoders with a pulse channel. Otherwise I don't think there would be a way to synchronize successive passes when threading. This would necessitate a pulse on both the spindle and the lead screw, which makes for yet another argument in favor of servo motor since the stepper will require some kind of encoder anyway. Just make sure the servo motor comes with an encoder that has a pulse channel.
edit to add: you know, the more I think on this, it seems like by the time you work out everything it's gonna take to get an electronic lead screw to work, it seems like it would be more effort than just retrofitting the other axis and have a full CNC machine there. The thing I LIKE about it though is a fully integrated black box on the lathe that just works and needs no boot time or PC attached. Just have to weigh it out.
The timing between the lead screw and spindle for successive threading cuts so they hit the same V is what makes it tricky to my brain. The controller kind of needs to know the ACTUAL LOCATION of the carriage along the bed to be synchronized properly, not just to move at the proper speed. Once you get to threading metric with an inch leadscrew and rotating things at the proper ratios, there's more to it than just engaging the half nut. Hmmm.
One possible solution is to replace your carriage wheel mechanism with an encoder so the position of the carriage is in constant control of your electronics, thus preserving position. Seems like this adds a couple more layers of complexity maybe, but again, over my head anyway.
Great work and thanks for sharing. I really like your idea of through hole boards for kit development. The video is fun and informative.
Outstanding.... this is something I have been looking for a long time. I have a CNC machine sitting in the garage for over 15 years that looses steps and counts. I look forward to what you do in the future.
Looking forward to this prototype development series. It will be interesting to see how travel limits and error handling will be dealt with.
What a great project! I have that same grizzly lathe and hate changing those fiddly gears takes to much time. I'm going to follow this for sure with someone like you to follow i could probably make it work.
I'm late at watching this video. Outstanding project. As soon as I have some time, I 'll watch the whole series 😃
I have been thinking about this for awhile for an old South Bend C lathe and this is SO helpful. Thank you!!!!
Thank you for working this out I appreciate it and I want to make mine the same way
Excellent breakdown of the how and why. Looking forward to the rest of the project.
Hiya, I'm in the same place as you, looked around, not found what I wanted, until I found you. I'm with you on this completely, I have the 700x290 version of the Chinesium lathe, so a load more blasted gears to fart about with. I 'can' do SM but I'd prefer regular discrete comps (getting old, so eyesight is limiting my SM abilities). Many thanks for your efforts, I am with you totally and very much onboard. Cheers, Martin.
Thank you for doing this video. The idea behind using an encoder and mcu to drive the gear ratios is awesome! I've been considering getting a similar Grisly combo and the constant changing of gears was holding me back. This is a great way to solve for that problem. I also agree with a few responses below that you are overestimating the processing power needed for driving a stepper motor using a standalone driver ic.
Very col. I've been considering an electronic lead screw for my 7X10 mini lathe, so finding this is a godsend. Already I've learned lots of stuff from your very first video of this series, as well as from the comments of other viewers. I imagine there are lots of people like me who would be very interested in the board you mentioned, but only if it were through hole, not SMD. Last time I used SMD was when I took a HeathKit SMD copurse, and it definitely wasn't the easiest soldering project I've ever done, and I hold a 3M certification from a Navy soldering school (of course that school was over 30 years ago so I may have lost a few tricks by this time...) I also plan to use a step motor to add power cross feed to my mini lathe, as you may know most of those dinky little lathes don't have power cross feed, which really bugs me (and don't get me started about that miniscule through hole!).
This is a very good lesson in computer science. Your manner of speaking is similar to Don Jones, he's the Powershell master.
I would definitely like a through hole kit. Been wanting to do this to my old Atlas for years. Subscribed. Thanks!
This is FANTASTIC!!! I am following this closely, as I would love to implement your design on my 1965 Logan 14x40. Great idea, great presentation!!
Excellent! I've been putting off my project to do the same to my old Atlas lathe for ages so this is just what I need.
I certainly would be interested in this project. I vote for through hole. Can't wait for the next video.
Cheers
Willy
Thank you for sharing this. I have wanted to do exactly this for a long time but knew it was over my head to do. Please keep us informed as you progress.
I have been wanting something like this for years. I have a CNC converted 1022 but I really want something to to electronic threading on a bigger lathe with out going full cnc. Thanks for doing this!!!
some ideas : the controller might wanna work on a prediction algorithm where you calculate the position requested to the stepper depending on the position of the spindle at the moment in the future when the stepper would actually finish executing this request, this would dramatically improve your precision and surpass the reactivity limitation of the setup. The spindle can't change speed instantly that's why you can benefit from knowing this. Instead of following you would be tracking ahead bitwise but in reality be on target.
For screw-cutting, a fixed delay is not an issue. The start point is arbitrary (when you engage the feed drive) so the start point of the thread on the periphery is random. The feed being slightly behind is swallowed within this.
I have a love/hate relationship with clough42. I love the stuff he does, like, i 100% NEED this on my lathe, this is legitimately amazing. But i also hate how dumb i feel when i realize how much smarter he is than i'll ever be. Anyway, guess im off to order some parts...
I have been happily using my Clough42 control for several weeks. I've tweaked things a bit, and I've actually added threading and feeds to a lathe/mill combo that originally only had a manual leadscrew and no gearing whatsoever. It doesn't even have a half-nut, so all threads involve reversing. I've practiced making internal/external threads, and "picking up" threads for a deeper cut, etc. No noticeable difference from my geared lathe! I've also "temped up" a second axis, and it looks as if the board can handle it. Gotta do two things: slow the lathe down for threading, ~650 RPM is minimum, I may make a belt and pully "back gear" setup, because the high speed takes a while to wind down, and I gotta stop crashing because I did a stupid with my code (only on the two-axis thingy). The lathe has a combo compound/vise, with only enough travel to barely cut an MT1 taper, and I want to make longer tapers. ETA ... _electronic taper attachment._ I do need to make it fail-safe, so that if one servo misses a beat it moves the other in a way to minimize turning work into waste and carbide into noise and powder.
Huge thanks to James Clough; I had planned on this project, and was going in another direction before I found his video series.
I've been thinking about a taper attachment for this lathe. I think I want to do a traditional mechanical setup, but electronic is tempting. I'm worried that the backlash will be a big problem, though, feeding away from the cut. I guess it's always possible to just cut the opposite direction so it's always feeding in.
Yep, I was planning to cut only one way, pull back, return, and cut the same way, just as if threading. Kind of a pain, but I don't trust any backlash compensation to be quite accurate enough. I'll post a video if I get it working reliably.
Excellent presentation and all the important bits covered well :) Especially explaining why the TI chip is suitable for this job! Not many people explain that bit ;)
I love your project and believe that their are many like myself who would be interested in installing something like this on their lathe.
Please consider using a servo motor in lieu of a stepper. It will avoid position issues inherent with stepper motors and there are readily available units better suited for installation on a lathe.
I'll definitely be building one. I'd thought of making one for my ancient Atlas TH-54, but I'd rather make chips than write software & design PCBs at this point. Will be binge-watching the rest of the series in the next hours/days. :) Thanks for another good one!
Interesting idea. I would recommend adding an encoder on lead screw to get feed back as well as to possibly compensate any missed step or time lag.
This is fantastic! I have two lathes. The geared head 12" Logan has a quick change gear box with all the range I'll ever need. The 10" belt drive Logan is a great lathe but it was built as a production turret lathe, so it doesn't have a QCGB. I've swapped change gears out more times than I care to remember but once I got the bigger lathe I gave up and left it at the slowest speed possible with the available gears, and that's still too fast for a great surface finish in most situations. I've thought about just attaching a variable speed gear motor (with a clutch) on the tailstock end of the leadscrew and just use that for power feed, but your solution is immensely more elegant, versatile, and really not that much more work. Definitely interested in the board you described.
This is very interesting, i have old soviet lathe with broken gearbox, something like this would be super handy to have. And im in for PCBs as well!
I have considered doing a CNC lathe in the past like I have with my CNC mills but with a lathe it's much more manual friendly then a mill IMO. I did however consider a way to benefit from the lathes ability to "change gears" electronically to be superior and often wondered why it was not found on todays lathes as it seems much easier for some chinese lathe manufactuer to include vs cutting a ton of gears and designing a banjo/reverse etc. Glad to see someone following through on this.