Full cnc controller

Page 1 of 4 1234 LastLast
Results 1 to 20 of 70

Thread: Full cnc controller

  1. #1
    Registered
    Join Date
    Apr 2007
    Location
    france
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default Full cnc controller

    hello
    i have build a full cnc controller who can control full cnc machine without computer
    the board read the gcode in a sd-mmc card and drive the motors up to 50khz
    for the moment it do only linear interpolation (3axes) and drive the spindle with pwm and can switch on /off the coolant
    a manual mode can jog all axes in contius or in increments of 0.01 , 0.1 , 1 , 10 mm
    the remote mode is for rs232 com for sending one after one line of gcode
    the display is a simple KS0108 128*64 graphic lcd
    i have inclued a bootloader for flashing MCU without remove it
    when someone want to test i put the pcb on line and the firmware

    Similar Threads:
    Attached Images Attached Images
    Attached Files Attached Files


  2. #2
    Registered Crevice Reamer's Avatar
    Join Date
    Mar 2008
    Location
    USA
    Posts
    3655
    Downloads
    0
    Uploads
    0

    Default

    Very interesting! Kudos!

    CR.



  3. #3
    Registered slp_prlzys's Avatar
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    222
    Downloads
    0
    Uploads
    0

    Default

    great job, I tried to do the very same thing, but was not able to complete it due to lack of knowledge .

    mhel
    "This is intentionally left blank."


  4. #4
    Registered
    Join Date
    Mar 2006
    Location
    china
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default

    arnaud2 ,I want to test it,please put the pcb and schematic ,or email to me:zhangyue9331@126.com,thanks.



  5. #5
    Registered
    Join Date
    Apr 2007
    Location
    france
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    here is the pcb
    i have not doing schematic but it's easy tu understand how it works
    you must at the first programming the pic18f4620 with bootload.hex and after put the program with the bootloader software

    it have some little bug but that are modified in the next time

    if you have question

    Attached Images Attached Images


  6. #6
    Member Chris D's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    629
    Downloads
    0
    Uploads
    0

    Default

    Very impressive work!

    Chris



  7. #7
    Registered hesham morsy's Avatar
    Join Date
    Apr 2006
    Location
    egypt
    Posts
    169
    Downloads
    0
    Uploads
    0

    Default

    Very impressive work



  8. #8
    Registered
    Join Date
    Apr 2008
    Location
    Egypt
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default

    Very impressive work!



  9. #9
    Registered ImanCarrot's Avatar
    Join Date
    Nov 2005
    Location
    UK
    Posts
    1468
    Downloads
    0
    Uploads
    0

    Default

    Respect!

    That is some neat engineering

    I love deadlines- I like the whooshing sound they make as they fly by.


  10. #10
    Registered
    Join Date
    Sep 2006
    Location
    romania
    Posts
    218
    Downloads
    0
    Uploads
    0

    Thumbs up yap, nice

    Can you post schematics?
    What I really like to see is the source code, or the algorithms used for interpreting G-codes
    I can share my own design, with pic+ ethernet...



  11. #11
    Registered
    Join Date
    Apr 2007
    Location
    france
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    i cant give all the source code but i can give some routines of the program must be 100% free and i dont want that someone make buisness with it

    it is integrally writen with mikrobasic (aproximative 2500 lines of code)
    90% is only the menu and the display

    for driving the motors it use a simple bresenham algorythm

    Code:
    sub procedure do_line
    
    if px>maxx then fail=1 end if
    if py>maxy then fail=2 end if
    if pz>maxz then fail=3 end if
    
    if px<0 then fail=1 end if
    if py<0 then fail=2 end if
    if pz<0 then fail=3 end if                                 
    
    dx = ax - px
    dy = ay - py
    dz = az - pz
    
    dx = dx * stepratio
    dy = dy * stepratio
    dz = dz * stepratio
    
    stvel = 50000/(stvel1*stepratio)
    
    speed2 = 50000/(speed*stepratio)
    speed3 = 0
    
    acc2=acc
    
    coord = 0
    coord1 = 0
    coord2 = 0
    
    mx = 0
    my = 0
    mz = 0
    
    inv = -1
    ct = 0
    
       if dx < 0 then portb.6 = 1 dirx = 1  dx = dx*inv
                 else portb.6 = 0 dirx = 0  end if
                       
       if dy < 0 then portb.4 = 1 diry = 1  dy = dy*inv
                 else portb.4 = 0 diry = 0  end if
    
       if dz < 0 then portb.2 = 1 dirz = 1  dz = dz*inv
                 else portb.2 = 0 dirz = 0  end if
                 
       if dx > stepratio then spi_glcd_write_text("   MOVE",15,1,1) end if
       
       if dy > stepratio then spi_glcd_write_text("   MOVE",15,2,1) end if
       
       if dz > stepratio then spi_glcd_write_text("   MOVE",15,3,1) end if
    
       vm = sqrt((dx*dx)+(dy*dy)+(dz*dz))
       vm2 = vm
       
    
       
       if speed2 < stvel then speed3 = stvel  vel = 1
                              endvec = acc*((stvel-speed2)/10)
                         else speed3 = speed2  vel = 0
                              endvec = 0
                         end if
                         
          while (vm>0)and(porta.4=1)and(fail=0)
          
          if (portd.1=1)and(portc.0=0)and(menu=1) then spi_glcd_write_text(" PAUSE ",76,6,1)
                                                  delay_ms (1000)
                                                  while (portd.1=0)and(portc.0=0) wend
                                                     if speed2 < stvel then speed3 = stvel  vel = 1
                                                     else speed3 = speed2  vel = 0
                                                     end if
                                                  end if
          
          if vel=1
             then ct = ct +1
                  if ct = acc2 then speed3 = speed3-10 ct = 0 end if
                  if speed3stvel then speed3 = stvel end if
                  end if
    
          for delay = 0 to speed3
          nop
          next delay
    
          vm = vm - 1
          if dx<>0 then
          if coord > dx then coord = coord - vm2
                             portb.7 = 1
                             mx = mx +1 end if end if
          coord = coord + dx
          
          if dy<>0 then
          if coord1 > dy then coord1 = coord1 - vm2
                              portb.5 = 1
                              my = my + 1 end if end if
          coord1 = coord1 + dy
          
          if dz<>0 then
          if coord2 > dz then coord2 = coord2 - vm2
                              portb.3 = 1
                              mz = mz + 1 end if end if
          coord2 = coord2 + dz
    
          delay_us (2)
    
          portb.3 = 0
          portb.5 = 0
          portb.7 = 0
    
          wend
    
       if dirx = 1 then ax = ax + (mx/stepratio)
                   else ax = ax - (mx/stepratio)
                   end if
    
       if diry = 1 then ay = ay + (my/stepratio)
                   else ay = ay - (my/stepratio)
                   end if
    
       if dirz = 1 then az = az + (mz/stepratio)
                   else az = az - (mz/stepratio)
                   end if
    
    end sub
    if someone have a code to do circular interpolation with G02 and G03 i can integrate into the program

    for reading gcode it's verry simple i read it line after line

    if the 3 first carracters are G00 then rapid move
    if G01 the controled speed move

    here is the routine to read the values

    at the first i read a comlete line into the mmc (the routine is integred in mikrobasic) ans store it in a array of bytes

    Code:
    sub procedure read_gcode
    
    file = 0
    
    divider = 1
    
    while ((data[pointer]<47) or (data[pointer]>58)) and (pointer > 3)
          pointer = pointer - 1
          wend
    
    
    if (data[pointer]>47) and (data[pointer]< 58) and (pointer > 3)
       then file = (data[pointer]-48) * 100
       end if
    
    pointer = pointer - 1
    
    if (data[pointer]=46) and (pointer>3) then divider = 10
                                               pointer = pointer - 1 end if
            
    if (data[pointer]>47) and (data[pointer]< 58) and (pointer > 3)
       then file = file + (data[pointer]-48)*1000
            pointer = pointer - 1
            end if
            
    if (data[pointer]=46) and (pointer > 3) then divider = 100
                                            pointer = pointer - 1 end if
                                            
    if (data[pointer]>47) and (data[pointer]< 58) and (pointer > 3)
       then file = file + (data[pointer]-48)*10000
            pointer = pointer - 1
            end if
    
    if (data[pointer]>47) and (data[pointer]< 58) and (pointer > 3)
       then file = file + (data[pointer]-48)*100000
            pointer = pointer - 1
            end if
    
    if (data[pointer]>47) and (data[pointer]< 58) and (pointer > 3)
       then file = file + (data[pointer]-48)*1000000
            pointer = pointer - 1
            end if
    
    if (data[pointer]>47) and (data[pointer]< 58) and (pointer > 3)
       then file = file + (data[pointer]-48)*10000000
            pointer = pointer - 1
            end if
            
    if (data[pointer]=45) and (pointer > 3)
       then inv2=1
            pointer = pointer - 1
       else inv2=-1
            end if
    
    
    file = file /divider
    
    if (data[pointer]=88) and (pointer > 3) then px = file+opx end if
    
    if (data[pointer]=89) and (pointer > 3) then py = file+opy end if
    
    if (data[pointer]=90) and (pointer > 3) then pz = (file*inv2)+opz end if
    
    if (data[pointer]=70) and (pointer > 3) then setspeed = file/10 end if
    
    if (data[pointer]=83) and (pointer > 3) then setrpm = file/100 end if
    
    if (data[pointer]=84) and (pointer > 3) then tool = file/100 end if
    
    file = 0
    
    end sub




  12. #12
    Registered cwiliam's Avatar
    Join Date
    Jun 2004
    Location
    United States
    Posts
    33
    Downloads
    12
    Uploads
    0

    Default

    seen ths
    http://www.fisertek.it/index_000044.html

    i was hoping to see it finished but the owner of the webpage email me saying he doesn't have time

    hopefully I can make Arnaud2's great cnc controller

    thank you so much for sharing



  13. #13
    Registered
    Join Date
    Jul 2006
    Location
    UKRAINE
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default

    Very interesting project.
    I want to do the own project on a base ARM + ethernet ( EKI LM3S8962 ) + ELM -DC servomotor controller (New version ).



  14. #14
    Registered
    Join Date
    Oct 2007
    Location
    USA
    Posts
    57
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by arnaud2 View Post
    i cant give all the source code but i can give some routines of the program must be 100% free and i dont want that someone make buisness with it

    [/code]
    Just a thought. For the rest of us that arn't as talented or don't have the time, it would great to be able to purchase a kit. I'm thinking like the linistepper drivers. One other thought, maybe in a later version add a usb port for thumb drives.



  15. #15
    Registered
    Join Date
    Mar 2008
    Location
    india
    Posts
    5
    Downloads
    1
    Uploads
    0

    Default

    hi,
    plz.put the pcb and the firmware



  16. #16
    Registered
    Join Date
    Feb 2005
    Location
    Romania
    Posts
    122
    Downloads
    0
    Uploads
    0

    Default

    firmware is the first post.
    I'm curious if someone has build it and how it works.
    @arnaud, any new versions ?



  17. #17


  18. #18
    Registered
    Join Date
    Jul 2006
    Location
    UKRAINE
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default

    I need the type of simple KS0108 128*64 graphic lcd for Full_CNC.
    Is it BG12864 or DG-12864 or WG12864 or ...?
    Help me !



  19. #19
    Member
    Join Date
    Jan 2007
    Location
    U. S. A.
    Posts
    146
    Downloads
    5
    Uploads
    0

    Default

    Quote Originally Posted by vasyl markiv View Post
    I need the type of simple KS0108 128*64 graphic lcd for Full_CNC.
    Is it BG12864 or DG-12864 or WG12864 or ...?
    Help me !
    From the author discussion on the french site:
    http://74.125.65.132/translate_c?hl=...NQUbizxQnJ_CQA
    http://74.125.65.132/translate_c?hl=...qe6Y8-FMBrtRvw

    Last edited by jschmitt; 03-29-2009 at 01:42 PM. Reason: added url


  20. #20
    Registered
    Join Date
    Feb 2005
    Location
    Romania
    Posts
    122
    Downloads
    0
    Uploads
    0

    Default

    I think that they will work. Any display compatible or including ks0108 controller will be compatible. Unfortunately nobody can confirm that has build this controller.



Page 1 of 4 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Full cnc controller

Full cnc controller