Retromaster’s Electronics Projects

…related to old computers and other assorted stuff…

Posts Tagged ‘Stepper’

MF70 CNC New Drive & Motors

Posted by retromaster on April 11, 2011

Here is the new motor driver installed and working with the new steppers. It is the infamous 3-Axis TB6560 Chinese driver commonly found on ebay. I could have designed and built my own, but the price was too attractive to pass up. The board supports 1/16 microstepping and 3.5A per channel @ up-to 36V supply. Combined with the new motors (Minebea/Astrosyn, apparently salvaged from Diebold ATMs) the speeds have more than doubled-up, at slightly more than 200mm/s.

The enclosure (from a local supplier) is of good quality, but ultimately an overkill, and it is a bit too large for this board. Unfortunately, the nearest size in the manufacturer’s catalog was just a couple of centimeters smaller than the board.

Despite all that looks good on paper, I have to be wary of recommending this driver board, because mine turned out to be defective! Upon testing, I found out that the Y-axis was not providing enough torque. Some inspection with a multimeter revealed that the DIP-switch for the Y-axis was broken, resulting in the current setting being ignored. The fix was easy, with just a couple of wires, as in the photo above. Nevertheless, this just seems like another example of fine (!) Chinese manufacturing on display.

Advertisements

Posted in Projects, Robotics | Tagged: , , , , , , | 5 Comments »

New Stepper Drive Boards Ready

Posted by retromaster on January 26, 2010

I’ve finished building the new bipolar stepper driver. I’ve tested it, and it works, with a big speed/torque increase. There are two boards, a parallel port breakout board (with optical isolation) and the actual stepper driver board that accepts step and direction pulses. As I’ve mentioned in previous posts, I’ve gotten rid of the current sensing resistors and gone for a fixed frequency PWM chopper scheme instead. This seems to be sufficient for the motors I currently use, but I am definitely interested in trying out more elaborate driving schemes with more capable (higher current, lower voltage) motors in the future.

Both boards are designed to be mounted in the plastic enclosures as shown in the photo. There will be a 4-pin round connector for each axis and a power led on the front side of the box. On the back side will be the parallel port and power connectors as well as a power switch. I might also put some ventilation holes somewhere on the box but I am not sure that they will be necessary. Cutting the plastic plates for the sides of the enclosure will be the first order of business for the new drives.

Posted in Homebrew PCBs, Projects, Robotics | Tagged: , , , , | Leave a Comment »

New Bipolar Stepper Driver Tests

Posted by retromaster on January 13, 2010

I’ve finished building the new bipolar stepper driver test board I’ve mentioned in my previous post. When I took the photos I had not yet installed the PIC16F676, which goes in the leftmost socket. And the electrolytic capacitors on the top are not there now, because they exploded! I was careless and installed 10V capacitors where 24V is applied. Anyway… I implemented the basic full step sequence in the PIC code, but did not implement the current sensing/chopping scheme I mentioned before. As I predicted, I am able to get a lot more torque from the motors with this bipolar driver. I did some basic tests with the X axis, and it was much faster (and smoother) than before, without missing any steps. I did not make any measurements to quantify the change in speed, though.

It turns out that the sinusoidal profile current control may not be very useful with my motor-power supply combination, though. The oscilloscope screenshot shows why. The top signal shows the coil driver enable line, and the bottom signal is the voltage developed across the current sense resistor. There was a lot of noise on the current sense resistor, so I had to enable the digital filter on the oscilloscope to get a meaningful display. The current sense resistor is 1 Ohm, so it seems that the current through the motor coils barely reaches 0.4A, which is way beyond the 0.6A rating of the motors. I am guessing that this is because the motor coils have a (perhaps unusually) high inductance (In fact, most of the steppers I’ve seen around have much lower voltage and much higher current ratings). The voltage rating of the motors is 12V (unipolar), so it seems that 24V is not enough to make the current rise fast enough to make chopper drive useful in this case. A much higher DC voltage would be needed, but that is not practical.

So, the plan is to make further tests to validate my reasoning here to ensure safe, smooth and efficient running of the motors. If I decide that current sensing is not of much use here, than I’ll go ahead with a simpler design for all three axes, foregoing the large current sense resistors. I might still use the PICs for stepping sequence control, or I might switch to L297 controllers with the current sensing functionality disabled (for a coding-free solution :))

