587,475 active members*
3,526 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Gecko Drives > Custom PCB to interface with G540
Results 1 to 13 of 13
  1. #1
    Join Date
    May 2013
    Posts
    16

    Talking Custom PCB to interface with G540

    Greets,

    I am working on designing a custom PCB to interface with a G540. The intention is to drive the G540 from Arduino and GRBL, just as an alternative to my current MACH3 setup which works GREAT. I've a couple CNC machines using GECKO drives, one with the G540, one with individual drives, and very much like the products...Thanks for the good work GECKO!

    I've a couple questions regarding the DB25 and DB9 connections on the G540.

    1) Is there an available schematic, showing a little better what is going on with each pin just inside the DB25 connection, I am still making a few assumptions ATM. Of course I have reviewed the G540 manual immensely, and am thoroughly familiar with the pinout diagrams there, but I still don't quite understand what exactly is under the hood.
    for example...

    a) it seems there is roughly 4.5 volts between the 4 pins (input 10,11,12,13) and the ground pins. Where is this voltage coming from? Are these open collector pulled high from internal 5v source, as I notice the pins go to ground when the respective pins (1-4) of the Main
    Terminal Block are grounded?
    b) do the Step and Dir pins (2-9) connect internally to LED/Resistor input of an opto-isolator?
    c) is this the identical case with the Output2,1 pins (1,17)?
    d) Any advice regarding the electrical internals of pins 14,15, and 16 would very much help...?

    2) My G540 is mounted to an aluminum enclosure. Some of the DB shells (Y, Z) have continuity (are grounded) with the Aluminum enclosure, some (X,DB25) do not... Is this by design, or is there some problem with my unit? I would think all the shells would be connected to the enclosure, or should they all be isolated?

    Cheers,
    bc

  2. #2
    Join Date
    Mar 2007
    Posts
    2083

    Re: Custom PCB to interface withe G540

    from an old post here on CNCZONE I saved this circuit diagram for an early version of the G540

    G540's produced now have only 2 outputs-
    terminals for the deleted outputs 3 & 4 provide the terminals for the VFD circuit that was added

    also the 12V regulator is now a switchmode design

    never the less the old diagram should provide enough details to enable you to design your interface

    John

  3. #3
    Join Date
    May 2013
    Posts
    16

    Re: Custom PCB to interface withe G540

    Quote Originally Posted by john-100 View Post
    I saved this circuit diagram

    sorry...

    but WHICH circuit diagram?

  4. #4
    Join Date
    Mar 2007
    Posts
    2083

    Re: Custom PCB to interface with G540

    not sure what happend
    I'll try again

    pdf circuit
    Click image for larger version. 

Name:	G540 SCHEMATIC.pdf 
Views:	0 
Size:	97.1 KB 
ID:	332330

    John

  5. #5
    Join Date
    May 2013
    Posts
    16
    Nice, thank you...my first quick glance looks like it may answer a few questions once I study it a bit!

    Perhaps Gecko may provide something similar regarding the current model, that's the one I have.

    It's a start, thanks so much!

  6. #6
    Join Date
    Mar 2007
    Posts
    2083

    Re: Custom PCB to interface with G540

    looking at the old circuit and the latest G540 manual

    this is how it looks like the printer port pins have been re assigned

    Attachment 332384


    the opto isolaters on the main PCB adds the step & direction isolation missing on the G250 drivers

    Attachment 332386

    if your interface buffers the printerport and provide a +5V logic 1 output
    I expect it will need to be able to provide a maximum of a 16mA output -
    ( subtracting 1.8V across the LED gives you 3.2 V to be dropped across the 200 ohm resistors in the G540
    3.2/200 = 16 mA LED current )

    John

  7. #7
    Join Date
    Jan 2007
    Posts
    467

    Re: Custom PCB to interface with G540

    billcat,

    I was going to post that REV1 schematic but it looks like john-100 beat me to it. If there are any questions you have just let me know.

    Unfortunately we don't release current revision schematics but I will see if there is anything I can rustle up if you need something. In the meantime, here is the circuit for the VFD just in case you want that to go with it.

    Click image for larger version. 

