Toilet      06/15/2019

The choice of controller for stepper motors, engraving, milling, lathes, foam cutters. Choosing a controller for stepper motors, engraving, milling, lathes, foam cutters Excursion into history

Since I assembled a CNC machine for myself a long time ago and have been using it for hobby purposes for a long time, I hope my experience will be useful, as well as the source codes of the controller.

I tried to write only those moments that personally seemed important to me.

The link to the controller sources and the configured Eclipse + gcc shell, etc. are in the same place as the video:

History of creation

Regularly faced with the need to make one or another small “thing” of complex shape, I initially thought about a 3D printer. And even started doing it. But after reading the forums and evaluating the speed of the 3D printer, the quality and accuracy of the result, the percentage of rejects and the structural properties of thermoplastics, I realized that this is nothing more than a toy.

The order for components from China came in a month. And after 2 weeks the machine was working with control from LinuxCNC. Collected from any garbage that was at hand, because I wanted to quickly (profile + studs). I was going to redo it later, but, as it turned out, the machine turned out to be quite rigid, and the nuts on the studs did not have to be tightened even once. So the design remained unchanged.

The initial operation of the machine showed that:

  1. Do not use a 220V “china noname” drill as a spindle best idea. It overheats and is terribly loud. The side play of the cutter (bearings?) is felt by hand.
  2. The Proxon drill is quiet. The lift is not noticeable. But it overheats and turns off after 5 minutes.
  3. A loaned computer with a bidirectional LPT port is not convenient. Taken for a while (finding PCI-LPT turned out to be a problem). Takes up space. And generally speaking..
After the initial operation, I ordered a water-cooled spindle and decided to make a controller for autonomous operation on the cheapest version of STM32F103, sold complete with a 320x240 LCD screen.
Why people still stubbornly torment 8-bit ATMega for relatively complex tasks, and even through Arduino, is a mystery to me. They probably love challenges.

Controller development

I created the program after a thoughtful review of the sources of LinuxCNC and gbrl. However, neither those nor those source codes for calculating the trajectory were taken. I wanted to try to write a calculation module without using float. Exclusively on 32-bit arithmetic.
The result suits me for all operating modes and the firmware has not been touched for a long time.
Maximum speed selected experimentally: X:2000mm/min Y:1600 Z:700 (1600 step/mm. mode 1/8).
But it is not limited by controller resources. Just above the already nasty sound of skipping steps even straight stretches through the air. The budget Chinese stepper control board on the TB6560 is not the best option.
In fact, the speed on wood (beech, 5mm depth, d = 1mm cutter, step 0.15mm) is not more than 1200 mm. Increases the risk of cutter breakage.

The result is a controller with the following functionality:

  • Connecting to an external computer as a standard usb mass storage device (FAT16 on SD card). Working with standard G-code format files
  • Deleting files through the controller's user interface.
  • Viewing the trajectory for the selected file (as far as the 640x320 screen allows) and calculating the execution time. In fact, emulation of execution with the summation of time.
  • View the contents of files in a test form.
  • Mode manual control from the keyboard (moving and setting "0").
  • Starting the task for the selected file (G-code).
  • Pause/resume execution. (sometimes useful).
  • Emergency software stop.
The controller will be connected to the stepper control board through the same LPT connector. Those. it acts as a control computer with LinuxCNC/Mach3 and is interchangeable with it.

After creative experiments on carving hand-drawn reliefs on a tree, and experiments with acceleration settings in the program, I also wanted encoders on the axes. Just on e-bay I found relatively cheap optical encoders (1/512), the pitch of which for my ball screws was 5/512 = 0.0098mm.
By the way, the use of high-resolution optical encoders without a hardware scheme for working with them (the STM32 has it) is pointless. Neither interrupt processing, nor, moreover, a software poll will ever cope with the “bounce” (I say this for ATMega fans).

First of all, I wanted for the following tasks:

  1. Manual positioning on the table with high precision.
  2. Control of missed steps with control of deviation of the trajectory from the calculated one.

However, I found another application for them, albeit in a rather narrow task.

Using encoders to correct the machine path with stepper motors

