EGR 2800 Electrical

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Show the TTL-Level serial waveform of the capital letter N being transmitted at 9600 baud.

0x4E = 0100 1110

the size of the ADC on our arduino board is:

10-bit

What is the "no-load speed"?

100 RPM

What is the max-efficiency torque for the motor?

2 in-lbs

The Average Voltage of a PWM signal with 5 volts maximum voltage and 50% duty cycle is:

2.5 V

What is the RAW ADC reading when 5V are applied to an input channel of the ADC

2^10 or 1023

what is the step size of a hypothetical 4-bit ADC that accepts an analog voltage between 0 and 3 volts

3/15= 1/5

a 3 bit ADC with 0-5 volts range has a step size of:

5/7

The Duty Cycle of a PWM signal with 1 ms ON time and 2 ms period is:

50%

byte

8-bit unsigned number, from 0-255

c) The simplest way to use the thermistor with a microcontroller is to convert the change in resistance to a change in voltage using a voltage divider setup. Assume the divider circuit shown is used with the thermistor. Assume R is 50 kOhm. What is the output of the circuit if the temperature is 40ºC?

@40 C Rt=25Kohms Vout = 5(50/50+25) = 5(2/3) = 10/3 V

The graph provided shows the relationship between the resistance of a thermistor and its temperature. a) Assume that we will be using this thermistor in an application where the temperature will range between 10ºC and 25ºC. Provide a linear equation that approximates the resistance as a function of temperature in this range.

@T=10 - R=100 @T=25 - R=50 Rt = mT+b = (-10/3)T+ 400/3

Consider the motor connected to pins A,B, and EN of your microcontroller as shown. Assume I12 is the current flowing into pin 1 of the motor at full clockwise (CW) speed. What is the average current in each of the cases below in terms of I12? Use table for your answers

A B EN Current 0 0 1 0 0 1 0% duty 0 1 0 1 I12 1 50% dc 1 1/2 I12 1 1 50% dc 0 0 1 0% duty -0.8 I12

Boolean

A Boolean holds one of two values, true or false. Each Boolean variable occupies one byte of memory.

Char

A data type that takes up one byte of memory that stores a character value. Character literals are written in single quotes like this: 'A' and for multiple characters, strings use double quotes: "ABC". However, characters are stored as numbers. You can see the specific encoding in the ASCII chart. This means that it is possible to do arithmetic operations on characters, in which the ASCII value of the character is used. For example, 'A' + 1 has the value 66, since the ASCII value of the capital letter A is 65.

float

Data type for floating-point number is a number that has a decimal point. Floating-point numbers are often used to approximate the analog and continuous values because they have greater resolution than integers. Floating-point numbers can be as large as 3.4028235E+38 and as low as -3.4028235E+38. They are stored as 32 bits (4 bytes) of information.

T of F : All General purpose input/output (GPIO) pins on the Arduino Uno board can be used as PWM pins.

False

T of F : When writing a debouncing software, the total delay time from the readings must be shorter than the switch bounce time

False

Our Arduino has an on board debug LED that is connected to pin #9.

False connected to pin 13

T of F : Our Arduino Uno board contains two ATMega328P microcontrollers.

False only one

T of F : Stepper motor contain a closed loop controller

False open-loop controller.

T of F : servo motors have a range of 360 deg rotation

False, 180 deg rotation

T of F : Brushed motors typically last longer than brushless motors

False, Brushless last longer

T of F : We can power a DC motor directly from the Arduino board because the board is equipped with the motor power requirements.

False, Powering DC motors directly from the Arduino board is not recommended because the motor might consume more power than the Arduino's on board voltage regulator can provide.

T of F : All types of stepper motors require one power supply

False, Unipolar requires only one DC power supply Bipolar stepper motor requires two DC power supplies

T of F : When using an H- B=bridge cicuit to control the direction of a motor, closing both switches on the left side or right side will cause the direction of the rotation to change

False, closing both switches on right or left side will cause a short

T of F : constrain() function is used to implement an upper limit to a number.

False, constrain() function constrains a number to be within a range.

T of F : A motor can be turned in one direction with a single transistor. For bidirectional control, however, two transistors are necessary

False, for bidirectional control, four transistors are necessary.

T of F : A pullup resistor connects the microcontroller input to GND

False, input to 5V

T of F : map() function re-maps a number from one range to another in a nonlinear relationship

Fasle, map() function re-maps a number from one range to another in a linear relationship

what is the current flow in the LED? Assume LED forward voltage drop is 1V.

I=V/R = 8/470

int

Integers are the primary data-type for number storage. int stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) - 1).

Why was || used in line 9 instead of |?

Logic "OR" operator used to check true or false

long

Long variables are extended size variables for number storage, and store 32 bits (4 bytes), from -2,147,483,648 to 2,147,483,647.

What effect would returning state {2} instead of state {0} in line 10?

No effect, checking for debounce

What does != mean in line 9?

Not equal

double

On the Uno and other ATMEGA based boards, Double precision floating-point number occupies four bytes. That is, the double implementation is exactly the same as the float, with no gain in precision

when connecting a push button to the micro controller, a pullup or pulldown resistor is needed for what reason?

Prevent the MCU input from floating

What does "boolean" in Line 1 indicate?

Return type

b) For the 10ºC to 25ºC range, use the map function to map the resistance to the temperature. Assume that the resistance is stored in a variable named R in ohms. Store the result of the mapping into variable T in ºC. (Hint: answer is one line of code. No need to use constrain function).

T = map(R,100000,50000,10,25)

T o F : Power can be supplied to the Arduino through a USB cable or through a barrel jack connector.

True

T of F : Inductive loads cause voltage spikes that can damage the driving circuit.

True

T of F : Photoresistors needs a voltage divider setup to be read by a DAC.

True

T of F : Strain gauge works off of the principle of resistance being proportional to length.

True

T of F : The Arduino Uno board contains two power regulators, one produces 5V and the other produces 3.3V.

True

T of F : The speed of a DC motor can be adjusted using pulse-width modulation (PWM).

True

T of F : Transistors are used as switches when employing pulse-width modulation (PWM) to drive a motor.

True

T of F : a potentiometer is an angle sensor

True

T of F : in linear voltage regulators, the output voltage is set at a fixed value

True

T of F : stepper motors are manufactured with steps per revolution resulting in shaft increments of degrees per step

True

T of F : when using a tri-state buffer circuit to control the direction of a motor, the PWM signal can be fed to either the input pin or the enable pin.

True

T of F : with a servo motor, PWM is used, but it doesn't directly control the power for the servos motor, instead, PWM is used to set (encode) a desired angle.

True

T of F : When setting the desired angle for a servo motor, the pulse needs to be sent with 50 Hz frequency.

True, When setting the desired angle for a servo motor, the pulse needs to be sent every 20 ms, therefore 50 Hz frequency

unsigned char

Unsigned char is an unsigned data type that occupies one byte of memory. The unsigned char data type encodes numbers from 0 to 255.

unsigned int

Unsigned ints (unsigned integers) are the same as int in the way that they store a 2 byte value. Instead of storing negative numbers, however, they only store positive values, yielding a useful range of 0 to 65,535 (2^16) - 1). The Due stores a 4 byte (32-bit) value, ranging from 0 to 4,294,967,295 (2^32 - 1).

unsigned long

Unsigned long variables are extended size variables for number storage and store 32 bits (4 bytes). Unlike standard longs, unsigned longs will not store negative numbers, making their range from 0 to 4,294,967,295 (2^32 - 1).

analogRead()

integer value from 0-1023

What is the role of the 5 ms delay between readings in the context of debouncing?

space out the 3 readings cover worst case bounce of signal

why does the function analogWrite() have a misleading name?

using PWM pins is still controlling digital pin. OUTPUT is not analog.

Consider the terminal program screen shown on the right. Assume you have your Arduino connected appropriately through serial to this terminal program and that the terminal program screen is blank with the cursors at the top left. Write a complete Arduino Uno R3 program that produces the shown output once. Use a for-loop to create the 4th line.

void setup() { serial begin (9600); serialprint ("*****"); serialprintln ("* *"); serialprintln ("*****"); for (int i=1, i<=20,1++) { serialprint (i); } }


Ensembles d'études connexes

Chapter 2: Hinduism Inquisitive Questions

View Set

Chapter 2 - Theory, Research, and Evidence-Based Practice

View Set

ITCS 3162 Final Exam Review Guide

View Set

E4 Chapter 23: The Digestive System: Matching-T/F-Fill in the Blank

View Set

Ch 3: Medication Administration and the Nursing Process of Drug Therapy

View Set

Series and Parallel Circuits - Math2

View Set

Finance Chapter 7 Book Questions

View Set