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! > Electronics > PIC Programing / Design


PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips.


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 04-25-2007, 04:19 PM
 
Join Date: Apr 2007
Location: Brazil
Posts: 10
Bomber-eng is on a distinguished road
Pic 18f & Geckodrive!

Hello,.
A few days ago i bought some drivers g203 to test.
I would like to know if anybody have any routines for microchip PIC16F or PIC18F in language C (Compiler CCS) to control these drivers for one motor only.
I would like to receive some routines that have initial aceleration control, inicial speed control, speed control, and inicial aceleration. Or indicate a place that i could find these routines.

I'm just starting to program now these drivers, and i like to start correctly if tehy help.

Thank you for our attention.

Best regards.

Hugo from Brazil.
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 04-25-2007, 11:44 PM
 
Join Date: Dec 2005
Location: CANADA
Posts: 195
jcdammeyer is on a distinguished road
Pic 18f & Geckodrive!

Hi Hugo,

I'd suggest you join the E-Leadscrew Yahoo group

http://groups.yahoo.com/group/E-LeadScrew/

There in the files section you will find full source code for a PIC 18F series creating step and direction for an electronic lead screw. It uses a serial port for all motion commands.

Stay tuned and soon I'll post the complete stand alone unit that does threading and taper turning on a lathe equiped with two stepper motors.

John Dammeyer
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 04-26-2007, 11:52 AM
 
Join Date: Feb 2007
Location: italy
Posts: 2
cnccrive is on a distinguished road

Hello Hugo !

I think that what John suggests you is a good starting point.

I also think that you should better contact GEcKo to ask if they are avalable to give you the schematic diagrams of theyr drive.

Otherwise you have to do a lot of Reverse engineering work !

Good Luck !

Claudio -
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 04-26-2007, 01:04 PM
 
Join Date: Aug 2005
Location: Canada
Posts: 36
niclatrique is on a distinguished road

I already made something like that before with a PIC16F. I had accelaration ramp, decelaration ramp, min and max speed. My next step was to implement RS232. Once I'm back home tonight I'll post the source code. It's not in CCS but in PICC from Hi-Tech.


nic
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 04-26-2007, 01:20 PM
 
Join Date: Apr 2007
Location: Brazil
Posts: 10
Bomber-eng is on a distinguished road

Thank you very much for your colaboration.

Hugo.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 04-26-2007, 01:33 PM
 
Join Date: Dec 2005
Location: CANADA
Posts: 195
jcdammeyer is on a distinguished road

Hi Hugo,

Originally Posted by Bomber-eng View Post
Thank you very much for your colaboration.

Hugo.
If you don't have a subscription it's possible to buy a back issue of www.circuitcellar.com Issue #196 November 2006 which also has my article on the PIC based electronic lead screw. Source code is also available from that site. The article explains how the stepper code works.

John Dammeyer
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 04-26-2007, 06:00 PM
 
Join Date: Aug 2005
Location: Canada
Posts: 36
niclatrique is on a distinguished road

Here is the C file I was talking about. I made a mistake, I wasn't planning to implement RS232 but I2C.

I hope you'll be able to do something with this. It's not complete and I cannot provide any warranty on this code.

Nic
Attached Files
File Type: zip main.zip‎ (2.2 KB, 218 views)
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 04-26-2007, 07:27 PM
 
Join Date: Feb 2007
Location: italy
Posts: 2
cnccrive is on a distinguished road

Sorry Hugo...

I mistakenly supposed you were looking to use the microprocessor inside the GeCko to perform the profiles calculation routines....

Sorry...
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 05-11-2007, 05:11 PM
 
Join Date: Jul 2005
Location: France
Posts: 7
MaXx is on a distinguished road

hello

i need information to drive my gecko with a 18f too

for the DIR INPUT : 0 or 5v, ok ?
for the STEP INPUT ? with the PWM ?

Which frequency ? (motor speed ?)
Which duty cycle ?


do you have picture of dir/step signal output at // port of PC ?
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 05-11-2007, 05:30 PM
 
Join Date: Dec 2005
Location: CANADA
Posts: 195
jcdammeyer is on a distinguished road

Hi,

Originally Posted by MaXx View Post
hello

i need information to drive my gecko with a 18f too

for the DIR INPUT : 0 or 5v, ok ?
for the STEP INPUT ? with the PWM ?

Which frequency ? (motor speed ?)
Which duty cycle ?


do you have picture of dir/step signal output at // port of PC ?
I don't have a GECKO so I can't tell you anything any better than the GECKO user manual.

The direction input is 0 or 5V for direction control. That's pretty easy. Stepping pulses are not PWM. They need to be a pulse of about 5uS or so for each step. If you want to run the motor at 1000 steps per second then you are producing a pulse every millisecond that is at least about 5 uS long. If you are running 100 steps per second then it's a 5uS pulse every 10mS.

The GECKO manual will tell you if you have to sink current through the opto input or source current into the opto input.

Have fun!

John Dammeyer
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 05-11-2007, 05:36 PM
 
Join Date: Jul 2005
Location: France
Posts: 7
MaXx is on a distinguished road

cool !

5v for the step too ?


thx
Tweet this Post!Share on Facebook
Reply With Quote

  #12   Ban this user!
Old 05-11-2007, 06:14 PM
 
Join Date: Dec 2005
Location: CANADA
Posts: 195
jcdammeyer is on a distinguished road

Hi,

Originally Posted by MaXx View Post
cool !

5v for the step too ?


thx
Yes. Depending on which Gecko you have they have a terminal marked common. Contrary to logic this was often a common 5V rather than common as in common ground. That's why you have to read the manual carefully.

Also check in on the Yahoo Gecko group or

http://groups.yahoo.com/group/DIY-CNC/

or

http://groups.yahoo.com/group/CAD_CAM_EDM_DRO/

Someone there can assist you with how to wire a Gecko.

Since the Gecko's were designed to be driven directly from a PC parallel port, I think the ports pull the Gecko inputs to ground sinking current through the opto isolator. But don't quote me on that. The manual or the Gecko support can better answer those questions

John Dammeyer
Tweet this Post!Share on Facebook
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Geckodrive G100 Mariss Freimanis Gecko Drives 8 06-02-2006 03:37 AM
Flashcut to Geckodrive 210 whiteriver FlashCut CNC 17 02-22-2005 10:30 PM
Please Help with geckodrive Biggermens Gecko Drives 1 01-03-2005 12:29 PM
Power Supply for Geckodrive Grom1 Gecko Drives 7 12-31-2004 06:19 PM
Geckodrive 201 Vs Prodrive 2000 balsaman Gecko Drives 16 01-15-2004 05:17 PM




All times are GMT -5. The time now is 05:53 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