I noticed that when cutting out the relief, when setting the acceleration in Z to more than a certain value, the Z axis begins to slowly but surely creep down. But, the relief cutting time with this acceleration is 20% less. At the end of the cutting of the 17x20 cm relief with a step of 0.1 mm, the cutter can go down by 1-2 mm from the calculated trajectory.
An analysis of the situation in dynamics by encoders showed that when the cutter is raised, sometimes 1-2 steps are lost.
A simple step correction algorithm using an encoder gives a deviation of no more than 0.03 mm and reduces processing time by 20%. And even a 0.1 mm protrusion on a tree is difficult to notice.

Design


Ideal for hobby purposes desktop version with a margin slightly larger than A4. And I still have enough of it.

movable table

It still remains a mystery to me why everyone chooses a design with a movable portal for desktop machines. Its only advantage is the ability to process a very long board in parts or, if you have to process material on a regular basis, the weight of which is greater than the weight of the portal.

During the entire period of operation, there has never been a need to cut out the relief on a 3-meter board in parts or make an engraving on a stone slab.

The sliding table has the following advantages for desktop machines:

  1. The design is simpler and general case, the design is more rigid.
  2. All giblets (power supplies, boards, etc.) are hung on a fixed portal, and the machine turns out to be more compact and more convenient to carry.
  3. The mass of the table and a piece of typical material for processing is significantly lower than the mass of the portal and spindle.
  4. The problem with the cables and hoses of the water cooling of the spindle practically disappears.

Spindle

I would like to note that this machine is not for power processing. CNC machine for power processing is easiest to do on the basis of a conventional milling machine.

In my opinion, a machine for power metalworking and a machine with a high-speed spindle for wood / plastics is completely different types equipment.

Create at home universal machine at least it doesn't make sense.

The choice of spindle for a machine with this type of ball screw and guides with linear bearings is unambiguous. This is a high speed spindle.

For a typical high speed spindle (20,000 rpm), milling non-ferrous metals (not even talking about steel) is an extreme mode for the spindle. Well, unless it is very necessary, and then I will eat 0.3 mm per pass with watering the coolant.
The spindle for the machine would recommend water-cooled. With it, only the “singing” of stepper motors and the gurgling of the aquarium pump in the cooling circuit are heard during operation.

What can be done on such a machine

First of all, the problem of cases went away for me. The case of any shape is milled from "plexiglas" and glued together with a solvent along ideally smooth cuts.

Fiberglass refused to be a universal material. The precision of the machine allows cutting seat under the bearing, into which it will go cold, as it should be with a slight tightness, and after that it can no longer be pulled out. Textolite gears are perfectly cut with an honest involute profile.

Woodworking (reliefs, etc.) - a wide scope for the realization of their creative impulses, or at least for the implementation of other people's impulses (ready-made models).

But I haven't tried jewelry. There is nowhere to ignite / melt / pour the flasks. Although a bar of jewelry wax is waiting in the wings.

For self assembly milling machine, you must select the CNC control. Controllers are available as multi-channel: 3- and 4-axis stepper motor controllers, and single-channel. Multi-channel controllers are most often found to control small stepper motors, size 42 or 57mm (nema17 and nema23). Such motors are suitable for self-assembly of CNC machines with a working field of up to 1m. When self-assembling a machine with a working field of more than 1m, stepper motors of size 86mm (nema34) should be used, to control such motors you will need powerful single-channel drivers with a control current of 4.2A or more.

For desktop management milling machines controllers based on specialized microchips-drivers for stepper motor control are widespread, for example, TB6560 or A3977. This chip contains a controller that generates the correct sine wave for different half-step modes and has the ability to programmatically set the winding currents. These drivers are designed to work with stepper motors up to 3A, stepper motor sizes NEMA17 42mm and NEMA23 57mm.

Controller management using specialized or or Linux EMC2 and others installed on a PC. It is recommended to use a computer with at least 1GHz processor and 1GB memory. The desktop computer top scores compared to laptops and much cheaper. In addition, you can use this computer for other jobs when it is not busy operating your machine. When installing on a laptop or PC with 512MB of memory, it is recommended to run the .

The LPT parallel port is used to connect to a computer (for a controller with a USB interface, the USB port). If your computer is not equipped with a parallel port (more and more computers are being released without this port), you can purchase a PCI-LPT or PCI-E-LPT port expander card or a specialized USB-LPT controller converter that connects to the computer via a USB port .

