DIY CNC machine control controller. CNC milling machine with autonomous controller on STM32. Board appearance

Among the wide variety of controllers, users are looking for self-assembly those schemes that will be acceptable and most effective. Both single-channel and multi-channel devices are used: 3- and 4-axis controllers.

Device options

Multi-channel stepper motor controllers (stepper motors) with standard sizes of 42 or 57 mm are used in the case of a small working field of the machine - up to 1 m. When assembling a machine with a larger working field - over 1 m, a standard size of 86 mm is needed. It can be controlled using a single-channel driver (control current exceeding 4.2 A).

A machine with numerical control, in particular, can be controlled by a controller created on the basis of specialized driver chips intended for use for stepper motors up to 3A. The CNC controller of the machine is controlled by a special program. It is installed on a PC with a processor frequency of over 1 GHz and a memory capacity of 1 GB). With a smaller volume, the system is optimized.

NOTE! If compared with a laptop, then if you connect a desktop computer - top scores, and it costs less.

When connecting the controller to a computer, use a USB or LPT parallel port connector. If these ports are not available, then expander boards or controller converters are used.

Excursion into history

The milestones of technological progress can be schematically outlined as follows:

  • The first controller on the chip was conventionally called the “blue board”. This option has disadvantages and the scheme required improvement. The main advantage is that there is a connector, and the control panel was connected to it.
  • Following the blue one, a controller called the “red board” appeared. It already used fast (high-frequency) optocouplers, a 10A spindle relay, power isolation (galvanic) and a connector where the fourth axis drivers would be connected.
  • Another similar device with red markings was also used, but more simplified. With its help it was possible to control small machine desktop type - from among the 3-axis.

  • The next in the line of technological progress was a controller with galvanic isolation for power supply, fast optocouplers and special capacitors, having an aluminum housing that provided protection from dust. Instead of a control relay that would turn on the spindle, the design had two outputs and the ability to connect a relay or PWM (pulse width modulation) speed control.
  • Now, for the manufacture of a homemade milling and engraving machine with a stepper motor, there are options - a 4-axis controller, a stepper motor driver from Allegro, a single-channel driver for a machine with a large working field.

IMPORTANT! Do not overload the motor by using higher and higher speeds.


Controller made from scrap materials

Most craftsmen prefer control via the LPT port for most amateur-level control programs. Instead of using a set of special microcircuits for this purpose, some people build a controller from scrap materials - field-effect transistors from burnt-out motherboards (with a voltage of over 30 volts and a current of more than 2 amperes).

And since a machine for cutting foam plastic was created, the inventor used car incandescent lamps as a current limiter, and the SD was removed from old printers or scanners. This controller was installed without changes to the circuit.

To do the simplest machine Do-it-yourself CNC, when disassembling the scanner, in addition to the SD, the ULN2003 chip and two steel rods are removed, they will go to the test portal. In addition you will need:

  • A cardboard box (from which the device body will be mounted). Possible option with textolite or plywood sheet, but cardboard is easier to cut; pieces of wood;
  • tools - in the form of wire cutters, scissors, screwdrivers; glue gun and soldering accessories;
  • board option that is suitable for a homemade CNC machine;
  • connector for LPT port;
  • a cylinder-shaped socket for arranging a power supply;
  • connection elements - threaded rods, nuts, washers and screws;
  • program for TurboCNC.

Assembling a homemade device

Having started working on a homemade CNC controller, the first step is to carefully solder the chip onto breadboard with two power buses. Next will be the connection of the ULN2003 output and the LPT connector. Next, we connect the remaining pins according to the diagram. The zero pin (25th parallel port) is connected to the negative pin on the board's power bus.

Then the motor is connected to the control device, and the power supply socket is connected to the corresponding bus. To ensure the reliability of the wire connections, they are fixed with hot glue.

Connecting Turbo CNC will not be difficult. The program is effective with MS-DOS and is also compatible with Windows, but in this case some errors and failures are possible.

Having configured the program to work with the controller, you can make a test axis. The sequence of actions for connecting the machines is as follows:

  • In holes drilled at the same level in three wooden blocks, insert steel rods and secure with small screws.
  • The SD is connected to the second bar, putting it on the free ends of the rods and screwing it using screws.
  • The lead screw is threaded through the third hole and a nut is installed. The screw inserted into the hole of the second bar is screwed in until it stops so that it passes through these holes and comes out onto the motor shaft.
  • Next, you need to connect the rod to the engine shaft with a piece of rubber hose and a wire clamp.
  • Additional screws are required to secure the running nut.
  • The made stand is also attached to the second block using screws. The horizontal level is adjusted with additional screws and nuts.
  • Usually, motors are connected along with controllers and tested for correct connection. This is followed by checking the CNC scaling and running a test program.
  • All that remains is to make the body of the device and this will be the final stage of the work of those who create homemade machines.

