Microcontroller and Sensors

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

What is a microcontroller?

A microcontroller or microcontroller unit is a small computer on a single integrated circuit. A microcontroller


contains one or more CPUs along with memory and programmable input/output peripherals.
It is programmed using a specialized computer language and is capable of executing instructions stored in its
memory. Some common examples of microcontrollers include the Arduino, Raspberry Pi, and the PIC
(Peripheral Interface Controller) microcontroller.

Arduino is an Italian open-source hardware and software company, project, and user community that designs
and manufactures single-board microcontrollers and microcontroller kits for building digital devices.

Some of the Different Types of Arduino Boards


There are different Arduino types, each offering unique features and capabilities. From basic microcontrollers to more
advanced modules, let’s explore some of the popular types of Arduino boards.
1. Arduino Uno R3
The Arduino Uno R3 is a popular board among DIY electronics that offers features, such as 14 digital input/output pins, 6
analog pins, and an ICSP (In-Circuit Serial Programming) header.
 It runs on the ATmega328P 16MHz microchip providing up to 5V voltage supply to attached components.
 uses a USB-B connector for the computer interface
 The key specs include 2kB SRAM memory capability, 32kB flash storage space, and 1KB EEPROM chip along with
UART, and I2C SPI communication capabilities which can also be replaced in case of any problem.
 It is a great choice for anyone wanting to get into DIY electronics and programming. It can be used for projects both
simple and complex.

2. Arduino Nano
The Arduino Nano is highly popular among developers due to its small size yet considerable capabilities. It shares many
of the same features as the UNO, but in a smaller form, making it great for use on breadboards and other tight spaces. The
main differences from the larger model include:
 There is no onboard DC power jack connection. Instead, it relies on a mini USB port, which also handles UART bridge
chip duties with FTDI’s dedicated FT232 converter included. This means there’s no need for the ATMega16U2 chipset.
 This combination provides powerful control at both modest cost and minimum space requirements, allowing creative
designs to come within reach.
Also Read: Types Of PCB

3. Arduino Micro
The Arduino Micro offers features similar to the Leonardo but is significantly smaller and only has 12 analog I/O pins
together with its 20 digital ones.
 This board measures just 18mm wide by 48mm long. It is one of the smallest boards ever created by Arduino. You can
create a keyboard, mouse, or other HID devices that require minimal space with this Arduino board.
 It comes equipped with an ATmega32U4 microcontroller containing 2.5kB SRAM, 32KB flash memory, and 1 KB
EEPROM for data storage along with UART, IC2 & SPI communication protocols. It also has special built-in functions
such as HID connectivity.

4. Arduino Leonardo
The Arduino Leonardo is different from the other boards. Given below are its specifications.
 It uses an ATmega32U4 chip in place of ATMega328P. It offers more pins for IO (20), PWM (7), and analog input
signals (12).
 Instead of needing a second processor or a USB to UART bridge chip, this board has built-in USB communication. This
allows it to connect directly with computers as either Human Interface Devices or Virtual COM port serial/CDC ports.
This virtual connection enables us to program our Leonardo via its bootloader.

5. Arduino Micro
Arduino Micro is perfect for those who need the power of an Arduino Leonardo in a breadboard-friendly size.
 It offers all of the same functionalities as its larger counterpart, with only one slight difference.
 It doesn’t have a DC input jack. However, you can still use this tiny board to act like an HID or Virtual COM port device
just as you would on any other Leonardo model.
To understand the concept of Arduino boards and the different types of Arduino even better, you can take this
comprehensive Arduino course.

6. Arduino Mega2560 Rev3


The Arduino Mega 2560 stands out amongst the other boards.
 It is designed for those situations which require many I/O or peripherals.
 With a powerful ATMega2560 processor, this board boasts an impressive 54 I/O pins (15 of them can be used as PWM
outputs), 16 analog inputs, and 4 UARTs.
 Furthermore, there is more flash storage and SRAM on this basic Arduino than any other.
 Due to its capability, it has grown in popularity among open-source CNC makers and 3D printer builders.
 It can be easily implemented into various open-source Programmable Logic Controllers projects.

7. Arduino Nano 33 BLE


The Arduino Nano 33 BLE is an incredibly powerful board with the same form factor as its predecessor, the Arduino
Nano.
 Featuring Nordic Semiconductors’ advanced NRF52480 32-bit ARM Cortex-M4 processor running at 64MHz and 1MB
