Arduino

November 22, 2022

Arduino is an open-source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board (often referred to as a microcontroller) and a piece of software, or IDE (Integrated Development Environment) that runs on your computer, used to write and upload computer code to the physical board.

The Arduino platform is popular with people just starting out with electronics. Unlike most previous programmable circuit boards, the Arduino does not need a separate piece of hardware called a programmer to load new code onto the board.  We can use a USB cable.  A pre-assembled Arduino board includes a microcontroller, which is programmed using Arduino programming language and the Arduino development environment.  This platform provides a way to build and program electronic components.  The code for Arduino is generally written in Wiring, which is based on the Processing programming language.  Arduino programming language is a simplified version of C/C++ programming language based on what Arduino calls sketches, which use basic programming structures, variables and functions. These are then converted into a C++ program.

Most Arduino fans will choose to use the official integrated development environment (IDE) for the Arduino. The Arduino IDE is open source software written in Java and will work on a variety of platforms: Windows, Mac, and Linux. The IDE enables you to write code in a special environment with syntax highlighting and other features which will make coding easier, and then easily load your code onto the device with a simple click of a button.

With the Arduino, you can design and build devices that can interact with your surroundings. The Arduino boards are basically a tool for controlling electronics. They are able to read inputs with their onboard microcontroller and turn it into an output such as driving a motor,  turning on an LED, and displaying information on an LCD).

Arduino started at Interaction Design Institute Ivrea ( IDII ) in Ivrea, Italy, with the primary goal of creating affordable and straightforward tools for non-engineers to use and create digital projects.  The project consisted of just three members: Hernando Barragan, Massimo Banzi, and Casey Reas. Hernando Barragán worked under the guidance of Massimo Banzi and Casey Reas and created a development platform called Wiring for his masters thesis project at IDII. The development platform consisted of the ATMega168 microcontroller as its brains and used an IDE based on Processing, which was co-created by Casy Reas.  Massimo Banzi, along with two other students from IDII, David Mellis and David Cuartielles, added support for the cheaper ATMega8 microcontroller. The three forked it and renamed the project to Arduino. The initial core Arduino team consisted of Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca Martino, and David Mellis. 

One of the main reasons for Arduino being so accessible and affordable across the globe is because all of the Arduino hardware is open-source. Because it is open-source,  it has several advantages;  anyone can access the design and build of the device and make improvements; anyone can use the same hardware design to create their product lineup. Since Arduino is open-source, it has its own community that strives to help the core company develop and improve its hardware products. Another significant advantage of being open-source, especially in the case of hardware, is that local companies can create replicas of the products, making it more accessible and affordable to the local consumers as it avoids hefty customs and shipping charges. All of these advantages contribute to Arduino being so widespread, affordable and ever-improving. 

Arduino doesn’t offer just one piece of hardware, it provides a range of boards, each of which caters to a different level of expertise and have different use-cases altogether. Arduino Uno is one of the most basic and popular boards that Arduino offers. This is because it features an ATMega328 microcontroller that is both cheap and powerful enough for most basic beginner-level projects. Once you’re familiar with Arduino IDE, you can move up to boards with more powerful and sophisticated chipsets like the MKR range which is concerned with IoT applications, or the Nano range which as the name suggests is designed to keep the form factor as small as possible while packing most of the features and power of the full-sized boards. 

Rpi vs Arduino

An Arduino is based on a microcontroller which is a simple, easy to use computer designed for beginners to run 1 program at a time, over and over again.  A Raspberry Pi is a Single board computer based on a microprocessor that acts as a general-purpose computer. It is able to run various operating systems like Windows and Linux. The Raspberry Pi is able to run multiple programs and is more complicated to use compared to the Arduino.

Arduino boards are microcontrollers boards[3], not computers. Arduino doesn’t have an operating system, but it can run code that is interpreted by its firmware.  Firmware is a specific computer software that allows low-level control for a device’s specific hardware. About 2KB of the Arduino’s flash storage is allocated to it.  Arduino doesn’t run the program in the same way as the Raspberry Pi.  The firmware boots the system and performs the instructions provided with the help of Arduino IDE, which is an open-source Arduino Software, is used to write code and then upload it to the board.  The Arduino IDE runs on Windows, Mac, and Linux-based machines including the Raspberry Pi.

One of the main differences between these two boards is that Arduino is a physical, programmable circuit board while the Raspberry Pi is a microprocessor based mini computer.  On the Arduino board, CPU, RAM, and ROM are housed in the Microcontroller unit. All the additional hardware available on Arduino Board is used for power supply, programming, and IO Connectivity.  The Raspberry Pi has all features of a computer, like a processor, memory, storage, graphics driver, and connectors.Raspberry Pi needs an Operating System to run because it is more complex, with a microprocessor, memory, and GPU. Since it’s a full-fledged computer and needs an OS to manage everything. Arduino doesn’t need any operating system because it is a microcontroller-based board.  Microcontrollers don’t have the same amount of computing power or resources as most single-board computers.  All that is needed is a binary of the compiled source code to perform the task. 