When programming the operation of a 3-axis machine, there are no changes in the settings for the first two axes. But when programming the first 4 phases of the third, changes are introduced.

Attention! Using a simplified diagram of the ATMega32 controller (Appendix 1), in some cases you may encounter incorrect processing of the Z axis - half-step mode. But in full version its boards (Appendix 2), axes currents are regulated by external hardware PWM.

Conclusion

In controllers, assembled CNC machines - a wide range of uses: in plotters, small milling cutters, working with wood and plastic parts, steel engravers, miniature drilling machines.

Devices with axial functionality are also used in plotters; they can be used to draw and make printed circuit boards. So the efforts spent on assembly by skilled craftsmen will definitely pay off in the future controller.

The controller for the machine can easily be assembled and House master. Set required parameters It’s not difficult, it’s enough to take into account a few nuances.

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

  • Multichannel. This includes 3 and 4 axis controllers for stepper motors.
  • Single channel.

Small ball motors are most effectively controlled by multi-channel controllers. Standard sizes in in this case– 42 or 57 millimeters. This is an excellent option for self-assembly of CNC machines whose working field is up to 1 meter in size.

If you independently assemble a machine on a microcontroller with a field of more than 1 meter, you must use motors available in standard 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 and higher.

Controllers with special driver chips have become widespread when it is necessary to organize control of the operation of machines with table-type milling machines. The best option there will be a chip designated as TB6560 or A3977. This product has a controller inside that helps generate the correct sine wave for modes that support different half-steps. Winding currents can be set programmatically. With microcontrollers, achieving the result is easy.

Control

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

You can use laptops, but desktop computers give better results in this regard. And they cost much less. The computer can be used to solve other problems when the machines do not require control. It’s good if it is possible to optimize the system before starting work.

The parallel LPT port is the detail that helps organize the connection. If the controller has a USB port, then a connector of the appropriate shape is used. At the same time, more and more computers are being produced 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. Old printers perform this function perfectly.

We take the following parts extracted from previous devices:

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

When creating a controller case, you need to take the old one cardboard box. It is acceptable to use boxes made of plywood or PCB, the source material does not matter. But the easiest way to process cardboard is using regular 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 convenient connection.
  2. Cylindrical socket. Such structures are responsible for powering the device.
  3. Lead screws are rods with a specific thread.
  4. Nut with dimensions suitable for the lead screw.
  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. The scanner just needs to remove the glass and then remove a few bolts. You will also need to remove steel rods that will be used later to create a test portal.

The ULN2003 control chip will become one of the main elements. It is possible to purchase parts separately if the scanner uses other types of chips. If available desired device We carefully solder it on the board. The procedure for assembling a controller for CNC on Atmega8 16au with your own hands is as follows:

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

Next, the microcircuit is soldered onto the board, also with the utmost care. For the first trial steps, you can use mock-ups. We use the option with two power buses. One of them is connected to the positive terminal, and the other to the negative terminal.

At the next stage, the output of the second parallel port connector is connected to the output in the chip itself. The terminals of the connector and the microcircuit must be connected accordingly.

The zero pin is connected to the negative bus.

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

It’s good if you have the opportunity to study the documentation from the device manufacturer. If not, you will have to look for a suitable solution yourself.

The wires are connected to the terminals. Finally, one of them is connected to the positive bus.

Busbars and power sockets need to be connected.

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

We use Turbo CNC - a control program

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

  • We use a specialized website from where you can download software.
  • Any user will understand how to install.
  • This program works best under MS-DOS. Some errors may appear in compatibility mode on Windows.
  • But, on the other hand, this will allow you to build 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 press spacebar. This is how the user ends up in the main menu.
  3. Press F1, and then select Configure.
  4. Next, you need to click the “number of Axis” item. Use the Enter key.
  5. All that remains is to enter the amount of soybeans that you plan to use. In this case, we have one motor, so we click on number 1.
  6. To continue, use Enter. We will need the F1 key again, after using it in the Configure menu, select Configure Axis. Then press the space bar twice.

Drive Type - this is the tab we need, we reach it by numerous Tab presses. The down arrow helps you get to the Type item. We need a cell called Scale. Next, we determine how many steps the engine takes during just one revolution. To do this, just know the part number. Then it will be easy to understand how many degrees it rotates in just one step. Next, the number of degrees is divided into 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 should 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. Next, all that remains is 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 items:

