260 likes | 271 Views
Learn about testing light and sonar sensors for distance and light readings, using C code, with instrumentation like oscilloscopes and multimeters. Experiment with circuits in the lab. Explore AC and DC circuits using tools like Multisim.
E N D
TA: Chris Reilly Group 5: Benjamin, Ramie, Zachary, Dinal ECE 1020 FINAL PRESENTATION
Ben Asma - BME Ramie Abounaja - BME ZacChalup - BME Dinal J - BME
Sensor Characterization A sensor is a device which can be used to take physical readings from the environment and then convert them into a form that can be understood easily. This data can in turn be used for various purposes. • The project our group carried out tested two types of sensors: • Sonar Sensor • Light Sensor
Sonar Sensor • The value returned is the distance of the sensor from the closest object • The sensor used in the lab had a range of 0 – 4 ft
Light Sensor • The sensor measures the amount of reflected light that it receives an assigns a value based on a scale • Sensor readings have a range from 0 - 255
Interactive C code Shown below is the Interactive C code for our light sensor. void main(){ while(!start_button()); // Press Start Button while(1) // Continue infinitely { sleep(0.3); //the program waits for 0.3 seconds /*the program will display the output integer value of the sensor on the screen*/ printf("\n Output %d", analog(6)); }}
Limitations • Light from the surroundings affected some of the readings we obtained from our light sensor • The sonar sensor had a tendency to give different readings when the experiment was repeated at the same distance from the object
Instrumentation • Oscilloscope • - shows a graphical output • - time domain version of waveform/signal • Digital Multimeter (DMM) • - displays a numerical output • - can measure voltage, current, and resistance • DC Power Supply • - provides a source of voltage or current • - can generate voltage from -25V to +25 V
Oscilloscopes • It plots voltage on the y axis, and time on the x axis. • The amplitude of the signal can be found from the vertical distance from the x axis to the peak. • A user is able to adjust the appearance of a waveform by using knobs on the oscilloscope.
Digital Multimeter • It can measure voltage, current and resistance • It represents a complete signal with a single value. • The user can select buttons to measure voltage, resistance, and current. • Three terminals - red (voltage, resistance, small currents), white (large currents), black (common terminal)
3V DC Circuits Lab How do you find the current in this circuit? R1 = 1KΩ R2 = 1KΩ Use Ohm’s Law!!!!! 0V
I = 6 mA 1.5V Series Circuits • Same current through entire circuit • Battery voltage is shared • The total resistance of the circuit is given by the following formula: Req = .25KΩ Req = R1 + R2+…….
I = 3 mA I = 3 mA I = 6 mA 1.5V Parallel Circuits • Current is shared • Voltage across each component is the same as that of the power source • The total resistance of the circuit is given by the following formula: R1 = .5KΩ
1.5V Diodes • The diode acts as a tollbooth • Doesn’t allow any current to flow through the circuit unless the power source has a voltage greater than a specified amount Anode = 1.5V Diode R = .5KΩ
How to set up a DC Circuit in the lab? • In the lab, the power supply was used to generate voltage • To turn on the output, the “Output On/Off” button is pressed, and the “+6” button is pressed to enter the amount of voltage the user wants. ( in the lab 3V was used) • Once the voltage is entered, the “Output On/Off” button is pressed to turn the output off while a circuit can be connected to the Power Supply • The banana end of a cable is plugged into the red +6V terminal, and the banana end of another cable is plugged into the -6V terminal. • The mini grabbers are attached to the circuit, and the “Output On/Off” button is pressed to turn the output on.
DC Circuits Lab By setting up the circuit as shown, we varied the output voltage from the power source and checked to see if the current recorded by the multimeter agreed with the group’s calculated answer
AC Circuits • AC Circuits – circuit with current of varying amplitude • Varied the current from the power source and measured the corresponding amplitude of the current on the oscilloscope
Multisim • Multisim is a virtual circuit design program used to simulate AC and DC circuits. • Circuits are displayed on a grid allowing users to freely observe/modify their circuit. • During the lab, the group created basic AC and DC circuits and used virtual measuring tools such as multimeters and oscilloscopes to measure the current and various other aspects of the circuit.
AM Radio Lab • Designed an actual AM Radio using the given components and instructions • All components of the circuit had to be manually soldered in.
Ah….. That;s my song ;) And two weeks later……
Arduino (Week 1) • Gather sensor data • Actuate servos • Process image data and light LEDs • Communicate with smartphones for home automation • Many, many more possibilities!
The experiment involved connecting the light emitting diode to the breadboard and running the program to display different colors on the LED. By varying the time interval, we displayed a spectrum of colors.
Arduino (Week 2) Objectives • Control the rotation of a standard servo motor • Control the speed of a continuous rotation servo motor based on the light intensity Servo motor Servo connector
Light sensor Servo connector Resistor Servo motor • Varied the light received by the light sensor using the torch on a smartphone • Observed that a higher light intensity resulted in a higher motor speed