4180T1S23s

docx

School

Georgia Institute Of Technology *

*We aren’t endorsed by this school

Course

4180

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

docx

Pages

5

Uploaded by BailiffMantisMaster1210

Report
Score: _____________ Name:___________________________________________ EE 4180 Test I Test is open book and notes. No electronic devices. Place all answers in the spaces provided. 1. ( 4% ) What is used instead of a CS (chip select pin in SPI) when multiple I2C devices are hooked up on the same I2C bus (one word)? _______________ address_ _________________ 2. ( 4% ) The touch keypad used in the lab, uses this standard interface. _______________ I2C __________________ 3. ( 4% ) To generate an external voltage of 1.65V on the mbed's DA pin, what value would be used as the argument in the mbed AnalogOut API? (numeric value only) ________________ 0.5 _________________ 4. ( 4% ) Instead of an analog output that controls a transistor driver circuit, in many cases it is more energy efficient to use this type of output. _________________ PWM ________________ 5. ( 4% ) What mbed API was used to read the bits on the navigation switch used in the lab. ________________ BusIn _________________ 6. ( 4% ) To write multiple bits in one operation faster than several DigitalOuts (one for each bit), use this mbed API. _________________ BusOut ________________ 7. ( 4% ) If a chip has two pins labeled MOSI and MISO, it uses this type of standard interface. (acronym) __________________ SPI _______________ 8. ( 4% ) How many power transistors are needed to vary the speed and reverse a DC motor? (numeric value) ___________________ 4 ______________ 9. ( 4% ) This three terminal semiconductor device can switch AC loads and is often found in dimmer circuits, but it only turns off at a zero-voltage crossing. (acronym) ________________ TRIAC _________________ 10. ( 4% ) Output pins on SPI ICs always have this special type of logic output (one word). _________________ tristate ________________ 11. ( 4% ) At 9600 baud, what is the maximum number of ASCII characters per second that can be sent out on a serial port? (numeric value) _________________ 960 ________________ 12. ( 4% ) What is the special name used for a cable or an adapter that switches the RX and TX lines on a serial port. __________________ null modem _______________ 13. ( 4% ) RC servos and ESCs use this type of digital output signal for position and speed control commands. __________________ PWM _______________ 14. ( 4% ) If a small DC motor without a driver circuit has three large wire leads coming from the coils, it is most likely this type of DC motor. (one word) _________________ brushles s________________ 15. ( 4% ) What hardware feature in the processor was used to trigger the lab software to read the RPG rotary encoder bits (one word) _________________ interrupt ________________
Problem 16. ( 15% ) Complete the hardware schematic below to build the Bluetooth AC smart plug with an automatic dimmable night light using additional parts of the same type that are found in your lab kit. Read the detailed instructions and requirements provided on the last page of the test. Power Supply 5V 1A + -
Socket for Switchable AC Device Plugs Hot (Black) Neutral (White) 120VAC wall outlet pins Hot (Black) Neutral (White) Mbed LPC1768 Relay 5VDC Coil Pins + - Relay Switch Contact Pins Common NO (normally open) NC (normally closed) White LED 60mA + -
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Problem 17. ( 25% ) Write a complete mbed API C++ program for your hardware design on the previous page in the space provided below following the instructions and constraints provided on the last page of the test. #include "mbed.h" Serial blue(p28, p27); PwmOut Light(p21); DigitalOut AC(p22); AnalogIn Sensor(p16); int main() { bool Light_on = false; float Dim = 1.0; char bnum = 0; while (1) { if(Sensor < (1.65/3.3) ) Light_on = true; if(Sensor > (2.2/3.3) ) Light_on = false; if (Light_on) Light = Dim; else Light = 0.0; if (blue.readable()) { //data avaiable? if (blue.getc() == '!') { if (blue.getc() == 'B') { // button data packet bnum = blue.getc(); // button number if (blue.getc() == '1') { //button hit switch (bnum) { case '5': // button 5 up arrow AC = 1; break; case '6': // button 6 down arrow AC = 0; break; case '7': // button 7 left arrow if (Dim >= 0.25) Dim = Dim - 0.25; break; case '8': // button 8 right arrow if (Dim <= 0.75) Dim = Dim + 0.25; break; default: break; } } } } } wait(0.1); } }
Name:______________________________________________ Additional Information and Requirements for Problems 16 and 17 Using parts found in your lab kit and mbed C++ I/O APIs, design the hardware schematic and then the software for a Bluetooth remote controlled AC smart wall plug with built-in a dimmable automatic night light. A light sensor turns on a large bright 60mA white LED on when the room is dark. A single relay switches both AC device plugs On/Off. The hardware setup should ensure that the relay and AC device are turned off at a power on restart or when power is off. The Adafruit Bluefruit GUI app on a phone serves as the remote control to turn the AC device(s) on/off and the GUI also can be used to set the brightness level of the automatic night light. Additional Software Requirements (no RTOS!) Use the following variable and object names in your mbed API C++ program solution to 17 LED – the I/O pin that controls the dimmable white LED Sensor – The input pin that reads the light sensor voltage AC – The I/O output pin that controls the relay Blue – The serial port object Dim – the dimming level setting of the night light Light_on – A Boolean flag that is used to turn the night light ON/OFF based on the light level bnum – a character to hold the ASCII button number while decoding commands Using software polling only (i.e, no Interrrupts) , in a main program infinite loop that runs no more than 10 times a second. Read the light sensor and when the voltage is less than 1.65 set Light_on or if the voltage is greater than 2.34 clear Light_on (i.e., it needs a bit of Hysteresis to prevent the LED from blinking on/off near the light level change threshold level as the LED turns on ). When Light_on is true set LED to Dim otherwise 0.0. Check for an incoming Bluetooth character available and if no character is available skip to the end of the loop. When a character is available, parse the Bluetooth command string using a case statement and implement the following remote control functions: Note: GUI Button Release codes and the Checksum character should be ignored to simplify your solution for the test GUI touch key ASCII String Smart Plug Function Up Arrow “!B51” AC device ON Down Arrow “!B61” AC device OFF Left Arrow “!B71” Dim LED (if > .25 , -.25) Right Arrow “!B81” Brighten LED (if<0.75 , +.25)