1000XXXXXXXX
0100XXXXXXXX
0010XXXXXXXX
0001XXXXXXXX

No changes need to be made to the remaining cells. Just select OK. That's it, the program is configured to work with the computer and the actuators themselves.

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

Mechanical part

bed
The bed of our machine is made of plastic with a thickness of 11-12mm. The material is not critical, aluminum can be used, 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 fastening points with glue; if you use wood, you can use PVA glue.

Calipers and guides
Steel rods with a diameter of 12mm, length 200mm (Z axis 90mm), two pieces per axis, were used as guides. The 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 fastened with M6 screws. The X and Y supports have 4 threaded holes at the top for attaching the table and Z axis assembly.


Caliper Z
The Z axis guides are attached to the X support through a steel plate, which is a transition plate, the dimensions of the plate are 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 a rubber hose. If you use 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 are not first installed on the base.
  • We move the caliper along the guides until we achieve smooth movement.
  • Tighten the bolts, fixing the guide parts.
  • We attach the caliper, guide assembly and side frame to the base; we use self-tapping screws for fastening.
  • We assemble assembly Z and, together with the adapter plate, attach it to support X.
  • Next, install the lead screws along with the couplings.
  • We install stepper motors by connecting the motor rotor and the screw with a coupling. We pay strict attention to ensure that the lead screws rotate smoothly.

Recommendations for assembling the machine:
Nuts can also be made from cast iron; there is no need to use other materials; screws can be purchased at any hardware store and trim to suit your needs. When using screws with M6x1 thread, the nut length will be 10 mm.

Machine drawings.rar

Let's move on to the second part of assembling a CNC machine with our own hands, namely the electronics.

Electronics

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

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


Controller
The control controller was assembled using only 3 555TM7 series microcircuits. The controller does not require firmware and has a fairly simple schematic diagram, thanks to this, this CNC machine can be made by a person who is not particularly versed in electronics.

Description and purpose of the LPT port connector pins.

Vvyv. Name Direction Description
1 STROBE input and output Sets the PC after each data transfer is completed
2..9 DO-D7 conclusion Conclusion
10 ASK 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 circuit, 7 bits are not used because 3 engines are used. You can hang the key to turn on the main engine (mill or drill) on it.

Driver for stepper motors
To control the stepper motor, a driver is used, which is an amplifier with 4 channels. The design is implemented using 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 located at.


By assembling this CNC machine with your own hands, you will become the owner of a machine capable of performing machining(drilling, milling) plastics. Engraving on steel. Also, a homemade 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. When I started writing the article, I didn’t 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 covered with writing on both sides, and there was still a lot, a lot to tell.

In the end it turned out like this guide to creating a CNC machine, working machine, from scratch. There will be three parts of an article about one machine: 1-electronic filling, 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 that is useful and necessary for every beginner in this interesting business, what I myself have read on various Internet resources and passed through myself.

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

Preface

After I assembled my small machine without significant expenditure of effort, time and money, I became seriously interested in this topic. I watched on YouTube, if not all, then almost all the videos related to amateur machines. I was especially impressed by the photographs of the products that people make on their “ home CNC" I looked and made a decision - I will assemble my own large machine! So, on a wave of emotions, without thinking everything through, I plunged into a new and unknown world CNC.

I didn't know where to start. First of all, I ordered a normal stepper motor Vexta by 12 kg/cm, by the way with the proud inscription “made in Japan”.


While he was traveling across Russia, he sat in the evenings on various CNC forums and tried to decide on his choice STEP/DIR controller and stepper motor drivers. I considered three options: on a chip L298, on field workers, or buy ready-made Chinese TB6560 which had very mixed 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 it burned out when he slightly turned the shaft of the motor connected to the controller at that time. Probably the fact of the unreliability of the Chinese played in favor of the choice of scheme L297+ actively discussed on the forum. The scheme is probably really indestructible because... The driver's field amperes are several times higher than what needs to be supplied to the motors. Even though you have to solder it yourself (that’s just a plus), and the cost of the parts was a little more than a Chinese controller, but it’s reliable, which is more important.

I'll digress a little from the topic. When all this was done, the thought did not even arise that I would ever write about it. Therefore, there are no photographs of the assembly process of mechanics and electronics, only a few photos taken with a mobile phone camera. Everything else was clicked specifically for the article, in already assembled form.

The soldering iron case is afraid

