What can you do with an Arduino mini? Homemade Arduino from ATMEGA328P-PU controller

Arduino is a universal platform for DIY microcontrollers. There are many shields (expansion cards) and sensors for it. This diversity allows you to create a number of interesting projects aimed at improving your life and increasing its comfort. The board's areas of application are limitless: automation, security systems, systems for data collection and analysis, etc.

From this article you will learn what interesting things you can do with Arduino. Which projects will be spectacular and which will be useful.

What can you do with Arduino

Robot vacuum cleaner

Cleaning an apartment is a routine task and unattractive, especially since it takes time. You can save it if you delegate part of the housework to a robot. This robot was assembled by an electronics engineer from Sochi - Dmitry Ivanov. Structurally, it turned out to be of sufficient quality and is not inferior in efficiency.

To assemble it you will need:

1. Arduino Pro-mini, or any other similar and suitable in size...

2. USB-TTL adapter if you are using Pro mini. If you chose Arduino Nano, then it is not needed. It is already installed on the board.

3. L298N driver is needed to control and reverse DC motors.

4. Small motors with gearbox and wheels.

5. 6 IR sensors.

6. Engine for turbine (larger).

7. The turbine itself, or rather the impeller from a vacuum cleaner.

8. Motor for brushes (small).

9. 2 collision sensors.

10. 4 x 18650 batteries.

11. 2 DC-DC converters (boost and step-down).

13. Controller for operation (charging and discharging) of batteries.

The control system looks like this:

And here is the power system:

Such cleaners are evolving, factory-made models have complex intelligent algorithms, but you can try to make your own design that will not be inferior in quality to expensive analogues.

Capable of producing a luminous flux of any color, they usually use LEDs in the housing of which there are three crystals glowing in different colors. They are sold to control them; their essence is to regulate the current supplied to each of the colors of the LED strip, therefore, the intensity of the glow of each of the three colors is regulated (separately).

You can make your own RGB controller using Arduino, even moreover, this project implements control via Bluetooth.

The photo shows an example of using one RGB LED. To control the tape, you will need an additional 12V power supply, then they will control the gates of field-effect transistors included in the circuit. The gate charging current is limited by 10 kOhm resistors; they are installed between the Arduino pin and the gate, in series with it.

Using a microcontroller, you can make a universal remote control controlled from a mobile phone.

For this you will need:

    Arduino of any model;

    IR receiver TSOP1138;

    IR LED;

    Bluetooth module HC-05 or HC-06.

The project can read codes from factory remotes and save their values. After which you can control this homemade product via Bluetooth.

The webcam is installed on a rotating mechanism. It is connected to a computer with installed software. It is based on the computer vision library - OpenCV (Open Source Computer Vision Library), after the program detects a face, the coordinates of its movement are transmitted via a USB cable.

Arduino commands the rotating mechanism drive and positions the camera lens. A pair of servos are used to move the camera.

The video shows how this device works.

Keep an eye on your animals!

The idea is to find out where your animal roams, which can be of interest for scientific research or just for fun. To do this you need to use a GPS tracker. But to store location data on some kind of storage device.

In this case, the dimensions of the device play a decisive role here, since the animal should not feel discomfort from it. To record data, you can use it to work with Micro-SD memory cards.

Below is a diagram of the original version of the device.

The original version of the project used a TinyDuino board and shields for it. If you cannot find one, it is quite possible to use small Arduino copies: mini, micro, nano.

A low-capacity Li-ion element was used for power supply. The small battery lasts about 6 hours. The author ended up fitting everything into a cut-off Tic-Tac jar. It is worth noting that the GPS antenna must point upward to obtain reliable sensor readings.

Code lock burglar

To crack combination locks using Arduino, you will need a servo and stepper motor. This project was developed by hacker Samy Kamkar. This is quite a complex project. The operation of this device is shown in the video, where the author explains all the details.

Of course, such a device is unlikely to be suitable for practical use, but it is an excellent demonstration device.

Arduino in music

This is more likely not a project, but a small demonstration of how this platform has been used by musicians.

Drum machine on Arduino. It is notable for the fact that this is not an ordinary search of recorded samples, but, in principle, sound generation using “hardware” devices.

Parts ratings:

    NPN-type transistor, for example 2n3904 - 1 pc.

    Resistor 1 kOhm (R2, R4, R5) - 3 pcs.

    330 Ohm (R6) - 1 pc.

    10 kOhm (R1) - 1 pc.

    100 kOhm (R3) - 1 pc.

    Electrolytic capacitor 3.3 uF - 1 pc.

