Common Tasks Final Report Part-1\n---\n## TinkerCAD \nAim : Estimating the distance between an obstacle and\nthe sensor using ultrasonic/infrared sensors.\n\nComponents Used :\n1. Arduino Uno R3 board\n2. Ultrasonic sensor (HC-SR04)\n3. 16×2 LCD I2C Display\n4. Jumper Wires\n\nSetup : Connections are done as shown in the circuit diagram.\n\n\n\nSteps :\n1. Connect the Echo pin of the sensor to the D2 pin of the Arduino.\n2. Connect the Trig pin of the sensor to the D3 pin of the Arduino.\n3. Navigate to Tools and select board and port.\n4. Verify and compile the Code, then upload the code to the Arduino Uno R3 board.\n5. Monitor the output in the Serial monitor (Set the baud rate as 9600).To open Serial monitor Tools>Serial Monitor or (Ctrl+Shift+M)\n\nCode : \n
c++\n#define echoPin\t\t\t\t\t\t\t\t\t\t \\\n\t2 // attach pin D2 Arduino to pin Echo of HC-SR04\n#define trigPin\t\t\t\t\t\t\t\t\t\t \\\n\t3 // attach pin D3 Arduino to pin Trig of HC-SR04\t\t\t\t\t\t\t\t\t\t \\\n\n\nlong duration; // Variable to store time taken to the pulse\n\t\t\t// to reach receiver\n\nint distance; // Variable to store distance calculated using\n\t\t\t// formula\n\nvoid setup()\n{\n\tpinMode(trigPi \n\t\t\tOUTPUT); // Sets the trigPin as an OUTPUT\n\tpinMode(echoPin, INPUT); // Sets the echoPin as an INPUT\n\n\t// Serial Communication is starting with 9600 of\n\t// baudrate speed\n\tSerial.begin(9600);\n\n\t// The text to be printed in serial monitor\n\tSerial.println(\n\t\t\Distance measurement using Arduino Uno.\");\n\tdelay(500);\n}\n\nvoid loop()\n{\n\tdigitalWrite(trigPin, LOW);\n\tdelayMicroseconds(2); // wait for 2 ms to avoid\n\t\t\t\t\t\t// collision in serial monitor\n\n\tdigitalWrite(\n\t\ttrigPi \n\t\tHIGH); // turn on the Trigger to generate pulse\n\tdelayMicroseconds(\n\t\t10); // keep the trigger \"ON\" for 10 ms to generate\n\t\t\t// pulse for 10 ms.\n\n\tdigitalWrite(trigPi \n\t\t\t\tLOW); // Turn off the pulse trigger to stop\n\t\t\t\t\t// pulse generation\n\n\t// If pulse reached the receiver echoPin\n\t// become high Then pulseIn() returns the\n\t// time taken by the pulse to reach the\n\t// receiver\n\n\tduration = pulseIn(echoPin, HIGH);\n\tdistance\n\t\t= duration * 0.0344 / 2; // Expression to calculate\n\t\t\t\t\t\t\t\t// distance using time\n\n\tSerial.print(\"Distance: \");\n\tSerial.print(\n\t\tdistance); // Print the output in serial monitor\n\tSerial.println(\" cm\");\n\tdelay(100);\n}\n
\n\nSimulation Link\n\nModel\n\n---\n## Ubuntu Command Line\n\n1.Create a folder named test :\n\n To create a folder we use the mkdir command.\n\n mkdir (folder_name)\n\n \n\n\n2.cd into that folder :\n\n To cd into the folder we use the cd command.\n\n cd (folder_name)\n\n \n\n3.Create a blank file without using any text editor :\n\n To create a blank file we use the ls command.\n\n ls > (filename.txt)\n\n \n\n4.Create 2600 folders in this folder :\n\n To create multiple folders we use mkdir -p fname{ n} command\n\n mkdir -p m90{1..2600}\n\n \n\n5.Concatenate two text files containing any random text and display them on the terminal\n\n To concatenate two files, first we create two files and add\n text into them. Then, we concatenate the two files using\n command cat and store it in another file.\n\n cat file1 file2 > file3\n\n \n\n To add text into a file we use echo command.\n \n ---\n\n## Karnaugh Maps and Deriving the logic circuit\n\nAim : Determining the\nkarnaugh map and make a burglar alarm using simple logic circuits. \n\nComponents Used :\n1. Breadboard\n2. Power Supply\n3. Sideswitches\n4. NOT and OR gate\n5. Wires\n\nWorking :\n\nKarnaugh maps are used to solve boolean equations and used to solve burglar alarm systems. Here, the combination of OR and NOT gate(NOR Gate) is used to make a burglar alarm. In this setup, a person opens the door and presses the buzzer when entering into the secured room. If they fail to do so, the alarm triggers.\n\nSetup :\n\nHere, OR and NOT gates are setup in series on the board. A resistor is connected on the board and power supply is used to give power to the model. Two switches are used and the working of the alarm can be explained with the help of LED. The switches 1 and 2 represent the actions of entering the room and pressing the buzzer respectively.\n\nLogic Gate and truth table :\n\n\n\nSimulation Link :\n\nBurglar Alarm\n\n\n---\n\n\n## 555 IC\n\nAim : To Design a 555 astable multivibrator with duty cycle 60%\n\nCircuit :\n\n\n\nWorking :\n\n1.The 555 IC is used to create a free running stable oscillator to continously produce square wave pulses. Pin 2 and pin 6 are connected together allowing the circuit to re-trigger itself on each and every cycle allowing it to operate as a free running oscillator. During each cycle capacitor, C charges up through both timing resistors, R1 and R2 but discharges itself only through resistor, R2 as the other side of R2 is connected to the discharge terminal, pin 7.\n\n2.The duty cycle of the oscillator is 60% when : R1=2R2.\n\n3.The circuit is connected to a Oscilloscope. This instrument is used to display the waveform.\n\n\n\n\n\nOscilloscope Video :\n\n\n<iframe height=""315"">\n\n\n---\n\n## Soldering\n\nWhat is Soldering?\n\nIt is the process of joining two metal surfaces together using solder.\n\nList of Soldering equipment in the lab :\n\n1. Soldering iron\n2. Soldering lead\n3. Soldering flux \n4. Soldering wick\n5. Soldering stand\n\nSoldering Procedure :\n\n1. Gather all the necessary components for your circuit.\n2. Place the components on the perfboard in their correct positions.\n3. Use wire cutters to cut wires to the appropriate lengths.\n4. Strip the ends of the wires and insert them into the perfboard holes.\n5. Solder each component to the board one at a time, making sure that each connection is strong and secure.\n \nImage :\n\n\n\n---\n"