With a desktop aluminum engraving and milling machine CNC-2020AL, complete with a control unit with the ability to adjust the spindle speed, Figure 1 and 2, the control unit contains a stepper motor driver on a TB6560AHQ chip, stepper motor driver power supplies and a spindle power supply.

picture 1

Figure 2

1. One of the first CNC milling machine controllers based on the TB6560 chip was nicknamed the "blue board", Figure 3. This board option has been discussed a lot on the forums, it has a number of disadvantages. The first is slow PC817 optocouplers, which requires, when setting up the MACH3 machine control program, to enter the maximum allowable value in the Step pulse and Dir pulse = 15 fields. The second is poor matching of the optocouplers outputs with the inputs of the TB6560 driver, which is solved by finalizing the circuit, Figure 8 and 9. Third - Linear power supply regulators of the board and, as a result, a large overheating, switching regulators are used on subsequent boards. Fourth - the lack of galvanic isolation of the power circuit. Spindle relay 5A, which in most cases is not enough and requires the use of a more powerful intermediate relay. The advantages include the presence of a connector for connecting the control panel. This controller does not apply.

Figure 3

2. The CNC machine control controller entered the market after the "blue board", nicknamed the red board, Figure 4.

More high-frequency (fast) 6N137 optocouplers are used here. Spindle relay 10A. The presence of galvanic isolation for power supply. There is a connector for connecting the driver of the fourth axis. Convenient connector for connecting limit switches.

Figure 4

3. The stepper motor controller marked TB6560-v2 is also red, but simplified, there is no power decoupling, Figure 5. Small size, but as a result, the size of the radiator is also smaller.

Figure 5

4. Controller in aluminum case, figure 6. The case protects the controller from dust, metal parts, and it also serves as a good heat sink. Galvanic power isolation. There is a connector for powering additional circuits + 5V. Fast optocouplers 6N137. H low impedance and Low ESR capacitors. There is no spindle turn-on control relay, but there are two outputs for connecting a relay (transistor switches with OK) or PWM spindle speed control. Description of connection of relay control signals on the page

Figure 6

5. 4 axis controller of CNC router, USB interface, Figure 7.

Figure 7

This controller does not work with the MACH3 program, it comes with its own machine control program.

6. CNC machine controller on the stepper motor driver from Allegro A3977, Figure 8.

Figure 8

7. Single-channel stepper motor driver for CNC machine DQ542MA. This driver can be used with self-manufacturing machine with a large working field and stepper motors for current up to 4.2A, can also work with Nema34 86mm motors, Figure 9.

Figure 9

Photo of the finalization of the blue stepper motor controller board on the TB6560, Figure 10.

Figure 10.

Diagram for fixing the blue stepper controller board on TB6560, Figure 11.

The article describes homemade machine with CNC. Main advantage this option machine is a simple method of connecting stepper motors to a computer via the LPT port.

Mechanical

bed
The bed of our machine is made of plastic 11-12 mm thick. The material is not critical, you can use aluminum, organic glass plywood and any other available material. The main parts of the frame are attached using self-tapping screws, if desired, you can additionally decorate the attachment points with glue, if you use wood, you can use PVA glue.

Calipers and guides
Steel bars with a diameter of 12mm, length 200mm (on the Z axis 90mm), two pieces per axis, were used as guides. Calipers are made of textolite with dimensions 25X100X45. Textolite has three through holes, two of them for the guides and one for the nut. The guide parts are fixed with M6 screws. Supports X and Y in the upper part have 4 threaded holes for fixing the table and the Z-axis assembly.


Caliper Z
The Z axis guides are attached to the X support through a steel plate, which is transitional, plate dimensions 45x100x4.


Stepper motors are mounted on fasteners, which can be made of sheet steel with a thickness of 2-3mm. The screw must be connected to the axis of the stepper motor using a flexible shaft, which can be used as a rubber hose. When using a rigid shaft, the system will not work accurately. The nut is made of brass, which is glued into the caliper.


