cover photo

COURSEWORK

Sophia's EV-RE-001 course work. Lv 1

Sophia SAUTHORACTIVE
This Report is yet to be approved by a Coordinator.

2 / 1 / 2025


TASK 1: 3D Printing

This was a very thrilling experience. i was able to make a 3D printed snowflake using a STL design acquired from thingiverse.com to splice and resize the model, i used the ultimaker software.

Material Used and Settings

  1. PLA (Poly-Lactic Acid): is the most used material for 3D printing.
  2. Bed temperature: 50°C - 60°C (can increase temperature upto 65°C for first two layers if model is sticky towards the build plate)
  3. Extruder's fan: 100% ( This will ensure a clean, crisp layers with best surface resolution)
  4. Nozzle temperature: 200°C - 210°C
    Here's an image of my 3D printed model: Imgur

TASK 2: API

Through this task, i was able to learn that API (Applicaton Programming Interface) is used as an accessible way to extract and share data within and across organizations. THis helped me create a weather Application that gives real-time information about the weather, temperature, humidity and wind pressure.

Resources

  1. OpenWeather API for accessing the weather data.
  2. ColorHunt for preferred color pallete.
  3. Colorzilla extension is pick up the color codes i liked from any website.
  4. Shutterstock images for weather widgets.

Here's an image of my weather application: Imgur Github link

TASK 3: Working with Github

GitHub is a platform for hosting and sharing Git repositories online, enabling collaboration. This task made me familiarise with Github features.

Process

  1. I forked the original repository.
  2. Following the instructions in the ReadMe file, i identified the error in the code
  3. Using browser-run github.dev editor, i made the correction in the code.
  4. After commiting changes to code, i opened a pull request with the newly corrected code.

Here's the images of the pull request: Imgur Imgur Github link

TASK 4: Getting familiar with the Command line on Ubuntu

This task helped me gain familiarity with Ubuntu which is a open source operating system. It provides us with various functions like file management and efficient manipulation of files and directories

Commands Used

  1. To create a folder(make directory): mkdir test
  2. To change directory: cd test
  3. To create a blank file: touch blankfile.txt
  4. To list the contents: ls
  5. To create 2600 folders: mkdir -p M{1..2600}
  6. To create two files with text and without any text editor: echo "Not empty" > notBlank1.txt echo "Still not empty" > notBlank2.txt
  7. To concatenate the files: cat notBlank1.txt notBlank2.txt

Here's an image of the Ubuntu terminal: Imgur

TASK 5: Kaggle contest

Kaggle is a website where you can learn data science and practice machine learning by working on real-world problems.Although this task seemed overwhelming at first, i realised this was one of the best ways to get into Datascience and ML.

Learnings

i was able to learn new concepts and features involved with a ML project. i learned about RandomForestTrees and Decision trees model which are more commonly used. i was also introduced to jupyter notebook.

Code

# Titanic - Machine Learning from Disaster
from sklearn.preprocessing import LabelEncoder
from sklearn.ensemble import RandomForestClassifier
import pandas as pd

# Load and preprocess data using panda library
train_data = pd.read_csv('train.csv')
test_data = pd.read_csv('test.csv')

#This code fills missing values with the median Value.
train_data['Fare'] = train_data['Fare'].fillna(train_data['Fare'].median())
test_data['Fare'] = test_data['Fare'].fillna(test_data['Fare'].median())
train_data['Age'] = train_data['Age'].fillna(train_data['Age'].median())
test_data['Age'] = test_data['Age'].fillna(test_data['Age'].median())

#LabelEncoder transforms the column into numeric values
label_encoder = LabelEncoder()
train_data['Sex'] = label_encoder.fit_transform(train_data['Sex'])
test_data['Sex'] = label_encoder.transform(test_data['Sex'])

#This code fills missing values with the most occured values and labelencodes them into numerical values
train_data['Embarked'] = train_data['Embarked'].fillna(train_data['Embarked'].mode()[0])
train_data['Embarked'] = label_encoder.fit_transform(train_data['Embarked'])
test_data['Embarked'] = test_data['Embarked'].fillna(test_data['Embarked'].mode()[0])
test_data['Embarked'] = label_encoder.transform(test_data['Embarked'])

#Combine two columns/features into one
train_data['FamilySize'] = train_data['SibSp'] + train_data['Parch']
test_data['FamilySize'] = test_data['SibSp'] + test_data['Parch']