flash plus 256KB SRAM memory capacity, it’s a great choice for applications that need more processing power and
storage capabilities than traditional boards provide.
 The most impressive attribute of this device has to be Bluetooth Low Energy (BLE) support.
 It allows users to leverage both client/host configurations with their compatible devices while taking advantage of energy
efficiency benefits offered by connected wearables development.

8. Arduino Due
The Arduino Due is a more powerful upgrade of the popular Arduino Mega with its 54 Digital I/Os and 12 Analog inputs.
 Running at 84MHz, this 3.3V-only board offers an Atmel SAM3x8E Arm Cortex-M3 processor along with USB OTG,
DAC, and JTAG interfaces for extra connectivity options.
 It’s important to note that this device’s I/O pins are not 5V tolerant so be sure you keep that in mind when getting started
on your project.

9. LilyPad Arduino Board
Leah Buechley and SparkFun collaborated to create the LilyPad Arduino board, a wearable e-textile technology. This
creative design comes complete with large connecting pads and a flat back, allowing it to be easily sewn into clothing
using conductive thread. Alongside this are I/O, power, and sensor boards created for use in e-textiles.

10. Arduino Bluetooth


Arduino Bluetooth is one of the popular types of Arduino boards. The Arduino BT board is powered by the ATmega168
microcontroller and includes components such as digital pins (16), analog pins (6), a crystal oscillator (16MHz) reset
button, screw terminals for power connections, and an ICSP header. Programming with this Bluetooth-enabled controller
can be done wirelessly via a Bluetooth connection.

11. RedBoard Arduino Board


The RedBoard Arduino board is an easy-to-use device that can be programmed with the Arduino IDE using a Mini-B
USB cable. It is compatible with Windows 8, so you don’t need to modify your security settings for it to work properly.
Furthermore, its flat design and constant performance because of the FTDI or USB chip make it perfect for any project.

12. Arduino Robot


Arduino Robot is the first robotic platform to feature two microcontroller boards, a motor board for controlling motors
and a control board utilized as an interface to read sensors.
 This small all-in-one computer is programmed with code via the same language used by Arduino Leonardo,
ATmega32u4.
 With several strategically placed pins connected directly to onboard actuators/sensors, this robot has limitless possibilities
of use.
 Additional features, such as speakers, color screens, buttons (5), digital compass (1), SD card reader(1), potentiometers
(2) or floor sensors can be hooked up.

13. Arduino Ethernet


The Arduino Ethernet board is powered by the ATmega328 microcontroller, which has 5 analog pins, 14 digital I/O pins
(including a reset button), and an RJ45 connection for hooking up to the internet via an Ethernet shield. It also has other
components, such as a crystal oscillator, power jack, and ICSP header.

Features of Arduino Boards


The following are some of the key features of Arduino boards.
 Microcontroller: It acts as Arduino’s “brain” by handling all processing tasks and providing access to input/output pins
(I/O).
 Power Supply Source: An external power source, such as a battery or USB port is needed. Some models also offer
alternative methods, like solar panels or AC adapters that allow more flexibility when powering up.
 Digital & Analog I/O Pins: General-purpose digital inputs and outputs read signals from sensors or buttons while
analogs enable complex elements like distance sensors or motor controllers to connect easily.
 USB Interface (e.g., FTDI): The serial communication protocol used by most Arduinos is UART over a mini-USB port.
It enables connection with computers for simple data transfer tasks and programming.
 Clock Speed & Memory Capacity: Higher clock speeds result in faster performance while larger memory capacities
enable more complex projects. These are important considerations when selecting an appropriate Arduino model.

Parts of the Arduino Uno Board

LED, Resistor and Arduino

Hardware Required
 Arduino Board
optional
 LED
 220 ohm resistor

Schematic

Code#1 – ONE LED connected in pin 13


// the setup function runs once when you press reset or power the board.
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);// LED connected to pin 13 of arduino
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
2. CODE #2: Using variable
ONE LED connected in pin 13
// the setup function runs once when you press reset or power the board.
Int LED1 = 13;
void setup() {
// initialize digital pin 13 as an output.
pinMode(LED1, OUTPUT);// LED connected to pin 13 of arduino
}

// the loop function runs over and over again forever