For the project to work, you will need to connect the library for fast Fourier series expansion.

This is a fairly simple and interesting “you can show off to your friends” project.

3 robot projects

Robotics is one of the most interesting areas for geeks and just those who like to do something unusual with their own hands, I decided to make a selection of several interesting projects.

BEAM robot on Arduino

To assemble a four-legged walking robot you will need:

    To move the legs you need servomotors, for example, Tower Hobbies TS-53;

    A piece of copper wire of medium thickness (so that it can withstand the weight of the structure and not bend, but not too thick, because it does not make sense);

    Microcontroller - AVR ATMega 8 or Arduino board of any model;

    For the chassis, the design states that a Sintra Frame was used. It's a kind of plastic that bends into any shape when heated.

As a result you will get:

It is noteworthy that this robot does not drive, but walks, can step over and climb heights of up to 1 cm.

For some reason, this project reminded me of the robot from the cartoon Wall-e. Its special feature is its use for charging batteries. It moves like a car, on 4 wheels.

Its constituent parts:

    Plastic bottle of suitable size;

  • Mom-dad jumpers;

    Solar panel with an output voltage of 6V;

    As a donor of wheels, engines and other parts - a radio-controlled car;

    Two continuous rotation servos;

    Two conventional servos (180 degrees);

    Holder for AA batteries and for “crown”;

    Collision sensor;

    LEDs, photoresistors, 10 kOhm fixed resistors - 4 pieces in total;

    Diode 1n4001.

Here is the basis - an Arduino board with a proto-shield.

This is what the spare parts from - wheels look like.

The structure is almost assembled, the sensors are installed.

The essence of the robot's work is that it goes to the light. He needs abundance for navigation.

This is more of a CNC machine than a robot, but the project is very entertaining. It is a 2-axis drawing machine. Here is a list of the main components of which it consists:

    (DVD)CD drives - 2 pcs;

    2 drivers for A498 stepper motors;

    servo drive MG90S;

    Arduino Uno;

    Power supply 12V;

    Ballpoint pen, and other design elements.

The optical disc drive uses blocks with a stepper motor and a guide rod that position the optical head. The motor, shaft and carriage are removed from these blocks.

You will not be able to control a stepper motor without additional equipment, so special driver boards are used; it is better if a motor radiator is installed on them at the time of starting or changing the direction of rotation.

The complete assembly and operation process is shown in this video.

See also 16 best Arduino projects from AlexGyver:

Conclusion

This article covers just a small sampling of all that you can do on this popular platform. In fact, it all depends on your imagination and the task you set for yourself.

I would like to present to you my project version of the well-known Arduino controller.
I'll start with a short background. I have been involved in electronics and radio engineering for more than 10 years. But interest in microcontrollers appeared not so long ago. I studied the C language, programmed microcontrollers from , success was changeable. And somehow, while exploring the Internet on the topic of microcontroller programming, I came across the website www.arduino.ru. I liked their controllers and wanted one for myself. Since I “know how to hold a soldering iron in my hands,” I refused to buy a controller and started looking on the Internet for information on making it myself, but I couldn’t find anything suitable. The version of the board that is assembled on the pages of the http://robocraft.ru/blog/arduino/19.html site does not suit me, and I don’t really like it. I wanted one with a USB connector.

I downloaded the circuit files of the original versions of the Arduino controller, the datasheet for the FT232R chip, printed out the article “Arduino Home Made” (link above) and thought about how to connect it all to get what I wanted to find. And this is the diagram we got:

Parts used in the diagram:
I used SMD resistors of size 0805:
- R1, R2, R4, R7 – from 300 Ohm to 1 kOhm (whichever you find);
- R3 – 10 kOhm;
- R5, R6 – 1 kOhm.

Capacitors:
- C2, C3, C5, C13, C8, C10, C11 – SMD (0805) with a nominal value of 0.1 μF;
- electrolytes C1, C4, C9, C12 - I used 22 uF * 50 V each, they suited my height. The rating is not particularly important, not lower than 10 microfarads for a voltage not lower than 10 V, except for C9, its voltage should be no more than 20% of the supply voltage of the external source;
- C6, C7 – ceramics 22 pf.

Any LEDs (shape, dimensions, color) for a current of 15-20 mA. Diode D5 – 1N4007 is also in an SMD package.
Quartz – 16 MHz.

