Download presentation
Presentation is loading. Please wait.
Published byOctavia McBride Modified over 9 years ago
1
Bike Buddy Group 15Sponsored By: Ari Nacius Progress Energy Nowook Park Ethan Pemble Nick Quinlan
2
Introduction Bike Buddy uses a portable AC generator to harness power from pedaling. It attaches to the bicycle and displays riding information. Speed (mph) and direction Lat./Long. coordinates Ambient temperature Power generated by pedaling (Watts) It also supplies power to USB devices. [picture] Speed: 18 MPH Dir:28.53˚N,-81.20 ˚W T:85 ˚F P=4.2W
3
Goals & Motivation Current portable bicycle generators are primarily used to power headlights. Our goal is to expand on possible applications of this alternative energy source by providing additional features to the bike rider. Provide accurate data to the user while efficiently powering all systems with the AC generator.
4
Power Flow Diagram AC generator DC converter Battery charger 6v regulator5v regulator3.3v regulator LCDTemp sensorµCGPS Battery switcher USB Pedal the bike Power System Display System Li- Ion
5
Bike Buddy Power System
6
Specifications & Requirements Power PeripheralOperating voltage Expected maximum current drawPower requirement Microcontroller3.3v19 mA62.7 mW LCD6v220 mA1320 mW GPS3.3v70 mA231 mW Temp sensor5v1 mA5 mW USB port5v500 mA2500 mW Total Power4.12 W
7
Building the Generator Initially we wanted to design our own custom generator. Instead of spending time on designing a generator we decided to concentrate on the capabilities of the LCD and sensing functions. Because it was vital to provide constant power for the rest of the project to work, we thought it best to purchase one instead. Example of a home-made electric generator
8
Choosing a Generator Voltage (volts) Current (milliamps) Power (watts) Cost (USD) Current Source 6V400mA2.4W$63.70AC Voltage (V) Current (mA) Power (W) Cost (USD) Current Source 12V500mA6W$16.99AC Pros: Less energy loss to friction Sleek design Cons: More expensive Custom Wheel Needed Low Power Output Pros: Higher Power Output Cheap Cons: Energy Loss in wet or muddy conditions Produces buzzing noise
9
Generator {Voltage vs Speed Graph of gen output}
10
Power Supply AC/DC conversion No need for a step-up or step-down transformer. Full Bridge rectifier using 4 schottky diodes for low voltage drops. A 50V 2200 uF electrolytic capacitor is used to minimize the ripple before regulation. A voltage regulator (LM317) regulates the voltage to a constant 10V. Formulas to find the average DC Voltage from the generator When V rms = 30V, V dc = (30V x 1.414)/3.14 = 13.5V,
11
Battery CharacteristicsLead AcidNickel CadmiumNickel Metal HydrideLithium Ion Energy/Weight (Wh/kg) 30-4040-6030-80100-160 Energy/Size (Wh/L) 60-7550-150140-300250-360 Power/Weight (W/kg) 180150250-1000250-340 Charge/Discharge Efficiency 50-92%70-90%66%80-90% Energy/Price (Wh/USD) —2.752.8 - 5 Self-discharge Rate (per mo.) 3-20%10%30%8% (21°C) Cycle Durability 500-8002,000500-1,0001,200 Nominal Cell Voltage 2.105V1.24V1.2V3.6V Nominal Capacity 7200 mAh900 mAh700 mAh4800 mAh Size 151x98x98mm73x29x52mm51x48x22mm127x80x43mm Weight 3940g210g135g678g Battery Characteristics
12
Specifications & Requirements Lithium-Ion BatteryPack (2 Cell) Capacity: 1400mAh Voltage: 7.4 V (8.4 V pk) Dimensions: 51mm x 38.1mm x 19mm Weight: 2.5 oz Maximum Charge Current: 1C or 1.4A Maximum Current Draw: 0.87 A
13
Li-Ion Battery Charger ADP3810 (Analog Devices) MAX1758 (Maxim) MCP73842 (Microchip) Input Voltage -0.4V to 18V-0.3V to 30V-0.3V - 12V Max Charge Current 1.2A1.5A2A Operational Temp 40 C to +85 C Maximum Power Dissipation 500mW762mW120mW Battery Temp monitoring No Yes Packaging SO-8SSOP-28MSOP-8 Charger Comparison Table
14
Li-Ion Battery Charger MCP73842 manufactured by Microchip to charge an 8.4V Li-Ion battery. Programmable Charge Current. Programmable Safety Charge Timers. Preconditioning of Deeply Depleted Cells. Automatic End-of-Charge Control. Continuous Cell Temperature monitoring Automatic power-down when input power is removed to prevent battery discharge. Ctimer = 0.033uF T precon = (C timer /0.1uF) X 1 hr = 19.8 mns T fast-charge = (C timer /0.1uF) X 1.5 hrs = 29.7 mns T term = (C timer /0.1uF) X 3 hrs = 59.4 mns Typical Charge Profile
15
Charge Circuit Flow Diagram
16
Li-Ion Battery Charger (cont’d) For a maximum charge current of 2A, R SENSE is calculated using the formula in the datasheet. R SENSE = 120mV / 2A = 60m The charger turns off when the battery reaches a temperature limits of 10 F and 80 F. Those temperature limits are set using two resistors Rt1 and Rt2 Rt1 = (2 x 10 x 100)/(100 - 10) = 22 Ohms Rt2 = (2 x 10 x 100)/(100 - 3 x 10) = 28.57 Ohms Practical values: Rt1 = 22.22 Ohms Rt2 = 29.00 Ohms *maufacturer-recommended design configurationation.
17
Battery Switcher 2 comparators to monitor and compare the battery voltage levels with a reference voltage of 3.5V. 6 p-channel mosfets used to switch the batteries when the source battery reaches 3.5V. A zener diode is used to keep the reference voltage at a constant 3.5V. The 100uF capacitor is to ensure that the output doesn’t change during the switch.
18
Battery Switcher One battery powers the unit while the other is being charged. Switch happens when the battery powering the unit reaches 3.5V. 3.5V is the minimum input voltage range of switching regulators that power the subsystems. The power source switch does not affect the operation of the unit. Switcher Profile
19
Switching Regulators Vref=1.5 V, 10kΩ ≤R1≤ 500kΩ R2=R1*(Vout/Vref-1) For Vout=6V: R1=10kΩ, R2=30kΩ
20
The MAX608 low-voltage step-up controller operates from a 1.8V to 16.5V input voltage range. Pulse-frequency-modulation (PFM) control provides high efficiency at heavy loads, while using only 85μA (typical) when operating with no load. In addition, a logic-controlled shutdown mode reduces supply current to 2μA typical. The output voltage is factory-set at 5V or can be adjusted from 3V to 16.5V with an external voltage divider. The MAX608 operates in “bootstrapped” mode only (with the chip supply, OUT, connected to the DC-DC output). The two bootstrap capacitors and are employed on both sides of inductor to provide gate voltage to high side input switch through high side driver in any mode of operation. This allows the regulator to work in all three modes of operation without different external components or configurations depending on the mode. Switching Regulators
21
Bike Buddy Power Sensor
22
Current Sensor The ACS756 current sensor needs a single +3 to+5V supply. Ultra-low power loss: 130uOhm internal resistance. 13kVRMS isolation voltage between terminals 4/5 and pins 1/2/3. Output voltage proportional to AC and DC current. 20mV/A output sensitivity. Nearly Zero magnetic hysteresis
23
Analog-to-Digital Converter The ADC pins have a voltage range of 0V to 5V. But since the internal reference voltage is 2.56V, our input voltage must not reach that level. We use a voltage divider to prevent the attempted maximum voltage from the generator from reaching 2.56V on the ADC pins. Voltage interval = 2.56V / 1023 = 0.0025V At every 2.5mV increment, a binary data is recorded and stored in a data register. Since we want the recorded voltage to be accurate to 1/10 of a volt, we select resistor values that will increment the stored binary data at every 1/10 of a volt. 0.0025 = (1/10)(R2/(R2+R1)) 1/40 = R2/(R1+R2) R1 = 39K, R2 = 1K
24
Analog-to-Digital Converter (cont’d) The ADC is used to measure the power generated by the generator by monitoring the voltage and current. The current sensor output is connected to a similar voltage divider as the one on the right for the battery. Since we don’t want to drain the batteries, we use a to isolate the batteries from the voltage divider.
25
Bike Buddy Display System
26
Small and power efficient Peripheral sensors to provide information to the rider: Speed and direction Power generated Global position Ambient temperature Time of day Display System Goals Temp sensor µC GPS 12:37 PM 67 °F Lat: 28.60265 NE 6.73 MPH Lon: -81.23185 Generating 3.7 Watts Power sensor
27
Liquid Crystal Display Serial Graphic LCD from sparkfun Provides simple 1-wire serial interface with built- in commands and character display. 128x64 pixel space Software-scalable backlighting for indoor/outdoor use Operates at 6v, average current draw ~125 mA (with full backlighting)
28
GPS Receiver: LS20031 The LS20031 GPS unit has an embedded antenna and simple TTL serial interface. Built-in battery stores satellite positions for rapid startup. 3.3v @ 41 mA
29
Microcontroller Atmel ATmega128 L Input/Output53 pins Memory 128KB FLASH 4KB EEPROM 4KB internal SRAM Analog-to-Digital10 bit, 8 channel Peripheral Interface2 USART, TWI, SPI Clock SpeedUp to 8 MHz Operating Voltage2.7 – 5.5 v Expected Active Current~20 mA
30
Development Board: STK-300 RS-232 port for USART communication. Simple USB programmer for quick prototyping. Provides 8 buttons and LEDs for testing. External 8 MHz crystal provided for source clock. Includes C compiler (WinAVR) and AVR Studio 4 development environment.
31
Software Overview Initialize Serial Devices Retrieve Power Sensor Data (ATD) Retrieve GPS Data (USART1) Update Display (USART0) Power Switch ON Retrieve Temperature Data (TWI) Retrieve Sensor Data Stand-by Timer overflow? Format numbers for display
32
ATmega128 Timer Timer1: 16-bit timer System clock rate: 7.3728 MHz Prescaler: divide-by-1024 Tic: 7.2 kHz Overflow: 9.1 ms Desired period: 300ms or 2730 overflows The sensor update loop is driven by a timer, and executed every 300ms. The screen will update roughly 3 times per second.
33
C1 = C2 = 15 nF USART on the ATmega128L Liquid Crystal Display Serial DeviceUSART0 Transmit pinPE1 (#3) Receive pinPE0 (unused) Baud rate9600 bps Frame Structure 8N1 GPS Receiver Serial DeviceUSART1 Transmit pinPD3 (#28) Receive pinPD2 (#27) Baud rate9600 bps Frame Structure 8N1 USART is dependent on the internal system clock and is highly sensitive. To reduce data error rates, an external system clock rated at 7.3728 MHz is chosen. Both devices (the LCD and the GPS receiver) are configured to transmit at 9600 bps with 8 data bits, 1 stop bit, no parity bit.
34
Drawing Native Commands LCD Commands CommandByteArgumentDescription Clear Screen0x00— Clears all written pixels. Reverse Mode0x12— Green-on-black pixel display. Splash Screen0x13— Toggles sparkfun logo at boot. Set Backlight0x020:100d The number is decimal. Set Baud Rate0x07“1:6” Retained during power cycling. CommandByteArgumentDescription Set X Coordinate0x180:127d Moves cursor for text generator. Set Y Coordinate0x190:63d Moves cursor for text generator. Set/Reset Pixel0x10x, y, 0:1d 0: set (x,y) pixel, 1: reset (x,y) pixel Draw Line0x02x1, y1, x2, y2, 0:1d (x1,y1) to (x2,y2), 0: draw, 1: erase Draw Circle0x07x, y, r, 0:1d (x,y) center, r: radius, 0: draw, 1: erase Draw Box0x0Fx1, y1, x2, y2, 0:1d (x1,y1) to (x2,y2), 0: draw, 1: erase Erase Block0x05x1, y1, x2, y2 Entire box is erased. Wrapper functions int lcd_clearScreen() int lcd_setBacklight(int) int lcd_setPixel(int,int) int lcd_setX(int) int lcd_setY(int) int lcd_drawLine(int,int,int,int) int lcd_drawCircle(int,int,int) int lcd_drawBox(int,int,int,int) int lcd_erase(int,int,int,int)
35
Parsing GPS Information The only NMEA record used in the design is the Recommended Minimum Specific GNSS Data (RMC), which provides UTC time, date, latitude, longitude, speed over ground, and course over ground. NameExampleUnitsDescription Message ID $GPRMC RMC protocol header UTC Time 053740.000 hhmmss.sss Status A A = data valid or V=data not valid Latitude 2503.6319 ddmm.mmmm N/S Indicator N N=north or S=south Longitude 12136.0099 dddmm.mmmm E/W Indicator E E=east or W=west Speed over ground 2.69 KnotsTrue Course over ground 79.65 Degrees Date 100106 ddmmyy Magnetic variationDegrees Variation senseE=east or W=west (not shown) Mode A A=autonomous, D=DGPS, E=DR Checksum *53 End of message termination $GPRMC,053740.000,A,2503.6319,N,12136.0099,E,2.69,79.65,100106,,,A*53
36
Bike Buddy Temperature Sensor
37
DS1820 Unique 1-Wire® Interface Requires Only One Port Pin for communication Requires No External Components Can Be Powered from Data Line Power Supply Range is 3.0V to 5.5V Measures Temperatures from -55°C to +125°C (-67°F to +257°F) ±0.5°C Accuracy from -10°C to +85°C Converts Temperature to 12-Bit Digital Word in 750ms
38
ParameterSymbolConditionMinTypMaxUnits Supply VoltageV DD Local Power3.0-5.5V Pull-up Supply Voltage V PU Parasite Power3.0 - 5.5 V Local Power3.0VDD Sink CurrentILIL VI/O =0.4V4.0--mA Standby Current I DDS --7501000nA Active CurrentI DD VDD=5V-11.5mA DQ Input Current I DQ --5-µAµA
39
DS1625 Data is read from / written via a 2-wire serial interface (open drain I / O lines) Temperature measurements require no external components Measures Temperatures from -55°C to +125°C (-67°F to +257°F) Converts temperature to digital word in 500 ms Temperature is read as a 9-bit value (two byte transfer) ParameterSupply Voltage SymbolV DD Min4.5 Typ5.0 Max5.5 UnitsV
40
Pin 1 SD A Data input/output pin for 2-wire serial communication port Pin 2 SC L Clock input/output pin for 2-wire serial communication port Pin 3 T out Thermostat output. Active when temperature exceeds TH; will reset when temperature falls below TL Pin 4 GN D Ground pin Pin 5 A2 Address input pin Pin 6 A1 Address input pin Pin 7 A0 Address input pin Pin 8 V DD Supply voltage 5V input power pin DS1625
41
Temperature Digital Output (Binary) Digital output (Hex) +125°C01111101 000000007B00h +25°C00011001 000000001900h +1/2°C00000000 100000000080h +0°C00000000 007Fh -1/2°C11111111 10000000FF80h -25°C11100111 00000000E700h -55°C11001001 00000000C900h MSBLSB 1110011100000000 = -25°C Temperature is represented in the DS1625 in terms of a 0.5°C LSB. Not Using, Remains 0
42
Don’t know if I wanna add this Temperature = TEMP_READ -.25 +(Count per clock-count remain)/count per clock
43
Two Wire Interface (TWI) A popular serial peripheral interface bus TWI stands for Two Wire Interface and for most parts this bus is identical to I²C. The name TWI was introduced by Atmel and other companies to avoid conflicts with trademark issues related to I²C. -More flexible than SPI (Serial Peripheral Interface ) -Master and slave modes supported -7-bit slave address -Bidirectional, open-drain bus (device pulls down, resistors pull up) -Two wires, SCL, (clock) and SDA (data) Typical TWI bus configuration
44
Two Wire Interface A TWI transmission consists of Start condition An address packet consisting of - Read/Write indication and -Slave acknowledge, ( SLA+RW) One or more data packets Stop condition A Start condition initiates a transmission by a master. Between Start and Stop conditions, the bus is busy and no other masters should try to initiate a transfer. A Start condition is signaled by a falling edge of SDA while SCL is high.
45
Two Wire Interface Address packet -Address packet is 9 bits long -MSB first -Address “000 0000” is reserved for broadcast mode -7 address bits (driven by master) -1 read/write control bit (driven by master) -1 acknowledge bit (driven by addressed slave)
46
Two Wire Interface Data packet -All data packets are 9 bits long -MSB first -One data byte plus an acknowledge -During a transfer, Master generates SCL, Receiver acknowledges -Acknowledge (ACK): Slave pulls down SDA in the 9th SCL cycle -Not Acknowledge (NACK): Slave does not pull down SDA in 9th cycle
47
STOP condition A Stop condition initiates a transmission by a master. A Stop condition is signaled by a rising edge of SDA while SCL is high. SDA SCL
48
USB
49
WHY USB? USB, became really popular nowadays to connect computer peripherals. Not only for Data Source, but Power Source A USB controller require to power one unit load, which is around 100mA. such as fan, light, charging the batteries of mp3 players and cell phones.
50
ParameterRequirement DC voltage, high-power port4.75V to 5.25V DC voltage, low-power port4.75V to 5.25V Maximum quiescent current (low power, suspend mode) 500µA Maximum quiescent current (high power, suspend mode) 2500µA Maximum allowable Input capacitance (load side) 10µF Minimum required output capacitance (host side) 120µF ±20% Maximum allowable inrush charge Into load 50µC
52
Devices Powering Low Power Bus powered Devices High Power Bus powered Devices 100ma ( MAX) 500ma ( MAX) 100ma @power up
53
Pin No.Signal Cable Color 1+ VCCRed 2Data -White 3Data +Green 4GNDBlack
54
Extra project Cell Type Charge Time 700mAh NiCd1.5h 1100mAh NiCd2.5h 1600mAh NiMH3.5h 2000mAh NiMH4.5h 2500mAh NiMH5.5h
55
Budget Product/PartVendor/ServiceActual Cost ATmega128L dev board (STK300)Kanda.com$104.00 Serial graphic LCD 128x64Sparkfun.com$43.83 Bike generator 12V 6WBike World USA$16.99 LS20031 GPS receiverSparkfun.com$60.00 2x 2-cell Li-Ion Battery packsPowerizer.com$40.00 Temperature sensor circuitDigikey/Mouser$20.00 USB port (female)Sparkfun.com$4.00 Power supply circuitDigikey/Mouser? Battery charger circuitDigikey/Mouser? Battery switching circuitDigikey/Mouser? Packaging/Misc. HardwareSkycraft, …? Extra cost?? Total
56
Progress Research Hardware Design Software Design Parts purchased Programming Building Testing Overall 95% 90% 80% 85% 10% 5% 55%
57
Milestones FebMar Feb. 19 Complete part acquisition Feb. 26 Assemble prototypes of hardware systems Feb. 27-28 Successfully implement USART devices Mar. 13-14 Battery circuit built and tested Mar. 10 Complete basic software control flow Mar. 20-21 Finish programming Mar. 27-28 Build and test power supply Apr. 3-4 Assemble unit and attach to bicycle for final testing Apr
58
Bike Buddy Group 15
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.