# Features under study
features = ['Pclass', 'Sex', 'Age', 'Fare', 'FamilySize', 'Embarked']
X = train_data[features]
y = train_data['Survived']
X_test = test_data[features]
# Model and prediction
model = RandomForestClassifier(n_estimators=100, max_depth=5, random_state=1)
model.fit(X, y)
predictions = model.predict(X_test)
# Save results inside submission.csv
output = pd.DataFrame({'PassengerId': test_data['PassengerId'], 'Survived': predictions})
output.to_csv('submission.csv', index=False)
print("Your submission was successfully saved!")   

Here is an image of the submissions: Imgur

TASK 6: Working with Pandas and Matplotlib

Pandas is an open-source data analysis and manipulation library for Python. It provides flexible data structures, such as DataFrames(2D) and Series(1D), which are essential for handling and analyzing large datasets.Matplotlib is a widely used plotting library in Python that allows you to create a variety of animated and interactive plots and visualizations.

Notebook Link

Line Graph

Imgur

Bar Graph

Imgur

Scatter Graph

Imgur

TASK 9: Tinkercad

Tinkercad is a free, online tool for 3D design and models, electronics circiuts and coding IDE. After creating a account, i tinkered around given basic circuits. We also had to simulate a simple circuit using an ultrasonic sensor to estimate the distance between an obstacle and the sensor and display the results on the serial monitor.

Working

The distance is calculated by sending a trigger pulse (using trigger pin) from the ultrasonic sensor, waiting for the echo to receive it back (through the echo pin), and measures the time it takes for the pulse to return using the formula :
Distance = (speed of sound x time)/2​
Distance = (0.03430 x time)/2

Here's images of the circuit: Imgur Tinkercad Circuit link

TASK 10: Speed Control of DC Motor

I completed the task of controlling the speed of a 5V motor by using Arduino board, DC Motor, H-Bridge L298N motor driver and 20K potentiometer. After uploading the code into the arduino IDE and compiling it, i could change the the speed of the DC motor using the potentiometer manually.

Working

  1. Power the Components
  • The Arduino UNO is powered via USB connected to the computer.
  • The L298N Motor Driver is powered by a 12V power supply, which is also used to drive the motor.
  1. Speed Control (Using PWM pins of Arduino)
    The motor's speed is controlled via the ENA pin on the L298N. Arduino generates a PWM signal(a rapid on/off voltage switching) on the ENA pin. The duty cycle of this signal determines the motor speed:
  • 100% duty cycle (255 in analogWrite): Full speed.
  • 50% duty cycle (128 in analogWrite): Half speed.
  • 0% duty cycle (0 in analogWrite): Motor stops.
  1. Direction Control (Using IN1 and IN2) The direction of the motor's rotation is determined by the IN1 and IN2 pins:
  • IN1 = HIGH, IN2 = LOW: The motor rotates in one direction.
  • IN1 = LOW, IN2 = HIGH: The motor rotates in the opposite direction.
  • IN1 = IN2 (both HIGH or both LOW): The motor stops due to a lack of current flow.

Arduino Controls Both Speed and Direction:
The Arduino sketch controls the logic levels (HIGH/LOW) for the IN1 and IN2 pins to set the motor's direction.
It uses analogWrite to send PWM signals to the ENA pin to control speed.

Here's an image of circuit connection: Imgur Here's a video of the working: Speed control

TASK 10: LED Toggle Using ESP32

An LED connected to an ESP32 microcontroller is controlled (turned on and off) via software, often through a web server.

Components

  • ESP32 board.
  • An LED.
  • A resistor (220 ohms).
  • Jumper wires and a breadboard.

Connections

Connect the long leg (anode) of the LED to ESP32 GPIO pins(for example, pin 26 and pin 27). Connect the short leg (cathode) of the LED to a 220-ohm resistor, and the other end of the resistor to GND.

Working

  1. Connect ESP32 via USB to computer.

  2. Select the correct port.

  3. Upload the code onto the arduino IDE.

  4. Input the correct network ssid and password in the code.

  5. After compiling, open the Serial Monitor in the Arduino IDE to find the ESP32's IP address.

  6. Open a web browser and type the ESP32's IP address (e.g: http://192.168.1.100). You will see a simple webpage with links to turn the LED ON and OFF.

