CLONAGEM DO ARDUINO

ARDUINO CLONING

There are countless motivations for building your own Arduino circuit on a breadboard or PCB. It consumes less space on the breadboard, is cheaper than Arduino boards or maybe you don't use a shield, but despite everything you need an Arduino as the heart of your project.

The following steps describe how to assemble the circuit on a breadboard.

This tutorial demonstrates how to build an Arduino on a breadboard with an Atmel Atmega8/168/328 AVR microcontroller and a USB to TTL converter breakout board.

Step 1: Required Components:

 Componentes necessários para clonar Arduino

  1. A breadboard

  2. Connecting Wires

  3. 7805 Voltage regulator

  4. Two LEDs

  5. Two 220 Ohm resistors

  6. 10k Ohm Resistor

  7. Two 10 UF capacitors

  8. 16 MHz clock crystal

  9. Two 22 PF capacitors

  10. Small momentary normally open (“off”) button.

You will also need a USB to TTL logic converter for programming.

Step 2: Add power supply components:

The Arduino power socket can accept input in the voltage range of 7 to 16 volts. A 9V battery or an adapter is usually used. Since most sensors and chips work at 5V, we need to reduce the input voltage to 5V using 7805 voltage regulators.

Adicionando fonte de alimentação na placa de ensaio para clonagem de Arduino

Fig. 2: Adding power supply on breadboard for Arduino cloning

The 7805 voltage regulator is a TO-220 package. Holding the printed side of the 7805 IC facing you. Connect the positive input of the external power supply to the first pin (left side). Negative for the middle pin and the third pin will give 5V output. Add wires to connect the output side of the regulator to power and ground to the ground rail.

Use 10µF capacitors for decoupling purposes between input and ground. And another capacitor on the output side, i.e. 5V and ground. Note: These capacitors are polarized, with the negative side facing ground and the positive side facing 5V.

You can place the power LED on the input source and on the top of the breadboard.

Power Led no topo da placa de ensaio

Fig. 3: Power LED on top of the breadboard

Step 3: Installing Board Components

Install the ATmega328/168/8 chip so that the notched side of the IC is facing up. Add the 10KΩ pull-up resistor to +5V and connect the other end to the RESET pin on the ATmega (pin 1). Add power and ground jumpers to the following pins.

Pin 7 – VCC (+5V)

Pin 8 – GND

Pin 22 – GND

Pin 21 – AREF, analog reference pin for ADC (+5V)

Pin 20 – AVcc, the ADC supply voltage (+5V)

Pin 20 needs to be connected to power if the ADC is not being used, and if it is, it needs to be connected to power through a low pass filter (which is a circuit to reduce power supply noise).

Power Led no topo da placa de ensaio

Fig. 4: Installing the ATmega328/168/8 chip on the breadboard

Add the external 16 MHz crystal between pin 9 and pin 10 of the ATmega. Then add one 22pF capacitor from pin 9 to ground and the other 22pF capacitor from pin 10 to ground.

Instalando cristal externo de 16 MHz e capacitor de 22pF na placa de ensaio

Fig. 5: Installing external 16 MHz crystal and 22pF capacitor on the breadboard

Add the momentary button as a reset switch so that it spans the gap on the breadboard in the same way as the IC. Add a small jumper from pin 1 of the ATmega to the bottom leg of the button (pin closest to the IC). And add another jumper wire from the top left leg of the button to ground. Add the Arduino LED Pin 13. Connect a jumper wire from microcontroller pin 19 to the LED anode (longer cable). Use the remaining 180Ω resistor to connect the LED cathode (short lead) to the ground rail.

Instalando o botão momentâneo na placa de ensaio

Fig. 6: Installing the momentary button on the breadboard

Note: Pin 13 of Arduino is not the same as pin 13 of IC ATmega328. Pin 19 of the IC is actually the pin of digital pin 13 of the Arduino. If you are unsure or want to see the point of the ATmega8 IC, see the diagram below.

Configuração de pinos do ATmega8 IC para Arduino

Fig. 7: IC ATmega8 pin configuration for Arduino

Mapeamento de pinos do Arduino do ATmega8 Ic

Fig. 8: Arduino pin mapping of the ATmega8 Ic

Plus, there it is… ready to be plugged in, turned on and programmed

Burning the Bootloader:

Preparing the hardware:

Connect as shown in the diagram below.

 Diagrama de circuito de hardware de clonagem de Arduino

Fig. 9: Arduino cloning hardware circuit diagram

Preparing the software:

Well, you just need to follow the instructions carefully. I added 2 files that you need to replace. Follow the instructions to replace.

0. Download the IDE.

1. Make a complete copy of the folder where your IDE is. (I called mine Arduino-1.0.1 – Copy)

2. Open the new folder.

3. Navigate to… arduino-1.0.1 – Copy hardwaretoolsavretc

4. Find a file called avrdude.conf

5. Replace it with the file I attached. 6. Navigate to… arduino-1.0.1 – Copyarduino hardware

7. Find a file called boards.txt

8. Replace it with the file I attached.

9. Close everything.

Excellent, now all we need to do is burn the bootloader and our cheap PC will work like a normal PC.

plaques.txt

avrdude.conf

Configuring your Arduino as an ISP:

First, we have to make our Arduino as an ISP. In other words, we are making our Arduino like an ISP programmer.

1. Connect your Arduino UNO via USB to your computer. (WITH USB ONLY)

2. Open the IDE

3. Open > Examples > ArduinoISP

4. Select Arduino UNO in Tools > Board

5. Select your serial port in Tools > Board (mine is usually COM3, but this may change).

6. Upload the sketch.

Configurando Arduino como ISP

Fig. 10: Configuring Arduino as ISP

With everything connected, open the IDE from the folder you just created (the copy).

1. Select Arduino328 in Tools > Board

2. Select your serial port.

3. Select Arduino as ISP in Tools > Programmer

4. Select Burn Bootloader

It will take some time, now you can use your cheap ATMega8/168/328 as a normal Arduino. For detailed information watch the video.

Project video

Back to the blog

Leave a comment

Comments need to be approved before publication.