top of page

Introduction to Arduino "What is Arduino ?"

First of all, since this task is mainly concerned with Arduino and how we use it as both hardware to connect it to our DC motor control circuit and as software to write our code logic, compile it, and upload it on the Arduino board. Therefore, I will be going first through a detailed introduction to discuss what is Arduino as both a hardware regarding its different board designs, capabilities, and shields in addition to discussing it as a software platform that we can use to write, debug, and compile our codes. So, lets get started!

Overview

         Arduino is an open-source hardware and software company, project and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control objects in the physical and digital world. Its products are licensed under the GNU Lesser General Public License (LGPL) or the GNU General Public License (GPL), permitting the manufacture of Arduino boards and software distribution by anyone. Arduino boards are available commercially in preassembled form or as do-it-yourself (DIY) kits.

Arduino board designs use a variety of microprocessors and controllers. The boards are equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards or breadboards (shields) and other circuits. The boards feature serial communications interfaces, including Universal Serial Bus (USB) on some models, which are also used for loading programs from personal computers. The microcontrollers are typically programmed using a dialect of features from the programming languages C and C++. In addition to using traditional compiler toolchains, the Arduino project provides an Integrated Development Environment (IDE) based on the Processing language project.

        The Arduino project started in 2003 as a program for students at the Interaction Design Institute Ivrea in Ivrea, Italy aiming to provide a low-cost and easy way for novices and professionals to create devices that interact with their environment using sensors and actuators. Common examples of such devices intended for beginner hobbyists include simple robots, thermostats and motion detectors. The name Arduino comes from a bar in Ivrea, Italy, where some of the founders of the project used to meet. The bar was named after Arduin of Ivrea, who was the margrave of the March of Ivrea and King of Italy from 1002 to 1014.

Arduino as Hardware

             Arduino is an open-source hardware. The hardware reference designs are distributed under a Creative Commons Attribution Share like 2.5 license and are available on the Arduino website. Layout and production files for some versions of the hardware are also available.

Although the hardware and software designs are freely available under copy left licenses, the developers have requested the name "Arduino" to be exclusive to the original product and not be used for derived works without permission. However, there is always some informality such as the unofficial and non-authentic Arduino boards that are manufactured in China with no official Arduino logos and having identical markings like the original products as shown in the figure below. The official policy document on use of the Arduino name emphasizes that the project is open to incorporating work by others into the official product. Several Arduino-compatible products commercially released have avoided the project name by using various names ending in "–duino".

1.jpg

Arduino-compatible R3 UNO board made in China with no Arduino logo, but with identical markings, including "Made in Italy" text

Most Arduino boards consist of an Atmel 8-bit AVR microcontroller ( ATmega8, ATmega168, ATmega328, ATmega1280, ATmega2560 ) with varying amounts of flash memory, pins, and features. The 32-bit Arduino Due, based on the Atmel SAM3X8E was introduced in 2012. The boards use single or double-row pins or female headers that facilitate connections for programming and incorporation into other circuits. These may connect with add-on modules termed shields. Multiple and possibly stacked shields may be individually addressable via an I²C serial bus. Most boards include a 5 V linear regulator and a 16 MHz crystal oscillator or ceramic resonator. Some designs, such as the LilyPad, run at 8 MHz and dispense with the on board voltage regulator due to specific form-factor restrictions. In the figure below, is a prototype of an early Arduino board.
2.jpg

An early Arduino board with an RS-232 serial interface (upper left) and an Atmel ATmega8 microcontroller chip (black, lower right); the 14 digital I/O pins are at the top, the 6 analog input pins at the lower right, and the power connector at the lower left.

               Arduino microcontrollers are pre-programmed with a boot loader that simplifies uploading of programs to the on-chip flash memory. The default bootloader of the Arduino UNO is the optiboot bootloader. Boards are loaded with program code via a serial connection to another computer. Some serial Arduino boards contain a level shifter circuit to convert between RS-232 logic levels and transistor-transistor logic (TTL) level signals. Current Arduino boards are programmed via Universal Serial Bus (USB), implemented using USB-to-serial adapter chips such as the FTDI FT232. Some boards, such as later-model Uno boards, substitute the FTDI chip with a separate AVR chip containing USB-to-serial firmware, which is reprogrammable via its own In-Circuit Serial Programming (ICSP) header. Other variants, such as the Arduino Mini and the unofficial Boarduino, use a detachable USB-to-serial adapter board or cable, Bluetooth or other methods. When used with traditional microcontroller tools, instead of the Arduino IDE, standard AVR In-System Programming (ISP) programming is used.

               The Arduino board exposes most of the microcontroller's I/O pins for use by other circuits. The Diecimila, Duemilanove, and current Uno, shown in the figure below, provide 14 digital I/O pins, six of which can produce pulse-width modulated (PWM) signals, and six analog inputs, which can also be used as six digital I/O pins. These pins are on the top of the board, via female 0.1-inch (2.54 mm) headers. Several plug-in application shields are also commercially available. The Arduino Nano, and Arduino-compatible Bare Bones Board and Boarduino boards may provide male header pins on the underside of the board that can plug into solderless breadboards.

3.jpg

An official Arduino Uno R2 with descriptions of the I/O locations

