Question


Objective: Develop an understanding of how a Pulse Width Modulation (PWM) signal can control the speed of a motor DescriptionC) Connect the motors tachometer lines (Yellow and Green) to the ADiscs analog input +V1 and-V1, as is shown in the circuit

Need to figure out the coding to complete this Circuit Board.

If you are able to post how the Circuit will be wired with the Arduino and the Motor Controller as well that would be great.

Objective: Develop an understanding of how a Pulse Width Modulation (PWM) signal can control the speed of a motor Description of Lab 10: In this lab we will be using using TimerOne to provide a PWM signal and then use the analog inputs on Analog Discovery (ADisc). The code for this assignment is similar to that in D_PWM Demo.pdf. A) Supply a PWM from the Arduino on pin 10, and have it so that the Duty Cycle can be set. Code for this can be found in "Files->CourseNotes->D_Hardwarelnterfacing->O PWM_Demo.pdf". B) Connect the motor drive to the Arduino. The circuit looks like the following Blue Red Green 1 2 3 4 Motor JI +12v -V1 Analog Discovery 1N4001 D1 IRF510 Q1 R1 PWM Si 10K IRF510 GDS
C) Connect the motor's tachometer lines (Yellow and Green) to the ADisc's analog input +V1 and-V1, as is shown in the circuit. Also connect the +V2 to the PWM signal and -V2 to ground. As a test, set the PWM to approximately 50% or a setting of 510-515 on Timer 1 should be work. Record the duty cycle, of the PWM, and frequency of the tachometer signal. Demonstrate this to the lab instructor and include a screen shot of this test D) Record the frequency for a duty cycle of approximately 90%, 80%, 70%, 60%, 50%, 40%, 30% and 20%. A table of these should be included E) The report consists of a screen shot exemplifying the test, and the table of results from part D
0 0
Add a comment Improve this question Transcribed image text
Answer #1

//Initializing PWM Output Pin
int pwm_pin = 10;
int duty_limit = 255;
/*Replace 255 for the desired duty cycle
* replace by 127 for 50% duty cycle
* replace by 0 for 0% duty cycle
* replace by 255 for 100% duty cycle
* replace by 191 for 75% duty cycle
* replace by 64 for 25% duty cycle
*/
void setup() {
//Declaring pin as output
pinMode(pwm_pin, OUTPUT);
}

void loop() {
//Toggling the PWM
for(int i=0; i<duty_limit; i++){
analogWrite(pwm_pin, i);
delay(5);
}

for(int i=duty_limit; i>0; i--){
analogWrite(pwm_pin, i);
delay(5);
}
}

QuO 12 o Aiduno 1o Und . lo k S circw am e provided to ųou Remember ta that the enhre crcit thot is, all thi poin> Tiat are g

Add a comment
Know the answer?
Add Answer to:
Need to figure out the coding to complete this Circuit Board. If you are able to post how the Cir...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I am currently trying to figure out the experiment below. Please complete Table 1 with an...

    I am currently trying to figure out the experiment below. Please complete Table 1 with an explanation, I appreciate it thank you!  Promise to give thumbs up! Introduction The phase differences between the output voltage, the voltage across the inductor, the voltage across the capacitor, and the voltage across the resistor will be examined at resonant frequency. The voltage and phase relationship will also be examined for frequencies above and below resonance. Theory An inductor, a capacitor, and a resistor are...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT