Lathe Electronic Leadscrew Part 2: Gear Ratio Calculations

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 322

  • @arduinoversusevil2025
    @arduinoversusevil2025 5 лет назад +122

    Oh man this is a really BIG project. I'm looking forward to learning how you'll overcome the unforeseen. Like how to minimize glitches on your dev board? Motor noise, etc...

    • @Clough42
      @Clough42  5 лет назад +35

      Hey, thanks for stopping by! Prior planning and good engineering practice go a long way toward reducing risk, but something always goes sideways. Always. When it does, you'll see it here, and then we'll learn and adapt.

    • @EdAgers110
      @EdAgers110 5 лет назад +2

      Clough42 Murphy’s Law: If anything can go wrong, it will go wrong! ;)

    • @robsciuk729
      @robsciuk729 5 лет назад +6

      True, you don't want to be dropping steps in a thread cutting operation, but this is a VERY cool project, and solves the problem of cheap shit mini lathes shipping with plastic gears problem ;-)

    • @jrkorman
      @jrkorman 5 лет назад +3

      @@EdAgers110 And then remembering "O'Toole's Commentary on Murphy's Law : Murphy was an Optimist."
      This looks very interesting and something I can use also! And having written software on and off for 30 years...what can go wrong? Ok, then what? And then after that happens? . . .

    • @sblack48
      @sblack48 5 лет назад

      Ya but don't you think this video needs more swearing?

  • @nccyr1
    @nccyr1 Год назад +1

    It is still generating great interest 3 yrs later!!
    Well done and thank you!

  • @CyrilKemalov
    @CyrilKemalov 5 лет назад +30

    The depth of understanding the problem you are demonstrating is astonishing. Can't wait to see more

  • @minskmade
    @minskmade 5 лет назад +41

    i think this blew a capacitor in my brain. great vid. super exciting.

  • @davidandrews8566
    @davidandrews8566 2 месяца назад

    I have watched this video several times since it was first posted. It taught me so much. I have to say it is my favourite of the whole project. Thankyou.

  • @gcewing
    @gcewing 5 лет назад +11

    There are ways to do this kind of thing using only integer addition and subtraction, which should be comparable in speed to the floating point while giving results that don't drift at all. Check out the integer version of Bresenham's algorithm. It's usually presented as a way of drawing lines in computer graphics, but it's essentially the same problem.

    • @Tensquaremetreworkshop
      @Tensquaremetreworkshop Год назад

      Exactly what I thought! Having designed a plotter many years ago (Z80...) I discovered this algorithm. Widely use in CNC machines.

  • @traviscalvin431
    @traviscalvin431 5 лет назад +3

    This project combines many of my favorite hobbies. Microcontrollers, steppers, encoders, machining and hopefully a little 3D printing.

    • @Clough42
      @Clough42  5 лет назад +1

      Of course. How about a keypad with flexible 3D-printed buttons?

  • @yanwo2359
    @yanwo2359 5 лет назад +11

    Your explanation and demonstration of dimensional analysis was excellent! I have long appreciated the value of multiplying by one. Entire video was excellent in all respects. (And thanks VERY much for no "music" under your narration.)

    • @jrkorman
      @jrkorman 5 лет назад

      That was our first week of High School Physics! And significant digits also!

  • @troglokev
    @troglokev 4 года назад +6

    How about this:
    Write your ratio in the form R = I + N/D , such that 0 0
    {
    Output I + 1 steps
    E = E - D
    }
    else
    {
    Output I steps
    }
    E = E + N
    Next count
    }
    All integer arithmetic, with only addition and subtraction in the main loop. It’s a variation on Bresenham’s algorithm, which is well known in graphics.

    • @dieSpinnt
      @dieSpinnt Год назад

      Finally, someone who understands this problem, thanks!:)
      And remember the granularity of the encoder is 0.09 degrees, which is way over-designed! There is no floating point needed, because many MCUs have exactly for those pwm/dividing/motor control applications specialized hardware counters. Also, if you have expertise with such machines (... in REALITY) and the design of them you would've chosen an ANGLE ENCODER (that grants synchronicity, BY DESIGN which is a no-brainer for the PROBLEM we want to solve here: proportional synchronicity) which renders those botched mathematical pull-ups superfluous, anyways.
      Great project, but in hindsight? It hurts, its sad, because it was doomed (a botch) from the beginning.

    • @troglokev
      @troglokev Год назад +1

      @@dieSpinnt the advantage of my approach here is that it will be exact for any rational number to within one pulse. Threading, by its nature, uses integer ratios (even for metric/imperial conversions).
      With an ELS, you COULD, conceivably, cut a non rational thread pitch, that would be incompatible with anything cut using a lead screw and gears, but who would be mad enough to do that (other than This Old Tony)?

    • @danmenes3143
      @danmenes3143 6 месяцев назад

      I know this is years old, but I was screaming this at the screen. I didn't get there from graphics, but from EE. James is building a phase-locked loop, and this is how you construct a phase locked loop that can generate a frequency that is locked to your reference signal times any arbitrary rational factor.

    • @troglokev
      @troglokev 6 месяцев назад +1

      @@danmenes3143 you and me both. I’ve had this argument with any number of junior SW engineers who were wondering why their floating point implementation was drifting off the specified endpoint.
      Bresenham would certainly have known of analog PLLs in 1962, and may have found inspiration there.

  • @opendstudio7141
    @opendstudio7141 5 лет назад +13

    This might be a great article to submit to Nuts & Volts and or Servo magazine, maybe both! This video did answer my questions regarding differences in lead screws and inch/metric translations. Thanks for the intensely interesting-informative content and detailed explanations.

  • @simonconvey9645
    @simonconvey9645 5 лет назад +5

    A very surprising result regarding integer vs. floating point. I've thought about doing this for ages, but dreaded doing all the fiddly quadrature decoding in ardunio. I really didn't know that there were microcontrollers out there that did this......

  • @Barrysworkshop
    @Barrysworkshop 5 лет назад +12

    Nice explanation. You identified the issue and built it up in a very logical way. I remember being taught this by a physics teacher, and it's helped me continuously since then. Particularly useful when you have more than a couple of unit conversions to do.
    FWIW, I tried to explain this to my kid in jr. high recently, and it's harder to teach than it is to do, once you 'get' it. So I appreciate the effort that it took to put this together.

    • @ghillieinthemist593
      @ghillieinthemist593 5 лет назад

      the biggest roadblock i have seen( and experienced) is that most of the time it is taught using "simple" conversions. when you already know the conversion rate, DA is easy enough as Input # X or / by Conversion Rate = Answer with a calculator, making many young people(and me at one point) think this is a waste of time, pointless, and needlessly complex for something so simple. only when you do more complex conversions like this, that you don't know the conversion rate is this actually useful. I personally think that teachers shouldn't teach that DA is used for converting, but teach that DA is useful for FINDING conversion rates.

    • @boldford
      @boldford 5 лет назад

      @Mr T One metre = 3 feet 3 and 3/8 inches less 5 thou.

  • @siberx4
    @siberx4 5 лет назад +1

    Fabulous walk-through and solid reasoning - this is real engineering in action. Integer divisions are definitely pretty slow on small microcontrollers, but floating point operations without a hardware floating-point unit are much worse! The fact that you have hardware floating point in that controller definitely tips the scales toward using floating-point numbers, but for anybody else looking to implement a similar solution in another microcontroller that lacks hardware floating-point operations, definitely check the docs for your specific chip (they usually document cycle counts for various operations) or run some simulations since the integer version will almost certainly be faster in that case.

    • @mrlazda
      @mrlazda 5 лет назад

      In most microcontrollers every integer operation is faster than floating point operations even with FPU, but here is problem (if i remember correctly) microcontroller he picked do not have hardware integer division (or multiplication, common in 8 bit microcontrollers but most 32 bit microcontrollers have hardware implementated that instructions), and for most microcontrollers for simple calclations like this (where you have some oponents as integers) is faster doing float point calculations not using FPU (conversion from integer to float point take more time then it take to simulate float point on main cpu unit).
      In this case there is posibility that with diferent optimization levels he get totaly different results (if he tested speed in debug mode, he can get even 10 times slower results for compilers that have good optimization conmpairing to optimized code).
      ps: chacking documentaion for cycle count for operation is theoreticly good way but in case of some c/c++ compilers is useless (for example Microchip compiler for 8 bit PIC microcontrollsers in free mode which insert useless instruction to make code slower, so you need to buy it...)

  • @EnlightenedSavage
    @EnlightenedSavage 5 лет назад +5

    It is an interesting application. Can't wait to see the finished product.

  • @MrCrankyface
    @MrCrankyface 5 лет назад +5

    Absolutely amazing stuff, love the indepth look of the math. Can't wait for part 3.

  • @solarfiretechnologies2304
    @solarfiretechnologies2304 5 лет назад +2

    This is absolutely one of the best examples of a real world, mixed-signal embedded application design I've seen. Thank you!!! I'm looking forward to more of your videos.

    • @dieSpinnt
      @dieSpinnt Год назад

      "mixed-signal" means processing of both analogue and digital electrical (input) signals ... which isn't the case here. That "application" is purely digital: discrete steps in -> discrete steps out. Don't confuse that something like a motor driver looks somehow analogue: the motor is also driven digitally. Or that computers and MCUs work with "analogue supply voltages". From that logic everything is analogue ... and digital at the same time. But that would render the technical term "mixed-signal"-something-something just useless, because that is not its meaning. Excuse my nitpicking and possibly have fun with a quick look at Wikipedia about the term?!:)

  • @robzeilinga4240
    @robzeilinga4240 5 лет назад +2

    Thank you for being completely different to almost everybody posting"how to" videos when they show an accelerated video if them making something.
    Your explanations of the mathematics ( p.s. can someone please explain the singular MATH word?) was both educational and clear.
    Subscribed.

    • @Clough42
      @Clough42  5 лет назад

      Thanks! I'm glad you're enjoying them.

  • @SteinErikDahle
    @SteinErikDahle 5 лет назад +2

    That was a surprising amount of AWESOME! I learned a lot more than expected from this video!
    Thank you!

  • @johnstubbe3113
    @johnstubbe3113 5 лет назад +1

    educating in the best tradition of true education.
    I had a large turret lathe from WW2, low hrs.,but no half nuts for threading,this would have solved that issue. The next step is a rotter table to cut splines and gears .thanks so much.

  • @jq4t49f3
    @jq4t49f3 3 года назад

    He speaks with the clarity of full understanding

  • @bobuk5722
    @bobuk5722 5 лет назад +1

    Hi James, a general comment if I may (! - I'm English, you see!). I've been dipping into your back catalog (catalogue!) and originally I felt things were moving on a bit too slow. But I've come to appreciate both the pacing and the carefully explained gentle presenational style and realised that it is what a newcomer like me really needs. So, Thank You! There's a very good chance that with your current project your channel will really take off. It most certainly deserves to, there's a lot of thought, care and expertise going into it. It's not enough to 'know' stuff for these shows, you have to be able to explain it, and you can and do. It is VERY much appreciated. BobUK.

  • @revtmyers1
    @revtmyers1 5 лет назад +1

    New to your channel and have been binge watched the episodes starting with the lathe VFD through present. Now I have gone to the earlier ones for the tool post grinder. All I can say is you do an awesome job. I love how you share all the steps from concept in Fusion 360 through final operations and sometime including 3D printing, another passion of mine, when it make sense. Plenty of highlights and details without being overwhelming make this one of the more enjoyable channels to watch.

  • @RRINTHESHOP
    @RRINTHESHOP 5 лет назад +4

    Excellent job at your math explanation. I think it all will work just fine with the floating point. Heck a worn lead screw will be off more than that. Great Project.

  • @machinemaker2248
    @machinemaker2248 3 года назад

    The dimensional analysis refresher was super useful, particularly showing each conversion fraction. It's been a while, so I had a lot of trouble trying to think of all of the steps to get from one end to the other. Thank you!

  • @joemcgarry1106
    @joemcgarry1106 5 лет назад +3

    Great video James, I am so on board with this. I am ready to start buying components. My 1945 South bend lathe will never be the same!

  • @rogue277
    @rogue277 3 года назад

    This is my new favorite youtube channel by far. You are an engineer's engineer. Every nuance I was struggling to find an answer for, you answered them.

  • @twobob
    @twobob Год назад

    As a programmer of industrial PLC's with specific reference to spinning things must admit this project has been my fave for a while of yours. No, You sat on Goldbolt for hours trying to wangle the instructions down when you found the github.. Hah.
    Anyway kudos. Ballsy.

  • @Somun-a
    @Somun-a 5 лет назад +3

    Such a high quality content, on such an interesting project with such a generous effort on depicting a fantastic engineers mindset. Thank you!

  • @thomaslamora1679
    @thomaslamora1679 5 лет назад +1

    wow - that was a total nerdgasm!!! loved every minute from thought process to calculation to measurements. Can't wait for the next one.

  • @bandana_girl6507
    @bandana_girl6507 Год назад

    With how you set things up, it's also possible to reduce your floating point error physically. You could also detect if for certain threads the thread ratio can be computed perfectly as a fixed point decimal (or even an integer), which would allow some clever math to vastly speed up the division. For example, if you were cutting a 12 TPI thread instead of a 13 TPI thread, you'd have an integer multiplier of 25 and then bit shift 6 (with bit shifting being able to be performed as a single processor instruction)

  • @EverettsWorkshop
    @EverettsWorkshop 3 года назад

    I watched this one three times as it was very fascinating to see your approach. I like it, and learned a lot from your explanation of how you approached your system's input-process-output algorithm. Thank you for sharing your thought processes in your projects.

  • @broheim23
    @broheim23 3 года назад

    WOW! Excellent description of how the program works and why you chose to do what you did. Thank you for the detail! 👍

  • @jimreed863
    @jimreed863 5 лет назад

    There's an old adage : those who can, do. Those who can't, teach. It's refreshing to see you can do, and teach. Thanks.

  • @TrekDreamer11
    @TrekDreamer11 5 лет назад

    For me the detail, delivery and structure made it easy to follow along. Thanks for taking your time to make and share your learnings. I have finaly been able get some clarity on fundamentals that are skipped over elsewhere. The awesomeness is that I can adapt into my projects and priorities. Much appreciated

  • @rtkracht
    @rtkracht 5 лет назад +2

    Excellent job in explaining the background details. I’m hooked!

  • @sooty655
    @sooty655 5 лет назад +16

    Looking forward to buying the kit. I hope you'll make it easy to adapt to a metric feedscrew - 4mm pitch in my case.

    • @boldford
      @boldford 5 лет назад

      Enter 0.15748" pitch

    • @MecMod_Homeshop
      @MecMod_Homeshop 3 года назад

      Nice Brian you answer to a my doubt

  • @michaelsloan7002
    @michaelsloan7002 10 месяцев назад

    Fantastic video!!! Now I plan on adding one to my old Clausing lathe, instead of trying to source 50+ year old metric gear sets!

  • @dalecostich8794
    @dalecostich8794 5 лет назад +5

    eager to purchase your "kit" and adapt my 12" Clausing that has had its threader removed. this is a genius adaptation. thankyou!

  • @paulmanhart4481
    @paulmanhart4481 Год назад

    Amazing display of talent and knowledge. Thanks.

  • @victorreppeto7050
    @victorreppeto7050 5 лет назад

    I appreciate you sharing at this depth. Your strategy for avoiding propagation of the rounding error seems so obvious once you explained it! I had to replay the video a couple of times to get it. I explains why so much horsepower is needed in the processor. Please continue to drill down into the logic of your strategies.

  • @psion5mxfred
    @psion5mxfred 5 лет назад +3

    My old Myford Super 7 is dancing around the shop in anticipation.

  • @twistedupright8697
    @twistedupright8697 5 лет назад +6

    "count " me in, thru hole board for me. Great video, thanks

  • @charleshirst6220
    @charleshirst6220 Год назад

    Dimensional analysis is a very useful and powerfull technique. In my day way back when Pontious was still a pilot, this particular technique was called Unitary Brackets, the underlying principle being, as you noted, that you can multiply something by '1' as many times as you like without affecting it.

  • @misterfixit1952
    @misterfixit1952 5 лет назад

    Thanks for keeping cost a factor.Too many projects on youtube are great but will never be in my SS budget. This one definitely is and I and my Harbor Freight 9x20 appreciate the effort.

  • @Made2hack
    @Made2hack 5 лет назад +1

    Thanks for going into the pros / cons of floating point! Awesome video!

  • @lesthompson5907
    @lesthompson5907 4 года назад +1

    most lead screws are 4 or 8 I have. 1" 4 trends to the 1" UNC course. most are acne thread's are 6,12, 4, or 8, that the normal lead screw Thread's for the 1" . led screw pitch. very interesting theatrical work , & I will buy one once you have sorted it out , use of the shelf produces too build the package , out the work & I can see it being an attentive system to the makers of the modern lath , small lath It certainly interesting for my lath witch is a Colchester master A hundred years old , with a half shaft .

  • @justinbudreau4814
    @justinbudreau4814 5 лет назад +4

    this means a lot for home built lathes.

  • @PaulDriverPlus
    @PaulDriverPlus 5 лет назад

    I've taught computer science, and you did a beautiful job explaining this, well done.

  • @bobuk5722
    @bobuk5722 5 лет назад +1

    Hi James, I've been thinking. I do, sometimes! There's a good argument that using change gears is essentially 'open loop'. There's so much power available that 'slip' simply cannot occur - the machine would have to shear a gear tooth. So, despite what I was saying earlier, an open loop stepper could be seen as replicating that change gear implementation. It just needs a powerful enough motor. BobUK.

  • @jamesbrewer3020
    @jamesbrewer3020 5 лет назад +1

    Great math explanation and demonstration. Keep the info coming. Looking forward to more of your videos. Thanks.

  • @riggsron
    @riggsron 5 лет назад +3

    I think I may have understood a bit less than half. That's a lot more than I understood before. A few more viewings and I might get there. I have a 1950's South Bend 9B. This would be fantastic for it.
    Thank you

  • @danmenes3143
    @danmenes3143 6 месяцев назад

    You have built a phase-locked loop. There is no need to use either integer division OR floating point. You have a signed integer register that tracks your cumulative error. Every time you get a pulse from the spindle encoder, decrement the register by the denominator (or numerator--not sure which way your fraction is standing). As long as the register is negative, output pulses to your microstepper driver, adding the numerator (or denominator...) to the error value for each pulse.
    Nothing but integer add and subtract, no cumulative error, and your instantaneous error is always less than one pulse. And, if I am not mistaken, on many microcontrollers, part or all of this math can be done by hardware independent of the main CPU.

  • @luckyboy6357
    @luckyboy6357 2 года назад +1

    A great thanks for the fine project and we can learn so much from you.

  • @paulrichmond6903
    @paulrichmond6903 5 лет назад +1

    Very well done. Great analysis and pretty damn good code. (Coming from a retired systems analyst / programmer.)

  • @stefanhertweck
    @stefanhertweck 5 лет назад +1

    Great combination of theory and practice. I very much like the discussion on rounding error and to what degree it plays a role ... or not :)

  • @piccilos
    @piccilos 5 лет назад +2

    Incredibly well explained a complex subject. Thank you.
    It would be fun to see a 14+ hour threading cycles That first week scratch pass...

  • @quadmasta
    @quadmasta 5 лет назад +1

    I really wish you were my high school chemistry teacher :) The way you explained the complex conversions was great

  • @mvadu
    @mvadu 5 лет назад

    Subscribed to your channel just to hear you explain the design process, even though I am not a machinist and might never need an electronic lead screw. Coming from from electronics computer background, I am getting deja vu of sitting in my classes.. Thank you for the great video and wish you all the success with your project.

  • @FrankThorley
    @FrankThorley 10 месяцев назад

    Excellent Presentation. Thanks for Sharing. ❤

  • @petera1033
    @petera1033 5 лет назад

    James - just wanted to express my thanks for your outstanding videos I have a special interest in this ELS project and you Fusion explanations and demonstrations.
    Pete

  • @OuroborosArmory
    @OuroborosArmory 5 лет назад +2

    Nice.. it’s nice to see The math behind binary.

  • @newagerc5356
    @newagerc5356 5 лет назад

    Well the math is over my head. I do understand what your doing and wow very well thought out. Loved both videos. Looking forward to the next one.

  • @EdAgers110
    @EdAgers110 5 лет назад +3

    This was an incredibly complex problem, and explained very simply! You are one of those people I would put in the category of “GENIOUS”! I am super interested in watching this project to it’s completion! Well done!!

    • @ohammouda
      @ohammouda 5 лет назад +3

      The problem isn't incredibly complex. It's digital logic 101. He did however explain it nicely.

    • @EdAgers110
      @EdAgers110 5 лет назад

      Omar Ham Perhaps you are a GENIOUS as well! Please provide the links to YOUR videos showing YOUR solutions to this problem.

  • @rogerfurer2273
    @rogerfurer2273 5 лет назад +1

    Very cool video. My suggestion is to add an index so the encoder count resets on every revolution. Hall-effect or optical. Prevents position error from accumulating over multiple revs.

    • @pcrengnr1
      @pcrengnr1 5 лет назад +1

      I feel the same way. I was wondering if anybody noticed. Knowing the phase angle that the thread started is how to eliminate the accumulated error. So, the index will solve the accumulated error problem. This would allow the pgm to return to using integer arithmetic too.

  • @chrisj4570g
    @chrisj4570g 5 лет назад

    Most excellent. I have no clue what you were taking about, (I despise math) but your presentation is excellent! Can’t wait to see this in action.

  • @Jan_Seidel
    @Jan_Seidel 3 года назад

    *Subscribed*
    I *luuuv* this project.
    Learning much and refreshing skills dormant a long time - like programming.
    Also many thanks for referencing to decimal too.
    The code - I think - is unfortunately imperial only, so I have to adapt the code. Btw. cheers for offering the code!
    This is such a good project, I decided to build it as I got half ways through the first video.
    So I ordered a TI micro-controller without spending a second thought.
    As mentioned Arduino RasPi is easy to use and thanks to you I am diving into a new world :)

  • @turningpoint6643
    @turningpoint6643 5 лет назад +12

    An extremely interesting video James although most of it was well above what little I thought I knew.
    But a calculated 1/10th error after 15 min. of continuous threading at 600 rpm is 100% meaningless. I can guarantee your leadscrew is off by multiple thous per foot and that also will change variably throughout it's length to different lead and lag pitch errors. Moore Tools tried everything they could think of to build perfect feed screws for there jig borers and grinders prior to the development of cnc and very likely threw a few million $$$$ at the effort. While they could measure the errors of only a few millionths in there precision ground and carefully lapped screws and nuts it's simply impossible to get perfection using the best state of the art equipment and a large bankroll. Even if it was the slightest wear would ruin the perfection as soon as you started using the machine. So you can bet on a more than surprising amount of pitch error in the average lathes leadscrew. In fact the lathes components will flex far more than that under even the fairly light cutting loads during single point threading.

  • @leec2106
    @leec2106 3 года назад

    I like it I will look into doing it as well. For now I need to get my shop done first.

  • @dazaspc
    @dazaspc 5 лет назад

    Great explanation for what can be a confusing problem.

  • @InssiAjaton
    @InssiAjaton 5 лет назад

    This might be a place to reminisce my old HP-87. An amazing engineering tool. Not fast, but with its 8-bit registers chained to 64 bits wide and with BCD math you avoided the rounding errors within something like 10^-500 to 10^+500 numerical range. Well, I mentioned the speed. If I’m right, its clock frequency was 680 kHz (some people have stated 0.7 MHz). That was in the days when a Z80 chip ran at up to 4 MHz.

  • @chuckm65
    @chuckm65 5 лет назад

    Amazing video! I love the detailed explanations of the math. I'll start ordering parts soon, and will definitely want a through-hole pcb. Thank you for sharing your wealth of knowledge!!

  • @nicolaspillot5789
    @nicolaspillot5789 3 года назад

    Try the floating point performance when *dividing* by the (precalculated) inverse of the ratio...
    Instead of multiplying by the ratio, i mean.
    I say that because i think the time diff is not due to float vs integer, but due to a single vs two operations
    And furthermore, with one division vs without division.
    Afaik, divisions are the less optimized operations.
    Great vid, awesome explainations

  • @lkw6640
    @lkw6640 5 лет назад

    Like you, I expected a lot more error using floats. The results are really surprising! Well done sir!! I see few people don't quite grasp binary representation of numbers less than one. Perhaps a video showing decimal number system with positive and negative exponents of 10 multiplied by 0-9 and then the same thing with base 2 number system. I hope that makes sense lol. That's what made it click for me in college. After that, digital design class was a breeze. Great video!! On behalf of everyone here, thank you for all your work and sharing your knowledge!! Please keep it up :)

  • @BluesDoctor
    @BluesDoctor 5 лет назад

    Very good. Insightful problem solving and excellent communication skills. I will definitely track the developments. Congratulations.

  • @bkoholliston
    @bkoholliston 5 лет назад +1

    I'm looking at a freeze frame of your inch TPI table and would recommend a few more sizes like 26 TPI (3C collets) and 11 1/2 TPI (garden hose) if you have room. Cool project!

    • @Clough42
      @Clough42  5 лет назад

      Great suggestion. Done. I have seen 11 1/2 TPI on lathes before but never knew what it was for.

    • @ericfeatherstone
      @ericfeatherstone 5 лет назад

      @@Clough42 Some others to consider perhaps:
      19 for BSP (British Standard Pipe thread)
      22 for 5/16 BSF
      26 for Brass thread, CEI & 1/4 BSF
      27 for GAS thread

  • @clydeulmer4484
    @clydeulmer4484 5 лет назад

    Wonderfully lucid explanation -- I wish my instructors had been half as clear when I was doing my C.S. degree. Too bad binary coded decimal fell out of modern microprocessor instruction sets...

  • @simonkrezias7615
    @simonkrezias7615 5 лет назад

    Excellent video.University standart teaching.Lets see the comercial aspect of this.Thank you very much.

  • @mr1enrollment
    @mr1enrollment 5 лет назад

    First: You presented an excellent explanation, very clear.
    Comment: Rather than compare the two methods on an RPM basis, consider a comparison
    of error per linear thread length. Error/time seems to me not the best metric.
    Comment: Again, I have not done the work so I may be missing something with raw intuition, but I 'suspect' that a purely integer method can work. I assert this is a problem for which all the calculation can be accomplished once without the need for floats on a per count basis. I mentioned the other day a count down register approach. The core of which is a pair of integers calculated once and used to approximate the ratio first over then under the exact.
    Implementing n/d = 1/a - 1/b. Think of a Taylor series. The actual code may require more than two fractions, (1/a, 1/b , 1/c,...), depending on the resulting error per length. The count values corresponding to each fraction are calculated once. Then the count down register is loaded sequentially with the values.
    Comment: I am sure my 'explanation' is not as clear as you have presented. The path you are following WILL WORK, I have no doubt. The only possibility is that 'maybe' a less capable uprocessor would be able to do the work.
    Second: I enjoy your presentation method, very organized, nice work. You have another subscriber.

  •  5 лет назад +1

    Still can't believe you only have 6.6K subs. Production quality is awesome. There's many 1M subs who don't even have such content. Keep up your good work. Really becoming of one my favorite channel ever.

  • @Mike-jv6il
    @Mike-jv6il 5 лет назад +1

    im a first time viewer and just learned so much... Thank you! and please keep making this kind of content. I

  • @ardisd01
    @ardisd01 5 лет назад +1

    I am in the fortunate position with my lathe its very easy to change the feed rate . But watched the whole video the explanation of the math was brilliant and always good to see how other tackle a coding problem. Need to do some test on floating point math for my projects (Subscriberd and thumbs up)

    • @Clough42
      @Clough42  5 лет назад

      I totally agree. I don't assert that the way I'm doing it is the best way--just that it's the way I did it. I'm always fascinated to see how other people solve the same problem in different ways. Someone this morning mentioned Bresenham's line drawing algorithm. I'd never made that connection before.

    • @ardisd01
      @ardisd01 5 лет назад

      @@Clough42 The internet has made electronics and programming much more accessible to everyone when I started programming over 20 years ago it was all done through books and courses. Now with creators like yourself and others you can just watch a video. Keep up the great content

  • @adrianstephens56
    @adrianstephens56 5 лет назад

    Nice video. I must admit my initial thought was that the integer maths would be the way to go, but you explained the value of the floating point well. If you really needed the FP speed, but wanted to get rid of the error, I think you could run the loop in two parts. A slow loop that operates on the most significant bits of the encoder count done in integer maths, and a fast interrupt loop that applies only to the least significant number of bits, and adds to the number calculated by the slower loop. That way your floating point error can be made essentially as small as you like, based on that number of bits and how fast (frequently) you choose to run the integer loop.

  • @simonjones394
    @simonjones394 5 лет назад

    Awesome project. I really enjoyed the math. I will be following with interest to see how it all comes together.

  • @simonconvey9645
    @simonconvey9645 5 лет назад

    Suggestion: Continuously output the position delta. Numeric display might be useless for this, maybe something like......if abs(delta) > 10 ; LED yellow, >100 LED red, else green ? The code is on github, so I'll give this a go anyway ........ TI dev kit is in the post ...... This is an excellent project, I wish you and the community much success.

  • @edishergiorgadze4413
    @edishergiorgadze4413 5 лет назад

    excellent, can't wait to see ALL in real action, THANKS!

  • @TheBendixSA
    @TheBendixSA 5 лет назад

    Man this is an epic project!! Can't wait for the rest of the series!

  • @allengentz7572
    @allengentz7572 5 лет назад +1

    I am following you thank you for instruction something I want to adopt, old head but will get there.

  • @LabRatJason
    @LabRatJason 5 лет назад

    Your talking hands rival those of This Old Tony! Awesome video! Thanks!

  • @lyndone.2682
    @lyndone.2682 2 года назад

    Great MATH Refresher!

  • @johnbradley5823
    @johnbradley5823 5 лет назад +2

    Hi Clough42 , I have a 602 lathe and I'm looking forward to watching this project. Have you considered a look up table? Or multiple tables, one for each feed? You only need one table in memory at a time and 32 x 4096 is only 16K. You'd get the accuracy back. I'm also hoping you'll get a speed up as I'd like to try doing this with a teensy.

  • @Giblet535
    @Giblet535 5 лет назад

    Been here, did this. Use a 32 bit microcontroller and go floating point. Teensy and a 2600 series Trinamic stepper driver, or there are steppers that have an encoder right inside the stepper housing that pulse more than 1 million times per revolution. (Micron level encoding) That stepper/encoder manufacturer makes a driver board for it that deals with missed steps automatically.

  • @gadjetsvideo
    @gadjetsvideo 5 лет назад

    Good video, I think I'll need to watch it a few more times before I get it straight in my head though I wish I had more Software experience.

  • @bobblaine1437
    @bobblaine1437 5 лет назад

    Thanks for going through the math, great explanation.

  • @revgro
    @revgro 5 лет назад

    Good job on the video, definitely worth watching. Looking forward to the next one. Bill

  • @cabengg
    @cabengg 3 года назад

    great explination , thank you

  • @A13tech
    @A13tech 5 лет назад

    oooh man, very cool project. I am looking forward to another progress !

  • @Kaxlon
    @Kaxlon 5 лет назад

    Fastest 30 minutes this week. =)
    Thank you.

  • @robertcarr5846
    @robertcarr5846 5 лет назад

    Well done James complicated subject but understandable

  • @DoRC
    @DoRC 5 лет назад +1

    If you put a piece of red packing tape over those led displays it makes them much easier to see and film.

  • @tomkatkc
    @tomkatkc 4 года назад

    Outstanding! !