In this post I will discuss about the Arduino MICRO which is the smallest development board of the Arduino. In the previous post I have discussed about the Arduino PRO MINI and Arduino NANO which are comparatively smaller in size and preferred in cases where space is an important constraint. This post will discuss the Arduino MICRO which is due to its small size is also preferred for smaller space and Breadboard friendly form factor.
After reading this post the reader will learn about the Arduino MICRO, about the microcontroller IC on which the Arduino MICRO is based and the important similarities and differences between the Arduino NANO and Arduino PRO MINI. So sit back, keep reading and enjoy learning.
Arduino MICRO is an open-source microcontroller development board and it is based on the ATMEGA32U4 microcontroller IC. This microcontroller IC has many perks which makes it more reliable and useful as compared to that of the Arduino UNO and Arduino PRO MINI. It is important to note here that the Arduino UNO, NANO and PRO MINI all development boards are based on the same microcontroller IC that is the ATMEGA328P but differ in the package used. Depending upon the package of the ATMEGA328P the analog pins can be either 6 or 8. For example the DIP package of the ATMEGA328P has total analog pins whereas the flat package of the ATMEGA328P has 8 analog pins. The number of analog pins determines the number of the analog sensors to which the Arduino Microcontroller development board can communicate simultaneously. The Arduino MICRO has unique feature in terms of the analog pins it has total 12 analog pins out of which 2 are dedicated analog pins and other has added functionality. I will discuss the analog pins in detail in the later section. Arduino MICRO as stated earlier is the smallest microcontroller development board and can easily be mounted on the breadboard which makes it popular for designing the prototypes of the embedded systems. Arduino MICRO has total 24 Digital Input / Output pins out of which 7 are PWM (Pulse Width Modulation) enabled and 12 analog pins but they are not so much straightforward as in the case of Arduino UNO, NANO and PRO MINI as we will see later. Arduino MICRO has one UART, one Inter-Integrated Circuit (I2C) computer bus and one Serial Peripheral Interface (SPI) computer bus. Arduino UNO, NANO and PRO MINI also have one UART, one SPI and one I2C interface on board. The Arduino MICRO board looks like the one in the following image:
An important point worth mentioning here is that the Arduino MICRO has USB connector on board for programming and monitoring the board. It should be noted that in case of the Arduino PRO MINI the board does not have the on board USB port due to which the user has to connect the FTDI cable and the USB to UART converter module in order to program the Arduino PRO MINI board. In addition in case of the Arduino UNO and NANO the designer needs to add the additional IC apart from the microcontroller which acts as the bridge for USB and UART and thus program the boards. The microcontroller on which Arduino MICRO is based has on chip USB interface so the user does not need to connect the FTDI cable and the module and neither the designer needs to add additional IC. It is one of the most useful quirks of the Arduino MICRO. The USB connector is MICRO type. Another important thing is that the Arduino MICRO has a JTAG interface which Arduino UNO, NANO and PRO MINI lack.
The configuration of the ATMEGA32U4 is as shown in the following figure;
The block diagram of the microcontroller IC is shown in the following figure:
Arduino Integrated Development Environment (IDE):
In the post on the Arduino UNO we learned that the Arduino UNO can easily be programmed using the Arduino IDE. The Arduino MICRO can also be programmed in the similar way; that is the programming of the Arduino MICRO is not different from that of the Arduino UNO however it should be kept in mind that Arduino MICRO has different number of pins and different pin configuration. The care should be taken while configuring the Arduino MICRO pins. As most of you might have known that in order to program a microcontroller one need to write the code in the editor, and then compile that code in the compiler after which you get the HEX file of that code and later upload that HEX file in the microcontroller IC using another program. In case of Arduino all these steps are performed in single software which is called the Arduino IDE. By integrated Development Environment it means that all the steps that editor, compiler, burner are integrated in the same software. In short Arduino MICRO is quite easy to program it is just a matter of few clicks. I will go through in detail about how to write a code and upload it in Arduino MICRO later in the post. Note that the Arduino MICRO has the micro USB port on it which means that USB cable used for programming the Arduino MICRO is different from that of the Arduino UNO and Arduino MEGA.
Arduino MICRO features:
Let us now learn some of the general specifications of the Arduino NANO microcontroller development board. Before diving deep into the discussion it is important to keep in mind that the Arduino MICRO should be employed in the case when Arduino UNO does not meet the requirements of the project. For example if one needs to design the system that has limited space then he would go for the Arduino MICRO to save the space. The space constraint is the only constraint that is kept in mind when selecting the Arduino MICRO as you will see that it has limited amount of memory on chip over the Arduino UNO. One other consideration is the additional Analog pins present on the Arduino MICRO and JTAG interface as compared to the Arduino UNO.
- Microcontroller IC: Microchip ATMEGA 32U4
- Operating Voltage: 5 Volts
- Input Voltage: 5 volts. Unlike the Arduino UNO and Arduino MEGA the Arduino MICRO should not be supplied with voltage more than 12 volts.
- Digital I/O Pins: 24 (of which 7 provide PWM (Pulse Width Modulation) output)
- Analog Input Pins: 12
- DC Current per I/O Pin: 20 mA (This is the current that can be sourced or sink into and out of the Input / Output pins)
- DC Current for 3.3V Pin: 50 mA
- Flash Memory: 16 / 32 KB of which 2 KB used by bootloader
- SRAM: 1.25 / 2.5 KB
- EEPROM: 1 KB
- Clock Speed: 8 / 16 MHz (All the operations are synced by this clock. The clock frequency depends on the power supply that 8 MHz for 3v3 and 16MHZ for 5V).
As can be seen in the specifications that the Arduino UNO and Arduino MICRO shares many of the properties but also differs in some features. They have same amount of EEPROM and SRAM. The detailed description of each feature is out of the scope of this post but will be discussed in detail later in the next post.
Arduino MICRO Pinout:
Let us now dive into the discussion about the pinout of the Arduino MICRO. As described earlier that the Arduino MICRO is based on the ATMEGA32U4 microcontroller IC so it follows that the pinout of the Arduino MICRO is simply that of the ATMEGA32U4 microcontroller but note here that the Arduino MICRO has its own nomenclature for its pins and here I will use the nomenclature used by the Arduino for pin reference.
As pointed out earlier that the Arduino MICRO has total 24 digital Input / Output pins. The digital Input / Output pins can receive a digital signal or transfer a digital signal. Out of these 24 Digital Input / Output pins 7 are PWM (Pulse Width Modulation) enabled and some pins can also be configured as either SPI (Serial Peripheral Interface) or I2C (Inter-Integrated Circuit) computer bus. The Arduino MICRO also has one UART with Tx and Rx signals used for communication. The header on the other side of the Arduino MICRO bears the voltage pins and the Analog pins. There are total twelve analog pins on this on this header; the analog pins need some discussion which will follow in the next sections. Unlike Digital pins these pins can just act as Input pins that is these pins can only receive signal and cannot provide signal or voltage, that is why they are called Analog inputs. These analog inputs are actually the inputs of the Analog to Digital Converter inside the ATMEGA 32U4 microcontroller. These pins can be connected to the output of the analog sensors. The voltage pins on this header are used to power up the Arduino MICRO board these pins are also used to deliver power from the Arduino MICRO board to other peripheral devices or the sensors attached to the Arduino MICRO microcontroller development board.
Let us now discuss in detail the digital Input / Output pins, Analog input pins and Voltage pins of the Arduino MICRO.
Arduino MICRO Digital Input / Output Pins:
As described in the previous section that the Arduino MICRO has total 24 digital input / output pins out of which 7 input / output pins are PWM enabled. Some of these Digital Input / Output pins can also serve as the SPI (Serial Peripheral Interface) or I2C interface (Inter-Integrated Circuit). The detailed description is shown in the following figure:
The function that the digital input / output pins perform depends upon the coding of the Arduino MICRO. That is whether the pin number 8, 9, 11 and 10 functions simply as Digital Input / Output or they are used as the Serial Peripheral Interface (SPI) depends upon the coding that specifies their functionality using particular functions. It is also important to note here that the Digital Input / Output pins are called as Input / Output because either they can be used as Input in which case they are intended to receive the signals form sensor or transducer (digital) or they can be used as Output in which case they drive the actuators such as relays. The functionality of the Digital Input / Output pins as either Input or Output is determined by the code also. It is important to realize here that digital input / output pins can only supply a limited amount of current which is not sufficient to drive the motors or relays therefore we need to use drivers such as stepper motor driver or L298 DC motor driver. I will come to the coding of the Arduino MICRO later in this post. Another point worth mentioning is that seven out of the 24 digital input / output pins are PWM enabled pins that is these pins can provide PWM (Pulse Width Modulation) signal as output. These PWM pins find applications in which we need to regulate something for example the speed of the motor or brightness of the lamp..
The I2C serial communication bus as shown in the above image is embedded on Digital Input / Output pins it is opposite to that of the Arduino UNO, NANO and PRO MINI in which this computer bus is present on the analog side.
Arduino MICRO Analog Pins:
As mentioned previously that the Arduino PRO mini has 12 Analog inputs which means that 12 different analog sensors can be interfaced to the Arduino MICRO and the Arduino MICRO can fetch the data from these 12 analog sensors simultaneously. Unlike the Digital Input / Output pins these Analog Pins are the input only that these pins can only receive the analog signals that is read the signals and cannot drive the signal outwards. An interesting and important point here is that the analog input pins unlike the Arduino UNO has added functionalities that is they can either be configured as the JTAG interface or they can be programed to work as digital input / output pins. The pin number 36, 37, 38 and 39 of the Arduino MICRO acts as the JTAG interface.
Arduino MICRO SPI Interface:
Arduino MICRO has a SPI interface. The SPI (Serial Peripheral Interface) is the synchronous serial computer bus used for the communication for the short distances. The SPI bus is found in almost all microcontrollers and other peripheral ICs. For example manufacturers have designed the EEPROM with SPI interfaces and a number of other peripherals are also available with SPI interface. The SPI computer bus uses four pins for implementing the protocol. One pin is called the MOSI (Master out Slave In) and is available on Arduino MICRO on pin number 10, the other is called the MISO (Master In Slave Out) and is available on the Arduino PRO MINI on pin number 11. These two signals are the data signals that is the data is delivered and retrieved to and from the Arduino PRO mini using MOSI and MISO. SCK called the serial clock which synchronizes the data transfer is available on the pin number 9 and finally the chip select (SS) is implemented using the pin number 8 on the Arduino PRO MINI microcontroller development board.
Arduino MICRO PWM Pins:
Let us now discuss the PWM pins of the Arduino MICRO in some detail. As mentioned in the previous section that the Arduino MICRO has 7 PWM pins which are numbered as 26, 12, 13, 29, 27, 31 and 18. These digital pins can deliver the PWM signal as output. The PWM is the abbreviation of the Pulse Width Modulation and it is a phenomenon in which we adjust the width of the pulse according to the requirement of the applications. For example if one needs to regulate the speed of the motor or the brightness of the lamp this can be achieved by varying the width of the PWM signal. The power delivered by the PWM signal is the average of the signal for which it is zero and for which it is maximum. If the width of the PWM signal for which the signal remains HIGH is greater than more power will be delivered and thus reducing the width will cause the reduction in the power delivered. The width of the PWM signal for which the signal remains HIGH during its time period is referred to as the Duty Cycle of the PWM signal. The PWM pins are also used to control the angular position of the Servo motors.
Arduino MICRO Schematics:
The Arduino MICRO has simplest schematics among all the boards. As told earlier that the Arduino MICRO is based on the ATMEGA32U4 microcontroller which has a built in USB interface which means that unlike the Arduino UNO and Arduino PRO MINI the user does not need to connect the USB to UART bridge for programming the microcontroller, the schematics of the Arduino MICRO is as shown in the following image:
Arduino MICRO Applications:
Before discussing the programming language of the Arduino MICRO let us first know the applications of the Arduino MICRO for motivation. So basically the Arduino MICRO can be used in any system that requires the microcontroller. It is now the most commonly used microcontroller development board that is equally popular among the hobbyists and the engineering students. Some of the embedded systems in which the Arduino can be used are listed below:
- IR remote based Home Automation System.
- Bluetooth controlled Home Automation System.
- IoT enabled Home Automation System.
- RC car.
- Mobile lifter.
- Hurdle Avoiding Vehicle.
- Wall climbing vehicle.
- Autonomous vehicle.
- Robotic arm.
Arduino MICRO programming language:
One of the perks that make Arduino MICRO quite popular among the hobbyists and beginners is it’s easy to use programming language and programming. The programming language used by the Arduino MICRO is the C++. The Arduino MICRO IDE has a well-defined function for each task that is easy to remember. As an example the function that specifies the Arduino MICRO digital Input / Output pin to work as input is:
Here in this function there are two arguments. First argument is the pin number which we want to make input or output and second argument specifies the property that is input or output to the pin number used. The detailed discussion on programming the Arduino MICRO will come later in the next posts.
That is all for now I hope this post would be helpful for you. In the next post I will come up with more interesting topics. Till then stay connected, keep reading and enjoy learning.