Embededd System Questions

You might also like

Download as pdf
Download as pdf
You are on page 1of 25
Ad A2 AS Without any sensors attached a robot demand’s 0.5A of current from a power supply. i) Four additional infra-red sensors are now attached to the robot. If each sensor demands an extra 100 mA of current when fully on calculate the worst-case current that will be drawn from the power supply. Given that the maximum specified output current of the power supply is 0.65A suggest and explain how the 4 additional infra-red sensors could be used. A Light Emitting Diode LED is to be turned on by a micro-controller. The micro-controller pin used provides 3.3 volts when it is a Logic 1 and 0 volts when it is Logic 0. Given that the LED has a forward voltage of 2.3 volts and the desired quiescent current is 20mA, draws a carefully labelled schematic of the circuit showing all components and there values. An asserted low switch is attached to a micro-controller as shown in Figure 1 below. Vid i) Pullup resistor — 7 =~ 02 Figure 1: mechanical sensor attached to pin D2 of a micro-controller Explain the purpose of the “Pull-Up resistor” in the circuit shown in Figure 1. Using a Capacitor, modify the circuit in Figure 1 so that the switch is de-bounced. A4 AS AS AT AB ‘Suggest an algorithm that could be used to increase the confidence and repeatability of an analogue sensor read. A 5-sensor micro-mouse wing layout shown below is used. FL uo RL RR Given that the sensors are asserted high, write down the type of maze layout observed for each sensor combination below: i ili) ‘A drive gear ‘GEAR X’ is used to drive a driven gear ‘GEAR Y’. The tadius of ‘GEAR X’ is 2cm, the radius of ‘GEAR Y" is 4cm. The efficiency of the gearing system is 80%. Calculate the Mechanical advantage achieved by using this gearing arrangement. [ Why does a stepper motor eventually stall when the stepping rate is increased over a period of time? Typically a bipolar motor can be clocked at a higher speed than a unipolar motor for a given load. Explain the reason for this. AQ The circuit in Figure 2 below is used to drive a single coil of a stepper motor. a au P10 pl Rb cu Figure 2, simple motor coil driver circuit (1-phase) Reoil ‘LENOISW University of Westminster Page 2|4 For full torque the coil current must be 100mA. Given that the on voltage of the micro-controller pin is 3.3V, that the base-emitter voltage Vbe of the bipolar transistor is 0.6V and that the current gain of the transistor Hfe = 100, calculate a suitable value for Rb that will ensure that the full motor torque can be achieved. A10 Att Assume the following: Required Acceleration = 0.001 ms-2 - Maximum Speed = 0.2 rads-1 = Mass of Robot 0.6 Kg - Wheel Radius = 0.06m - Motor holding torque = 5 Nem - Max no-load stepping rate of motor before stall = 1000 steps/s = Step size = 1.8° i) Using the values above, calculate the stepping rate required to travel at the maximum specified speed. ii) Using the values above, estimate the maximum output power produced by the motor. Using the Data Sheet table in Appendix A to help you, answer the following question. A.LM7805 linear voltage regulator is used to produce a 5 Volt supply rail from an 8 Voit supply rail. The current demand of the circuit supplied by the 5 Volt rail will be 600mA. Assume that the ambient temperature of the environment is 25°C. i) Calculate the power dissipated by the LM7805. ii) Given that the maximum operating temperature must not exceed 90°C determine if a heat sink must be used. A412 ALPC1768 MBED board is used to generate a PWM signal with a period of 1ms and a duty cycle of 65%. i) Sketch the Voltage Vs Time graph of the PWM waveform described above between time 0 seconds and 4ms. ii) Briefly explain the use (application) of PWM in embedded systems such as the micro-mouse. ‘A13. How many serially connected 1.5V AA battery cells are required to produce a supply voltage of 12 volts? SELENOISW_ University of Westminster Page3|4 A.14 Two AA cell batteries are connected in parallel. If Each cell provides 1.2 volts and has a capacity of 400mAh. i) Calculate the total voltage and the total capacity provided by this combination of batteries. ii) Comment on the electrical safety of using batteries in parallel. 2. An autonomous robot uses 5 infra-red proximity sensors to detect walls either side to help it navigate through an IEEE micro-mouse maze. Each of these sensors will draw 100mA from the power supply. a) b) ) The sensors will be subject to interference signals and ambient noise sources. Explain 2 solutions that could be used to reduce the effects of ambient noise and interference. [4 Marks] The robot has a limited power budget. Without the sensors attached to the circuit the robot already draws 850mA from the power supply. Given that the current drawn by the robot cannot exceed 1000mAh explain how the 5 additional infra-red sensors could be used. [2 Marks] Glitches in the sensor circuits sometimes result in an incorrect logic level being read by the robots control software. This will lead to bad behaviour of the robot. 1) Suggest an algorithm that could be used to increase the confidence of a sensor read to help reduce the probability of the robot behaving badly. [1 Mark] ii) With the use of a flowchart and a written discussion explain how the algorithm suggested for Question 2 C) part i) will work. [8 Marks] Figure 1.1 shows a simple maze of 9 squares with the target square shaded red. A maze solving robot indicated by the blue square will start from the bottom left-hand comer. ‘The robot gives priority to the forward direction. Initially the robot is facing east as shown by the red arrow in Figure 1.1 Torget square Figure 1.1: Layout of 3x3 maze ‘What you need to do: ‘+ Pull off Appendix A from the Test paper and attach this to your test solutions at the end of your test. Using the exhaustive Lee's algorithm Navigate the maze layout shown in Figure 1.1. ‘+ Use the maze maps provided to show the path of travel as the robot solves, the maze. ‘+ Inthe first maze map show the Lees numbers for an empty map Le. before the robot has moved. ‘+ For each move of the robot use a separate maze map. Clearly indicate the walls currently detected and the correct Lee's numbers as the robot moves from square to square. ‘+ Make sure that you clearly indicate the current position of the robot using a circle in each maze map and draw all the wall lines discovered up to that point. [15 Marks] Appendix A: Empty Maze Maps for Question 1 3. A robot has two main circuits named ‘Circuit’ and ‘Circuit2’. Circuit 1 drives two unipolar stepper motors. The stepper motors need a 12 Volt supply rail to achieve full torque. The coil windings within each stepper ‘motor have a coil resistance of 750. In full torque operation 2 windings of the stepper motor are energised at the same time. Circuit 2 contains a micro-controller unit, sensor circuits and a pattern generation chip for the motor driver. Circuit 2 is a low-power circuit. Cirouit 2 requires a 5 Volt power supply rall. When active the micro-controller draws approximately 100mA, the sensors in total draw 100mA and the pattern generator chip draws 20mA. The 12 volt and 5 volt power supply rails are to be supplied by a single AA cell battery pack. A LM7805 linear voltage regulator will be used to help implement the supply rails needed. a) Sketch and carefully label a block diagram for the circuit described above. Use a rectangle to represent circuit 1 and circuit 2. Your diagram should clearly show where the LM7805 linear voltage regulator chip will be placed in the circuit. The diagram should also show the voltage levels and the current drawn by each part of the circuit. [6 Marks} ) For this question use the answer to Question 3 a) to inform your answer and assume that the ambient temperature is 22°C. Show all working. Using the information provided about the LM7805 linear voltage regulator in Appendix B calculate the running temperature of the M7806 linear voltage regulator and carefully explain if heat sink is required. [4 Marks} ©) If 1.5V AA battery cells are used for the power source how many would you need and would you connect them in parallel or series? [2 Marks} 4) Through experimentation it is found that the chosen 1.5 Volt battery cells have a rated capacity of 2700mAh for a load of 0.8 ohms. Will these batteries be able to power the circuit described above for 2 hours? Show all your working. [3 Marks] 4. An MBED board is used control the speed and distance travelled by a robot. The robot is propelled using a wheel on each side of the robot. Each wheel is, driven by an identical stepper motor. The robot uses a L297 pattern generation chip to produce the phase waveforms that will drive the motors. The microcontroller software will have to supply two signals to the L297 chip to control the motors. These are a speed signal in the form of a square wave and a direction signal. The speed signal controls the number of steps per second. For example if the square wave has a frequency of 10 Hz then there will be 10 steps of the motor per second. The direction signal Is a logic level. When the direction signal is 0 Volts the motor will turn counter clockwise and when the direction signal is 5 volts the motor will tum clockwise. Assume that the radius of each wheel is 10/x cm and that the motor stepping angle is 1.8°C. a) Calculate the number of steps that will be required to move the robot 106m forward. [2 Marks] b) Calculate the stepping frequency required to move 10cm in 1second. [1 Mark] ¢) Write a short commented MBED program that will make the robot move forward by 10cm in approximately 1 second and then stop. Assume that the stepper motors can operate in their stop/start region of operation. [12 Marks] AA A2 Without any sensors attached a robot demand’s 0.5A of current from a power supply. i) Four additional infra-red sensors are now attached to the robot. If each sensor demands an extra 100 mA of current when fully on calculate the worst-case current that will be drawn from the power supply. [3 Marks] ii) Given that the maximum specified output current of the power supply is 0.65A suggest and explain how the 4 additional infra-red sensors could be used. (5 Marks] A Light Emitting Diode LED is to be turned on by a micro-controller. The micro-controller pin used provides 3.3 volts when it is a Logic 1 and 0 volts when it is Logic 0. At a specified (desired) current the LED emits light at a maximum luminosity. Given that the LED has a forward voltage of 2.1 volts and the desired quiescent current is 21mA, draws a carefully labelled schematic of the circuit required showing all components and there values. [6 Marks} Viewing Angle Draxing i) A luminous intensity of 110x10° candela is emitted by an LED when its current is 15mA. Using the "Viewing Angle” chart in Figure 1, calculate the expected luminous intensity that will be observed when the LED is viewed at an angle of 10 degrees away from the vertical. (2 Marks} 3 Three infra-red (|-R) sensors are positioned next to each other to provide a sensor pattem that will inform the next state encoder of a state machine. Discuss three solutions that could be used to reduce effects of ambient noise and/or interfering signals so as to increase the repeatability, accuracy andlor reliability of the sensor pattern read [10 Marks] A4 An asserted low switch is attached to a micro-controller as shown in Figure 2 below. Vda Pull-up resistor Figure 2: mechanical sensor attached to pin D2 of a micro-controller i) Explain the purpose of the “Pull-Up resistor’ in the circuit shown in Figure 2. [2 Marks] ii) Carefully sketch a voltage Vs time graph from 0 seconds to 10 seconds for pin D2 of the micro-controller. Assume that at 0 seconds the mechanical sensor is not asserted (not pressed) and that between the time of 3 seconds to 6 seconds it is asserted (pressed) [5 Marks] iii) Using a Capacitor, modify the circuit in Figure 2 so that issues related to contact bounce are reduced. 11 Markl AS SELENOISW A tesistive load R. is connected to a digital output pin of a micro- controller. It is expected that when the digital output pin is Logic True that the voltage output on the pin will be 5 Volts. However upon measuring the voltage on the output pin it is found that the voltage on the pin is lower than the expected voltage. i) Explain why the measured voltage on the output pin is lower than the expected 5 volts. [2 Marks] ii) Given that when the load resistance is 1000 the output voltage on the pin is 2.5 volts, calculate the output resistance of the pin itself. [2 Marks] University of Westminster Page 2|3 AG Suggest an algorithm that could be used to increase the confidence and repeatability of a digital sensor read operation. [2 Marks] A7 ALPC1768 MBED board is used to generate a PWM signal with a period of 1ms and a duty cycle of 65%. i) Sketch the Voltage Vs Time graph of the PWM waveform described above between time 0 seconds and 4ms. (3 Marks} ji) _ Write MBED code that will generate the PWM signal described. [6 Marks] ‘A8 — How many serially connected 1.5V AA battery cells are required to produce a supply voltage of 12 volts? [2 Marks] AQ — Two AA cell batteries are connected in parallel. If Each cell provides 1.2 volts and has a capacity of 3400mAh, Calculate the total voltage and the total capacity provided by this combination of batteries. [4Marks} ‘Comment on the electrical safety of using batteries in parallel. [4 Marks} 2. An autonomous robot uses 5 infra-red proximity sensors to detect walls either side to help it navigate through an IEEE micro-mouse maze. Each of these sensors will draw 100mA from the power supply. a) The sensors will be subject to interference signals and ambient noise sources. Explain 2 solutions that could be used to reduce the effects of ambient noise. and interference. [4 Marks] b) The robot has a limited power budget. Without the sensors attached to the circuit the robot already draws 850mA from the power supply. Given that the current drawn by the robot cannot exceed 1000mAh explain how the 5 additional infra-red sensors could be used. [2 Marks] c) Glitches in the sensor circuits sometimes result in an incorrect logic level being read by the robots control software. This will lead to bad behaviour of the robot. i) Suggest an algorithm that could be used to increase the confidence of a sensor read to help reduce the probability of the robot behaving badly. [1 Mark] ii) With the use of a flowchart and a written discussion explain how the algorithm suggested for Question 2 C) part i) will work. [8 Marks] A robot has two main circuits named ‘Circuit’ and ‘Circuit2’ Circuit 1 drives two unipolar stepper motors. The stepper motors need a 12 Volt supply rail to achieve full torque. The coil windings within each stepper motor have a coil resistance of 750. In full torque operation 2 windings of the stepper motor are energised at the same time. Circuit 2 contains a micro-controller unit, sensor circuits and a pattern generation chip for the motor driver. Circuit 2 is a low-power circuit. Circuit 2 requires a 5 Volt power supply rail. When active the micro-controller draws approximately 100mA, the sensors in total draw 100mA and the pattern generator chip draws 20mA. The 12 volt and 5 volt power supply rails are to be supplied by a single AA cell battery pack. A LM7805 linear voltage regulator will be used to help implement the supply rails needed. a) Sketch and carefully label a block diagram for the circuit described above. Use a rectangle to represent circuit 1 and circuit 2. Your diagram should clearly show where the LM7805 linear voltage regulator chip will be placed in the circuit. The diagram should also show the voltage levels and the current drawn by each part of the circuit, [6 Marks} b) For this question use the answer to Question 3 a) to inform your answer and assume that the ambient temperature is 22°C. Using the information provided about the LM7805 linear voltage regulator in ‘Appendix B calculate the running temperature of the LM7805 linear voltage regulator and carefully explain if a heat sink is required. Show all working. [4 Marks] ©) If 1.5V AA battery cells are used for the power source how many would you need and would you connect them in parallel or series? [2 Marks] d) Through experimentation it is found that the chosen 1.5 Volt battery cells have a rated capacity of 2700mAh for a load of 0.8 ohms. Will these batteries be able to power the circuit described above for 2 hours? Show all your working. [3 Marks] 4, An MBED board is used control the speed and distance travelled by a robot. The robot is propelled using a wheel on each side of the robot. Each wheel is driven by an identical stepper motor. The robot uses a L297 pattern generation chip to produce the phase waveforms that will drive the motors. The microcontroller software will have to supply two signals to the L297 chip to control the motors. These are a speed signal in the form of a square wave and a direction signal. The speed signal controls the number of steps per second. For example if the square wave has a frequency of 10 Hz then there will be 10 steps of the motor per second. The direction signal is a logic level. When the direction signal is 0 Volts the motor will turn counter clockwise and when the direction signal is 5 volts the motor will turn clockwise. Assume that the radius of each well is 10/x cm and the stepping angle is 1.8°. a) Calculate the number of steps that will be required to move the robot 10cm forward. [2 Marks] b) Calculate the stepping frequency required to move 10cm in 1second. [1 Mark] c) Write a short commented MBED program that will make the robot move forward by 10cm in approximately 1 second and then stop. Assume that the stepper motors can operate in their stop/start region of ‘operation. [12 Marks] PART A: (60 Marks) A4— The circuit in Figure 1a below contains two LEDs, a DC power source and a resistor. The DC power source in Figure 1a is 6 volts. =| 2 cYWNY : eu . "O UES Figure 1a: LED circuit Figure 1b: LED viewing angle chart i) Explain the purpose of the resistor R in Figure 1a. [2 Marks] ii) Ifthe ‘Forward Voltage’ of each LED in Figure 1a is 1.8 volts and the required current to achieve the maximum luminous intensity of the LED is 18mA, calculate the value for the resistor R that will achieve maximum luminous intensity. [4 Marks] iii) A luminous intensity of 180x10° candela is emitted by each LED when 18mA is flowing through the circuit. Using the “Viewing Angle” chart in Figure 1b, calculate the expected luminous intensity that will be observed when the LEDs is viewed at an angle of 30 degrees away from the vertical [2 Marks] iv) Ad A3 Discuss the application of the Viewing Angle chart with respect to the sensor configuration as used in your maze solving robot solution. [3 Marks} A robot has a limited power budget. Without any sensors attached to the robot 850mA of current is drawn from the power supply. i) Given that 5 additional infra-red sensors are attached to the robot and that each sensor requires 50mA to operate, calculate the worst- case total amount of current that will be drawn from the power supply. [3 Marks] Given that the maximum specified output current of the power supply is 1000mAh suggest and explain how the 5 additional infra-red sensors could be used. [5 Marks] An autonomous robot uses 6 infra-red proximity sensors which look down under a wing to detect the tops of walls underneath the wing. In fact the sensors provide information to the robot to help it navigate through an IEEE micro-mouse maze. For this question it is assumed that the sensors will be subject to interference sources and ambient noise sources. Discuss three solutions that could be used to reduce the effects of ambient noise and/or interfering signals so as to increase the repeatability, accuracy and/or reliability of the sensors. [10 Marks} 4 Amechanical sensor (switch) is attached to a micro-controller as shown in Figure 2 below. Nod Pull-up resistor Figure 2: mechanical sensor attached to pin D2 of a micro-controller i) _ Is the mechanical sensor asserted high or asserted low? [1 Mark] ii) Explain the purpose of the “Pull-Up resistor” in the circuit shown in Figure 2. [2 Marks] ili) Carefully sketch a voltage Vs time graph from 0 seconds to 10 seconds for pin D2 of the micro-controller. Assume that at 0 seconds the mechanical sensor is not asserted (not pressed) and that between the time of 3 seconds to 6 seconds it is asserted (pressed). [5 Marks] iv) A mechanical switch such as the one used in Figure 2 can result in the voltage on pin D2 swinging erratically between 0 volts and Vdd volts until the mechanical contacts of the switch have finally settled down. This erratic state of the switch is due to “Contact Bouncing” and could lead to erroneous sensor readings resulting in a robots controller entering an incorrect state. Using a carefully labelled and sketched diagram, illustrate how and where you might place a capacitor in the circuit of Figure 2 to help alleviate this problem. [2 Marks] v) Explain how the capacitor used in question A.4 part iv) will supress the erratic voltage jumps that result whilst the switch is in its “Contact Bouncing” state. [3 Marks] AS Induced electrical noise, sudden spikes in current demand and unstable electrical contacts can result in electrical glitches which may result in an incorrect sensor reading being input to a robots control algorithm, Such a glitch could then lead to unpredictable behaviour of the robot. i) For a digital sensor suggest an algorithm that could be used to increase the confidence of the sensor reading(s) and thus help reduce the probability of the robot behaving badly. [1 Mark] ji) With the use of a flowchart and a written discussion explain the operation of the algorithm suggested for Question A.5 part i). [8 Marks] A — The code in Figure 3 below outputs a signal on pin 21 of an MBED board. SELENOISW University of Westminster Page 6|15 # include “mbed.h” PwmOut PWM1(p21); int main() { PWM1 period(0.010); PWM1=0.8; while (1) { wait(2); + Figure 3: waveform generation code i) Look at the code in Figure 3 above, Now carefully sketch the Voltage Vs Time graph between 0 seconds and 40ms for the waveform generated on pin 21. [3 Marks} ii) Most modern micro-controllers have the ability to generate Pulse Width Modulation (PWM) signals. Briefly explain the application of this ability. [2 Marks] AT Ayoung engineer attaches a resistive load R, to a digital output pin of a micro-controller. It is expected that when the digital output pin is Logic True that the voltage output on the pin will be 3.3 Volts. However upon measuring the voltage on the output pin it is found that the voltage on the pin is lower than the expected voltage. i) Explain why the measured voltage on the output pin is lower than the expected 3.3 volts. [2 Marks] ii) Given that when a load resistance of 1000 is attached to the pin that the measured voltage output from the pin is 3volts calculate the output resistance of the pin. [2 Marks] PART B: (20 Marks) BA Figure 4 shows a simple maze of 9 squares with the target square shaded red. A maze solving robot indicated by the blue square will start from the bottom left-hand corner. The robot gives priority to the forward direction. Initially the robot is facing north as shown by the red arrow in Figure 4. ‘Target square Figure 4: Layout of 3x3 maze What you need to do: Pull off Appendix A from the Test paper and attach this to your test solutions at the end of your test. Using the exhaustive Lee's algorithm Navigate the maze layout shown in Figure 4. Use the maze maps provided to show the path of travel as the robot solves the maze. In the first maze map show the Lees numbers for an empty map i.e. before the robot has moved. For each move of the robot use a separate maze map. Clearly indicate the walls currently detected and the correct Lee’s numbers as the robot moves. from square to square. Make sure that you clearly indicate the current position of the robot using a circle in each maze map and draw all the wall lines discovered up to that point. PART C: (answer only 1 question in this section either C.1 or C.2) C1 (20 Marks) A robot has two main circuits named ‘Circuit’ and ‘Circuit2. * Circuit 1 is a high power driver circuit that drives two unipolar stepper motors. The current drawn by circuit 1 is 450mA, * Circuit 2 is a low-power circuit that contains a micro-controller unit, sensor circuits and two L297 pattem generation chips one for each motor driver. The total current drawn by circuit 2 is 80mA Circuit 1 requires a 9 volt power supply and Circuit 2 requires a 3.3 volt power supply. The 9 volt and 3.3 volt power supply rails are to be supplied by a single ‘AA call battery pack. A LM7805 linear voltage regulator will be used to help implement the supply rails needed a) For this question assume that the ambient temperature is 21°C. Show all working. Using the information provided about the LM7805 linear voltage regulator in Appendix B calculate the running temperature of the LM7805 linear voltage regulator and carefully explain if a heat sink is required. [5 Marks] b) If 4.5V AA battery cells are used for the power source how many cells would you need and would you connect them in parallel or series? [3 Marks} ) Through experimentation it is found that the chosen 4.5 Volt battery cells have a rated capacity of 2700mAh for a test load of 2 ohms. Will these batteries be able to power the robot described above for 2 hours? Show all you're working. [4 Marks] d) Four AA cell batteries are connected in parallel as shown in Figure 5. Each cell provides 3.6 volts and has a capacity of 3400mAh. Figure 5: Battery pack consisting of four batteries Calculate the total voltage and the total capacity provided by this combination of batteries. [4Marks] ii) Comment on the electrical safety of using batteries in parallel as shown in Figure 5. [4 Marks} C.2 (20 Marks) ‘An MBED board is used control the speed and distance travelled by a robot. The robot is propelled using a wheel on each side of the robot. Each wheel is driven by an identical stepper motor. ‘The robot uses a L297 patter generation chip to produce the phase waveforms that will drive the motors. The microcontroller software will have to supply two signals to the L297 chip to control the motors. These are a speed signal in the form of a square wave and a direction signal The speed signal controls the number of steps per second. For example if the square wave has a frequency of 10 Hz then there will be 10 steps of the motor per second. The direction signal is a logic level. When the direction signal is 0 Volts the motor will tum counter clockwise and when the direction signal is 5 volts the motor will turn clockwise. Assume that the radius of each wheel is 2.5/x cm and that the motor stepping angle is 1.8°C. a) Calculate the number of steps that will be required to move the robot 20cm forward. [2 Marks] b) °) Calculate the stepping frequency required to move 10cm in 2 seconds. [2 Marks] Write a short fully commented MBED program using good software engineering practice that will make the robot: = move forward by 2.5cm in approximately 1 second + spin left for 30 motor steps © move in reverse for a further 10 steps. Assume thal the stepper motors can operate in their stopstrt region of operation. [16 Marks]

You might also like