EP7 - CNC3018 Rebuild - DIY CNC Controller

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 เม.ย. 2024
  • Finally in the home stretch for this little project, in this episode I will show you my controller that I made for the CNC3018. Also included allot of information about making your own controller, as well as the relevent settings. If you are so inclined, check it out!
    This is the seventh episode in a series where I upgrade my cheap 3018 CNC in an effort to improve its precision, performance and work area size.
    [[[[[[[[[[ REPORTED VERSION INFO ]]]]]]]]]]
    [VER:1.1f.20240204:]
    [OPT:VNMZTS,500,1024,3,0]
    [AXS:3:XYZ]
    [NEWOPT:ENUMS,RT+,HOME,ES,SED]
    [FIRMWARE:grblHAL]
    [SIGNALS:HSE]
    [NVS STORAGE:*FLASH]
    [FREE MEMORY:1K]
    [DRIVER:STM32F401CC]
    [DRIVER VERSION:240205]
    [BOARD:BlackPill]
    [AUX IO:1,2,0,0]
    [[[[[[[[[[ MACRO BUTTONS G-CODE ]]]]]]]]]]
    ( HOME )
    $H;
    ( MODE [Spindle] )
    M5; $32=0; $30=10000; $31=250; $33=200; $34=21.9; $35=24.8; $36=34.1; M0;
    ( MODE [Laser] )
    M5; $32=1; $30=10000; $31=0; $33=5000; $34=0; $35=0; $36=100; M0;
    ( Set ZERO [XYZ] )
    G10P0L20X0Y0Z0;
    ( Set ZERO [XY] )
    G10P0L20X0Y0;
    ( Set ZERO [Z] )
    G10P0L20Z0;
    ( Goto ZERO [XYZ] )
    G21G90G0Z5; G90G0X0Y0; G90G0Z0;
    ( Goto ZERO [XY] )
    G21G90G0X0Y0;
    ( Goto ZERO [Z] )
    G21G90G0Z0;
    ( Probe-Z [Laser] )
    G91G21G38.2Z-5F100; G92 Z2.79; G0Z5M30;
    ( OOP [Laser] )
    $32=0; M5; $H; G91; G01 X14 Y61 Z-74 F1000; M0; G91G21G38.2Z-5F100; G92 Z2.79; G0Z5M30; M0; G91; G00 X14.58 Y-38.39; G90; G00 Z-2.5; G91; M3 S85; G38.2 Y2 F10; G92 Y-6.058; M5; G00 X-20.2 Y20.6; M3 S85; G38.2 X2 F10; G92 X-5.7075; G90; M5; G00 X0 Y0 Z30; $32=1;
    ( Pos Laser [ON] )
    $32=0; M4 S100;
    ( Probe-Z [Spindle] )
    G91G21G38.2Z-20F100; G92 Z12.85; G0Z5M30;
    ( OOP [Spindle] )
    M5; $H; G91; G01 X30 Y45 Z-45 F1000; M0; G91G21G38.2Z-20F100; G92 Z12.85; G0Z5M30; M0; G91; G00 X-1.3 Y-23.6; G90; G00 Z5; G91; G01 Z-6.8 F250; M3 S10000; G38.2 Y2 F10; G92 Y-7; M5; G00 Z9; G00 X-21.2 Y21.1; G01 Z-9 F250; M3 S10000; G38.2 X2 F10; G92 X-7; M5; G00 Z9; G90; G00 X0 Y0 Z30;
    ( Pos Laser [OFF] )
    $32=1; M5;
    [[[[[[[[[[ SETTINGS IN LASER MODE ]]]]]]]]]]
    $0 = 10.0 (Step pulse time, microseconds)
    $1 = 25 (Step idle delay, milliseconds)
    $2 = 0 (Step pulse invert, mask)
    $3 = 2 (Step direction invert, mask)
    $4 = 7 (Invert step enable pin, boolean)
    $5 = 7 (Invert limit pins, boolean)
    $6 = 1 (Invert probe pin, boolean)
    $9 = 1
    $10 = 511 (Status report options, mask)
    $11 = 0.010 (Junction deviation, millimeters)
    $12 = 0.002 (Arc tolerance, millimeters)
    $13 = 0 (Report in inches, boolean)
    $14 = 0
    $15 = 0
    $16 = 0
    $17 = 0
    $18 = 0
    $19 = 0
    $20 = 1 (Soft limits enable, boolean)
    $21 = 3 (Hard limits enable, boolean)
    $22 = 253 (Homing cycle enable, boolean)
    $23 = 3 (Homing direction invert, mask)
    $24 = 15.0 (Homing locate feed rate, mm/min)
    $25 = 1000.0 (Homing search seek rate, mm/min)
    $26 = 10 (Homing switch debounce delay, milliseconds)
    $27 = 0.500 (Homing switch pull-off distance, millimeters)
    $28 = 0.100
    $29 = 0.0
    $30 = 10000.000 (Maximum spindle speed, RPM)
    $31 = 0.000 (Minimum spindle speed, RPM)
    $32 = 1 (Laser-mode enable, boolean)
    $33 = 5000.0
    $34 = 0.0
    $35 = 0.0
    $36 = 100.0
    $37 = 0
    $39 = 1
    $40 = 1
    $43 = 1
    $44 = 4
    $45 = 3
    $46 = 0
    $62 = 0
    $63 = 3
    $64 = 0
    $65 = 0
    $100 = 3201.60034 (X-axis travel resolution, step/mm)
    $101 = 3201.60034 (Y-axis travel resolution, step/mm)
    $102 = 3214.23413 (Z-axis travel resolution, step/mm)
    $110 = 1100.000 (X-axis maximum rate, mm/min)
    $111 = 1100.000 (Y-axis maximum rate, mm/min)
    $112 = 1100.000 (Z-axis maximum rate, mm/min)
    $120 = 500.000 (X-axis acceleration, mm/sec^2)
    $121 = 500.000 (Y-axis acceleration, mm/sec^2)
    $122 = 500.000 (Z-axis acceleration, mm/sec^2)
    $130 = 298.000 (X-axis maximum travel, millimeters)
    $131 = 219.000 (Y-axis maximum travel, millimeters)
    $132 = 83.000 (Z-axis maximum travel, millimeters)
    $341 = 0
    $342 = 30.0
    $343 = 25.0
    $344 = 200.0
    $345 = 200.0
    $346 = 1
    $370 = 0
    $372 = 0
    $384 = 0
    $398 = 500
    $481 = 0
    $484 = 0
    $486 = 0
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 37

  • @Jan-es4qg
    @Jan-es4qg 2 หลายเดือนก่อน +1

    Huge amount of useful information in one video! Thank you

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน +1

      Glad you found it informational, this video was one of the more time-consuming episodes in the series to make, so its always nice to hear I am not just wanting my time. Thanks for commenting!

  • @williamash1849
    @williamash1849 2 หลายเดือนก่อน +1

    Project is coming along very nicely!!!

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน

      Stuggling a bit here and there, but thankfully no show stoppers so far! (Touch wood)

  • @rubenstenlund
    @rubenstenlund 2 หลายเดือนก่อน +1

    Great project! You are certainly very skilled!

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน

      Thanks! I am glad you liked it. 😃

  • @SQ8MXT
    @SQ8MXT 2 หลายเดือนก่อน +1

    Cant wait to see it making PCBs :)

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน

      Me too! It will be interesting to see if I actually get any meaningful improvements from all this work. Thanks for the comment!

  • @incubatork
    @incubatork 12 วันที่ผ่านมา +1

    I also use UGS but lately I've been trying CNC3D Commander which is proving to be pretty good so far.

    • @ForOurGood
      @ForOurGood  12 วันที่ผ่านมา

      Actually, I tried a couple of others that people suggested, but ended up sticking with UGS for now, it's actually not all that bad taking everything into account. Maybe if I get motivated I will try some others at some point in the future.

  • @HakkiOgrt
    @HakkiOgrt 2 หลายเดือนก่อน +1

    thnx for video :)

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน +1

      You are very welcome.

  • @TheHayruss
    @TheHayruss 2 หลายเดือนก่อน +1

    I enjoy watching how people approach and their soldering and layout steps (sped up of course) I think it could have been made even more simply. You may have mentioned it already as a reason why you didn't go down this path but I coul dhave missed it. using the existing ramps/Uno sheild and making an adaptor to connect the 32bit CP. if costs are a primary driver then your time in building must come into the equation. Just a thought, enjoyed the video thanks.

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน

      Appreciate the comment. There is a section in the video where I cover it. But my first thought was to use the Uno shield as you suggested, but for reasons I went over there, I decided not to. As for time being a cost, when you are doing it as a hobby, often your time making something is much the opposite of a cost, obviously it is case by case, but in this case I was happy wiring up the new shield, and there was not much difference in work compared to adapting the Uno shield really.

    • @TheHayruss
      @TheHayruss 2 หลายเดือนก่อน +1

      @@ForOurGood Cheers. I tend to reply whilst I watch, so still watching now, Openbuilds CONTROL is nice and CNC3D commander is pretty good. But same same horses for courses and each software has their own issues.

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน

      @@TheHayruss yeah, no worries, I do that too sometimes.. Another viewer also recommended OpenBuilds, so I think I will give that a try first.. must be better than UGS!

  • @AndyJenkins999
    @AndyJenkins999 2 หลายเดือนก่อน +1

    Very interesting thanks it’s looking great your wiring is so neat and tidy.. Glad you sorted the end stop problem I came across exactly the same issue on my rebuild, I was using some garbage GRBL board and spent hours replacing all the end stop cabling convinced they wee picking up interference from the motor or something and had so many problems. now I’m watching this im wondering if I had issues on the board itself. Looking forward to the next instalment.

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน

      Thanks for the comment. Actually, it is probably counterproductive wiring everything together like that, for sure this is adding to the noise problem somewhat. But keeping it tidy, also should keep it reliable, in addition to looking good, so overall I think it’s a plus. When I built the CNC for the first time, I did read on people’s blogs about false triggering, so I decided to use shielded cables for all my end stop sensors, and thankfully I didn’t have a problem then. I actually read that many people were using special optocoupler interface boards to solve this problem, but now I think about it, the application of optocouplers in this case seems not quite correct. Optocoupler are primarily intended for isolation, and in a truly isolated environment they can remove noise too, because in such a case, you effectively convert a balanced signal to and unbalanced one, which would remove any noise picked up in the cable. But actually, the end stop switches are typically not an isolated system, and operate on a common ground with the controller, so this noise reduction effect should not be at play. I actually had a misconception about optocouplers myself, in my mind I always expected they were really fast, like “speed of light” fast. But my testing some time ago, and also recent retesting done for this project, does indicate that optocouplers are really very slow to respond, it’s like they have some capacitive charging affect that slows the switch on time. To be specific, the generic optocoupler I had on hand would switch at a max frequency of 1.1Khz with a 240us delay. So why people see a benefit when using the optocouplers with their end stops, is likely nothing to do with isolation, and more to do with the low pass filter affect the optocouplers inherently have due to their slowness. I guess if it solves the problem, then fine really!

    • @AndyJenkins999
      @AndyJenkins999 2 หลายเดือนก่อน +1

      Very interesting thanks I really had little idea of the operating limits of the optocouplers as I have never really used one in a circuit to the point of reaching the limits (or actually bothered to test them) 😂 so haven’t noticed those limitations. I also worried about having the wiring bundled together when I saw your design but it seems to work great and as you say looks really very neat. Great work. Very intrigued about spindle now I went with a brushless 10,000 ish rpm unit kit with rpm display and ER16 collets to replace the old brushed and very noisy motor but have been a little disappointed so intrigued with what you come up with. Thanks again for the great content.

  • @Cybernetic_Systems
    @Cybernetic_Systems 2 หลายเดือนก่อน +1

    Great solution! I use a DLC32 myself, but with the grblHAL firmware which is simply excellent
    The other great thing about the DLC32 is you can run external drivers with it when 1.5A RMS becomes a limiting factor for your stepper motors.

    • @Cybernetic_Systems
      @Cybernetic_Systems 2 หลายเดือนก่อน

      Btw, you won’t get 2A out of the 2209’s simply because of the way they work. 1.7A is the absolute peak. I was really only able to get 1.5a consistently. I actually got 1.8A out of A4988’s.
      On my 3D printer I use TMC5160’s as I can get 2.3A RMS for my 2.5A motors.
      I’ve actually got some external TMC2160-OC drivers that I’ll be running from a 36v PSU when I get around to making a new electronics enclosure.

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน +1

      @@Cybernetic_Systems The DLC32 solution is pretty nice actually, I nearly pulled the trigger on buying one of those.. But that was really going to push my cheap-ass budget over the top, and as I already have a pile of microcontrollers, I need to use them for something! As for the TMC2209.. honestly I have no idea, I have never actually measured the real current. But I somehow doubt it will be a problem for my little 3018 using those Nema17 1.5amp stepper motors. Thanks for the info!

    • @Cybernetic_Systems
      @Cybernetic_Systems 2 หลายเดือนก่อน

      @@ForOurGood no worries. I’m using Nema 17’s too, but beefy 2.5A units from LDO. My 3018 derived CNC doesn’t have room for Nema 23’s in its current form.

    • @Cybernetic_Systems
      @Cybernetic_Systems 2 หลายเดือนก่อน

      @@ForOurGoodI think my comment went missing for some reason. But check out OpenBuilds Control, it is much better than UGS in most respects only missing surface mapping). The best for grblHAL tho is IoSender which is natively designed for GH. It has a built in config tool which makes life much simpler with its tree structure and helpful info.

    • @Cybernetic_Systems
      @Cybernetic_Systems 2 หลายเดือนก่อน

      @@ForOurGoodargh, YT keeps blocking my posts regarding other gcode options. Must think it’s spam! 😢

  • @regalheros347
    @regalheros347 2 หลายเดือนก่อน +1

    Nice job. Are you sourcing electronic parts from AliExpress? Looking forward to the spindle build, sounds interesting. Thanks

    • @ForOurGood
      @ForOurGood  2 หลายเดือนก่อน

      Thanks for the comment. Actually, I have sourced a heap of stuff from Ali-Express, and without a doubt it has saved me thousands of dollars, and given me access too many new possibilities. But it is not always easy, and at first it can be a struggle with what is good or bad, clearly morals are not at play in Chinese business for the most part. Most of the time if you get burnt, Ali-Express will give you your money back, but sometimes you lose still money too, but this is something easily offset by of the overall savings. Some/many stores sell fake and lower quality stuff, but in most cases they do the job no problem. I source Bluepill, Blackpill, ESP32, connectors, displays, mosfets and all sorts of passive components from Ali-Express. But things such as ATTiny series, current sense IC’s, High-Low mosfet drivers, are either not available, or poor-quality fakes in my experience, so in this case I would turn to somewhere like RS-Components to get the real deal.