Name:	G540 VFD Schematic.jpg 
Views:	0 
Size:	34.8 KB 
ID:	332416
    Marcus Freimanis
    www.geckodrive.com

  8. #8
    Join Date
    May 2013
    Posts
    16

    Smile Re: Custom PCB to interface with G540

    John,
    Your info has been most helpful, thanks a bunch!
    And you too CoAMarcus, chimed in as I was typing here it seems I appreciate the attachment, will have a look shortly.

    I've been working on the project for a couple of days so far, I've no formal electronics background, just a hobby so it's a good stretch.
    I built the first prototype PCB on my DIY mini router and also made up some easy to connect db9 to G540 adapters with built in current set dip switch...pic attached

    So far, I have been able to at least run 3 unattached steppers as I was hoping for from my Android app over BLUETOOTH, yay: https://play.google.com/store/apps/d...ommander&hl=en

    I'm trying to make the best interface of the features offered from the GRBL firmware for Arduino, we'll see how it goes...fun stuff. If all goes well, I'll probably make available all my CAD files and schematics somewhere, perhaps on the Shapeoko/GRBL forum... or maybe here, if anyone is interested. I'm also considering having some PCB's manufactured as well just for the heck of it, maybe offer bare boards for cheap for those DIY types like myself. I like to stay with all DIP and through hole, just to make it easy to work with/repair.

    Cheers,
    bc

  9. #9
    Join Date
    Mar 2007
    Posts
    2083

    Re: Custom PCB to interface with G540

    Hi Marcus

    its a difficult decision to decide how much circuit detail to release for your products
    I for one would not expect you to post the circuit diagrams of your latest products

    I have was pleasantly surprised by the designer of a BDL-Autoscript teleprompter sending the circuit of the monitors power supply
    so I could see if I could modify two , 3 day old monitors !!!
    I needed to reduce the switch on surge that tripped the cameras switch mode power supply

    within an hour I had modded one monitor by increasing the value of an electrolytic to extend the time it took for the HT to ramp up
    and yes I sent him a copy the circuit with my modification

    with the G540
    I see you have gone the extra mile with an active filter on the VFD circuit
    ( I'd thought it would of been simpler to fit in the limited PCB space )


    previous versions of the driver pin 26 is the reserved pin that powered the opto isolators

    I guess with the new G250 stepper drivers use pin 26 to connect the remote potentiometers that are moved to the main board

    will the date sheet be updated to show enough information to connect a potentiometer to bench test a driver ?
    does the potentiometer apply an adjustable DC voltage ( 0 to +5V ?) to pin 26

    John

  10. #10
    Join Date
    Jan 2007
    Posts
    467

    Re: Custom PCB to interface with G540

    John,

    We currently have two G250X revisions, G250XR2 and G250XR3. The G250XR3 has had pin 26 reassigned to allow for external trim adjustment and is only used in the G540, which is why the G250XR2 manual has not been modified to reflect any pin changes. The G540 used to use that pin because of its voltage output but that has been reassigned to come from an onboard bus.

    The G540 motherboard doesn't really do too much that is special and is functionally a pretty simple breakout board, which is why we don't mind posting circuit diagrams for it on the forums.
    Marcus Freimanis
    www.geckodrive.com

  11. #11
    Join Date
    Mar 2007
    Posts
    2083

    Re: Custom PCB to interface with G540

    Hi billcat

    I have had a look at your pictures
    the milled PCB looks good

    what s the range of resistance you can select with the DIP switches -
    1K to 3K5 in 250 ohm steps ? (1A to 3.5A in 0.25 A steps)

    How reliable is the Bluetooth connection ?
    looks like a pioneering project

    John

  12. #12
    Join Date
    May 2013
    Posts
    16

    Re: Custom PCB to interface with G540

    @Marcus
    In your opinion, should I leave the db25 shell isolated from the logic ground on my PCB? PCB grounding is quite the ambiguous topic for me.

    Quote Originally Posted by john-100 View Post
    the milled PCB looks good
    what s the range of resistance you can select with the DIP switches -
    1K to 3K5 in 250 ohm steps ? (1A to 3.5A in 0.25 A steps)
    How reliable is the Bluetooth connection ?
    looks like a pioneering project
    John
    Hi John, thanks for the nice comments.
    Not sure the words 'pioneering' and billcat have ever been used together!

    The goal for the /current set/ resolution was .1 ampere. Have a look at the attachments...and enjoy!

    I have completed perhaps 100 or more small cnc jobs on my mini router over the Bluetooth connection, with never a one hiccup....unless I walked out of range with my phone and lost connection.
    I have a handful of rough videos on youtube demonstrating some simple runs.
    Now, my little router uses the DRV8825 drivers at a max of about 2amp per motor. That's why my interest is in testing the operation at higher current levels as those available with the Gecko drives.
    Curious if the extra current will cause noise problems.

    *I have tested further my PCB with the gracious help of the info you guys have provided, and so far the results look promising:
    3 step motors running as expected (no load), 4 inputs reporting back to my PCB, 2 outputs recognized from my PCB. Next...look into the Analog signal.
    for the uninitiated, GRBL does not pack a heaping bunch of features as Mach3, LinuxCNC, and other proprietary softs. What I have found it to offer is solid, reliable motion control, with two bonuses:
    a) open source so that you may reconfigure the firmware...if your'e up to it
    b) inexpensive alternative to complete motion control; no PC needed. I imagine cost of around $25 dollars to fill the BOM of my design.

    Thanks again!
    bc

  13. #13
    Join Date
    Mar 2007
    Posts
    2083

    Re: Custom PCB to interface with G540

    Hi billcat

    thats a great solution just using 3 resistor values

    I'll have to take a closer look at GRBL

    John

    PS

    an alternative version of your board
    for when you only expect to set the resistance once

    Attachment 332480

Similar Threads

  1. What is needed to have Mach4 interface to G540
    By SteveS in forum Gecko Drives
    Replies: 7
    Last Post: 04-11-2016, 08:16 PM
  2. G540 Interface Boards Back in Stock!
    By RPCElectronics in forum News Announcements
    Replies: 0
    Last Post: 06-27-2012, 10:39 PM
  3. Gecko G540 Interface Board
    By RPCElectronics in forum News Announcements
    Replies: 24
    Last Post: 09-27-2011, 02:50 PM
  4. C10 interface card to g540
    By Vatorman in forum Gecko Drives
    Replies: 7
    Last Post: 05-08-2011, 07:11 PM
  5. Custom output interface
    By pommac in forum Fanuc
    Replies: 1
    Last Post: 06-23-2008, 12:02 PM

Tags for this Thread

Posting Permissions

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