Super PID first light

All’s well that ends well.

I had a long day out in the shop today, and it was filled with a lot of trials.

First, I spent a little time working on the foot for the NJP mount. I’m kind of working a lot of projects at once, here, but I was pretty close to being done, so I wanted to get that complete. Things went together, and it looks awesome. More about that on the other blog.

Then, I needed to put a servo cable end on the RPM sensor for the Super-PID. That took a couple of tries, but I got it done. While the soldering iron was hot, I decided to also solder some male header pins onto the Hall Effect sensors. That went ok, too, although there’s not a lot of pin sticking out to solder to, and the smell of burning Sugru is not awesome.

I wanted to test the Hall Effect sensors one more time to make sure I hadn’t killed them with all the soldering. In the process of testing, however, I must have cross-wired something, because I blew one of the sensors. Argh. I will have to go back through my notes again, and construct a new one. I carefully tested the other 2 sensors and they’re working fine. I may run the machine with just X and Y home switches for a bit. I was very disappointed in myself that I messed that up.

However, it was probably for the best; as a result of blowing up the sensor, I decided to carefully test the wiring of the Super-PID case. It’s a lot of new wiring, and I didn’t want to blow anything else up.

First, I put 5v and ground into the wires on the DB-9 port on the side of the case. I confirmed, piece by piece, that things were working when powered like that; first with all plugs out, I tested the perfboard to make sure that I was getting 5v and ground where I thought I should. Then I plugged in the Super-PID and tested it again. It powered up just fine. Then I tested the new RPM sensor wire, and that worked, too (I could turn the endmill by hand and see it flash up and down past the sensor). I even tested the mains voltage to make sure that the board could see the 110vac.

At this point, I was getting over my fears about the new circuit, and I was just about to plug the thing into the computer and boot up, when I decided that I should test the cable coming from the computer first. I started getting some weird readings, and decided to test continuity on the CAT5/DB-9s. I discovered a bad CAT5 cable that way. Whew!

Then I started probing the cable for 5v and ground, to make sure I was wired up the way that I thought I should be, and I noticed something was decidedly odd about the readings I was getting. I knew the cable was OK (and the ends were straight through), so couldn’t figure out what was going on without tearing down the computer side of things.

So, I dismounted the PC, got it up on the table, and started ohming out the connections between the G540 and the DB-9 connector. I finally got to the bottom of what I had been attempting to do with the cabling, and I found that I’d somehow flipped 4 of the pins on the DB-9 connector on the Super-PID.

?!?

I double-checked everything carefully, and indeed, I had wired it 4-3-2-1 instead of 1-2-3-4 (with 2 of those pins being +5v and Ground!). I am *so* glad I took the time to check the connections before I hooked it up!

Once I found the problem, I looked for its source, and found it immediately — I had written up the diagram incorrectly in my notebook. *facepalm* The pins were numbered correctly (although poorly annotated — I didn’t realize, 4 months later, that I’d written down “G540 pin number” instead of “DB-9 pin number”), but they were *labeled* incorrectly, and of course I followed the labels as I wired up the new connector.

I corrected the error in the notebook (and added some extra annotations), then de-soldered and re-soldered the DB-9 port on the Super-PID. I spent a little extra time going through and making sure I completely understood all the connections, re-tested all the voltages, and, breath held, I plugged into the computer and powered up all the way from the G540 through to the Super-PID.

It worked!

Discovering, Diagnosing, and Repairing an error I’d made 4 months ago took the better part of the afternoon. By this point, my brain was pretty fried.

During the middle of all the testing, I decided to re-work the cable runs going to the router. I haven’t been happy with the cable channel I bought (it actually caused a machine failure last time I was doing a cut), so I removed that. In addition, I had a couple of new cables to run (there are now 5 of a future 6 wires plus the vacuum hose, that need to move with the Z table), so I removed the channel, and worked up a new solution. I’m now running everything directly to the vacuum hose, which I think will keep cables from fouling. I’ll probably use some of the same split-channel that I used for the NJP wiring harness, to keep everything nice and tidy. For now, it’s still being held in place by Velcro.I really like the new cable run, though — it looks pretty nice, and I think that it’ll work without binding up.

I decided to fire up the computer and do a test all the way through Mach3. I got the computer re-mounted, got all the cables plugged in, and booted up. As if I hadn’t had enough trauma for the day, the mouse needed a new battery. Can you feel my eyes rolling?

I got Mach3 up, put in all the configuration parameters from the notes I’d written in the notebook (deciphering took a few passes), and told Mach3 to turn on the spindle.

Nothing happened.

To say that I was a little disappointed at this point would be a vast understatement. Was I facing a problem in hardware? firmware? software? cabling? configuration?

I’d just been fighting this thing all day, and working to get to this moment for several working days over the course of a year. Was this *ever* going to work?

I was so fried at this point that I just needed some time away. I shut everything down, and went to dinner. A couple of hours later, I was seeing if the ‘net could help me to diagnose the problem, when I had a flash of inspiration. I headed out to the shop, changed 2 parameters, and voila! the router started spinning at Mach3’s command, and the tachometer in Mach3 started reading back the same RPM that the router was reading. Cool!

The configuration parameters I changed? I had put the Super-PID onto the G540’s Output 2 (it has 2 outputs; don’t know why I didn’t do output 1, don’t ask), but since most people use Output 1 for this, the configuration I’d copied down for “which LPT pin to toggle for the RUN pin on the Super-PID” was set to the wrong pin. Fixing that, the router fired right up. Also, the TACH input was set to the wrong LPT port. Tweak that, and the tachometer started working. There’s a whole lot of “pin X” translates to “pin Y” in this build — from LPT to G540 to DB-9 (there are 4 of these that come in 2 mirror-image pairs) to CAT5 to Super-PID… I’d captured all the data, but I’d just missed that last translation (output 1 vs output 2).

I was tickled that I’d carefully diagnosed all the hardware errors before booting the thing up, and that the only problem was in configuration.

Three more errors manifested at this point, but my confidence is high that I’ll get them solved quickly.

First, for some reason the router is only running at 5,000rpm. That’s the “minimum” value, so this means that the Super-PID is not getting a voltage difference across the “potentiometer” pins from the G540. It’ll take some looking at, but I’m not going to stress about it for now.

Second, the Y-axis motor, which has plagued me for a long time, is not working right. Again. It was doing the stuttering thing that turned out to be a cold solder joint last time. I assume this is due to re-cabling the gantry. I’ll get it worked out, but it has nothing to do with the Super-PID, so it’s just another bug to crush, not something that I just broke.

Finally, the bearings in the router are sounding really terrible. Running at 5k rpm, the router would normally be almost silent, but it was screeching and caterwauling away. So, when I went back inside, I did a little final research, and decided to buy a Porter Cable 892 router. I have a couple of spare routers around, but none of them will fit the CNC without modification. The BuildYourCNC folks build their machines around PC892 routers, so rather than continuing to swim against the current, I decided to just do it. The router will be here in a few days, and of course I need to cut a new mount for it before I can use it.

Installing a new router mount will give me some time to redo the Z-table. I really need to replace the 3/8″ socket-head bolts with pan-head ones, and get everything tightened up and ready to roll.

The Super-PID is installed. It is being controlled by Mach3. For now, I am declaring victory.

TODO:
– new Hall Effect sensor
– 3 servo cables for the home switches
– new router mount
– modify the new router for Super-PID control
– buy new Y-axis rails
– tighten up the Z-table
– Super-PID RPM control
– Y-axis motor connector

This entry was posted in Electronics, Making, Woodworking and tagged , , , , . Bookmark the permalink.