The ESP32 connects to your Wi-Fi network and sets up a web server. When you click the links on the webpage (LED=ON or LED=OFF), the ESP32 processes the request and controls the GPIO pin to turn the LED on or off.

Here's an image of the circuit connections: Imgur

Here's an video of the working:
Led toggle

TASK 11: Soldering Prerequisites

Soldering is used to join two or more components of an electronic circuit together melting solder around it.

Equipments

  1. Soldering iron: This is an hand held tool.
  2. Solder: It is an metal alloy. Most used solder is lead-free resin core solder

Working

  1. Mount the components or secure it well.
  2. Heat the joint by touching both copper pad and the resistor lead.
  3. Apply solder to joint and do not directly touch the tip of the solder to the tip of the soldering iron.
  4. After cooling, snip off the leads. Here's an image of the soldered LED circuit: Imgur

TASK 12: 555 Timer

When 555 Timer is operated in astable mode it is 555 oscillator circuit which continously produces square wave pulses with desired duty cycle. By choosing the correct resistors and capacitor, we can get the needed 60% duty cycle.

Formulae

  • T1 = 0.693 x (R1 + R2) x C
  • T2 = 0.693 x R2 x C
  • T = T1 + T2
    T = 0.693 x (R1 + 2R2) x C
  • Duty cycle = (R1 + R2)/(R1 + 2R2) = Ton/(Ton + Toff)
  • f = 1 / T
    Here's an image of the circuit connection: Imgur Here's an image of the output waveform: Imgur

TASK 13: Karnaugh Maps and Deriving the logic circuit

A Karnaugh Map (K-Map) is a diagrammatic method used in digital electronics and Boolean algebra to simplify logical expressions and minimize the number of logic gates required to implement a circuit. It helps eliminate redundant terms in a Boolean function, making it more efficient.

Here's an image of logic diagram and truth table: Imgur

TASK 14: Active Participation:

I participated in the college hackaton and poster presentation competition
Here's an image of the certificates: Imgur Click here

TASK 15: Datasheets report writing:

Since motors require more current than what the microcontroller pin can typically generate, we need a type of intermediate that can accept a small current, amplify it and generate a larger current, which can drive a motor. This is done by what is known as a Motor driver. The L293D motor driver is a device used to control DC motors. The L293D has two H-bridge circuits, allowing control of two motors independently. This makes it great for projects like robots and automation.

H-bridge

Reversal of direction of motor can be achieved by using four switches(Transistors) that are arranged in an H-like manner such that the circuit not only drives the motor but also controls its direction. H-bridge circuit transistors are arranged in a shape that resembles the English alphabet “H”.

Specifications

SpecificationValue
Operating Voltage4.5V to 36V
Output Current600 mA per channel
Control Logic Voltage5V
Number of Channels2
Operating Temperature0°C to 70°C

Pin Diagram

Imgur

Logic Diagram

Imgur

Truth table Representation

Enable 1,2Input 1Input 2Function
110Rotates Anti-clockwise (Reverse)
101Rotates Clockwise (Forward)
111OFF
100OFF
0XXOFF
The same is true of the other side of IC with enable 3,4 and the input 3 and input 4

PWM

PWM (Pulse Width Modulation) is a technique used to control the amount of power delivered to an electrical device by varying the width (duration) of electrical pulses in a signal. It’s used in electronics for tasks such as motor speed control, dimming LEDs etc.

Working

  1. In PWM, a digital signal alternates between ON (high voltage) and OFF (low voltage). The ratio of the ON time to the total cycle time (ON + OFF) is called the duty cycle.
  2. Duty Cycle determines the amount of power delivered. The duty cycle is determined by
    | Duty Cycle | Signal Behavior | Power Delivered | | -------- | ------- | ------- | 25% |ON for 25% of the time, OFF for 75% | Low Power 50% | ON for 50% of the time, OFF for 50% | Medium Power 75% | ON for 75% of the time, OFF for 25% | High Power 100%| Always ON | Full Power
  3. Frequency (Hz) is how fast the ON-OFF cycle repeats, Higher frequencies make the PWM signal smoother and reduce flicker.

TASK 16: Sad servers - "Like LeetCode for Linux"

SadServers is an online platform designed to help individuals enhance their Linux troubleshooting skills through interactive, real-world scenarios. In this task, we had to solve the Problem: Command Line Murders. This is a murder mystery which can be cracked using the clues and witness reports. Imgur

UVCE,
K. R Circle,
Bengaluru 01