Sunday, August 11, 2013

New PC Controller

March 2013

After deciding to ditch the Rutex hardware for Mesa, I did a lot of reading and research and asked a bunch of questions on the LinuxCNC Forums. Ultimately I bought a Mesa 5i20 PCI FPGA card, two 7i29 DC Brushed servo drives, a 7i37TA optoisolated I/O card and a couple of 50-pin ribbon cables to connect the works.

I had also previously been using a free Dell Dimension desktop sitting on a chemical drum to push signals to the Lagun, but it was more test rig than a long-term solution.

I had hoped to find an enclosed, fanless solution but it seemed that almost everything with a case had either no PCI slot or not enough room to fit a full height PCI card inside. After weighing my options and not liking any off-the-shelf solutions, I decided to piece together a system around a mini-ITX main board.

I took a risk since there was no data on the LinuxCNC wiki about this particular board, and bought a WTM-D28 main board powered by an Intel Atom 1.8 and 2g of ram. Internet is handled with a Mini-PCIE wifi card. Onboard video, USB, ethernet and audio, and easy power interfacing with a barrel plug.

I also bought a 120Vac 160 Watt power supply, because I was concerned that once rectified, the low voltage output from my servo power supply would be too high for the mainboard to handle.

The DTM mobo also has a DC-DC converter on board to supply +5V and +12V for the hard drive, although its a 4-pin Molex and the wrong orientation (male). I remedied this by clipping part off a power split wye I had lying around and since I had a SATA drive I intended on using, coupled the Molex-SATA adapter to the former wye and plugged it into the mainboard and hard disk.

About this time I also got myself a display enclosure with a keyboard and trackball from ebay, and mounted it to the top of the mill. For now there's a Dell LCD I pulled the stand off sitting in the enclosure and no shield to protect it from flying chips.DSCF3149

It's starting to look like a real machine!

DSCF3128

DSCF3129

DSCF3142

Testing and installing LinuxCNC on the WTM mobo before my power supply showed up DSCF3150

Monday, May 13, 2013

Rutex drives, and why I don't use them anymore.

November 2012-March 2013



Since the Lagun mill didn't have any drives when I brought it home, I originally thought I'd be using Geckodrives to power my mill project, because a lot of other people have had success using them. They're cheap, effective, well supported and have a lot of dedicated followers on CNCZone and elsewhere. I had been using ebay to scope out my options as far as servo drives go and stumbled across a set of 3 Rutex 2010 drives really cheap ($60/ea) and that upset my initial plans, because I thought I could save some money and time in getting my mill from its unfinished state to making chips. Unfortunately it didn't work out, and I have written up some praise and criticism of the Rutex R2010's for the sake of anyone who is considering them. When I was searching out the pros and cons of using them there was not any such information out there for me to use and I hope that by sharing what I've found that I'll save someone else some hassle.

On paper, the Rutex drives are great - for a comparable price the R2010s handle more voltage than the Geckos, offer software based tuning that doesn't require an oscilloscope, and offer a modular main board and differential line drivers that interconnect simply.

Before I completely tear into Rutex for their products, I will give them a few praises for things they did right. On their software, the whole auto-reverse to tune works great, and now that I'm tuning with HALScope on LinuxCNC, I have a better appreciation for how good it does work.

I also like that the R2XTuneVB6 software had up/down buttons on the variables for P, I, D, etc and that the changes to variables was "live" and didn't require a keystroke or mouse-click to download the changes to the drive.

That said, I'll bullet a few points that I think Rutex needs to address in order to make their drives a viable option for the DIY CNC crowd:

- Ditch the SPI protocol. Rutex uses SPI to tune, and as far as I can tell its as buggy as can be. The R2XTuneVB6 software apparently can't properly calculate overshoot if there's a serial interruption or error, so instead of displaying a correct overshoot number it automatically jumps to a number over 32000.

- The R2XTuneVB6 software can't really deal with communication outages, and this wouldn't be so frustrating if it didn't reset all the variable values to zero when that happens.

I tried to brainstorm a number of things that could be causing the problem (for whatever reason it was worst on my Z-axis) and tried the following to make the tuning communication problem go away:
Swap differential line drivers
swap cat5 cables
swap encoders
swap PC's
swap motors
check grounds on PC, power supply, mainboard
change shielded cable on motor
change cat5 cable with another brand
swap a custom made tune cable for an R2110 mainboard

Needless to say none of these things worked, and I had to endure nonstop resets and infuriating loss of variables in order to even get close to a tuned axis.

- Fix your broken documentation. One of my motors had a CUI capacitive encoder on it, and after trying for many hours to figure out why it wouldn't play nice with the drive I called and talked to Rutex USA, who told me that CUI capacitive encoders have known problems with their drives. Yet the rutextest.doc document I downloaded from their website mere days before the phone call showed an identical encoder mounted on a Keling motor. Their tech docs and phone support have conflicting information spread across several documents. Additionally their documents are in several formats (!) and there is not a single document that shows how their "system" is supposed to work or integrate.