Assembly
Assembly homemade CNC machine, is carried out in the following sequence:

  • First you need to install all the guide components in the calipers and screw them to the sidewalls, which were not initially installed on the base.
  • We move the caliper along the guides until we achieve a smooth ride.
  • We tighten the bolts, fixing the guide parts.
  • We attach a caliper, a guide assembly and a sidewall to the base, we use self-tapping screws for fastening.
  • We assemble the Z assembly and, together with the adapter plate, attach it to the X caliper.
  • Next, install the lead screws along with the couplings.
  • We install stepper motors, connecting the motor rotor and the screw with a coupling. We pay strict attention to the fact that the lead screws rotate smoothly.

Recommendations for assembling the machine:
Nuts can also be made from cast iron, you should not use other materials, screws can be bought at any hardware store and trim to fit your needs. When using screws with M6x1 thread, the length of the nut will be 10 mm.

Machine drawings.rar

We turn to the second part of the assembly of the CNC machine with our own hands, namely to electronics.

Electronics

power unit
A 12V 3A block was used as a power source. The unit is designed to power stepper motors. Another voltage source at 5V and with a current of 0.3A was used to power the controller microcircuits. The power supply depends on the power of the stepper motors.

We present the calculation of the power supply. The calculation is simple - 3x2x1 \u003d 6A, where 3 is the number of stepper motors used, 2 is the number of powered windings, 1 is the current in Amperes.


Control Controller
The control controller was assembled on only 3 microcircuits of the 555TM7 series. The controller does not require firmware and has a fairly simple circuit diagram, thanks to this, this CNC machine can be made by a person who is not particularly versed in electronics with his own hands.

Description and pin assignment of the LPT port connector.

Pin. Name Direction Description
1 STROBE input and output Set by PC after completion of each data transfer
2..9 DO-D7 conclusion Conclusion
10 ASC input Set to "0" by an external device after receiving a byte
11 BUSY input The device indicates that it is busy by setting this line to "1"
12 paper out input For printers
13 Select input The device indicates that it is ready by setting this line to "1"
14 Autofeed
15 error input Indicates an error
16 Initialize input and output
17 Select In input and output
18..25 Ground GND GND common wire

For the experiment, a stepper motor from an old 5.25-inch was used. In the scheme, 7 bits are not used. 3 engines used. You can hang a key on it to turn on the main engine (cutter or drill).

Driver for stepper motors
To control the stepper motor, a driver is used, which is an amplifier with 4 channels. The design is implemented on only 4 transistors of the KT917 type.


You can also use serial microcircuits, for example - ULN 2004 (9 keys) with a current of 0.5-0.6A.


The vri-cnc program is used for control. Detailed description and instructions for using the program are on .


Having assembled this CNC machine with your own hands, you will become the owner of a machine capable of machining (drilling, milling) plastics. Steel engraving. Also, a home-made CNC machine can be used as a plotter, you can draw and drill printed circuit boards on it.

Based on materials from the site: vri-cnc.ru


Good day to all! And here I am with a new part of my story about CNC - machine tool. When I started writing the article, I did not even think that it would turn out to be so voluminous. When I wrote about the electronics of the machine, I looked and got scared - the A4 sheet was written on both sides, and there was still a lot to tell.

In the end it turned out like this manual for creating a CNC machine, working machine, from scratch. There will be three parts of the article about one machine: 1-electronic stuffing, 2-mechanics of the machine, 3-all the subtleties of setting up the electronics, the machine itself, and the machine control program.
In general, I will try to combine in one material everything useful and necessary for every beginner in this interesting business, what I myself read on various Internet resources and passed through myself.

By the way, in that article I forgot to show photos of crafts made. I'm fixing this. Styrofoam bear and plywood plant.

Foreword

After I assembled my little machine without significant expenditure of effort, time and money, I was seriously interested in this topic. I looked on YouTube, if not all, then almost all the videos related to amateur machines. Particularly impressive were the photographs of products that people make on their “ Home CNC". I looked and decided - I will collect my own big machine! So, on a wave of emotions, I didn’t think it over well, I plunged into a new and unknown world for myself CNC.

Didn't know where to start. First of all, I ordered a normal stepper motor Vexta 12 kg/cm, among other things with the proud inscription "made in Japan".


While he was driving through all of Russia, he sat in the evenings at various CNC forums and tried to make a choice STEP/DIR controller and stepper motor drivers. I considered three options: on a microcircuit L298, on field workers, or buy ready-made Chinese TB6560 about which there were very conflicting reviews.