I'll start with the power supply. I planned to do an impulse one, I tinkered with it for probably a week, but I still couldn’t overcome the excitement that was coming from out of nowhere. I change the trans to 12V - everything is OK, but when I change it to 30 it’s a total mess. I came to the conclusion that some kind of bullshit is climbing around feedback from 30v to TL494 and demolishes her tower. So I abandoned this impulse generator, fortunately there were several TS-180s, one of which went to serve the homeland as a trance power supply. And whatever you say, a piece of iron and copper will be more reliable than a pile of powder. The transformer rewound to the required voltages, but it needed +30V to power the motors, +15V to power IR2104, +5V on L297, and a fan. You can supply 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 are reduced, but the transformer did not allow more because needed 6-7A. Voltages 5 and 15v stabilized, 30 left “floating” at the discretion of our electrical network.


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 control the machine, how to make mechanics, etc. and so on. In general, the more I read, the scarier it became, and more and more often the question arose “why do I need this?!” But it was too late to retreat, the engine is on the table, the parts are somewhere on the way - we must continue.

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


2 - I also took resistors and capacitors in SMD packages to reduce the number of holes that needed to be drilled.
3 - The radiator I had was smaller and the outer transistors were outside its area. It was necessary to shift the field switches on one board to the right, and on the other to the left, so I made two types of boards.

Machine controller diagram


For the security of the LPT port, the controller and computer were connected via an optical isolation board. I took the diagram and signet from one well-known site, but again I had to remake it a little to suit myself and remove unnecessary details.


One side of the board is powered through USB port, the other, connected to the controller - from a +5V source. Signals are transmitted through 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 to safely connect a stepper motor controller to the LPT port of a 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 limit sensors, a forced stop button, a spindle switch relay and another device, such as a vacuum cleaner.


This 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. Using a trimmer, I set a small current (this is possible thanks to the presence of PWM), and connected the power (to the motors) through a chain of 12+24V light bulbs, so that there was “nothing, if anything.” My field workers are without a radiator.

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

I ordered the next two engines more powerful, Nema by 18kg/s, but already “made in China”.


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

I soldered the two remaining boards, checked them using the “LED stepper motor simulator”, everything seemed to be fine. I connect one motor - it works great, 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 stops... I look with an oscillator - there are no pulses on one output. I call the fee - one of IR2104 broken.

Well, okay, maybe I got a defective one, I read that this often happens with this little thing. I solder in a new one (I took 2 pieces with a spare), the same nonsense - it turns for a couple of seconds and STOP! Here I tensed up, and let’s check the field workers. By the way, my board has IRF530(100V/17A) versus (50V/49A), as in the original. A maximum of 3A will go to the motor, so a reserve of 14A is more than enough, but the price difference is almost 2 times in favor of the 530s.
So, I check the field devices 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, inspected everything carefully again, and installed 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. The modes were left as follows: engine Vexta– 1.5A, motor NEMA 2.5A. With this current, approximately 2000 revolutions are achieved, but it is better to limit them in software to avoid skipping steps, and the engine temperature at long work does not exceed safe values ​​for motors. The power transformer copes without problems, because usually only 2 motors spin at the same time, but additional air cooling is desirable for the radiator.

Now about installing field guards on the radiator, and there are 24 of them, if anyone hasn’t noticed. In this version of the board they are located lying down, i.e. the radiator simply rests on them and is attracted by something.


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

I cut out the side and top covers from plywood, and placed a fan on top.

"RFF" - can control both separate 3 stepper motor drivers and a ready-made board with drivers for 3-axis CNC with LPT output.
This board is an alternative to an old computer with an LPT port on which MACH3 is installed.
If the G-code is loaded into the MACH3 program on the computer, then here it is read “RFF” from the SD card.

1. Appearance boards

1 - SLOT for SD card;

2 - start button;

3 - manual control joystick;

4 - LED (for X and Y axes);

5 LED (for Z axis);

6 - leads for the spindle power button;

8 - low level pins (-GND);

9 - high level pins (+5v);

10 - pins on 3 axes (Xstep, Xdir, Ystep, Ydir, Zstep, Zdir), 2 pins each;

11 - LPT connector pins (25 pins);

12 - LPT connector (female);

13 - USB connector (only for +5v power supply);

14 and 16 - spindle frequency control (PWM 5 V);

15 - GND (for spindle);

17 - output for spindle ON and OFF;

18 - spindle speed control (analog from 0 to 10 V).

When connected to a ready-made board with drivers for 3 axial CNC which has an LPT output:

Install jumpers between 10 pins and 11 pins.

8 and 9 pins with 11, they are needed if additional on and off pins are allocated for the drivers (there is no specific standard, so these can be any combinations, you can find them in the description, or at random :) -)

When connecting to separate drivers with motors:

