Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

My main question is how would I create the connection on the breadboard using an

ID: 3583436 • Letter: M

Question

My main question is how would I create the connection on the breadboard using an mBed LPC1768 along with the described neccisary parts listed below. Also How would I write the program so that when I compile it on the mBed site it works when I connect the circuit to my computer.

1. you are given a 10kohm linear rotary potentiometer (included) in the kit, and then a resistor with unknown resistance (pick one resistor out of your resistor envelope in the kit). Without any meters, your task is to use the mbed to find out the resistance of the resistor of unknown resistance. You are free to use any of the LEDs for indication.

2. Design the hardware connection of the potentiometer and the unknown resistors to mbed to produce various voltages to some point of the circuit. Use your mbed to read the voltage at this point. Study the potentiometer that is provided in your kit, research and find the circuit diagram of such potentiometer and how you should connect it to mbed so that you can get various voltage reading from some point of the circuit. You may use the Vout of the mbed platform to provide the consistent voltage to your circuit of the potentiometer and the unknown resistor, but take into consideration (if needed) of limiting current when the potentiometer produce a zero resistance into the circuit. Use the analog input and the Tara Term to display your measurement.

Build your circuit and include all the required information about your hardware design in your lab report. 3. Based on the hardware you designed, write a code that takes voltage measurement every 10 seconds and write it to the Tera Terminal. You are also required to find a way to indicate to the user that he/she is free to change the potentiometer setting (no measurement is being currently taken). Your program will read the voltage and display the actual voltage reading to the Tear Terminal. What settings on the potentiometer is important to help you figure out the resistance of the unknown resistor?

Explanation / Answer

Place the center of the switch in p12 of the mbed.

Now Connect LED1's cathode to p10 of the mbed and the anode to the current limit resistor - inline with 'G' on the breadboard

Now Connect LED2's cathode to p11 of the mbed and the anode to the current limit resistor - inline with 'G' on the breadboard

Now Connect a wire directly from p12 to Vout (Opposite side of breadboard (3.3v out))

Now Connect a wire directly from p11 to gnd (0v)

Now Connect a wire directly from p10 to gnd (0v)

Now Connect a resistor to the same pin as both of the anodes of p11 and p12, and the otherside of the resistor.

Program:

#include "mbed.h"

Serial pc(USBTX, USBRX); //transmitter and receiver are defined here

AnalogOut Aout(p18); //This defines the analog output on pin 18
AnalogIn Ain(p20); //This defines the analog input on pin 20


int main() //decleration
{
pc.printf(" The Code will take voltage measurement every 10 seconds "); //Print Section starts from here
pc.printf(" and will write the same to Tera Terminal. ");
pc.printf(" You are free to change the potentiometer setting at anytime. ");

while(1)                                    //while loop starts from here
{
Aout = Ain; // out = in condition
float c = Aout * 3.3; // This will put Aout value to c; Aout takes a floating point no. between 0.0 and 1.0.
// the actual output voltage on p18 is between 0v=3.3v, we scale this with * 3.3v


pc.printf ("%f ", c); //This will print to Tera Terminal the Decimal floating point, lowercase from Aout

wait(5); //This is the wait command before next reading


}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote