1) For this problem, assume the ADC on the Arduino is using its internal 1.1 vol
ID: 3813073 • Letter: 1
Question
1) For this problem, assume the ADC on the Arduino is using its internal 1.1 volt reference. What is the value that the ADC will return for each to the following input voltages. (6 points)
A) Vin = 0.25 volts
B) Vin = 0.66 volts
C) Vin = 2.0 volts
D) Vin = 0.1 volts
2) For this problem, assume the ADC on the Arduino is using the external reference with an input reference voltage of 3.5 volts ( much as was done in the lab ). What is the value that the ADC will return for each to the following input voltages. ( 6 points )
A) Vin = 5.0 volts
B) Vin = 2.5 volts
C) Vin = 0.1 volts
D) Vin = 1.1 volts
3) Using the diagram shown here, fill in the values for T0 and T1, for the following code snippets. (9 points)
Figure HW3-1. PWM Timing Diagram.
A) void setup( )
{
analogWrite( 10, 128 );
}
void loop()
{
}
T1 = ___________________________
T0 = ___________________________
B) #include <TimerOne.h>
void setup( )
{
Timer1.initialize( 500 );
Timer1.pwm( 10, 128 );
}
void loop()
{
}
T1 = ___________________________
T0 = ___________________________
C) unsigned long Timer;
void setup( )
{
Timer = millis();
pinMode( 10, OUTPUT )
}
void loop()
{
if( millis() - Timer >= 15 )
{
digitalWrite( 10, LOW );
}
if( millis() - Timer >= 20 )
{
digitalWrite( 10, HIGH );
Timer += 20;
}
}
T1 = ___________________________
T0 = ___________________________
Explanation / Answer
Answer to the first four subparts of the first question is:-
Using the formula
Volt=(Vin/1023)*Vcc
Volt=Voltage to be calculated
Vin=input voltage
Vcc=Voltage esupllied to adruino
And Vcc = 1.1 * 1023 / ADC-measurement
Now solving the question 1:-
a)Vin = 5.0 volts
Vcc=1.1*1023/5.0
=225.06
Now
Voltage=(5.0/1023)*Vcc
=11volts
b)Vin=0.66volt
Vcc=1.1*1023/.66
=1705
Now
Voltage=(5.0/1023)*1705
=8.3volts
c)Vin=2.0volts
Vcc=1.1*1023/2.0
=562
Now
Voltage=(2.0/1023)*562
=1.0987volt
d)Vin=0.1volts
Vcc=(1.1*1023)/0.1
=11253
Now
Voltage=0.1/1023*11253
=0.00909volts
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.