Resume_prep
Resume_prep
Embedded:
1. Microprocessors:
Key Characteristics:
Use Case:
• Used in devices requiring a lot of processing power, like desktops, complex robots,
and systems with multiple tasks.
2. Microcontrollers:
Key Characteristics:
• Embedded peripherals: Built-in RAM, ROM, timers, I/O pins, and communication
interfaces (e.g., SPI, I2C).
• Cost-effective: Ideal for tasks requiring low power, real-time control, and high
integration.
• Single-purpose tasks: Designed to perform specific control-oriented tasks in
embedded systems.
Popular Microcontrollers:
1. Arduino:
o Microcontroller family: Typically based on Atmel's ATmega series (e.g.,
ATmega328).
o Features: Simple to program using the Arduino IDE, has digital/analog I/O
pins, and supports a variety of communication protocols (UART, SPI, I2C).
o Use Case: Perfect for hobbyists, DIY projects, and prototyping. Commonly
used in sensor interfacing, robotics, home automation, etc.
2. NodeMCU (ESP8266):
o Microcontroller family: Based on the ESP8266 chip, which has Wi-Fi
capabilities.
o Features: Combines a microcontroller with built-in Wi-Fi, making it ideal for
IoT (Internet of Things) applications. It can be programmed with the Arduino
IDE or Lua scripting language.
o Use Case: Ideal for IoT projects like home automation, remote sensing, and
controlling devices over the internet.
1. Schematic Design:
o This is the first step where the circuit is drawn using PCB design software
(e.g., Eagle, KiCad, Altium). It shows how different components are
connected together.
2. Component Placement:
o Components such as resistors, capacitors, and ICs are placed on the board in
an optimal manner to ensure good signal flow and minimize noise.
3. Routing:
o The conductive tracks (or traces) are drawn to connect the components based
on the schematic. This routing needs to be optimized to avoid interference and
ensure signal integrity.
4. Layers:
o PCBs can have multiple layers (e.g., two-layer, four-layer) depending on the
complexity. In multi-layer PCBs, different layers can be used for power,
ground, and signal lines.
5. Gerber Files:
o After the PCB design is complete, Gerber files are generated, which are sent to
the PCB manufacturer. These files contain information about each layer of the
PCB.
6. Fabrication and Assembly:
o The PCB is fabricated by a manufacturer and then populated with components
in the assembly process.
• Eagle: Widely used for small to medium projects, especially among hobbyists.
• KiCad: Open-source and free, popular among both beginners and professionals.
• Altium Designer: A professional-level tool with advanced features for complex
designs.
• Prototyping and Development: Used for building electronic circuits, sensors, and
controllers in prototypes.
• Mass Production: PCBs are integral to mass-produced electronics like smartphones,
laptops, and embedded systems.
VLSI
What Is RISC?
With RISC, a central processing unit (CPU) implements the processor design
principle of simplified instructions that can do less but can execute more
rapidly. The result is improved performance. A key RISC feature is that it
allows developers to increase the register set and increase internal parallelism
by increasing the number of parallel threads executed by the CPU and
increasing the speed of the CPU's executing instructions. ARM, or “Advanced
RISC Machine” is a specific family of instruction set architecture that’s based
on reduced instruction set architecture developed by Arm Ltd. Processors based
on this architecture are common in smartphones, tablets, laptops, gaming
consoles and desktops, as well as a growing number of other intelligent devices.
RISC provides high performance per watt for battery operated devices where
energy efficiency is key. A RISC processor executes one action per instruction.
By taking just one cycle to complete, operation execution time is optimized.
Because the architecture uses a fixed length of instruction, it’s easier to pipeline.
And because it lacks complex instruction decoding logic, it supports more
registers and spends less time on loading and storing values to memory.
For chip designers, RISC processors simplify the design and deployment
process and provide a lower per-chip cost due to the smaller components
required. Because of the reduced instruction set and simple decoding logic, less
chip space is used, fewer transistors are required, and more general-purpose
registers can fit into the central processing unit.
• RISC (Reduced Instruction Set Computer): RISC architectures are known for
having a simple, fixed instruction length, a load/store architecture (separating memory
access and arithmetic operations), and an emphasis on maximizing instruction
throughput via pipelining.
• Open-Source: RISC-V is free to use, modify, and implement. This makes it highly
attractive for academia, research, and industries looking to avoid licensing costs
associated with proprietary ISAs.
• Modular: The architecture is designed to be extensible. You can implement a base
instruction set (e.g., RV32I for 32-bit integer operations) and add optional extensions
(e.g., for floating-point operations, atomic operations, or vector processing).
RISC-V is available in multiple forms, tailored to different applications. The two most
common configurations are:
1. Registers:
o In RV32I, there are 32 general-purpose registers, each 32 bits
wide.
o Register x0 is always hardwired to the value 0.
2. Instruction Types: RISC-V instructions are grouped into several formats:
o R-Type: Used for register-register arithmetic instructions.
o I-Type: Used for immediate instructions (e.g., load, arithmetic with
an immediate value).
o S-Type: Used for store instructions (writing data to memory).
o B-Type: Used for branch instructions (conditional jumps).
o U-Type: Used for upper immediate instructions (for loading a
constant).
o J-Type: Used for jump instructions (unconditional jumps).
3. Load/Store Architecture:
o The processor can only perform arithmetic or logical operations on
data that is already in registers.
o To access data from memory, explicit load and store instructions
must be used to move data between memory and registers.
4. Pipeline Design: The RISC-V architecture lends itself to pipelined implementations.
A common pipeline has 5 stages:
o Instruction Fetch (IF)
o Instruction Decode (ID)
o Execute (EX)
o Memory Access (MEM)
o Write Back (WB)
• Micro Architecture:Pipelining Stage 3: Containing Load Unit, ALU, Write Back Mux
Selection Unit
Micro Architecture Pipelining Stage 1: Containing PC Mux and Reg Block1 The primary
function of Pipeline Stage 1 is to fetch the next instruction from the instruction memory (or
cache) using the address provided by the PC register. This involves: Sending the address
from the PC register to the instruction memory. Retrieving the corresponding instruction
from the memory. Passing the fetched instruction to the next pipeline stage for further
processing.
• What it Does: The PC Mux (Multiplexer) selects the next address for the Program
Counter. It decides whether the next instruction will be fetched from the current
sequential address or from a branch target address.
• How it Works: The Mux has multiple inputs:
o Next Sequential Address: The address of the next instruction
(current PC + 4 for the next sequential instruction).
o Branch Address: The target address if a branch instruction is
taken.
o Jump Address: If the instruction is a jump instruction, it selects
the target address.
The selection is based on control signals generated by the control unit, indicating
whether the instruction is a branch or jump.
• What it Does: This block contains the registers where intermediate values are stored. It
typically includes the register file and possibly additional registers used during the pipeline
stages.
• How it Works:
During this stage, the register file is accessed to read the operands needed for the instruction
being executed.
Immediate Generator
• What it Does: Generates immediate values used in instructions. Immediate values are
constants encoded directly in the instruction.
• How it Works: Extracts and processes the immediate value from the instruction,
handling different formats (e.g., I-type, S-type).
For instance, for an ADDI instruction, the immediate value is added to a register value.
• Use Case in Project: It provides the necessary immediate values for arithmetic
operations and branching, crucial for instructions like ADDI (add immediate) or LW
(load word).
2. Immediate Adder
• What it Does: Adds an immediate value to a register value or calculates the branch
target address.
• How it Works: Takes the value from a register and adds the immediate value to it.
For example, in an ADDI instruction, the immediate adder calculates the result of
adding the immediate value to the value in the register.
• Use Case in Project: It performs arithmetic involving immediate values, essential for
instructions with immediate operands.
3. Branch Unit
4. Integer File
• What it Does: Stores integer values, typically used for arithmetic and logical
operations.
• How it Works: Provides read and write access to integer registers.
This block is essential for fetching and updating values used in integer operations.
• What it Does: Generates signals to enable or disable writing to registers based on the
type of instruction.
• How it Works: Determines which registers should be written to based on the
instruction being executed.
For example, write enable signals are set for ADD instructions but not for instructions
that do not produce a result.
• Use Case in Project: Controls which registers are updated with new values after
instruction execution.
6. Instruction Mux
• What it Does: Selects the appropriate instruction path based on the instruction type.
• How it Works: Chooses between different sources of instructions or different formats
of instructions.
• Use Case in Project: Ensures that the correct instruction is processed in the
subsequent stages of the pipeline.
7. Decoder
For example, it decodes whether the instruction is an ADD or LW and what actions need
to be taken.
• Use Case in Project: Provides the necessary control signals for proper execution of
the instruction, ensuring the correct operation of the pipeline stages.
Micro Architecture Pipelining Stage 3: Containing Load Unit, ALU, Write Back Mux
Selection Unit It also manages any required protocol conversions and timing adjustments to
ensure proper operation between the two bus interfaces. Executes arithmetic, logical, and
comparison operations using the ALU. Handles load instructions by fetching data from
memory using the Load Unit. Selects the appropriate result (either from the ALU or the Load
Unit) to be written back to the register file in the next stage.
Load Unit
• What it Does: Handles load instructions that read data from memory.
• How it Works: Computes the memory address from which to read the data and
performs the memory read operation.
For example, in an LW (load word) instruction, it calculates the address using the base
register and immediate value, then reads the data from that address.
• Use Case in Project: Facilitates data retrieval from memory, essential for operations
that involve loading data into registers.
2. ALU (Arithmetic Logic Unit)
For example, in an ADD instruction, the ALU performs addition on two register values.
• Use Case in Project: Executes most of the arithmetic and logic operations required
by the processor. It is a core component for processing instructions.
• What it Does: Selects the data to be written back to the register file.
• How it Works: Chooses between different sources for the data that will be written
back to the register file.
It might select between the result of an ALU operation, data loaded from memory, or
other sources.
• Use Case in Project: Ensures that the correct result is written back to the appropriate
register, finalizing the instruction execution process.
RV32UI stands for RISC-V 32-bit User-Level Integer benchmark suite. It is a set of test
programs designed to verify the functionality of the RV32I (32-bit integer) base instruction
set.
Key Features:
Typical Tests:
• Arithmetic Instructions: ADD, SUB, MUL, DIV, etc. To test whether the
processor performs arithmetic operations correctly.
• Logical Instructions: AND, OR, XOR, etc. To test logical operations on
register values.
• Control Flow Instructions: Branch instructions like BEQ, BNE, JAL, JALR to
ensure that branching and jumping are handled correctly.
• Load/Store Instructions: Instructions like LW, SW to verify memory
access operations.
RV32MI stands for RISC-V 32-bit Machine-Level Integer benchmark suite. It extends the
RV32UI suite by testing additional machine-level instructions and features.
Key Features:
Typical Tests:
IOT
1. NodeMCU
Overview:
NodeMCU is an open-source IoT (Internet of Things) platform based on the ESP8266 Wi-Fi
module. It combines the ESP8266 chip with the Lua-based NodeMCU firmware and a
hardware development board that makes it easy to prototype IoT applications.
Architecture:
• ESP8266 Chip: The core of the NodeMCU is the ESP8266 chip, which
includes a 32-bit RISC processor, Wi-Fi transceiver, and multiple GPIO
pins.
• Firmware: NodeMCU firmware can be programmed using Lua scripting
language or C++ through the Arduino IDE.
• Development Board: NodeMCU development boards come with USB-
to-serial interfaces for easy programming and debugging.
Key Features:
Advantages:
• Ease of Use: Simplifies the development of IoT projects with built-in Wi-
Fi and user-friendly programming environments.
• Low Cost: Affordable compared to other microcontrollers with similar
features.
• Community Support: Large community and extensive libraries available
for development.
Use Cases:
2. Arduino
Overview:
Key Features:
Advantages:
Use Cases:
3. PIC Microcontrollers
Overview:
Architecture:
Key Features:
Advantages:
Use Cases:
• NodeMCU:
o Strengths: Built-in Wi-Fi, easy to use for IoT projects, Lua and
C++ programming.
o Weaknesses: Limited to Wi-Fi-based applications, less suitable for
applications requiring extensive processing power.
• Arduino:
o Strengths: Versatile, extensive library support, user-friendly for
beginners, wide range of boards and shields.
o Weaknesses: May not be suitable for high-performance
applications or those requiring advanced features.
• PIC:
o Strengths: Cost-effective, reliable, and simple architecture,
suitable for a wide range of applications.
o Weaknesses: Typically requires more effort to set up and program
compared to Arduino and NodeMCU.
Projects
Temp and Humidity Alert and Monitoring Using AWS and ESP32
Components Used
AWS IoT Core: Cloud service for connecting IoT devices to the AWS cloud
securely.
System Design
Hardware Setup:
The ESP32 connects to Wi-Fi and sends the collected data to AWS IoT Core
using the MQTT protocol.
Cloud Setup:
AWS IoT Core: Acts as a broker to receive the sensor data and route it to other
AWS services.
AWS Lambda: Processes the incoming data and determines whether it exceeds
predefined thresholds.
Amazon SNS: Sends alert notifications if the data crosses the threshold values.
DynamoDB: Stores the sensor data for historical analysis and long-term
monitoring.
Data Collection: The ESP32 reads temperature and humidity data from the
DHT11/DHT22 sensor.
MQTT Communication: The ESP32 sends the sensor data to AWS IoT Core
over the MQTT protocol.
AWS IoT Core: The data is received by AWS IoT Core, which triggers an AWS
Lambda function for further processing.
Data Processing:
The AWS Lambda function evaluates the incoming data. If the temperature or
humidity exceeds the predefined threshold, an alert is sent via Amazon SNS.
Alert System:
The SNS notification is sent to the subscribed email addresses, alerting users
about the abnormal conditions.
The ESP32 is programmed using the Arduino IDE. The code handles sensor
data collection, Wi-Fi connection, and MQTT communication with AWS IoT
Core.
CODE:
#include <WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>
WiFiClient espClient;
PubSubClient client(espClient);
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
delay(500);
Serial.println("Connecting to WiFi...");
client.setServer(mqtt_server, 1883);
dht.begin();
void loop() {
if (!client.connected()) {
reconnect();
}
client.loop();
if (isnan(temperature) || isnan(humidity)) {
return;
client.publish("iot/temperature", payload.c_str());
void reconnect() {
while (!client.connected()) {
if (client.connect("ESP32Client")) {
} else {
delay(5000);
}
}
The Lambda function processes the incoming data and checks if the temperature
or humidity exceeds the threshold. If it does, an alert is sent via Amazon SNS.
CODE:
import json
import boto3
sns = boto3.client('sns')
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('TemperatureData')
data = json.loads(event['body'])
temperature = data['temperature']
humidity = data['humidity']
table.put_item(Item={
'timestamp': str(int(time.time())),
'temperature': temperature,
'humidity': humidity
})
sns.publish(
TopicArn='your_sns_topic_arn',
Subject="Temperature Alert"
return {
'statusCode': 200,
3. Face recognition
face recognition
we used esp32 and hc05 bt module and blutooth app to establish wireless
communication between the microcontroller and the smartphone.
code:
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11); // RX, TX for Bluetooth module
void loop() {
if (BTSerial.available()) {
char command = BTSerial.read(); // Read the command from the
Bluetooth app
if (command == '1') {
digitalWrite(relay1, HIGH); // Turn ON the relay
} else if (command == '0') {
digitalWrite(relay1, LOW); // Turn OFF the relay
}
}
}
Working Principle
Bluetooth Pairing: The smartphone is paired with the Bluetooth module
(HC-05). The module operates in slave mode, waiting for commands
from the smartphone.
Mobile App Interface: The user can open the Bluetooth control app on
their smartphone, which allows them to send commands (such as
ON/OFF for each appliance).