power systems
DESCRIPTION
Power Systems. Team Name: Common Ground. Team Leader. Cody Morr. Hardware Specialist. Justin Winterhalter. Kausthub Rao. Software Specialist. Greg Zick. Team Assistant. Overview. Problem Statement Hardware Requirements/concepts interface Software Design Code Summary References - PowerPoint PPT PresentationTRANSCRIPT
TEAM G.O.A.T.ZPOWER SYSTEM
TEAM MEMBERS
TEAM LEADER: TYLER LEAKESOFTWARE SPECIALIST: HEATHER AHLIN
HARDWARE SPECIALIST: HUNTER DETWILERASSISTANT: JONATHAN PATZ
1
OVERVIEW
• Problem statement• Requirements/ constraints
• Hardware• Components• Interface
• Software• Code for initialization, operation
• Q&A
2
PROBLEM STATEMENT: POWER SYSTEM
• Distribute the appropriate voltage to each component on the Smart Car
3
REQUIREMENTS/CONSTRAINTS
• Supply 5v going to cold fire, steering servo, line sensor, etc.• Supply 3.3v going to wireless X BEE
chip (for future use)• Supply raw voltage to motor • Calculate battery level and display it
through RGB LEDs • Shut system down when it drops
below 6.1v.
• Schedule• Size of breadboard• Safety• Don’t operate battery below
6V
4
• Components• Ni MH 7.2 V Battery• LM2940 LDO (Low Drop Out) Regulator ~5V• MCP1702 LDO (Low Drop Out) Regulator ~3.3V• Pololu 12A Chip• Two 4.7kΩ Resistors(Voltage divider) • Capacitors (22µF, .47µF, two 1µF)• Potentiometer
5
HARDWARE
BATTERY
• 7.2v Ni MH• 3000 mAh• Six 1.2 V cells in pack • The max voltage for the batteries can vary. Our battery
maxed out around 8.6V but others may go up to almost 10V
6
LM2940 LDO REGULATOR
• This regulator is used to drop the voltage to 5V.• Vin Range = 6.25V(5.5V
min) – 26V• Make sure the pins are
correctly connected
7
LM2940 LDO REGULATOR
• Without capacitors the voltage will read around 8V.• 8v will damage the
firebird 32 processor• After the capacitors are
added you will get around 5V for Vout. 8
MCP1702 LDO REGULATOR
• This regulator is used to drop the voltage to 3.3V.• This regulator is only
used for the Wireless communication
9
MCP1702 LDO REGULATOR
• Two 1µF capacitors are added on each side.• Notice that the Vout leads to
nowhere, it will be used for future applications.(wireless comm.)
10
• PIN 9, VOUT is raw voltage from Battery• PIN1, INA will receive 5V
11
Pololu 12A Chip
A-D CONVERSION
• Two 4.7kΩ Resistors• Jumper Wire from VREFH to
+5V
12
SOFTWARE
• #DEFINE’s• ADC Initialization• RGB LED Initialization• Main
• ADC• Battery Voltage• Decision
• Functions
13
#DEFINE
• #define redLED PTED_PTED3 • #define grnLED PTED_PTED2
14
ADC INITIALIZATION
• Using ADC Channel 11APCTL2 |= APCTL2_ADPC11;
// disable PTD4 as GPIO (enable for A/D)
15
RGB LED INITIALIZATION
• I/O Ports to initialize:// RGB ENABLEPTGDD |= PTGDD_PTGDD1_MASK; // (2U) make PTG1 an output for RGB LED
PTGD_PTGD1 = 1; // Set G1 high to enable the RGB LED (+)// RED LEDPTEDD |= PTEDD_PTEDD3_MASK; // (8U) make PTE3 an output for redLEDPTED_PTED3 = 1; // Turn OFF red LED (Neg. True Logic)// GREEN LEDPTEDD |= PTEDD_PTEDD2_MASK; // (4U) make PTE2 an output for grnLEDPTED_PTED2 = 1; // Turn OFF green LED (Neg. True Logic)
16
17
MAIN
Void main()
ADCSC1 = 11; // start conv. on ch11WAITFOR(ADCSC1_COCO); // wait for conversion
completeint BTxTEN = ADCR*100/1024;// (Variable) Battery level x
10… 1
8
BTXTEN
• Battery Voltage multiplied by ten.• Vin = 0V-5V, representing
0V-10V• ADCR = 0-210 = 1023• BTxTEN = ADCR *100/1024 • 7.2V ~ 72, 6.6V ~ 66, 6.1V
~ 63 19
MAIN, DECISION
if (BTxTEN >= 72) // Battery Above 7.2V grnLED(); // Show Greenelse if (BTxTEN >= 66) // Battery Above 6.6V ylwLED(); // Show Yellowelse if (BTxTEN >= 63) // Battery Above 6.1V redLED(); // Show Redelse // Battery Below 6.1V SHUTDOWN(); // FAIL SAFE
20
GREEN LED
// GREEN LED - Ensure only green LED is litvoid grnLED(void)
grnLED = 0; //Turn on green LEDredLED = 1; //Turn off RED LED
21
RED LED
// RED LED – Ensure only the red LED is litvoid redLED(void)
grnLED = 1; //Turn off green LEDredLED = 0; //Turn on RED LED
22
YELLOW LED
// YELLOW LED – MIX Green and Red LEDs to make Yellowvoid ylwLED(void)
grnLED = 0; //Turn on green LEDredLED = 0; //Turn on RED LED
23
EMERGENCY SHUT DOWN
// SHUTDOWN MOTORvoid SHUTDOWN(void)
PTED_PTED3 = 1; //Turn off RED LEDMotorDC = 0; //Shut down Motor under 6.1VTPM2SC = 0x00; //Turn off TPM2 as fail safe
24
SUMMARY
• We showed you how to supply 5v going to cold fire, steering servo, line sensor, etc.• Supply 3.3v going to wireless X BEE chip • Supply raw voltage to motor • Calculate battery level and display it through RGB LEDs • Shut system down when it drops below 6.1v
25
REFERENCES
• "Voltage Dividers." Voltage Dividers. N.p., n.d. Web. 07 Mar. 2017.• Mcf51Jm128, Document Number:, and 6/2009 Rev. 3. Document Number:
MCF51JM128 (n.d.): n. page. Web.• "CET360 Microprocessor Engineering." CET360 Microprocessor Engineering. N.p.,
n.d. Web. 07 Mar. 2017.• In. LM2940/LM2940C 1A Low Dropout Regulator (n.d.): n. page. Web.• Inc, Microchip Technology. MCP1702 250 MA Low Quiescent Current LDO Regulator
(n.d.): n. page. Web.• "Embedded Systems Week." IEEE Embedded Systems Letters 2.3 (2010): 96. Web.
26
REFRENCES
• "ThreadX and the ColdFire Microprocessor." Real-Time Embedded Multithreading Using ThreadX (2009): 439-88. MCF51JM128 Reference Manual. J Sumey, 2 June 1995. Web. 10 Mar. 2017.• Sumey, J. Firebird 32 Nano Schematic. Digital image.
Http://www.aet.calu.edu. N.p., n.d. Web.• Sumey, J. "SC Lab 3." SC Lab 3. N.p., 2 Mar. 2017. Web. 08 Mar.2017• "Voltage Dividers." Voltage Dividers. N.p., n.d. Web. 08 Mar. 2017.
27
QUESTIONS!
28