IT400 MIDTERM EXAMINATION Use a variable resistance (pot) as a potential divider
ID: 2248874 • Letter: I
Question
IT400 MIDTERM EXAMINATION Use a variable resistance (pot) as a potential divider. Power it up with 5 volts and Ground. Connect the wiper leg with any of your Arduino's analog input. Write a program that will display the voltage on the wiper leg as a value between 0 and 5 Volts, and as a percentage value (0 to 100). Make sure to comment your program. When you show me your working product, you need to bring a hard copy of your program and be ready to explain it in detail. This exam is due Friday 10/13/2017. +3 V Arduino hab 30 Percent Voltag = 4.ovExplanation / Answer
For your question enter R2 vale as 4,YOU will get V2=4 and percenage vlue 80.
MATLAB CODE
clc;
close all;
clear all;
R=5;% let total resistance vale is 5 ohms
V=5; %source voltage
R2=input('enter the resistance below the wiper leg(beteen 0 to 5)');
R1=R-R2; %resistance below the wiper leg
V2=(R2*V)/R; %volage at wiper leg
percentage_value=(V2/5)*100;
disp(V2);
disp(percentage_value);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.