OK fans, there is finally more progress to report. I've spent the last 2 weeks trying to get my electronics wired up and working. I finished the initial wiring 3 days ago, and since then have been feverishly trying to debug it all. I am happy to say that I can now spin one servo under Mach3 computer control. Yay!
But what an ordeal it was getting there!
If you want the full story of how I debugged this silly thing, I captured it on a page so you can see how I went about it:
http://www.cnccookbook.com/CCMillCNCDebugging.htm
It's a painful process as not all of the relevant information you will need is captured in one single place. Some of it was out there, but a lot of it I just had to figure out on my own.
Here is a concise list of all the things I had to change from my original attempt to run:
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 PC board. You can see my substitute sitting there atop an electrolytic capacitor. I don't think I blew the Gecko, amazingly! My only excuse for that bone-headed mistake is that it was late at night and I have the flu. This needed the electronics equivalent of measure twice cut once!
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. He says there that this fixes power on fault problems and will be built into the next generation Gecko servo controllers.
6. Now I was getting the servo to hold position, so I played with the tuning trimpots a bit.
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! I had it connected to Ground for a long time because that's what the word "Common" meant to me. I finally found an old picture of a G320 where the connection said +5V and that gave me the idea.
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! I discovered this as I was clutching at straws and decided to see if I had missed some jumper or DIP switch on the Smoothstepper.
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.
I must admit that per the discussion on the other thread, 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 on the Gecko, and bizarre experiences with "Common", which has to be +5V, and which didn't get +5V until the Smoothstepper jumpers were enabled. I may still have a problem or two to diagnose. This thing is breadboarded at best, and the Err/Reset still needs test and hookup.
Here are some photos of my CNC electronics testing lab on the dining room table (my wife is glad it seems to be working and I'm cursing a lot less!):
Next steps are to finalize my breadboarded wiring, clean it up a bit with cable ties and such, wire the other 2 axis modules and test them, and then assemble all this into the enclosure NEMA box and test it all again. At the conclusion of all that, the servos go on the mill and we'll see about some real fun!
Cheers,
BW