As of writing there's no explanation on the website or support documentation as to what the difference is between the different polarized and non-polarized motherboards that Rutex USA sells.

I also ran into problems early on getting bidirectional communication to work at all, and it was a bios setting problem but none of the suggestions in the R2000setup document fixed it. I suspect this may be a difference inherent to Dell bios but as many people are repurposing Dell machines as CNC controllers its probably worth mentioning.

- Sell breakout & interconnection hardware, don't force people to hunt thru digikey and ebay to get things like DB-25 and DB-15 cables and IDC connectors.

- Sell breakout boards, or put screw-type headers on your main boards for limit switch and estop connections. I don't believe that very many CNC retrofit projects work without changing things up from their original "plan" and screw terminals make changing plans much easier than re-soldering a DB style connector.

- Get rid of the cat5 encoder interconnects. Originally I though that this was a great idea and so much simpler than stringing wires, until I realized that TCP/IP comm over cat5 is designed around resilience to packet loss and signal degradation, and an RS-422 line driver has no such safeties against lost signals. Additionally most cat5 cable isn't designed to be flexible and without additional punchdown tools and extra ends, isn't easily run thru a strain relief to keep from damaging the drives or line drivers.

In conclusion, I eventually did what I should've in the first place and dumped the Rutex drives, main board, breakout hardware, encoder line drivers and cables on ebay to someone else with more patience than I have. I then called Mesa and did what I should have done in the first place - bought a 5i20 FPGA card, 2x 7i29 H-bridge drives, 2 interconnection flat cables, mounting hardware and a 7i37TA interface daughterboard.

Tuesday, April 2, 2013

A short tirade about cables and smart design

So I won't, and haven't attempted to disguise that I went into this whole CNC-retrofit business not knowing what the hell I was doing.

But I can't help but feel like there's a number of things that some manufacturers are doing to make things *harder* for people who are trying to make stuff, and make stuff work with other stuff. And one of those stupid things, that I think ought to be ridiculed until it is changed, is how attached so many hardware makers are to a DB-25 connector on their output/breakout board.

This could have been averted with some better planning - my original plan was to use a UIRobot breakout board with geckodrives, then my plan changed when I found some Rutex drives dirt cheap, and I've since scrapped that whole step/direction drive business for reasons I'll discuss in a future entry. Had I made a straight path from no-drives to a completed setup, I would have only needed one connection cable and maybe avoided some frustration.

But back to my original point, why the DB-25? I'm not sure that a printer sold in this country since I was born has actually had a DB-25 connector on the printer side. Everything, and I mean EVERYTHING printer/scanner/all in one on the PC side has a Centronics connector on the printer side, at least until USB peripherals started replacing everything that was previously connected via PS/2, parallel or serial ports.

Complicating this further, is that there doesn't seem to be some sort of standard as to whether the breakout board should have a male or female plug on it, so upgrading or changing breakout boards could mean changing cables as well. I wouldn't harp on this so much, had I not backburnered my own project for 4 days by not paying enough attention to that little detail.

So, hardware manufacturers, take this as my plea to do something that makes some sense.

I know it might complicate things from a wiring diagram standpoint, but I don't think its too much to ask to give the end user a simple chart documenting which pins on the PC side translate to which output pins on the breakout board. As an end-user, I don't really care how the signal gets from point A to point B, just that it gets there intact and that I've properly configured my software to mesh with it.

Monday, March 25, 2013

Power Supply Pt. 5: Putting it in a cabinet, then another

October 2012 - Feb 2013

After assembling my power supply into the nema box that came with the mill, I realized just how short on space I was for the second set of caps I wanted to run for my 12-24 volt supply. I found a bigger nema box with a disconnect on the outside for $50 from a local surplus shop, and started swapping everything over. I bent up some fence hardware from Ace to hold the caps flat against the backplane and used some of my additional free space to glue a fan to circulate air around the rectifiers.



DSCF3089



DSCF3090



DSCF3092



For the time being I still have a temporary (un-conduited) set of wires running from where power comes in the back of the mill and have set the new power box on top of the original box with a cable running to a pin header in the original box.



DSCF3093

Monday, February 18, 2013

Power Supply Pt. 4: Putting it all together

September-October 2012:

Since dewinding the transformer took me a bit to get finished, all my other components had shown up and I found a huge heatsink to mount everything on. So I started moving things around on the backplane and figuring out how I wanted to lay things out:

DSCF1168



In case you are wondering, the black box is an inrush current limiter. I'm told it uses a resistor to slowly bring the transformer core up to saturation and prevent downstream voltage spikes. Another ebay find for $20 + SH, and cheap insurance if it does what it is advertised to.

I mounted the rectifiers to the heatsink using self-tapping screws which walked and that was (in retrospect) a mistake without doing some proper layout and pre-drilling first.

DSCF1172



Ugly though it may be, it will still work so I moved on to soldering connectors onto the secondaries of the transformer:

DSCF1174



