Arduino Nano
Arduino Nano
Arduino Nano is simply a smaller version of Arduino UNO, thus both have almost
the same functionalities.
It comes with an operating voltage of 5V, however, the input voltage can vary
from 7 to 12V.
Arduino Nano’s maximum current rating is 40mA, so the load attached to its pins
shouldn’t draw current more than that.
Each of these Digital & Analog Pins is assigned with multiple functions but their
main function is to be configured as Input/Output.
Arduino Pins are acted as Input Pins when they are interfaced with sensors, but if
you are driving some load then we need to use them as an Output Pin.
Functions like pinMode() and digitalWrite() are used to control the operations of
digital pins while analogRead() is used to control analog pins.
The analog pins come with a total resolution of 10-bits which measures the value
from 0 to 5V.
Arduino Nano comes with a crystal oscillator of frequency 16 MHz. It is used to
produce a clock of precise frequency using constant voltage.
There is one limitation of using Arduino Nano i.e. it doesn’t come with a DC
power jack, which means the person cannot supply an external power source
through a battery.
This board doesn’t use standard USB for connection with a computer, instead, it
comes with Type-B Micro USB.
The tiny size and breadboard-friendly nature make this device an ideal choice for
most applications where the size of the electronic components is of great concern.
Flash memory is 16KB or 32KB that all depends on the Atmega board i.e
Atmega168 comes with 16KB of flash memory while Atmega328 comes with a
flash memory of 32KB. Flash memory is used for storing code. The 2KB of
memory out of total flash memory is used for a bootloader.
The SRAM memory of 2KB is present in Arduino Nano.
Arduino Nano has an EEPROM memory of 1KB.
The following figure shows the specifications of the Arduino Nano board.
It is programmed using Arduino IDE which is an Integrated Development
Environment that runs both offline and online.
No prior arrangements are required to run the board. All you need is a board, mini
USB cable and Arduino IDE software installed on the computer.
USB cable is used to transfer the program from the computer to the board.
No separate burner is required to compile and burn the program as this board
comes with a built-in boot-loader.
The following figure shows the pinout of the Arduino Nano Board:
Each pin on the Nano board comes with a specific function associated with it.
Analog pins can be used as an analog to a digital converter, where A4 and A5 pins
can also be used for I2C communication.
Similarly, there are 14 digital pins, out of which 6 pins are used for generating
PWM.
Arduino Nano Power Pins
Vin: It is input power supply voltage to the board when using an external power
source of 7 to 12 V.
5V: It is a regulated power supply voltage of the board that is used to power the
controller and other components placed on the board.
3V3: This is a minimum voltage generated by the voltage
regulator on the nano board.
Analog Pins: There are 8 analog pins on the board marked as A0 – A7.
These pins are used to measure the analog voltage ranging between 0 to 5V.
Digital Pins: Arduino Nano has 14 digital pins starting from D0 to D13.
These digital pins are used for interfacing third-party digital sensors and modules
with Nano board.
PWM Pins: Arduino Nano has 6 PWM pins, which are Pin#3, 5, 6, 9, 10 and 11.
(All are digital pins)
These pins are used to generate an 8-bit PWM (Pulse Width Modulation) signal.
The main program resumes once interrupt instruction is called and executed.
SPI is an interface bus and is mainly used to transfer data between microcontrollers
and other peripherals like sensors, registers, and SD cards.
The serial communication is carried out by the digital pins, Pin 0(Rx) and Pin
1(Tx) where Rx is used for receiving data and Tx is used for the transmission of
data.
The serial monitor is added to the Arduino IDE, which is used to transmit textual
data to or from the board.
FTDI drivers are also included in the software which behaves as a virtual com port
to the software.
The Tx and Rx pins come with an LED which blinks as the data is transmitted
between FTDI and USB connection to the computer.
Arduino Software Serial Library is used for carrying out serial communication
between the board and the computer.
Apart from serial communication the Nano board also supports I2C and SPI
communication. The Wire Library inside the Arduino Software is accessed to use
the I2C bus.
Uploading code to Arduino Nano is quite simple, as there’s no need to use any
external burner to compile and burn the program into the controller and you can
also upload code by using ICSP (In-circuit serial programming header).
Both Arduino Uno and Arduino Nano come with the same functionality with little
difference in terms of PCB layout, size and form factor.
It is a complete ready to use device that requires no prior technical skills to get
hands-on experience with it. You can power it by using a DC power jack, battery or
simply plug it into the computer using a USB cable to get started.
Arduino Nano is small and compact as compared to Arduino Uno. It lacks the DC
power jack and comes with Mini USB support instead of regular USB. Also, the
Nano board comes with two extra analog pins i.e. 8 pins as compared to 6 analog
pins in the Uno board. Nano board is breadboard friendly while Uno board lacks
this property.
However, both devices run at 5V, come with a current rating of 40mA, and 16MHz
of the clock frequency.
Medical Instruments
Industrial Automation
Embedded Systems
HC-SR04 Ultrasonic Sensor Pinout
1 Vcc The Vcc pin powers the sensor, typically with +5V
2 Trigger Trigger pin is an Input pin. This pin has to be kept high for 10us to
initialize measurement by sending US wave.
3 Echo Echo pin is an Output pin. This pin goes high for a period of time
which will be equal to the time taken for the US wave to return back
to the sensor.
As shown above the HC-SR04 Ultrasonic (US) sensor is a 4 pin module, whose pin
names are Vcc, Trigger, Echo and Ground respectively. This sensor is a very popular
sensor used in many applications where measuring distance or sensing objects are
required. The module has two eyes like projects in the front which forms the
Ultrasonic transmitter and Receiver. The sensor works with the simple high school
formula that
The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and
when it gets objected by any material it gets reflected back toward the sensor this
reflected wave is observed by the Ultrasonic receiver module as shown in the picture
below
Now, to calculate the distance using the above formulae, we should know the Speed
and time. Since we are using the Ultrasonic wave we know the universal speed of US
wave at room conditions which is 330m/s. The circuitry inbuilt on the module will
calculate the time taken for the US wave to come back and turns on the echo pin high
for that same particular amount of time, this way we can also know the time taken.
Now simply calculate the distance using a microcontroller or microprocessor.
The amount of time during which the Echo pin stays high is measured by the
MCU/MPU as it gives the information about the time taken for the wave to return
back to the Sensor. Using this information the distance is measured as explained in the
above heading.
Applications
Used to avoid and detect obstacles with robots like biped robot, obstacle avoider
robot, path finding robot etc.
Used to measure the distance within a wide range of 2cm to 400cm
Can be used to map the objects surrounding the sensor by rotating it
Depth of certain places like wells, pits etc can be measured since the waves can
penetrate through water