The clock speed of Arduino is 16 MHz or 48 MHz, and it depends on the type of microprocessor used on board. The Micro, UNO, and Mega are slower Arduino boards that run at 16/MHz, whereas the Portenta H7 is the fastest Arduino board available which can run up to 480 MHz.  Raspberry Pi offers a clock speed up to 1.8 GHz and contains multiple cores.  Raspberry Pi and Arduino operate on a different power. They both are powered by USB but the Raspberry Pi requires micro-USB or USB Type C, and Arduino needs USB Type B.  Since the Raspberry Pi requires a higher current to operate, it needs a power adapter, whereas a computer USB port is enough to feed power to Arduino[2].  Power interruption is another important factor, in the Raspberry Pi, sudden or frequent power interruptions may cause damage to the hardware, software, or application.  Procedures need to be followed for switching ON and switching OFF the system.  Arduino doesn’t get affected by the power interruption.  Whenever the power is restored, it just restarts and starts working without any hassle. 

Arduino is open-source hardware.  The hardware and software designs are freely available under copyleft licenses.  The hardware reference designs are distributed under a Creative Commons Attribution Share-Alike 2.5 license and are available on the Arduino website. Most Arduino boards consist of an Atmel microcontroller with different features,  pin and  memory configurations. The boards use single or double-row pins or female headers that connect to other circuits. These other circuits are called shields.  Multiple shields may be individually addressable via an I2C serial bus. Most boards include a 5 V linear regulator and a 16 MHz crystal oscillator or ceramic resonator.  Arduino microcontrollers are pre-programmed with a boot loader that simplifies reprogramming the flash memory. The default bootloader of the Arduino Uno is the Optiboot bootloader.  Current Arduino boards are programmed via Universal Serial Bus using USB-to-serial adapter chips such as the FTDI FT232. Some older boards connect via RS-232 serial port.   There are many Arduino-compatible and Arduino-derived boards.  Some can be used interchangeably with official Arduino boards. Many enhance the basic Arduino by adding output drivers to create small robots. Other boards are electrically equivalent but don’t have the same form factor and may be used with add in shields. Some other boards use different processors altogether and have different degrees of compatibility.

Shields are modular circuit boards that attach to your Arduino to give it extra functionality.  There are two main types of shields. The first type is the simple circuit board called protoshields which you can solder the components on the shield. Other shields come with already built-in components that are used for specific purposes.  There are hundreds of shields available that makes the Arduino more than just a development board.

Many Arduino shields are stackable. You can connect several shields together to create complex Arduino modules.  Shields are often supplied with a library and example code so you can plug it to the Arduino and upload up some example code to the Arduino.  Every Arduino shield must have the same form-factor as the standard Arduino. Power and ground pins on the one and eight pin header, and analog pins on a six-pin header next to that. Digital pins cover the other edge on the other side, an eight-pin header separated from a 10-pin by a 0.5″ spacing. Some shields also require a connection to the Arduino’s ICSP header which is the 2×3 programming header on the end.

When stacking shields, it’s important to make sure they don’t use overlapping pins. Some shields communicate with the Arduino via SPI, I2C, or Serial, and others use the Arduino’s interrupt or analog inputs.  Some shields don’t fit on top of one another. Components that are higher than the header sockets may touch the underside of any board on top of it which can cause short circuits if a connection is made that shouldn’t be.  If an input or output is obstructed by another shield, it is redundant because no more than one can be used.  Some hardware requires a lot of power.  Even though it is okay for shields to use the same power and ground pins,  there is a limit to the amount of current that can flow through the other input/output pins;  40mA per pin and 200mA max between all I/O pins.  If you go over this,  you run the risk of damaging your board and any other attached shield. In many cases, you can address this problem by powering your Arduino and shields from an external power supply so that the current isn’t passed through the Arduino,  just make sure to use a common GND if you’re communicating between a board using I2C, SPI, or serial.  Some shields require certain pins,  make sure that shields aren’t doubling up on the same pins,  you can send voltage to the wrong place and damage the board.  Aslo consider that wireless devices need space to work. Move antennas or aerials away from the board to get a clear signal. If an antenna is mounted on the board,  don’t cover it. Always try to place wireless shields at the top of the stack.  Many shields are sold as kits and will require some soldering.  You should know this ahead of time so it is worth it to double check.  Some older Arduino shields may don’t have all the pins to fill the header rows of an Arduino.  This is because older versions of Arduino didn’t have as many pin header slots.  This may be a problem if you need to use those pins that are not connected on the shield.

History of arduino

Power requirements of arduino

https://support.arduino.cc/hc/en-us/articles/360018922259-What-power-supply-can-I-use-with-my-Arduino-board-

Microcontrollers

https://www.allaboutcircuits.com/technical-articles/what-is-a-microcontroller-introduction-component-characteristics-component/