Since I knew that I was going to try and make this look pretty, I took the old nema box off and had it blasted and powder coated, while it was off I used a judicious amount of carb cleaner to get all the oxidized coolant and metal chips off the side of the mill:

DSCF1175



Powdercoater did the outside of the nema box but not the inside (facepalm!):

DSCF1176



I guess its ok, nobody will see much of it once electronics are mounted anyways right? Grumble grumble…

Now at least I can mount the backplane to the inside of the box, when I discover that my capacitors are too tall to mount up straight out the backplane without touching the inside of the lid and shorting out. So for now they get to stand up inside the cabinet:

DSCF1178



With the filter caps disconnected from the rectifiers and my new OTC portable scope hooked to the rectifier output, I can see the peaks and valleys where the AC voltage is rectified into DC:

DSCF1179



With filter caps connected and no load, I have slightly lower voltage than I anticipated but very smooth power:

DSCF1183



I didn't take any photos, but did hook up a mechanically disconnected servo just to hear it take off and spin at speed. And it was good to hear!

Power Supply Pt. 3: Assembly!

September 2012:

Ok so after going on an ebay buying spree my transformer and glass tape arrived and I had some ideas about dewinding the transformer to get my required ~57 VAC. The more complex and time consuming idea was to dewind and re-space the secondaries, but after consulting a couple of friends who are or are becoming EE's I decided to just remove enough turns to get my desired voltage.

I was excited to get things torn apart and didn't take my first picture until I already started removing the original glass tape and a few windings:

DSCF1147

DSCF1158



It should go without saying I did so with the power OFF but after removing a few turns I would hook power and my DMM up so that I could monitor change in voltage. During this time I removed no more of the original glass tape or insulator than absolutely necessary. Once I had gotten between 57 and 58 volts AC I cut my secondary output wires short, sanded the ends clean,, and promptly discovered as I was all ready to start re-insulating my transformer that my roll of 3M 27 Glass tape was too wide to fit through the center of my toroid. Crap!

DSCF1160



So, noting how large the cardboard center of the glass tape roll was, I used a small impact driver to wrap the tape around a small bolt instead. Success! (forgive the mess)

DSCF1162



Now I was able to start re-wrapping, careful to keep the loose wires tight and the coils tight as well. I started from where the original tape was still tight and wound near the most complex part (where the most wires meet up near the primary entrance) first, then moved towards the other side of the disturbed sections of transformer:

DSCF1163

DSCF1164



I then re-soldered on my secondary stranded wires and heatshrinked them, before re-wrapping the connections with insulator and glass taping over that too:

DSCF1165



Completed Transformer:

DSCF1166



Power Supply Pt. 2: Buying stuff!

August-2012 to near-present day and beyond…

In my last posting I reviewed some of the math involved to get our power supply components. 1500VA @ 58 VDC for the transformer, at least 26,666 uF for the capacitor bank, and 6 bridge rectifiers capable of handling the output from the transformer.

I can't stress enough that if you want to just go out and buy these things, there are a few different manufacturers making questionable grades of products, and few if any descent, objective and comparative reviews. I may write an article in the future on confirmation bias and compulsive forum posters, but it should go without saying that there are very few people who aren't in this professionally that will buy more than one version of essentially the same piece of hardware and the hardware to test it in order to review it for free for a limited audience. I am no different and just as cheap.

I originally decided I wanted to wind my own, and after deciding that was too much work, I settled on the idea of buying an Antek AN-15458, a 1500 VA @ 58 VAC toroid, with two 12v additional secondaries and split primaries allowing the use of 120 or 240V input voltage. That plan went away when I found a new Antek AN-15468 on eBay for less than half the cost of a new one, and bought it and some glass tape with the intentions of dewinding it until I got my intended voltage.

DSCF1147 About this same time I looked all over eBay to find some decently priced DC capacitors that would make a sufficient cap bank for my CNC. After poring over what must have been thousands of listings trying to find the best deal, I stumbled upon a set of 6 NOS, 200V, 56000 (!) uF electrolytic caps with mounting brackets for $5.75 each plus shipping, on an auction that showed them listed incorrectly as 5600 uF, and made a Buy-It-Now offer of $4.50 ea, and took the whole lot home for only $27 + SH! By comparison caps of similar size and voltage were looking to cost me in the range of $40-70 + SH/ea!

With the extra change rattling around my pockets I got a little cocky and bought a lot of a dozen 50A 600V bridge rectifiers for under $30. I figured it would be good to have a couple extras on the shelf if I needed them. I don't have a ton of semiconductor experience but my considerations for purchase required them to be US or Japanese made with a metal casing for better thermal conduction to a heatsink. I'm not sure what the rate of failure is (and don't care to find out myself), but beware that eBay is absolutely flooded with cheap rectifiers, it was easiest for me to identify them by the rough castings of the metal cases and sorting the location to only show items in North America. There are still American sellers of the poorly made imports but sorting by location reduced their numbers greatly.

Next up, a power supply build!