Showing posts with label cnc. Show all posts
Showing posts with label cnc. Show all posts

Sunday, November 16, 2008

Mardus-Kreutz Unipolar Micro-stepper. 3rd Part.








Translator's Block Diagram




In this part of the series we will open the translator black box and explain what is inside each of the smaller boxes.

Opto-Isolator Stage.

The opto-isolator stage's function is isolate the signals coming into the translator, specially, isolate the PC Ground from the motor power supply ground.

Isolation is used to protect the Lpt port of the PC from dangerous voltages and current leakage from the motor power supply, but its main function is really protect the Pc user from nasty/dangerous electrical shocks should the protective ground connection, on the motor power supply circuit, fail by any reason (the protective ground is the green wire connected to the building's ground).

Micro Controller Circuit.

The micro-controller used in our design is the ATtiny2313-20 from Atmel. This circuit includes, the micro-controller chip, Reset circuit, 20 Mhz oscillator's Xtal, Some LEDs for status display and the programming Jumpers connected to some of the chip's I/O pins.
Reference signal Processing.
The output of the micro-controller to the reference processing circuit are two 39.2 Khz 16 bits hardware generated PWM signals. Both signals have to be processed in order to obtain two analog waveforms which will respectively become the Channel A and Channel B current reference waveforms.
The processing circuit is a Second order low pass filter (two cascaded first order filters).
Another logic level signal coming from the micro-controller (STANDBY) will reduce the reference voltage to 50% after 1 second inactivity. This is done by means of a switched resistive voltage divider, the switching is done by means of two low power Mosfets.
Half of the Reference signal processing circuit is located on the Translator board, the other half is located on the Power Stage board. The reason of the splitting is simple, the reference signals are sent to the Power stage by means of a ribbon cable, noise captured on the cable is attenuated by the second low pass filter, located at the power board, before the analog signal amplitude is divided at the respective current setting potentiometer (more detailed explanation on this subject will be offered later).
SYNC signal.
This is one of the most important signals, its function is to serve as reference frequency for the choppers at the Power Stage, but it serves a second and very important function: It defines the "blanking time" on the chopper comparator circuits. We will be talking about the "blanking time" when we get to the chopper's circuit description, and a little more when we discuss the blanking time relationship with the minimum step current regulation.
The Sync signal is generated on a hardware 8 bits PWM generator inside the Micro-controller Chip, the "blanking time" is adjustable in the firmware. More information about this subject is going to be posted in the next parts of this blog.
Micro-controller's Watch-Dog.
The internal watchdog time base generator of the micro-controller is used as reference for a software controlled speed measurement circuit, it is also used as reference signal for the 1 Second inactivity Standby signal control.
The Speed measurement circuit is the responsible of controlling the variable morphing reference waveform versus motor speed, details about both features will be discussed on the firmware description part of this series.

FIRST PROTOTYPE PHOTOS

Translator and Power stage (click to enlarge)

Translator's bottom side (click to enlarge)











Thursday, November 13, 2008

Mardus-Kreutz Unipolar Micro-Stepper. 2nd Part.

Block diagram of the Mardus-Kreutz drive (Click to enlarge).



COMPONENTS OF THE M-K Drives.

What is a Translator?

A "Translator" is the part of the Micro-Stepper Drive circuit whose function is to "translate" Step and Direction input signals into the proper sequence of digital and analog signals required to drive the power output stage.
Basically, the translator contains the brain and soul of the stepper drive. The brain is a cheap but powerful micro-controller, the ATTiny2313 from Atmel. The soul is a simple but effective firmware (micro-controller software) able to handle a maximum step frequency of 100 Khz and providing all the micro-step functionality, as well as current waveform morphing with speed, standby motor current reduction, and automatic torque compensation. The translator includes also the opto-isolation circuit for the Step and Direction signals coming from the PC Lpt port or controlling device.

The Firmware.

The firmware is written in BASCOM AVR, a simple to understand flavor of the Basic language for the AVR micro-controllers, which is also free (the free version is limited to 2K bytes of code, just the capacity of our controller chip). Why Basic and not C or assembly?. We used Basic, as programming language, because the code was intended to be used as a learning tool, and well commented Basic code is simpler to digest.

Power Stage.

The output signals of the "translator" are logic level signals which can't provide the voltage and current levels necessary to drive most stepper motors. The power stage is the part of the circuit that provides the the power handling on the drive. It includes the current control as well as the coil switching, motor power supply filtering, and safety circuits.
The current control circuit is the heart of the Power stage. In our case we selected a fixed frequency chopper circuit. A detailed explanation of the discrete chopper circuit will be addressed in the respective circuit description. On the power stage there are also two voltage regulators: +5 Vdc regulator for the logic circuits, and +9 Vdc for the gate driver chips. The former is also used by the translator board.
Stepper Motor and Micro-stepper Theory
Stepper Motor theory is beyond the scope of this blog, there is a fine tutorial on the subject I would like the reader to familiarize with before continuing reading this blog.
We will be referring to some concepts explained on that tutorial on the description of the circuits on the following posts. My intention is to go deeper into each block (of our Block diagram), opening its contents into increasingly finer details, finalizing at the component level.
I will also talk about design decisions and compromises, as well as the solutions we implemented, in order to overcome some of the fixed frequency chopper inherent dis-advantages.
What I want to make clear is that there are many ways to get any stepper motor running, our design objectives were always focused into micro-stepping driving unipolar motors, but also to get the most of them, in terms of power, accuracy, efficiency and performance.
Our design is neither a mere copy of a text book circuit nor just a discretization of an integrated controller, it was intended as a design exercise with the objective of using it as a learning tool, nevertheless, the final product has an exceptional quality, as you can witness on the many videos taken during the early tests.

Tuesday, November 11, 2008

Mardus-Kreutz Unipolar Micro-stepper Drive.



Introduction

The Mardus-Kreutz unipolar micro-stepper board was born from a thread in CNCzone.

One of the members, Mardus, asked why DIY discrete unipolar micro-stepper drives were not available. Some of the participants tried to find a logical explanation and a challenge was created to provide a working DIY unipolar micro-stepper.

A few weeks later the first prototype Mardus-Kreutz board was designed and successfully tested. This blog will try to provide information about the design as well as step by step instructions of how to build a working, high quality, unipolar micro-stepper drive.


Mardus-Kreutz board specifications:


Maximum motor voltage: 80Volts
Maximum current: 8 Amps (peak) per phase
Current regulation type: fixed frequency chopper at 39.2 Khz
Micro-step modes: Full, Half, 1/4, 1/8, 1/16, 1/5, 1/10.
Standby current reduction (to 50%) after 1 second inactivity.
Automatic torque compensation and Current waveform morphing on all micro-step modes.
Command interface: Step-Direction (opto-isolated inputs), Motor Enable.
Minimum Step/Dir Pulse width: 2 microSeconds
Auxiliary power supply: 12 - 15 volts DC, non regulated.
Minimum motor current: 1.5 Amp r.m.s. per phase
Stepper motor types: Unipolar, 6 and 8 wires.
The design uses low cost components.
Modular approach: Translator and Power stage (two separated boards).
PCB Assembly complexity: Low/Medium (most components are trough-hole, uses only a couple of SMD components). The translator boards could be made on perforated prototype boards.