CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > OpenSource CNC Design Center > Open Source Controller Boards


Open Source Controller Boards Discussion for Open Source CNC type Controller Boards and other related items. (for personal use only)


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 06-11-2008, 04:19 AM
 
Join Date: Apr 2007
Location: france
Posts: 4
arnaud2 is on a distinguished road
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 Images
File Type: jpg DSC00953.JPG‎ (185.9 KB, 1603 views)
File Type: jpg DSC00957.JPG‎ (150.3 KB, 1385 views)
File Type: jpg DSC00960.JPG‎ (148.1 KB, 1090 views)
File Type: jpg DSC00958.JPG‎ (147.1 KB, 995 views)
File Type: jpg DSC00959.JPG‎ (145.7 KB, 1076 views)
Attached Files
File Type: zip firmware_ver1.0.zip‎ (351.7 KB, 1302 views)
Reply With Quote

  #2   Ban this user!
Old 06-11-2008, 07:48 AM
Crevice Reamer's Avatar  
Join Date: Mar 2008
Location: USA
Posts: 3,454
Crevice Reamer is on a distinguished road

Very interesting! Kudos!

CR.
Reply With Quote

  #3   Ban this user!
Old 06-11-2008, 09:13 AM
slp_prlzys's Avatar  
Join Date: Mar 2004
Location: Canada
Posts: 210
slp_prlzys is on a distinguished road

great job, I tried to do the very same thing, but was not able to complete it due to lack of knowledge .
__________________
Mhel
"me and my unselfish genes"
Reply With Quote

  #4   Ban this user!
Old 06-11-2008, 08:21 PM
 
Join Date: Mar 2006
Location: china
Posts: 2
california9331 is on a distinguished road

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

  #5   Ban this user!
Old 06-12-2008, 02:15 AM
 
Join Date: Apr 2007
Location: france
Posts: 4
arnaud2 is on a distinguished road

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
File Type: jpg typon.jpg‎ (183.4 KB, 1296 views)
File Type: jpg implantation.JPG‎ (128.1 KB, 1615 views)
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 06-15-2008, 11:27 AM
Chris D's Avatar  
Join Date: Apr 2005
Location: USA
Posts: 390
Chris D is on a distinguished road

Very impressive work!

Chris
Reply With Quote

  #7   Ban this user!
Old 06-15-2008, 04:25 PM
hesham morsy's Avatar  
Join Date: Apr 2006
Location: egypt
Age: 41
Posts: 141
hesham morsy is on a distinguished road

Very impressive work
Reply With Quote

  #8   Ban this user!
Old 06-25-2008, 05:17 AM
 
Join Date: Apr 2008
Location: Egypt
Posts: 2
kohla is on a distinguished road

Very impressive work!
Reply With Quote

  #9   Ban this user!
Old 06-25-2008, 05:55 AM
ImanCarrot's Avatar  
Join Date: Nov 2005
Location: UK
Posts: 1,468
ImanCarrot is on a distinguished road

Respect!

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

  #10   Ban this user!
Old 06-25-2008, 03:10 PM
 
Join Date: Sep 2006
Location: romania
Posts: 218
eSilviu is on a distinguished road
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...
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 06-25-2008, 04:13 PM
 
Join Date: Apr 2007
Location: france
Posts: 4
arnaud2 is on a distinguished road

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
Reply With Quote

  #12   Ban this user!
Old 07-07-2008, 06:35 PM
cwiliam's Avatar  
Join Date: Jun 2004
Location: United States
Posts: 32
cwiliam is on a distinguished road

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
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help!- FULL CNC or DRO Gunther45 Benchtop Machines 4 06-08-2008 09:28 AM
full 5th timf EdgeCam 0 04-28-2008 07:05 AM
6cm Full Bullnose DennisCNC Glass, Plastic and Stone 1 09-05-2007 09:10 PM
who sells full kit ataxy Benchtop Machines 4 06-19-2007 11:45 AM
memory full ad1z Haas Mills 5 11-16-2006 12:59 PM




All times are GMT -5. The time now is 12:54 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361