On a side note, I also found out that printouts from the laser printer are also not very dimensionally-accurate. Even though the holes and the printouts match much better now that I’ve taken care of warpage of the copperclad, the mismatch was not fully eliminated. So, suspecting the printer, I made some measurements with a micrometer and found out there is a seemingly linear dimensional error on the Y axis that is around 0.5%. It seems small, but on 5000mil, it makes 25mils, which is about the size of a hole. The error seems to be consistent so it should not be a problem to compensate for it. The X axis error seems to be around half the error on the Y axis. I’ll investigate this issue further…

Posted in Projects, Robotics | Tagged: , , , | Leave a Comment »

MF70 New X Axis Complete

Posted by retromaster on January 6, 2010

Here is a photo showing the new X and Y axes of the MF70 CNC. Also shown in the photo is my new standoff design for the Y axis. Both axes perform noticeably better, with the X axis achieving speeds within 250% of the previous version. 

That said, the couplings (which I’ve built) still seem to be problematic. I’ve tried building new couplings out of round aluminum stock (using the dividing attachment for the MF70) but they actually performed worse than the ones I had built before! I’ll have to think of a way to build better couplings.

And finally, for a change, I’ve started working on the new stepper drive electronics. I’ve made a new PCB layout for testing the drive electronics for a single axis. I’ll use that for debugging, and if that works, I’ll go on to build a new integrated board with drivers for the 3 axes interfaced to the parallel port. For each axis, I’ll use a PIC16F676 to monitor drive current through a current sensing resistor using the built-in ADC. The idea is to make the switch the coil drivers on and off to make the current amount follow a sinusoidal profile. I opted for the 16F676 because it is cheap, but it is quite possible that its built-in ADC will not be fast enough to current monitoring. In that case, I might try a design based on the 24F04, which has a much faster ADC (and it is not that much more expensive).

Building this debug PCB for the new drive electronics gave me an opportunity to test the PCB drill performance of the MF70 CNC. Unfortunately, the results were less than satisfactory. Locations for some of the holes were inaccurate. I am not sure what caused this. It may be due to positioning errors in the machine (backlash, missed steps, software errors), or due to drilling errors (the drill bit wandering on the copperclad, or even warpage of the copperclad). Over the next few days I’ll do some tests to figure out the root cause and hopefully solve the issue.

Posted in Projects, Robotics | Tagged: , , , , | 2 Comments »

Improved MF70 CNC Underway

Posted by retromaster on December 24, 2009

Here are a couple of aluminum plates, some of the very first milled by my CNC-converted MF70. These are intended for the Y axis of the new, improved version of my MF70 CNC. A standard type 606 ball bearing fits in the circular recess in the middle, just like the bottom one in the photo. The outer holes are for mounting the axis stepper motor, and the inner holes are for attachment to the table. At the moment I am about to start the process of milling a couple of standoffs that will go in between the table and these plates. This will hopefully extend the woefully limited Y axis travel of the MF70.

Milling new parts is going rather slowly at the moment. The current mechanics of the machine are not very precise and rather inefficient. To ensure that the motors do not miss any steps, they need to be driven at a rather low speed. This is in contrast to the built-in spindle of the MF70, which seems to do best with relatively light cuts with a high feed rate, due to the rather high RPM (5k to 20k). The new parts should help alleviate this problem.

One other thing that does not help the situation is that the torque obtainable with the current stepper drivers is quite beneath the potential of the motors I use. To overcome this, I’ve started to work on a new controller board that implements bipolar chopper drive instead of the unipolar L/R drive of the current board. In addition, the new board will increase max current per coil from 0.5A to 0.6A. For the new board, I am also seriously considering to switch to the LPT port instead of USB, as this will enable me to use readily existing software such as EMC2 without a lot of work.

Posted in Projects, Robotics | Tagged: , , , | Leave a Comment »

MF70 CNC Working!

Posted by retromaster on December 1, 2009

I’ve finally managed to complete all the axes and get the CNC-converted Proxxon MF70 to work. The photo above shows the whole machine, and here is a video:

Vodpod videos no longer available.

 