Chips:
- DA1 – L7805 in TO220 housing;
- DD1 – FT232RL (good microphone, but not available in a larger housing);
- DD2 is our microcontroller itself, I used ATmega168, you can use ATmega8, I think that ATmega328 will also work, the main thing is to load the appropriate bootloader.

I can’t say for sure about the final cost (SMD components were not purchased, they were found in the boxes of an amateur radio electronics engineer). And the costs were as follows (Rostov-on-Don): FT232RL - 200 rubles, ATmega168 - 220 rubles, L7805 - 15 rubles, connectors, fuse, combs, socket, button - about 100 rubles.
When you connect the assembled device to the computer, a new device will be detected; you need to install the driver by specifying the path to the “FTDI USB Drivers” directory (in the downloaded Arduino IDE program).

There were some problems with the printed circuit board (PCB), but the PCB picture in the article helped me. All pinouts and connector distances match the original Arduino board; you can connect various Arduino-compatible expansion boards.

The purpose of this controller can be very different - from a “tutorial” on programming to the creation of serious security systems. There is a lot of information on its use on the Internet.
The controller works simply. The Arduino IDE program, downloaded for free from the official website www.arduino.cc, is installed on the computer. In it you write your program (sketch) for execution by the controller. Then, by pressing the “download” button in the Arduino IDE, the computer compiles your program into a language understandable to the microcontroller and, through the virtual com port created by the FT232R chip, transfers it to the microcontroller. After loading the program, it begins to be executed immediately, unless the controller's power is turned off. Also, the FT232R chip has an output signal for automatically restarting the microcontroller, which is necessary when loading a sketch. The controller board can be powered either from USB or from an external power source (8-25 V) for which an L7805 microcircuit stabilizer is installed. There is a 500 mA + 5 V fuse from usb on the board, so as not to damage the usb port if there is a problem with the controller board. Using the ICSP connector, you can program the microcontroller with an external programmer. A button installed on the board resets the microcontroller, and it starts executing the loaded program again. Diode D5 protects the microcontroller from power reverse polarity.

Photo of the finished controller:

The location of some parts in the photo of the board does not coincide with the PP file, due to improvements at the time of creation of the article. The PP file in the program is attached.

A correctly assembled and flashed controller starts working immediately. I will note that after the first (and possibly subsequent) bootloader boot, the D3 LED begins to blink at a low frequency.

Flashing the bootloader of a finished device is easy. The most difficult thing is the presence of a programmer. Since I had experience programming microcontrollers, I already had a Prottoss AVR910 programmer assembled. Working horse, author 5 out of 5! Next, we connect the programmer to the Arduino board, open the program for programming AVR microcontrollers (I used ), open the microcontroller firmware window, click load flash, find our (for ATmega168) firmware file in the downloaded distribution “...arduino-1.0.1\hardware\arduino\ bootloaders\atmega\ ATmegaBOOT_168_diecimila.hex. Next, you need to set the lock and fuse bits as shown in the figure:

You can find out the fuse and lock bits for your microcontroller in the file: “...arduino-1.0.1\hardware\arduino\boards.txt”, using the fuse calculator for AVR (you can easily find it on the Internet).
If you don’t have a programmer, but a friend or neighbor has a programmer... then there is another, faster and more useful way to flash the bootloader. To do this you need to assemble a programmer. The scheme is working and tested by me. The simplicity of this method lies in the fact that you do not need to look for the microcontroller firmware, set the fuse and lock bits. When you connect this programmer to a computer with installed drivers and a connected programmable microcontroller, you, having selected in the Arduino IDE program the port on which the programmer “sits” and your board to be flashed and the connected programmer, simply click on the button in the service tab “flash bootloader” and rejoice .

If you have the “chicken and egg” problem, then I would advise you to assemble this programmer (I haven’t assembled it myself, but I think it’s a good thing). Or google the Internet on the topic AVRISP-mkII. I will also attach an archive with information on this programmer with files and descriptions.