Install jumpers between the 10 Step, Dir pins of the "RFF" board and the Step, Dir pins of your drivers. (don’t forget to supply power to the drivers and motors)

Connect "RFF" to the network. Two LEDs will light up.

Insert the formatted SD card into LOT 1. Press RESET. Wait until the right LED lights up. (Approximately 5 seconds) Remove the SD card.

A text file named "RFF" will appear on it.

Open this file and enter the following variables (Here in this form and sequence):

Example:

V=5 D=8 L=4.0 S=0 Dir X=0 Dir Y=1 Dir Z=1 F=600 H=1000 UP=0

V - conditional value from 0 to 10 of the initial speed during acceleration (acceleration).

Explanations of commands

D - step crushing installed on the motor drivers (should be the same on all three).

L is the length of passage of the carriage (portal), with one revolution of the stepper motor in mm (it should be the same on all three). Insert the rod from the handle instead of the cutter and manually rotate the motor one full turn, this line will be the L value.

S - which signal turns on the spindle, if 0 means - GND if 1 means +5v (can be selected experimentally).

Dir X, Dir Y, Dir Z, the direction of movement along the axes, can also be selected experimentally by setting 0 or 1 (it will become clear in manual mode).

F - speed at idling(G0), if F=600, then the speed is 600mm/sec.

H - the maximum frequency of your spindle (needed to control the spindle frequency using PWM, for example, if H = 1000, and S1000 is written in the G-code, then the output with this value will be 5v, if S500 then 2.5 v, etc., variable S in G code must not be greater than the variable H on SD.

The frequency at this pin is about 500 Hz.
UP - logic for controlling SD drivers (there is no standard, it can be like high level+5V, and low -) set 0 or 1. (works for me in any case. -)))

The controller itself

See video: control board with 3-axis CNC

2. Preparation of the control program (G_CODE)

The board was developed for ArtCam, so the Control program must have an extension. TAP (remember to put it in mm, not inches).
The G-code file saved on the SD card must be named G_CODE.

If you have a different extension, for example CNC, then open your file using notepad and save it as G_CODE.TAP.

x, y, z in G-code must be capitalized, the dot must be a dot, not a comma, and even an integer must have 3 zeros after the dot.

Here it is in this form:

X5.000Y34.400Z0.020

3. Manual control

Manual control is carried out using a joystick, if you have not entered the variables in the settings specified in point 1, “RFF” board
will not work even in manual mode!!!
To go to manual mode you need to press the joystick. Now try to control it. Looking at the board from above (SLOT 1 at the bottom,
12 LPT connector at the top).

Forward Y+, backward Y-, right X+, left X-, (if the movement in the Dir X, Dir Y settings is incorrect, change the value to the opposite).

Press the joystick again. The 4th LED will light up, which means you have switched to Z-axis control. Joystick up - spindle
should go up Z+, joystick down - go down Z- (if the move is incorrect, change the value in the Dir Z settings
to the opposite).
Lower the spindle until the cutter touches the workpiece. Click on button 2 start, now this is the zero point from here the execution of the G-code will begin.

4. Autonomous operation (performing G-code cutting)
Press button 2 again, briefly holding it down.

After releasing the button, the "RFF" board will begin to control your CNC machine.

5. Pause mode
Briefly press button 2 while the machine is running, cutting will stop and the spindle will rise 5mm above the workpiece. Now you can control the Z axis both up and down, and not be afraid to even go deeper into the workpiece, since after pressing button 2 again, cutting will continue from the paused value along Z. In the pause state, you can turn the spindle off and on with button 6. The X and Y axes are in Pause mode cannot be controlled.

6. Emergency stop of work with the spindle going to zero

Long-pressing button 2 while battery life, the spindle will rise 5 mm above the workpiece, do not release the button, 2 LEDs will begin to blink alternately, the 4th and 5th, when the blinking stops, release the button and the spindle will move to the zero point. Pressing button 2 again will execute the job from the beginning of the G-code.

Supports commands such as G0, G1, F, S, M3, M6 to control the spindle speed there are separate pins: PWM from 0 to 5 V and a second analog from 0 to 10 V.

Accepted command format:

X4.000Y50.005Z-0.100 M3 M6 F1000.0 S5000

There is no need to number the lines, no need to put spaces, indicate F and S only when changing.

A small example:

T1M6 G0Z5.000 G0X0.000Y0.000S50000M3 G0X17.608Y58.073Z5.000 G1Z-0.600F1000.0 G1X17.606Y58.132F1500.0 X17.599Y58.363 X17.597Y58.476 X 17.603Y58.707 X17.605Y58.748

Demonstration of the RFF controller operation

Share