Many Arduino-compatible and Arduino-derived boards exist. Some are functionally equivalent to an Arduino and can be used interchangeably. Many enhance the basic Arduino by adding output drivers, often for use in school-level education, to simplify making buggies and small robots. Others are electrically equivalent but change the form factor, sometimes retaining compatibility with shields, sometimes not. Some variants use different processors, of varying compatibility.

Official Boards

The original Arduino hardware was produced by the Italian company Smart Projects. Some Arduino-branded boards have been designed and sold by American companies like: Sparkfun Electronics (link here: https://www.sparkfun.com/) and Adafruit Industries. As of 2016, 17 versions of the Arduino hardware boards have been commercially produced, 15 of which are included in the list below, which includes the following:

1. Arduino RS232 (male pins).

2. Arduino Diecimila.

3. Arduino Duemilanove (rev 2009b).

4. Arduino Uno R2.

5. Arduino Uno SMD R3.

6. Arduino Leonardo.

7. Arduino Pro (No USB).

8. Arduino Mega.

9. Arduino Nano (DIP-30 footprint).

10. Arduino LilyPad 00 (rev 2007) (No USB).

11. Arduino Robot.

12. Arduino Esplora.

13. Arduino Ethernet (AVR + W5100).

14. Arduino Yun (AVR + AR9331).

15. Arduino Due (ARM-Cortex M3 core).

The figures of the Arduino boards shown below are in the same respective order of the list given above.

Shields

Arduino and Arduino-compatible boards use printed circuit expansion boards called "shields", which plug into the normally supplied Arduino pin headers. Shields can provide motor controls for 3D printing and other applications, Global Positioning Systems (GPS), Ethernet, Liquid Crystal Display (LCD), or bread boarding (prototyping). Several shields can also be made with Do It Yourself (DIY/ link here: https://www.diynetwork.com/).

Multiple shields can be stacked on top of each other, as shown in the figure here, the top shield contains a solderless breadboard.

19.jpg
20.jpg

Dragino Lora Shield, shown below, allows the user to send data and reach extremely long ranges at low data-rates.

21.jpg

Screw-terminal breakout shield in a wing-type format is shown in the figure shown.

Arduino as Software

A program for Arduino hardware may be written in any programming language with compilers that produce binary machine code for the target processor. Atmel provides a development environment for their 8-bit AVR and 32-bit ARM Cortex-M based microcontrollers that is: AVR Studio (older) and Atmel Studio (newer).

What is the difference between Microcontroller and Microprocessor ?

Second of all, and before going to the task itself, we need to highlight a fundamental concept, in both electronics and programming, which is crucial to be well-understood and that is the difference between a microprocessor and a microcontroller. Therefore, let us first start with defining each of the terms individually.

Microcontroller

It’s like a small computer on a single IC. It contains a processor core, ROM, RAM and I/O pins dedicated to perform various tasks. Microcontrollers are generally used in projects and applications that require direct control of user. As it has all the components needed in its single chip, it does not need any external circuits to do its task so microcontrollers are heavily used in embedded systems and major microcontroller manufacturing companies are making them to be used in embedded market. A microcontroller can be called the heart of embedded system. Some examples of popular microcontrollers are 8051, AVR, PIC series of microcontrollers. In the figure below, you can see an architecture of 8051 microcontroller and you can see all the required components for a small project is present in a single chip.

25.jpg

Microprocessor

     Microprocessor has only a CPU inside them in one or few Integrated Circuits. Unlike microcontrollers it does not have RAM, ROM and other peripherals. They are dependent on external circuits of peripherals to work. But microprocessors are not made for specific task but they are required where tasks are complex and tricky like development of software’s, games and other applications that require high memory and where input and output are not defined. It may be called heart of a computer system.  Some examples of microprocessor are Pentium, I3, and I5, etc. From the figure below of an architecture of a microprocessor, it can be easily seen that it has registers and Arithmetic Logic Unit (ALU) as a processing unit and it does not have RAM or ROM in it.

26.gif

So what are the key differences between microprocessor and microcontroller ?

1. Key difference in both of them is presence of external peripheral, where microcontrollers have RAM, ROM, EEPROM embedded in it while we have to use external circuits in case of microprocessors.

2. As all the peripheral of microcontroller are on single chip it is compact while microprocessor is bulky.

3. Microcontrollers are made by using complementary metal oxide semiconductor technology so they are far cheaper than microprocessors. In addition the applications made with microcontrollers are cheaper because they need lesser external components, while the overall cost of systems made with microprocessors are high because of the high number of external components required for such systems.

4. Processing speed of microcontrollers is about 8 MHz to 50 MHz, but in contrary processing speed of general microprocessors is above 1 GHz so it works much faster than microcontrollers.

5. Generally microcontrollers have power saving system, like idle mode or power saving mode so overall it uses less power and also since external components are low overall consumption of power is less. While in microprocessors generally there is no power saving system and also many external components are used with it, so its power consumption is high in comparison with microcontrollers.

6. Microcontrollers are compact so it makes them favorable and efficient system for small products and applications while microprocessors are bulky so they are preferred for larger applications.

7. Tasks performed by microcontrollers are limited and generally less complex. While task performed by microprocessors are software development, Game development, website, documents making etc. which are generally more complex so require more memory and speed so that’s why external ROM, RAM are used with it.

8. Microcontrollers are based on Harvard architecture where program memory and data memory are separate while microprocessors are based on von Neumann model where program and data are stored in same memory module.

© 2023 by The Artifact. Proudly created with Wix.com

bottom of page