You can read about an alternative method for flashing a bootloader.
Now (with the drivers installed on the computer, open the Arduino IDE program, in the “Service” tab, move the cursor to the “board” tab and select your device (in my version it is Arduino Diecimila or Duemilanove w/ ATmega168). Next, in the same place, select the port to which the controller is connected (you can see it in the computer’s device manager). Let’s implement our thoughts in a sketch and enjoy the operation of the controller!

Please send any questions you have via PM.
The controller board was developed and successfully used by a Rostov radio amateur Ananyev Valery. Login on the site:

List of radioelements

Designation Type Denomination Quantity NoteShopMy notepad
DD1 USB interface IC 1 To notepad
DD2 MK AVR 8-bit

ATmega168

1 To notepad
DA1 Linear regulator

L7805AB

1 TO220 To notepad
D1-D4 Light-emitting diode 4 Any for current 15-20 mA To notepad
D5 Rectifier diode

1N4007

1 SMD To notepad
Q1 Quartz resonator16 MHz1 To notepad
C1, C4, C9, C12 Electrolytic capacitor22uF 50V4 To notepad
C2, C3, C5, C8, C10, C11, C13 Capacitor0.1 µF7 SMD (0805) To notepad
C6, C7 Capacitor22 pF2 Ceramic To notepad
R1, R2, R4, R7 ResistorFrom 300 Ohm to 1 kOhm4 SMD (0805)

This time I will tell you how to make an Arduino with your own hands, and even without a soldering iron. The circuit for this simple Arduino clone is called Shrimp. Homemade Shrimp is fully compatible with the Arduino IDE, so you can easily run any sketches on it. It should be noted right away that to create Shrimp from scratch you will need a working Arduino board. It is necessary to install the bootloader on an empty microcontroller. If you don’t have an Arduino at hand, then you can purchase a microcontroller that has already been flashed and immediately jump to section 2. To create Shrimp we will need:

  • microcontroller ATMEGA328P-PU;
  • resistor 10 kOhm;
  • capacitor 10-100 µF, electrolytic;
  • capacitor 22 pF, ceramic - 2 pcs;
  • capacitor 100 nF, ceramic - 4 pcs;
  • tact button;
  • quartz 16 MHz;
  • bread board;
  • a set of jumpers for a breadboard;
  • USB to UART converter based on FT232R, CP2102 or CH340.

1. Copying the bootloader to a clean microcontroller

Typically, to write a program to a microcontroller, you need to use a separate device - a programmer. Arduino is good because it doesn’t need a programmer. Instead, a special firmware called a bootloader is used. This bootloader can accept programs from outside and write them into the flash memory of the microcontroller. So, the bootloader is written into the microcontroller at the factory. And to get our Shrimp to work, we have to repeat this procedure. This is where we need another Arduino board, which was mentioned at the very beginning. The bootloader installation procedure consists of three steps. Step 1. Install a special program on the Arduino working board - OptiLoader Open program OptiLoader allows you to flash the optiboot bootloader into the microcontroller of our Shrimp. At the time of writing, OptiLoader supported microcontrollers: ATmega8, ATmega168, ATmega168P, ATmega168PB, ATmega328, ATmega328P, ATmega328PB. Download the archive using one of the links:
  • from the official repository: https://github.com/WestfW/OptiLoader
  • from our website:
Unpack the archive and open the sketch in the Arduino IDE. Upload the sketch to the working Arduino board. Disconnect Arduino from USB power. Note. If you download the program from github, you will need to rename the “optiLoader-master” folder to simply “optiLoader” Step 2. Connecting a blank microcontroller We connect the working Arduino board with a clean microcontroller according to the diagram below. Everything is very simple here. We look carefully at the picture, insert the wiring, check it seven times. Schematic diagram Layout appearance
Step 3. Firmware bootloader Now let's connect the Arduino to power via USB. Immediately after turning on, the program will begin copying the bootloader to a clean microcontroller. In this case, the RX and TX LEDs will actively blink. As soon as the LEDs stop blinking, copying is complete. If something goes wrong and the LEDs are not blinking, you can open the COM monitor. OptiLoader displays the entire bootloader copying process. If successful, the procedure report will look like this.

2. Uploading programs to Shrimp

So now we have a homemade Arduino with a flashed bootloader. To upload some sketch to it, we will need to partially disassemble the previous circuit and supplement it with new elements. In particular, we add a reset button and protective power circuits.

Which is used in electrical circuits for data processing. It can often be found in smart home systems. There are many modifications of this element, which differ in conductivity, voltage and maximum overload. It is also worth noting that the models are produced with various components. If necessary, the device can be assembled independently. However, for this it is worth familiarizing yourself with the modification diagram.

How does the Arduino controller work?

The usual model includes a transistor that operates from an adapter, as well as a chain of transceivers. There is a relay to maintain a stable current. Contactors for controllers are used in different directions. Rectifier blocks for controllers are installed with plates. Capacitors in many models are available with low-pass filters.

Arduino UNO assembly

If necessary, you can make an Arduino UNO controller yourself. For this purpose, two transceivers and one cover are used. Capacitors can be used with a conductivity of 50 microns. The operating frequency of the elements is at 300 Hz. A regulator is used to set the transistor. Filters can be soldered at the beginning of the circuit. Quite often they are installed as a transitional type. In this case, transceivers can be used of the expansion type.

Assembly of Arduino UNO R3

Assembling an Arduino UNO R3 with your own hands is quite simple. For this purpose, you will need to prepare a transition-type transceiver that operates from an adapter. The stabilizer can be used with a conductivity of 40 microns. The operating frequency of the controller will be about 400 Hz. Experts advise not to use conductor transistors, since they are not able to operate with wave interference. Many models are made with self-regulating transceivers. Their connectors are connected with a conductivity of 340 microns. for controllers of this series is at least 200 V.

Assembling the Arduino Mega modification

You can make an Arduino Mega with your own hands only using a collector transceiver. Contactors are quite often installed with adapters, and their sensitivity is at least 2 mV. Some experts recommend using inverting filters, but remember that they cannot work at lower frequencies. Transistors are used only of the conductor type. The rectifier unit is installed last. If problems with conductivity occur, experts recommend checking the rated voltage of the device and installing capacitive capacitors.

How to build an Arduino Shield?

Assembling an Arduino Shield controller with your own hands is quite simple. For this purpose, the transceiver can be prepared for two adapters. The transistor can be used with a lining and a conductivity of 40 microns. The operating frequency of the controller of this series is at least 500 Hz. The element is operated at a voltage of 200 V. A regulator for modification will be required on a triode. The converter must be installed so that the transceiver does not burn out. Filters are often of variable type.

Arduino Nano assembly

A DIY Arduino Nano controller is made with two transceivers. A pole type stabilizer is used for assembly. A total of two small capacitors are required. The transistor is installed with a filter. In this case, the triode must operate at a frequency of at least 400 Hz. The rated voltage of the controllers in this series is 200 V. If we talk about other indicators, it is worth noting that the sensitivity is at least 3 mV. The relay for assembly will need a mesh filter.

Assembly of SMD transistors

To do with an SMD transistor (Arduino), you only need one transceiver. To maintain a stable frequency, two capacitors are installed. Their capacitance must be at least 5 pF. To install the thyristor, a conventional wire adapter is used. Stabilizers at the beginning of the circuit are installed on a diode base. The conductivity of the elements must be at least 55 microns. You should also pay attention to the insulation of capacitors. To reduce the number of system failures, it is recommended to use only converter comparators with low sensitivity. It is also worth noting that there are wave analogues. Their sensitivity indicator is 200 mV. Regulators are only suitable for duplex type.

Model based on DA1

Transistors of this series have excellent conductivity and are able to work with output converters of different frequencies. The user can make the modification with his own hands using a wire transceiver. Its contacts are connected directly through the capacitor unit. It is also worth noting that the regulator is installed behind the transceiver.

When assembling the controller, it is recommended to use capacitive triodes with low thermal losses. They have high sensitivity, and conductivity is at the level of 55 microns. If you use a simple transition type stabilizer, then the filter is used with a lining. Experts say that tetrodes can be installed with a comparator. However, it is worth considering all the risks of malfunctions in the operation of the capacitor unit.

Assembly on transistor DD1

DD1 transistors provide high response speed with low thermal losses. To assemble an Arduino controller with your own hands, it is recommended to prepare a transceiver. It is more advisable to use a linear analogue, which has high conductivity. It should also be noted that the market is full of single-pole modifications, and their sensitivity indicator is at the level of 60 mV. This is clearly not enough for a high-quality controller.

The regulator is installed as a standard duplex type. The triode for the model is selected on a diode basis. The comparator itself is installed at the beginning of the circuit. It must operate with a resistance of at least 50 Ohms. The rated voltage should be about 230 V.

DD2 based model

Transistors DD2 are operated at a conductivity of 300 microns. They have high sensitivity, but they can only operate at high frequencies. For this purpose, an expansion transceiver is installed on the controller. Next, to make an Arduino with your own hands, take a wire switch. The output contacts of the element are connected to a relay. The resistance of the switch must be at least 55 ohms.

Additionally, it is worth checking the resistance on the capacitor unit. If this parameter exceeds 30 Ohms, then the filter is used with a triode. The thyristor is installed with one stabilizer. In some cases, rectifiers are soldered behind the transistors. These elements not only maintain frequency stability, but also partially solve the conductivity problem.

Assembly on transistor L7805

Assembling an Arduino controller with your own hands (based on the L7805 transistor) is quite simple. The model will require a transceiver with a mesh filter. The conductivity of the element must be at least 40 microns. Additionally, it is worth noting that capacitors can be used of the binary type. Experts say that the rated voltage should not be higher than 200 V. Moreover, sensitivity depends on many factors. The comparator is most often installed on the controller with a linear adapter. A triode on a diode base is soldered at the output. To stabilize the conversion process, a single-junction filter is used.

Model based on FT232RL

To properly make an Arduino controller with your own hands, it is recommended to select a high-voltage transceiver. The conductivity of the element must be at least 400 microns with a sensitivity of 50 mV. Contactors in this case are installed at the output of the circuit. Relays are allowed to be used with low conductivity, but it is important to pay attention to the maximum voltage indicator, which should not exceed 210 V. The triode can only be installed behind the plate.

It is also worth noting that the controller will require one converter. The capacitor box is used with two low conductivity filters. The level of output resistance of the element depends on the type of comparator. It is mainly used on a dipole adapter. However, there are pulse analogues.

Assembling a controller with a 166NT1 transistor

Transistors of this series have a conductivity of 400 microns, and they have good sensitivity. To make a controller with your own hands, it is recommended to use a dipole transceiver. However, filters for it are only suitable with a winding. Experts say that the contactor should be installed with an adapter. In this case, a linear component is suitable, and the rated voltage in the circuit must be at least 200 V. Thus, the operating frequency of the controller will not fall below 35 Hz.

In my opinion, there is no point in collecting UNO exactly in the form in which it is presented in the original. I always use this scheme:

Everything here is no hassle at all - just 1 microcircuit and quartz. True, unlike Arduino UNO, there is no power and USB protection - accordingly, uploading sketches is a little more complicated. Let's figure it out.

Copying Arduino uno - power supply

Firstly, in this circuit there is only one voltage - the one that powers the microcontroller. The arduino uno has a stabilizer - you supply it with 5 volts, it also outputs 3.3 to the adjacent pin. In all my practice, I have never needed both 5 and 3.3 volts in one circuit at once. That is, either 5 or 3.3 is used, but never together. All devices, screens and sensors designed for 3.3 always had 5 volts plugged in and everything worked. Naturally, you need to read the datasheet (documentation) for these same sensors; perhaps you have something mega-sensitive to the input voltage and it really needs 3.3 volts. Then you can install a voltage stabilizer and reduce it to 3.3 volts. As usual there are a couple of ways:

In general, there are many perverted schemes with nutrition, but these are the basic approaches.

USB for our UNO

There are also two approaches here. There is such a thing called ISP:


This is such a connector)) In order to make our new UNO work, we need a microcontroller. If you just go to the store and buy an Atmega326, you will of course do great, but it won’t all work right away - you need to install an Arduino bootloader into it. For this, oddly enough, you need a second Arduino. Already a working XS, where can you get it, buy it in China or ask a friend to drive it. In principle, any will do. Let's call it a programmer. And you need to connect like this:

pin name: not-mega: mega(1280 and 2560) reset: 10: 53 MOSI: 11: 51 MISO: 12: 50 SCK: 13: 52

pin name : not - mega : mega (1280 and 2560 )

reset: 10:53

MOSI: 11: 51

MISO: 12:50

SCK: 13:52

If you got an Arduino Mega programmer somewhere, then use the last column to connect. If other arduinos serve as the programmer, then the second one. The first column shows the legs of your new purchased atmega. Next, fill the working Arduino (programmer) with a sketch from the samples called ArduinoISP:

And here we have two options:

  1. You can flash the bootloader and then in the future our microcontroller can be flashed via the Serial port and we no longer need a second Arduino programmer.
  2. Or you can flash our sketch directly through the programmer without a bootloader - and then after launch everything will work faster by a couple of seconds. This is done using the menu file -> load via programmer

If everything is clear with the second option... Then the first requires clarification. Click Tools – Programmer – Arduino. And then Tools – Burn bootloader.

After that, turn off the Arduino and now we need a USB to ttl serial Converter. After we got it out, we need to connect it to reset, d0 (rx), d1 (tx) of our just flashed atmega.

The essence is the same, just don’t forget to add a resistor and a capacitor to reset (see the first option).

After this, everything will be flashed in exactly the same way as a regular Arduino.