For some, it worked without problems for a long time, for others it burned out at the slightest user error. Someone even wrote that he burned out when he slightly turned the shaft of the motor connected at that time to the controller. Probably the fact of the unreliability of the Chinese and played in favor of choosing a scheme L297+ actively discussed on the forum. The scheme is probably really unkillable. the field drivers of the driver by amperes are several times higher than what needs to be fed to the motors. Even if you need to solder yourself (this is only a plus), and the cost of the parts came out a little more than the Chinese controller, but it is reliable, which is more important.

I'll digress a little from the topic. When all this was done, I didn’t even have the thought that someday I would write about it. Therefore, there are no photos of the assembly process of mechanics and electronics, only a few photos taken on a mobile phone camera. Everything else I clicked specifically for the article, already assembled.

The case of the soldering iron is afraid

I'll start with the power supply. I planned to make an impulse, I fiddled with it for probably a week, but I could not defeat the excitement, which came from nowhere. I wind the trance at 12v - everything is OK, I wind it at 30 - a complete mess. I came to the conclusion that some kind of bullshit climbs on feedback from 30th to TL494 and tear down her tower. So I abandoned this impulse, since there were several TS-180s, one of which went to serve the motherland as a power trance. And whatever you say, a piece of iron and copper will be more reliable than a bunch of crumbling. The transformer rewound to the required voltages, but it was necessary + 30V to power the motors, + 15V to power IR2104, +5v on L297, and a fan. You can apply 10 or 70 to the motors, the main thing is not to exceed the current, but if you do less, the maximum speed and power decrease, but the transformer no longer allowed it. I needed 6-7A. Stabilized voltages 5 and 15v, left 30 “floating” at the discretion of our power grid.


All this time, every night I sat at the computer and read, read, read. Setting up the controller, choosing programs: which one to draw, which one to operate the machine, how to make mechanics, etc. and so on. In general, the more I read, the more terrible it became, and more and more often the question arose “what for do I need this ?!”. But it was too late to retreat, the engine was on the table, the details were somewhere along the way - we must continue.

It's time to solder the board. Available on the Internet did not suit me for three reasons:
1 - The store that ordered the parts was not there IR2104 in DIP packages, and they sent me 8-SOICN. They are soldered to the board on the other side, upside down, and accordingly it was necessary to mirror the tracks, and them ( IR2104) 12 pieces.


2 - Resistors and capacitors are also taken in SMD packages to reduce the number of holes that had to be drilled.
3 - The radiator I had was smaller and the extreme transistors were out of its area. It was necessary to shift the field workers on one board to the right, and on the other to the left, so I made two types of board.

Machine controller diagram


For the safety of the LPT port, the controller and the computer are connected via an optocoupler board. I took the scheme and the signet from one well-known site, but again I had to redo it a bit for myself and remove unnecessary details.


One side of the board is powered via the USB port, the other, connected to the controller, is powered by a + 5V source. Signals are transmitted via optocouplers. I will write all the details about setting up the controller and decoupling in the third chapter, but here I will only mention the main points. This decoupling board is designed for safe connection of the stepper motor controller to the LPT port of the computer. Completely electrically isolates the computer port from the machine electronics, and allows you to control a 4-axis CNC machine. If the machine has only three axes, as in our case, unnecessary details you can leave them hanging in the air, or not solder them at all. It is possible to connect end sensors, a forced stop button, a spindle enable relay and another device, such as a vacuum cleaner.


It was a photo of the optocoupler board taken from the Internet, and this is what my garden looks like after installation in the case. Two boards and a bunch of wires. But there seems to be no interference, and everything works without errors.


The first controller board is ready, I checked everything and tested it step by step, as in the instructions. I set a small current as a trimmer (this is possible due to the presence of PWM), and connected the power (motors) through a chain of 12 + 24v bulbs so that it was “nothing if nothing”. I have field workers without a radiator.

The engine hissed. The good news is that the PWM is working as it should. I press a key and it spins! I forgot to mention that this controller is designed to control a bipolar stepper motor i.e. one with 4 wires. Played with step / half step modes, current. In half-step mode, the engine behaves more stable and develops high speed+ increases accuracy. So I left the jumper in the "half step". With the maximum safe current for the engine at a voltage of about 30V, it turned out to spin the engine up to 2500 rpm! My first machine without PWM never dreamed of such a thing.))

