584,802 active members*
4,983 visitors online*
Register for free
Login
Page 1 of 4 123
Results 1 to 20 of 69
  1. #1
    Join Date
    Apr 2007
    Posts
    4

    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
    Attached Thumbnails Attached Thumbnails DSC00953.JPG   DSC00957.JPG   DSC00960.JPG   DSC00958.JPG  

    DSC00959.JPG  
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2008
    Posts
    3655
    Very interesting! Kudos!

    CR.

  3. #3
    Join Date
    Mar 2004
    Posts
    222
    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
    Join Date
    Mar 2006
    Posts
    2
    arnaud2 ,I want to test it,please put the pcb and schematic ,or email to me:[email protected],thanks.

  5. #5
    Join Date
    Apr 2007
    Posts
    4
    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 Thumbnails Attached Thumbnails typon.jpg   implantation.JPG  

  6. #6
    Join Date
    Apr 2005
    Posts
    629
    Very impressive work!

    Chris

  7. #7
    Join Date
    Apr 2006
    Posts
    169
    Very impressive work

  8. #8
    Join Date
    Apr 2008
    Posts
    2
    Very impressive work!

  9. #9
    Join Date
    Nov 2005
    Posts
    1468
    Respect!

    That is some neat engineering
    I love deadlines- I like the whooshing sound they make as they fly by.

  10. #10
    Join Date
    Sep 2006
    Posts
    218

    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
    Join Date
    Apr 2007
    Posts
    4
    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
    Join Date
    Jun 2004
    Posts
    33
    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
    Join Date
    Jul 2006
    Posts
    16
    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
    Join Date
    Oct 2007
    Posts
    57
    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
    Join Date
    Mar 2008
    Posts
    5
    hi,
    plz.put the pcb and the firmware

  16. #16
    Join Date
    Feb 2005
    Posts
    122
    firmware is the first post.
    I'm curious if someone has build it and how it works.
    @arnaud, any new versions ?

  17. #17
    Join Date
    Apr 2008
    Posts
    57

  18. #18
    Join Date
    Jul 2006
    Posts
    16
    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
    Join Date
    Jan 2007
    Posts
    146
    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

  20. #20
    Join Date
    Feb 2005
    Posts
    122
    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 123

Similar Threads

  1. need full CNC kit for ZX-45
    By ma1 in forum Benchtop Machines
    Replies: 12
    Last Post: 02-11-2012, 08:23 PM
  2. FULL CNC or DRO
    By Gunther45 in forum Benchtop Machines
    Replies: 4
    Last Post: 06-08-2008, 03:28 PM

Posting Permissions

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