Question: Given the attached circuit diagram Vout = VL VR = Vin ( (R2 / (R1 + R2)) (R4 / (R3 + R4)) ) Write an

Given the attached circuit diagram

Given the attached circuit diagram Vout = VL VR = Vin (

Vout = VL VR = Vin ( (R2 / (R1 + R2)) (R4 / (R3 + R4)) )

Write an Arduino program to calculate Vout and display it on the serial monitor

a. The voltage (Vin) is input via a potentiometer attached to analog pin 0. The program

must read the pot and convert the raw analog to digital converter value to volts, range =

0.00 to 5.00V. Note: you must keep the decimal fractions.

b. The four resistances are input via four potentiometers. Use the raw analog to digital

values (0 to 1023) as the resistances in ohms. Note that none of the resistances should

be 0. Check each pot input and change all 0 values to 1.

i. Pot on analog pin 1 inputs the value for R1

ii. Pot on analog pin 2 inputs the value for R2

iii. Pot on analog pin 3 inputs the value for R3

iv. Pot on analog pin 4 inputs the value for R4

c. The output on the serial monitor must read:

Vin = x.xx volts

Vout = y.yy volts

R1 = a ohms

R2 = b ohms

R3 = c ohms

R4 = d ohms

Most of the message is text except for x.xx, y.yy a, b, c and d which are the values of the

variables:

x.xx is the value of volts input by the user

y.yy is the value of volts output by the circuit

a, b, c and d are the values of the resistances input by the user in ohms

d. The program repeats endlessly at 1 Hz.

e. Explain you program via comments in the code.

R3 Ri R3 Ri

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!