Hello Guest it is January 16, 2022, 07:42:59 PM

Author Topic: Getting my Smoothstepper + G320 + CNC4PC system spinning servos  (Read 6928 times)

0 Members and 1 Guest are viewing this topic.

Getting my Smoothstepper + G320 + CNC4PC system spinning servos
« on: January 03, 2009, 11:47:55 PM »
Hello all.  Just got my system to spin a servo for the first time on my IH Mill project.  Full details are available on my web site here:


It took me a little longer than I expected to debug the electronics well enough to spin a servo, and several things I discovered seemed arcane to me, so I thought I would post here the list of things I had to do to make it work in case that helps others.  I am using a Smoothstepper with CNC4PC breakout (plugs into Smoothstepper), CNC4PC Master Control Board, and Gecko G320 servo drivers.

Here is the list of things I had to change from my original test configuration to get things working:

1.  Set CNC4PC Master Control Board DIP switches for G320. It acts funny on the other board types whether or not Err/Res is connected.

2.  Discovered I had mislabeled the leads from my front panel for the "Start" and "E-stop", so they were connected backwards.

3.  Reverse the motor connections because they were backwards compared to what the encoder indicated, causing an immediate servo fault.

4.  In doing #3, I reversed the wrong leads and had to replace the power supply rectifier. I don't think I blew the Gecko, amazingly!

5.  Connect a 47K ohm resistor across pins 1 and 3 of the G320 to ensure the bridge initializes properly. This was buried in a hard to find Mariss note on CNCZone.  If you have power on fault problems with the G320, this helps a lot.  Mariss has said this change will go into next generation servo drives.

6.  Now I was getting the servo to hold position, so I played with the tuning trimpots a bit. I get a gentle buzz/rattle, but not really a "hum".  Holding force is really strong even with modest gain.  I could not fault the servo trying to turn shaft by hand.

7.  In Mach3, set Step/Dir to ActiveLo. Set pulse width to 5 (the pulse width may be ignored for Smoothstepper, but I was taking no chances!).

8.  Connect "Common" on G320 to +5V on breakout card instead of Ground. Another one that's easy to miss unless you read a lot of posts on various boards!  For me, "Common" meant ground, not +5V.  I discovered this when I noticed in the Geckodrive manual this one used to be labeled +5V.  Sure wish they'd kept that label!

9.  Set up the proper motor tuning parameters on Mach3. IH says 115 IPM speed and 0.15g of acceleration, according to another post I found. I also needed 28,240 steps to move 1".

10.  Set the Smoothstepper jumpers to actually provide +5V to the breakout board. Otherwise, the terminals marked "+5V" are 0V! This was a surprise.  The terminals marked +5V are not powered unless you set jumpers on the Smoothstepper.  Hence my work with "Common" initially had no effect.  Finally spotted the jumper when I was rereading all the docs for all the boards.

Now I can spin the servo this way and that with Mach3. It can still fault if I rapidly change directions at full jog, but that's just tuning and I need to set it properly on the actual machine instead of with servos flopping around on the floor.  It's pretty cool to be able to do this with a laptop too.

I must admit that per the discussion on my Cookbook Blog on the Eternal Servo vs Stepper Jihad, it was a lot harder to spin a servo than a stepper. In general, I encountered a lot of less than obvious things including the CNC4PC DIP switch settings, need for the 47K ohm resistor, and bizarre experiences with "Common", which has to be +5V, and which didn't get +5V until the Smoothstepper jumpers were enabled.

I hope these notes help the next guy who searches everywhere for "servo fault g320 problems" as I did! FWIW, I think I read every post on G320's on this board, on the Mach3 board (both Yahoo and Artsoft's), on CNCZone, and on the Geckodrive boards.  I learned a lot in the process, but not all of my answers were there, hence this post.

The Internet is your friend!

My next steps will be to clean up my breadboard wiring, wire up 2 more modules, test, stick it all into the enclosure box, test, mount servos on the machine, test, and make chips!


Try G-Wizard Machinist's Calculator for free:


Offline Chaoticone

  • *
  •  5,626 5,626
  • Precision Chaos
    • View Profile
Re: Getting my Smoothstepper + G320 + CNC4PC system spinning servos
« Reply #1 on: January 04, 2009, 10:12:39 AM »
Thanks Bob. Very helpful post for some I'm sure. I may copy this to the members docs sections.

;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!