The USB control board is able to do linear and circular interpolation on board. I’ve made the host-side into a Python module, and coded a few scripts that enable me to move the axes using the keyboard or interpret Gerber or NC drill codes. It’s all in quite early stages, though. Shortly after I recorded the video above, the controller got stuck in one of the line segments and ruined the workpiece, so it seems I’ve still got some debugging to do. Nevertheless, it all seems to be on track, and I am already planning improvements to the machine, with parts to be manufactured using the machine itself.

Posted in Projects, Robotics | Tagged: , , , | Leave a Comment »

MF70 CNC Control Board

Posted by retromaster on November 6, 2009

 

Here is the control board for the CNC-converted MF70. I opted for a rather simple design. It contains a PIC18F4550 microcontroller and 3 ULN2003A darlington arrays for driving the steppers. The PIC handles USB communication with the PC host, interprets incoming commands and controls the motor stepping sequences. It is probably a bit of an overkill for this kind of project but I already had some :). There is a ULN2003 per motor, implementing unipolar drive. The motors I use here are 12V, 0.6A motors and with a some current limiting a ULN2003 is able to drive one although not exactly at full torque. The whole system is powered from a 12V, 2A power adapter.

As the pictures show, I had to solder directly to the USB data pins on the board to get the USB communication working reliably. Using the on-board type B USB connector did not work very well, and I guessed that it was due to the rather long differential USB data traces on the single-sided board. To be honest, I did not pay much attention to the impedance of the USB traces and it seems this was a mistake :(. Anyway, I’ve already redone the PCB layout to shorten (and thicken) the USB traces to better meet the impedance requirements. To achieve this, I’ve rotated the PIC sideways in this new layout. I haven’t built the new layout yet, but I guess it might be one of the first PCBs I’ll build with the MF70 CNC when I get it working.

In its current state, the board can step the motors and it is detected properly as “Retromaster MiniStep” by the host OS. I decided to use the WinUSB API on the host side to avoid writing a device driver. Up until now, I tried to get USB control transfers to work with the firmware as that mode of communication seemed appropriate for this type of device. Even though control transfers with no data stage work fine, I could not get control transfers with a host-to-device data stage to work. I did examine the Microchip USB firmware thoroughly and tried several things, but without an in-depth knowledge of how USB control transfers and Microchip silicon work, I could not succeed. What makes matters worse is that Microchip firmware documentation on the subject is rather poor (and likely inaccurate), and to my knowledge none of the available device firmware examples use this kind of control transfer, which leads me to suspect that this functionality of the firmware was never properly tested. Anyway, I dropped the idea, and decided to use bulk transfers instead.

Posted in Projects, Robotics | Tagged: , , , , | 3 Comments »

Proxxon MF70 CNC Conversion

Posted by retromaster on November 2, 2009

 

Having found a decent solution for the problem of soldermask making, I decided to further improve the quality of my homemade PCBs by having the holes drilled automatically, rather than manually as I have been doing up to now. I own a Proxxon MF70 manual micro-mill that is quite suitable for conversion to CNC (as proven by several examples I’ve seen on the net). The MF70 has a rather limited Y-axis travel (of only 46mm), but this problem can be solved by a little bit of manual intervention, at least in the case of PCB drilling.

So, thinking that it would be rather cool to have a micro-CNC available for my workbench, I started working on it right away. I made a motor mount for the X-axis, as well as a rigid, set-screw type coupling that also serves as a stop to prevent the play of the leadscrew. The motor mount turned out all right but the center hole for the coupling was a little off-center and not perfectly straight. Anyway, I decided to change the design a little (separate the coupling and the stop) and I ordered some new tools that should allow me to make much better quality couplings / stops.

I also built a control board that connects to a PC host through USB and drives the 3 stepper motors. I’ve managed to drive the steppers using the board (and move the x-axis of the MF70) but there are problems with the USB. I’ll make a more detailed post about the control board later.

Anyway, it seems that I got sidetracked once more. Hopefully, I’ll have some quick progress with this new project so that projects like UFE won’t suffer from more delays. Actually, this MF70 CNC project is the sort of project that should prove to be a time saver in the long run.

Posted in Homebrew PCBs, Projects, Robotics | Tagged: , , , , , | Leave a Comment »