The next two motors ordered more powerful, Nema at 18kg/s, but already “made in China”.


They are inferior in quality Vexta After all, China and Japan are two different things. When you rotate the shaft with your hand, the Japanese do it somehow softly, but the Chinese have a different feeling, but so far this has not affected work. There are no comments for them.

I soldered the remaining two boards, checked through the "LED stepper motor simulator", everything seems to be fine. I connect one motor - it works fine, but not 2500 rpm, but about 3000! According to the already worked out scheme, I connect the third motor to the third board, spins for a couple of seconds and gets up ... I look at the oscilloscope - there are no pulses on one output. I call the fee - one of IR2104 pierced.

Well, maybe I got a defective one, I read that this often happens with this mikruha. I solder a new one (I took 2 pieces with a margin), the same nonsense - it turns STOP for a couple of seconds! Here I strained myself, and let's check the field workers. By the way, my board has IRF530(100V / 17A) vs. (50V / 49A), as in the original. A maximum of 3A will go to the motor, so a reserve of 14A will be more than enough, but the difference in price is almost 2 times in favor of the 530s.
So, I check the field workers and what I see ... I didn’t solder one leg! And all 30V from the field worker flew to the output of this "irka". I soldered the leg, carefully examined everything again, put another one IR2104, I'm worried myself - this is the last one. I turned it on and was very happy when the engine did not stop after two seconds of operation. Modes left as follows: engine Vexta- 1.5A, engine NEMA 2.5A. With this current, revolutions of about 2000 are achieved, but it is better to limit them programmatically in order to avoid skipping steps, and the temperature of the engines at long work does not exceed the safe for motors. The power transformer copes without problems, because usually only 2 motors are spinning at the same time, but additional air cooling is desirable for the radiator.

Now about the installation of field workers on the radiator, and there are 24 of them, if anyone has not noticed. In this version of the board, they are located lying down, i.e. the radiator just lays down on them and is attracted by something.


Of course, it is desirable to put a solid piece of mica to isolate the heatsink from the transistors, but I did not have one. Found a way out. Because in half of the transistors, the case goes to plus power; they can be mounted without insulation, just on thermal paste. And under the rest, I put pieces of mica left over from Soviet transistors. I drilled the radiator and the board in three places through and through and tightened it with bolts. I got one large board by soldering three separate boards along the edges, while soldering a 1mm copper wire around the perimeter for strength. All electronic stuffing and placed the power supply on some kind of iron chassis, I don’t even know from what.

Side and top cover cut out of plywood, and put a fan on top.

The controller for the machine can easily assemble and House master. Setting the desired parameters is not difficult, it is enough to take into account a few nuances.

Without right choice controller for the machine, it will not be possible to assemble the controller for the CNC on the Atmega8 16au with your own hands. These devices are divided into two types:

  • Multichannel. This includes 3 and 4 axis stepper motor controllers.
  • Single-channel.

Small ball motors are most effectively controlled by multi-channel controllers. The standard sizes in this case are 42 or 57 millimeters. This great option for self-assembly of CNC machines, in which the working field has a size of up to 1 meter.

If the machine is assembled independently on a microcontroller with a field of more than 1 meter, it is necessary to use motors that are produced in sizes up to 86 millimeters. In this case, it is recommended to organize the control of powerful single-channel drivers, with a control current of 4.2 A or more.

Controllers with special driver chips are widely used in case of need to control the operation of machines with desktop-type milling machines. The best option there will be a chip designated as TB6560 or A3977. This product has a controller inside to help generate the correct sine wave for modes that support different half steps. Winding currents can be set by software. With microcontrollers, achieving results is easy.

Control

The controller is easy to manage using specialized software installed on a PC. The main thing is that the computer itself has a memory of at least 1 GB, and a processor of at least 1 GHz.

You can use laptops, but desktop computers give better results in this regard. And they are much cheaper. The computer can be used for other tasks when the machines do not require control. Well, if there is an opportunity to optimize the system before starting work.

Parallel port LPT - that's what detail helps organize the connection. If the controller has a USB port, then an appropriately shaped connector is used. At the same time, more and more computers are being released that do not have a parallel port.

