21 / 7 / 2024
TASK 1
Methodology:
Understanding 3D Printing Basics:
STL Files and Slicing:
Printer Settings and Configuration:
Execution:
Outcome:
Conclusion: This task provided a comprehensive introduction to the 3D printing process, from understanding the underlying technology to hands-on experience with slicing software and printer configuration. By following structured steps and leveraging Ultimaker cura effectively, the objective of printing a model from an STL file was achieved. And model was prepared.
###TASK2 : ###Working with pandas and matplotlib:
Objective: The objective of this task was to demonstrate proficiency in data visualization using pandas and matplotlib by creating three types of plots: a line graph, a bar graph, and a scatter plot. These visualizations were based on a sample dataset representing car sales data over several years.
Methodology:
Data Preparation:
A fictitious dataset was created to simulate car sales data over a five-year period (2018-2022). The dataset included columns for 'Year', 'Sales', and 'Profit', providing the necessary variables for visualization.
import pandas as pd import matplotlib.pyplot as plt
For demonstration purposes, we'll create a simple DataFrame with fictitious car sales data. data = { 'Year': [2018, 2019, 2020, 2021, 2022], 'Sales': [500, 600, 750, 800, 900], 'Profit': [50, 70, 80, 85, 100] }
df = pd.DataFrame(data)
Let's plot a line graph showing the trend of car sales over the years. plt.figure(figsize=(8, 5)) plt.plot(df['Year'], df['Sales'], marker='o', linestyle='-', color='b', label='Sales') plt.title('Car Sales Over Years') plt.xlabel('Year') plt.ylabel('Sales') plt.grid(True) plt.legend() plt.tight_layout() plt.show()
Next, let's create a bar graph to visualize the profit made each year. plt.figure(figsize=(8, 5)) plt.bar(df['Year'], df['Profit'], color='g', alpha=0.7, label='Profit') plt.title('Profit from Car Sales') plt.xlabel('Year') plt.ylabel('Profit ($ millions)') plt.grid(axis='y') plt.legend() plt.tight_layout() plt.show()
Finally, let's create a scatter plot to explore the relationship between sales and profit. plt.figure(figsize=(8, 5)) plt.scatter(df['Sales'], df['Profit'], color='r', marker='o', s=100, alpha=0.5) plt.title('Scatter Plot of Sales vs Profit') plt.xlabel('Sales') plt.ylabel('Profit') plt.grid(True) plt.tight_layout() plt.show()
###TASK 3:
Controlling DC motors using an Arduino and an L298N motor driver involves several steps, both in simulation (using Tinkercad) and in hardware. Here's a detailed guide on how to achieve this:
Input Voltage: Supports a wide range of input voltages (5V to 35V). Current Capacity: Can handle up to 2A per channel (with a heatsink). Control: Enables precise control over motor speed and direction using PWM (Pulse Width Modulation) signals from the Arduino. 3. Circuit Design on Tinkercad: Setup the Components:
Place an Arduino UNO board and a DC motor on the Tinkercad workspace. Add an L298N motor driver module and connect it to the Arduino and motor. Connect Components:
Arduino to L298N Connections: Connect Arduino digital pins to the IN1, IN2, ENA (enable) pins of the L298N for motor control. Connect Arduino PWM pins (e.g., 5 and 6) to the ENA and ENB pins of the L298N for speed control using PWM. Connect Arduino GND to the GND of the L298N and connect Arduino VIN to the 5V pin of the L298N to power the logic. L298N to Motor Connections: Connect the terminals of the DC motor to OUT1 and OUT2 of the L298N motor driver. Connect the GND and VCC of the L298N to the external power source (ensure it matches the motor's voltage requirement). Simulation Settings:
Use Tinkercad's built-in Arduino simulation capabilities to write and run the Arduino code. Adjust the PWM values in the code to vary the motor speed and observe the motor's response in the simulation.
Objective: The objective of this task was to design and test a 555 timer IC configured as an astable multivibrator with a duty cycle of 60%. This involved selecting appropriate resistor and capacitor values, setting up the circuit on a breadboard, and observing the output waveform using a Digital Storage Oscilloscope (DSO).
Methodology:
Component Selection:
555 Timer IC: Chosen for its versatility in generating square wave oscillations. Resistors: Selected R1 = 6.8kΩ and R2 = 10kΩ to achieve the desired duty cycle. Capacitor: Chose C = 10µF to set the frequency of oscillation. Circuit Design:
Objective: The objective of this project was to utilize an ESP32 microcontroller to create a standalone web server capable of controlling an LED connected to its GPIO pin. This involved setting up the hardware components, writing the Arduino sketch in the Arduino IDE, uploading the program to the ESP32, and testing the functionality through a web interface.
Setting up the Circuit:
Writing the Arduino Sketch:
Uploading the Program:
Testing and Verification:
This project highlighted the versatility of the ESP32 microcontroller in IoT applications, showcasing its ability to serve web pages and handle HTTP requests for controlling physical devices. By integrating hardware components with software development in the Arduino IDE, we achieved a practical example of IoT device control via a web interface.
Let's define the conditions based on the states:
The alarm should activate (output A=1A = 1A=1) under the condition:
To implement this using AND gates, we can directly use two AND gates:
AND Gate 1: Takes inputs DDD and Kˉ\bar{K}Kˉ (where Kˉ\bar{K}Kˉ is the complement of KKK, i.e., Kˉ=K′\bar{K} = K'Kˉ=K′).
AND Gate 2: Takes the output of the first AND gate and an additional control input (this can be set to 1, essentially acting as a buffer or direct input depending on the circuit design).
Connect the AND gates as follows:
AND Gate 1: Inputs DDD and Kˉ\bar{K}Kˉ
AND Gate 2: Inputs the output of AND Gate 1 and another control input (can be a direct input or from another AND gate, depending on the specific circuit design).
Output Device: Buzzer or LED connected to the output of AND Gate 2.
This circuit design effectively implements the burglar alarm system using only AND gates, adhering to the specified conditions of door state and key press status. It ensures simplicity and reliability in operation, leveraging basic logic gates to achieve the desired functionality.
###Task 7: Soldering Prerequisites Procedure