584,800 active members*
4,760 visitors online*
Register for free
Login
Results 1 to 13 of 13
  1. #1
    Join Date
    Apr 2007
    Posts
    10

    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.

  2. #2
    Join Date
    Dec 2005
    Posts
    231

    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

  3. #3
    Join Date
    Feb 2007
    Posts
    2
    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 -

  4. #4
    Join Date
    Aug 2005
    Posts
    36
    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

  5. #5
    Join Date
    Apr 2007
    Posts
    10
    Thank you very much for your colaboration.

    Hugo.

  6. #6
    Join Date
    Dec 2005
    Posts
    231
    Hi Hugo,

    Quote 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

  7. #7
    Join Date
    Aug 2005
    Posts
    36
    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 Attached Files

  8. #8
    Join Date
    Feb 2007
    Posts
    2
    Sorry Hugo...

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

    Sorry...

  9. #9
    Join Date
    Jul 2005
    Posts
    7
    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 ?

  10. #10
    Join Date
    Dec 2005
    Posts
    231
    Hi,

    Quote 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

  11. #11
    Join Date
    Jul 2005
    Posts
    7
    cool !

    5v for the step too ?


    thx

  12. #12
    Join Date
    Dec 2005
    Posts
    231
    Hi,

    Quote 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

  13. #13
    Join Date
    Jul 2005
    Posts
    2415
    G203's use Common Ground instead of Common +5 (like most of the other Gecko's) Step & Dir signals are active high (positive). Don't forget that the G203 is a microstepping drive meaning that for every ten steps in you get on e full motor step )1.8 deg on most motors. You can't count on it for increased accuracy but it smoothes out the motion. Current waveform is closer to sine wave.

Similar Threads

  1. Geckodrive G100
    By Mariss Freimanis in forum Gecko Drives
    Replies: 8
    Last Post: 06-02-2006, 08:37 AM
  2. Flashcut to Geckodrive 210
    By whiteriver in forum FlashCut CNC
    Replies: 17
    Last Post: 02-23-2005, 04:30 AM
  3. Please Help with geckodrive
    By Biggermens in forum Gecko Drives
    Replies: 1
    Last Post: 01-03-2005, 06:29 PM
  4. Power Supply for Geckodrive
    By Grom1 in forum Gecko Drives
    Replies: 7
    Last Post: 01-01-2005, 12:19 AM
  5. Geckodrive 201 Vs Prodrive 2000
    By balsaman in forum Gecko Drives
    Replies: 16
    Last Post: 01-15-2004, 11:17 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
  •