void loop() {
digitalWrite(LED1, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED1, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
For LED builtin – meaning LED in Arduino uno is used
CODE#3:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever


void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

SENSORS

A sensor is a device that detects and responds to some type of input from the physical environment.
The input can be light, heat, motion, moisture, pressure or any number of other environmental
phenomena.

Types of Sensors
 An active sensor is one that requires an external power source to be able to respond to
environmental input and generate output. For example, sensors used in weather satellites often
require some source of energy to provide meteorological data about the Earth's atmosphere.
 A passive sensor, on the other hand, doesn't require an external power source to detect
environmental input. It relies on the environment itself for its power, using sources such as light
or thermal energy. A good example is the mercury-based glass thermometer. The mercury
expands and contracts in response to fluctuating temperatures, causing the level to be higher or
lower in the glass tube.
NOTE: there are sensors that are both active and passive. Examples are seismic and infrared
sensors.
Classification of Sensors
Digital Sensors - digital sensors convert the environmental input into discrete digital signals that are
transmitted in a binary format (1s and 0s). 1=5v, 0=0v

Analog Sensors - Analog sensors convert the environmental input into output analog signals, which are continuous and
varying.

NOTE: As with active and passive sensors, some types of sensors -- such as thermal or pressure sensors -- are available in
both analog and digital forms. In this case, too, the environment in which the sensor will operate typically determines
which is the best option.

Sensors are also commonly categorized by the type of environmental factors they monitor. Here are some
common examples:

 Accelerometer. This type of sensor detects changes in gravitational acceleration, making it


possible to measure tilt, vibration and, of course, acceleration. Accelerometer sensors are used in a
wide range of industries, from consumer electronics to professional sports to aerospace and
aviation.

 Chemical. Chemical sensors detect a specific chemical substance within a medium (gas, liquid or
solid). A chemical sensor can be used to detect soil nutrient levels in a crop field, smoke or carbon
monoxide in a room, pH levels in a body of water, the amount of alcohol on someone's breath or in
any number of other scenarios. For example, an oxygen sensor in a car's emission control system
will monitor the gasoline-to-oxygen ratio, usually through a chemical reaction that generates
voltage. A computer in the engine compartment reads the voltage and, if the mixture is not optimal,
readjusts the ratio.

 Humidity. These sensors can detect the level of water vapors in the air to determine the relative
humidity. Humidity sensors often include temperature readings because relative humidity is
dependent on the air temperature. The sensors are used in a wide range of industries and settings,
including agriculture, manufacturing, data centers, meteorology, and heating, ventilation and air
conditioning (HVAC).
 Level. A level sensor can determine the level of a physical substance such as water, fuel, coolant,
grain, fertilizer or waste. Motorists, for example, rely on their gas level sensors to ensure they don't
end up stranded on the side of the road. Level sensors are also used in tsunami warning systems.

 Motion. Motion detectors can sense physical movement in a defined space (the field of detection)
and can be used to control lights, cameras, parking gates, water faucets, security systems,
automatic door openers and numerous other systems. The sensors typically send out some type of
energy -- such as microwaves, ultrasonic waves or light beams -- and can detect when the flow of
energy is interrupted by something entering its path.

 Optical. Optical sensors, also called photosensors, can detect light waves at different points in the
light spectrum, including ultraviolet light, visible light and infrared light. Optical sensors are used
extensively in smartphones, robotics, Blu-ray players, home security systems, medical devices and
a wide range of other systems.

 Pressure. These sensors detect the pressure of a liquid or gas, and are used extensively in
machinery, automobiles, aircraft, HVAC systems and other environments. They also play an
important role in meteorology by measuring the atmospheric pressure. In addition, pressure
sensors can be used to monitor the flow of gases or liquids, often so that the flow can be regulated.

 Proximity. Proximity sensors detect the presence of an object or determine the distance between
objects. Proximity monitors are used in elevators, assembly lines, parking lots, retail stores,
automobiles, robotics and numerous other environments.

 Temperature. These sensors can identify the temperature of a target medium, whether gas, liquid
or air. Temperature sensors are used across a wide range of devices and environments, such as
appliances, machinery, aircraft, automobiles, computers, greenhouses, farms, thermostats and
many other devices.

 Touch. Touch sensing devices detect physical contact on a monitored surface. Touch sensors are
used extensively in electronic devices to support trackpad and touchscreen technologies. They're
also used in many other systems, such as elevators, robotics and soap dispensers.

You might also like