Question: Dear Helpers, this is my final project for programming in C. I am not a programmer but need to pass this class please help!! I

Dear Helpers, this is my final project for programming in C. I am not a programmer but need to pass this class please help!! I do not have a clue as how to start this project : Project for This Course Goal: Develop a program that will automatically adjust a variable resistor until the maximum power is transferred to a load resister. Purpose: For this project, you will create a prototype of a circuit designed to transfer the maximum power to a load. The program will receive a keyboard input representing the value of the power supply (VCC) and the size of the load resistor (RL). The program will simulate driving a motor controlled variable resistor (Rint) by incrementally changing the value of the variable resistor. Requirements: Analyze the following program requirements. -You are designing a circuit that will automatically adjust circuit resistance until the maximum power is delivered to the load. -The circuit consists of a programmable power supply (VCC), a variable internal resistor (Rint), and a programmable load resistor (RL). Examine the schematic: -The user will enter the value of the VCC and the value of Rint. The program must automatically adjust RL until the maximum power is transferred. RL is a 100 to 10k ohm potentiometer that is controlled by the program. -The Programmable Power Supply has a range of 1 to 15 VDC. Rint has a range of 200 Ohms to 5 kOhms and is accurate to 1 Ohm. Values that are not within range will damage the equipment and cannot be accepted. -After valid values are entered, the program will automatically adjust RL as follows: --The beginning value for RL will be 100 ohms below the value of Rint --RL will be incremented 1 ohm at a time and the power dissipated by both Rint and RL will be calculated at each increment of RL. --The final value of RL will be 100 ohms above Rint -The program will then use the calculated values to determine the value of RL that delivers the maximum power to RL. -The program must output the calculated values in descending order starting with the point of maximum power transfer to RL as well as printing separately the maximum power delivered to RL. -The output above will also be written to a file with the filename results.txt Program requirements: 1. Programmable Power Supply (VCC) a. Valid output range is 1 to 15VDC. b. Valid voltages are in increments of .1V. 2. Programmable Internal Resistance (Rint) a. Valid values are 200 Ohms to 5kOhms b. Valid resistance increments are 1 ohm. 3. Program Input a. The program must not allow illegal input values. b. The program must either be tuning, producing output, or waiting for new power and load values with the following message. Input request: New Power Supply Voltage: 4. Program Output a. The output must have the following structures. Output: RL Rint Power Power Rint RL 100 1000 .008 .08 b. The final output message must look like the following: Maximum power transferred to RL is 99.1 m Watts. c. Invalid inputs must have corresponding messages that advise the user to provide valid inputs. 5. Program Structure: The program must use at least 1 function prototype. This is what I got so far but my instructor says I am missing the part where I ask the user for input. It also needs to produce a table with the results. #include

#include

int main()

{

int motor, powerSupply, current, resistor1,

resistor2, resistor2Power, motorPower,

resistors1And2, maximumPower;

while ( resistor2 < 1 )

{

powerSupply = 16;

current = 0;

resistor2 = 10000;

motor = 0;

resistor2Power = 0;

motorPower = 0;

resistors1And2 = 0;

printf ( " New Voltage and the Load: /n/n/n" );

resistor1 = 100;

while (( powerSupply < 1) || ( powerSupply > 15 ))

{

printf ( "Enter the value for the Power Supply between 1 to 15 Volts " );

scanf ( "%lf", &powerSupply );

if (( powerSupply < 1 ) || ( powerSupply > 15 ))

{

printf ( "%.1lf Volts ", powerSupply );

printf ( "Value for the input is out of range and may cause damage to the equipment " );

}

}

while ( motor < 100 || motor > 5000 )

{

printf ( "Enter the value for motor between 100 to 5000 " );

scanf ( "%lf", motor );

if ( motor < 100 || motor > 5000)

{

printf ( "%.0lf ohms ", motor );

printf ( "Value of input load resistance is out of range and may damage equipment ");

}

}

resistor2 = motor;

while ( resistor2 >= 0 )

{

resistors1And2 = resistor1 + resistor2;

current = powerSupply / ( resistors1And2 + motor);

resistor2Power = current * resistor2 * current;

motorPower = current * motor * current;

printf ( "Output: %.0f R1 and R2: %.0f RL: %.0f R2 Power: %.15lf ", resistor2, resistors1And2, motor, resistor2Power );

printf ( "Motor Power: %.15lf %C", motorPower);

if ( resistors1And2 == motor )

{

printf ( "Equal " );

}

if ( resistors1And2 != motor )

{

printf ( "Unequal " );

}

resistor2 = resistor2 - 1;

}

if ( motorPower > .001 )

{

maximumPower = motorPower * 1000;

printf ( "Max power transferred to RL: %f mWatts ", maximumPower );

}

if ( motorPower < .001 )

{

maximumPower = motorPower * 1000000;

printf ( "Max power transferred to RL: %f uWatts ", maximumPower );

}

}

return (0);

}

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!