Making the simplest version of the scanner

One of the most simple solutions For homemade creation CNC machine - the use of parts from other equipment equipped with ball motors. The function is perfectly performed by old printers.

We take the following details extracted from the previous devices:

  1. microchip itself.
  2. Stepper motor.
  3. A pair of steel bars.

When creating the controller case, you must also take the old cardboard box. It is permissible to use boxes made of plywood or textolite, the source material does not matter. But cardboard is easiest to process using ordinary scissors.

The list of tools will look like this:

  • Soldering iron together, complete with accessories.
  • Glue gun.
  • Scissor tool.
  • Wire cutters.

Finally, making the controller will require the following additional parts:

  1. Connector with wire, for organizing convenient connection.
  2. Cylindrical socket. Such designs are responsible for powering the device.
  3. The lead screws are threaded rods.
  4. Nut with suitable for lead screw sizes.
  5. Screws, washers, wood in the form of pieces.

We begin work on creating a homemade machine

The stepper motor along with the board must be removed from the old devices. At the scanner, it is enough to remove the glass, and then unscrew a few bolts. You will also need to remove the steel rods used in the future, creating a test portal.

The ULN2003 control chip will be one of the main elements. Separate purchase of parts is possible if other types of chips are used in the scanner. If there is a desired device on the board, carefully unsolder it. The procedure for assembling a controller for a CNC on an Atmega8 16au with your own hands is as follows:

  • First, heat up the tin using a soldering iron.
  • Removing the top layer will require the use of suction.
  • At one end, we install a screwdriver under the microcircuit.
  • The tip of the soldering iron should touch each pin of the microcircuit. If this condition is met, the tool can be pressed.

Next, the microcircuit is soldered to the board, also with maximum accuracy. For the first trial steps, you can use layouts. We use the option with two power rails. One of them is connected to the positive terminal, and the other to the negative.

The next step is to connect the output of the second parallel port connector with the output in the chip itself. The pins of the connector and the microcircuit must be connected accordingly.

The zero terminal is connected to the negative bus.

One of last stages– Soldering the stepper motor to the control device.

It is good if there is an opportunity to study the documentation from the device manufacturer. If not, then you will have to find a suitable solution on your own.

The wires are connected to the leads. Finally, one of them connects to the positive bus.

Busbars and power sockets must be connected.

Hot glue from a gun will help secure the parts so they don't chip off.

We use Turbo CNC - a program for control

The Turbo CNC software will definitely work with a microcontroller that uses the ULN2003 chip.

  • We use a specialized site from where you can download software.
  • Any user will understand how to install.
  • It is this program that works best under MS-DOS. Some errors may appear in compatibility mode on Windows.
  • But, on the other hand, it will allow you to assemble a computer with certain characteristics that are compatible with this particular software.

  1. After the first launch of the program, a special screen will appear.
  2. You have to hit the space bar. So the user is in the main menu.
  3. Press F1 and then select Configure.
  4. Next, you need to click on the “number of Axis” item. We use the Enter key.
  5. It remains only to enter the amount of soybeans that you plan to use. In this case, we have one motor, so we click on the number 1.
  6. To continue, use Enter. We again need the F1 key, after using it, select Configure Axis from the Configure menu. Then - press the space bar twice.

Drive Type - this is the tab we need, we reach it with numerous Tab presses. The down arrow helps you get to Type. We need a cell called Scale. Next, we determine how many steps the engine takes only during one revolution. To do this, it is enough to know the part number. Then it will be easy to understand how many degrees it turns in just one step. Next, the number of degrees is divided by one step. This is how we calculate the number of steps.

The rest of the settings can be left as is. The number obtained in the Scale cell is simply copied to the same cell, but on another computer. The value 20 must be assigned to the Acceleration cell. The default value in this area is 2000, but it is too high for the system being built. The initial level is 20, and the maximum is 175. Then it remains to press TAB until the user reaches the Last Phase item. Here you need to put the number 4. Next, press Tab until we reach the row of x's, the first in the list. The first four lines should contain the following positions:

1000XXXXXXXX
0100XXXXXXXX
0010XXXXXXXX
0001XXXXXXXX

The rest of the cells do not need to be changed. Just choose OK. Everything, the program is configured to work with a computer, the executive devices themselves.