$1 SMALLEST ARDUINO DIY

intro 1,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
intro 0,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
intro 1,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
intro 2,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.

Arduino is an excellent platform for prototyping and making cool and creative projects. But when it comes to embedding them into small projects it becomes difficult as they are quite big in size. The other alternative is to go and buy some smd chips and program them via Arduino IDE. But soldering the smd chips manually is not an easy task and you may end up in a whole mess.

But Hopefully, There are other alternatives such as Attiny45/8 5. But They are priced around $2 – $3 which is kind of expensive as compared to the Chinese Arduino clones.

Luckily there exists a microcontroller from ATMEL named as Attiny13/13A.

Which is cheap and have all the basic functionalities.

Because sometimes you just want to have a PWM output from a microcontroller or any other stuff involving just 1 or 2 pins.

If you don’t have the microcontroller in Hand go ahead and buy from here:- Attiny13

Also Check my blog for more: – www.hardiqverma.com

Step 1: Specifications and Hardware

Specifications and Hardware 0,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.

Attiny13 is based on RISC Architecture and is manufactured by ATMEL.

It has 32 X 8 General Purpose Working Registers.

1 KB of Flash Memory (program memory).

64 Bytes of EEPROM Storage.

64 Bytes of RAM or SRAM.

Over 10,000 Flash Write and Erase Cycles.

4 Channel 10 bit ADC with Internal Voltage Reference.

Internal Calibrated Oscillator. (You don’t need any external crystal oscillator).

In Circuit Serial Programming (ICSP) for programming the microcontroller.

Up to 6, I/O’s pins are available in DIP package.

Up to 4 channel ADC inbuilt.

Up to 2 PWM channel and 1 External Interrupt.

Support for SPI Protocol.

I have also attached the datasheet if you need a kind of reference.

Step 2: Setting UP Arduino IDE

Setting UP Arduino IDE 0,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Setting UP Arduino IDE 1,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Setting UP Arduino IDE 2,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Setting UP Arduino IDE 3,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.

For programming the Attiny13 microcontroller we will use MicroCore developed by MCUdude.

Here is the Official GitHub link: – MicroCore

Follow these steps very carefully and in this order only

  • Open the Arduino IDE.
  • Open the File > Preferences menu item.
  • Enter the following URL in Additional Boards Manager URLs:

I have attached the photos for the steps, you can refer to them if necessary.

Step 3: Uploading Bootloader

Uploading Bootloader 0,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Uploading Bootloader 1,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Uploading Bootloader 2,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Uploading Bootloader 3,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Uploading Bootloader 4,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Uploading Bootloader 6,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.

Just like any other Arduino Board this Microcontroller also needs Bootloader so that it can understand the Arduino Functions and the necessary fuses can be programmed.

For this, you need a USBASP AVR Programmer or you can also use ARDUINO AS ISP.

But for this, I will be using USBASP programmer.

The connections from the ATTINY13 to the USBASP Programmer is simple.
I have attached the pinout diagram of the Attiny13.

Connect the MOSI, MISO, SCK, VCC (5v), RST, GND pins from the microcontroller to the respective pins to the USBASP Programmer.

Next Connect USBASP Programmer to The Computer and Open ARDUINO IDE.

THEN set the parameters as shown in the picture.

Once set then click on Burn Bootloader and after few Seconds the Microcontroller will be Bootloaded.

Step 4: Upload Your First Program

Upload Your First Program 0,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Upload Your First Program 1,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.

Now we will upload the program to the Microcontroller.

Go ahead and Paste the following code in Arduino IDE and click Upload.

After Uploading the Program Connect a Led’s anode on the pin 2 of the microcontroller and cathode to ground through a resistor.

Provide Power to the board (5v).

You will see LED light Flashing.

Now you can change delay timing for different effects.

Here is the Code:-

void setup()

{
pinMode(3, OUTPUT); }

void loop()

{

digitalWrite(3, HIGH);

delay(1000);

digitalWrite(3, LOW);

delay(1000);

}

Step 5: Another Example Program

Another Example Program 0,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.
Another Example Program 1,$1 SMALLEST ARDUINO DIY, ardino amega, ardino nano, hardiverma.com, HDRrobotics, facebook instagram, youtube.

In this example, we will read a Potentiometer and convert its values to drive a led through Pulse Width Modulation (PWM).

Go ahead and upload This Code to the Microcontroller:

#define LED 1

int data;

void setup() {

pinMode( 1, OUTPUT);

}

void loop() {

data = analogRead(A3);

analogWrite( LED, data/4);

}

Attach a potentiometer of value 10K to the 2 pin of the microcontroller.

And attach a LED on the 5 pin of the microcontroller.

You will see that the LED brightness changes as you change the value of Potentiometer.

Step 6: FINISH

FINISH 1, speaker, bluetooth, aurdino, hardiqverma.com, hdrrobotics

Of Course, this is just a start and this microcontroller is a lot more capable of doing other things. After playing around this microcontroller you will find that the program space is quite low. This space can be improved by using PIN manipulation and getting rid of digitalWrite and digitalRead Commands.

I will make future projects on this board so that you can understand better.

Hope You liked this instructable.

If so please vote for me in the contest.

Also check my blog for more: – www.hardiqverma.com

Leave a Reply

Your e-mail address will not be published. Required fields are marked *