Retromaster’s Electronics Projects

…related to old computers and other assorted stuff…

Archive for January, 2010

Assembled the New Stepper Drive Box

Posted by retromaster on January 27, 2010

Here is a photo of the new stepper driver assembled in its box, along with the laptop power supply I use to power it (and the steppers). The parallel port connector, power input and power switch are in the back. Now that the new driver has made the machine much faster, it’s become a lot more fun to use it :). In addition, with all the little improvements like the new connectors and the advanced PC software control, it has become much more reliable, too. Since the motors do not draw a lot of current, the box does not seem to get very hot (not that it’s difficult to rectify in case that happens). Now I’ll go back to improving the mechanics of the machine, as there is still some work to do in that area.

The faces of the box were cut using the CNC itself. One thing I found out (!) was that using a 3mm cutter at a high RPM to cut ABS plastic does not work very well. It melts the plastic and leaves a terrible finish, not to mention the melted plastic sticking to the cutter. I had to switch to a 1mm cutter, reduce the RPM, and make sure that the whole thing stays cool. This way I was able to get perfect cuts.


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

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 »

First Good PCB with the MF70 CNC

Posted by retromaster on January 21, 2010

I’ve finally managed to manufacture a good-looking single-sided PCB using my CNC MF70 and toner transfer. I first drilled the holes using the CNC, then I applied toner transfer aligning the transper paper with the holes. I’ve etched the board afterwards but not cleaned the toner yet. The PCB is a parallel port breakout board. I’ll use it for the new parallel port-based stepper drives. Tracks are 20mil with 10/12mil clearance. This time, I’ve used ink jet transparency film, as it’s a bit easier to align with the board holes. The results are quite good (the photo does not do it justice), though I am not sure how it’ll perform with finer traces. The text at the bottom turned out all right so I guess it could work. Soon I’ll try out another board with PnP Blue.

The most significant problem I’ve faced so far was the alignment of the drilled holes with the toner transfer printout. It seems that the printout function of the PCB layout software I am using was inaccurate, as it introduced a kind of shearing transformation to the printed pattern. The effect was very slight but enough to cause mismatch. It would not be fair to fully blame the software though, as the printout function was mainly intended for documentation purposes and laser printers can be inaccurate anyway. The solution I found was to first export Gerber files, then use the excellent utility by Joseph C. Chavez. Printing the resulting pdf file solved the shearing issue, but there was still a linear mismatch in the Y axis of about 1%. I’ve done some searching on the net and it seems that this kind of mismatch can be expected from laser printers. The gerber2pdf utility accepts a scale factor as input, so this was easily fixed, and the result is the board I mentioned earlier in this post. The alignment is now almost perfect, although the scale coefficient could probably use some finetuning.

Posted in Homebrew PCBs, Robotics | Tagged: , , , | 1 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 »

PCB Drilling with the MF70 CNC

Posted by retromaster on January 11, 2010

Over the weekend, I worked on getting rid of the backlash in the MF70 CNC. I’ve made new delrin nuts that fit much more tightly in the nut housings and I’ve tightened the stop nuts on each side of the X axis to make sure that there remained no play in the ball bearings. As the first photo shows, this resulted in a huge improvement in the backlash situation, although I had to reduce speed as the X axis became more difficult to move. Also, something I noticed before but I neglected to mention in my previous posts is that the X axis endplates do not seem to sit perfectly flat on the sides of the table. This may be because they are getting bent when the mounting screws are tightened. I think I may have to try rebuilding the endplates using aluminum twice as thick.

In addition to fixing the backlash, I greatly increased vertical speed for drilling and shortened the extension of the drill bit to just a few millimeters below the chuck, eliminating most of the problems due to wandering and flexing of the drill bit. But even these improvements were not enough to get a perfectly drilled PCB. It seems that warpage of the copperclad introduces a significant error as well. So significant in fact, that the holes in the top board in the first photo above did not align properly with the printout of the PCB layout. I also found out that I needed to have the hole locations mirrored since I was drilling from the copper side (this is a single-sided board). So I came up with the drilling setup in the right photo to fix the warpage issues and I had the hole locations mirrored, and I managed to have a drilled copperclad that matches the PCB layout very well.

The PCB I building is for testing the new axis drive circuitry that I mentioned in the previous post. In a few days, I expect to finish making and assembling the PCB. After a little bit of PIC coding, I’ll at least have an idea of the torque increase I’ll get from the new drives. If it turns out to be as worthwhile as I think it’ll be, I’ll build a new board with all drives for all 3 axes and then go back to improving the mechanics of the machine.

Posted in Homebrew PCBs, Projects, Robotics | Tagged: , , , | 4 Comments »

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 »