Download presentation
Presentation is loading. Please wait.
Published byWinifred Miles Modified over 9 years ago
1
Bike Buddy Group 15 Sponsored By: Ari Nacius Progress Energy
Nowook Park Ethan Pemble Nick Quinlan
2
Introduction [picture]
Speed: 18 MPH Dir:28.53˚N, ˚W T:85 ˚F P=4.2W 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]
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 Power System Display System AC generator
Pedal the bike DC converter Battery switcher Battery charger 6v regulator 5v regulator 3.3v regulator Display System USB µC GPS LCD
5
Bike Buddy Power System
6
Specifications & Requirements
Power Peripheral Operating voltage Expected maximum current draw Power requirement Microcontroller 3.3v 19 mA 62.7 mW LCD 6v 220 mA 1320 mW GPS 70 mA 231 mW USB port 5v 500 mA 2500 mW Total Power 4.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 Pros: Higher Power Output Cheap Cons:
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 Voltage (volts) Current (milliamps) Power (watts) Cost (USD) Current Source 6V 400mA 2.4W $63.70 AC Voltage (V) Current (mA) Power (W) Cost (USD) Current Source 12V 500mA 6W $16.99 AC
9
Power Supply AC/DC conversion Formulas to find the average DC
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 Vrms = 30V, Vdc = (30V x 1.414)/3.14 = 13.5V
10
Battery Characteristics
Lead Acid Nickel Cadmium Nickel Metal Hydride Lithium Ion Energy/Weight (Wh/kg) 30-40 40-60 30-80 Energy/Size (Wh/L) 60-75 50-150 Power/Weight (W/kg) 180 150 Charge/Discharge Efficiency 50-92% 70-90% 66% 80-90% Energy/Price (Wh/USD) — 2.75 Self-discharge Rate (per mo.) 3-20% 10% 30% 8% (21°C) Cycle Durability 2,000 500-1,000 1,200 Nominal Cell Voltage 2.105V 1.24V 1.2V 3.6V Nominal Capacity 7200 mAh 900 mAh 700 mAh 4800 mAh Size 151x98x98mm 73x29x52mm 51x48x22mm 127x80x43mm Weight 3940g 210g 135g 678g
11
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
12
Li-Ion Battery Charger
Charger Comparison Table ADP (Analog Devices) MAX1758 (Maxim) MCP (Microchip) Input Voltage -0.4V to 18V -0.3V to 30V -0.3V - 12V Max Charge Current 1.2A 1.5A 2A Operational Temp 40C to +85C Maximum Power Dissipation 500mW 762mW 120mW Battery Temp monitoring No Yes Packaging SO-8 SSOP-28 MSOP-8
13
Li-Ion Battery Charger
Typical Charge Profile 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 Tprecon = (Ctimer/0.1uF) X 1 hr = 19.8 mns Tfast-charge = (Ctimer/0.1uF) X 1.5 hrs = 29.7 mns Tterm = (Ctimer/0.1uF) X 3 hrs = 59.4 mns
14
Charge Circuit Flow Diagram
15
Li-Ion Battery Charger (cont’d)
For a maximum charge current of 2A, RSENSE is calculated using the formula in the datasheet. RSENSE = 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)/( ) = 22 Ohms Rt2 = (2 x 10 x 100)/( x 10) = Ohms Practical values: Rt1 = Ohms Rt2 = Ohms *maufacturer-recommended design configurationation.
16
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.
17
Battery Switcher Switcher Profile
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
18
Switching Regulators Vref=1.5 V, 10kΩ ≤R1≤ 500kΩ R2=R1*(Vout/Vref-1)
For Vout=6V: R1=10kΩ, R2=30kΩ
19
Switching Regulators 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.
20
Bike Buddy Power Sensor
21
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
22
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 = V 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. = (1/10)(R2/(R2+R1)) 1/40 = R2/(R1+R2) R1 = 39K, R2 = 1K
23
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.
24
Bike Buddy Display System
25
Display System Goals NE Small and power efficient
Peripheral sensors to provide information to the rider: Speed and direction Power generated Global position Ambient temperature Time of day Lat: 12:37 PM Lon: 67 °F NE 6.73 MPH Generating 3.7 Watts µC Power sensor GPS
26
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)
27
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. 41 mA
28
Microcontroller Atmel ATmega128 L Input/Output 53 pins Memory
128KB FLASH 4KB EEPROM 4KB internal SRAM Analog-to-Digital 10 bit, 8 channel Peripheral Interface 2 USART, TWI, SPI Clock Speed Up to 8 MHz Operating Voltage 2.7 – 5.5 v Expected Active Current ~20 mA
29
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.
30
Software Overview Retrieve Sensor Data Initialize Serial Devices
Power Switch ON Retrieve Sensor Data Retrieve Power Sensor Data (ATD) Retrieve GPS Data (USART1) Retrieve Temperature Data (TWI) Format numbers for display Update Display (USART0) Timer overflow? Stand-by
31
ATmega128 Timer The sensor update loop is driven by a timer, and executed every 300ms. The screen will update roughly 3 times per second. Timer1: 16-bit timer System clock rate: MHz Prescaler: divide-by-1024 Tic: 7.2 kHz Overflow: 9.1 ms Desired period: 300ms or 2730 overflows
32
Liquid Crystal Display
USART on the ATmega128L USART is dependent on the internal system clock and is highly sensitive. To reduce data error rates, an external system clock rated at 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. C1 = C2 = 15 nF Liquid Crystal Display Serial Device USART0 Transmit pin PE1 (#3) Receive pin PE0 (unused) Baud rate 9600 bps Frame Structure 8N1 GPS Receiver Serial Device USART1 Transmit pin PD3 (#28) Receive pin PD2 (#27) Baud rate 9600 bps Frame Structure 8N1
33
LCD Commands Wrapper functions Native Commands Drawing
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) Command Byte Argument Description Clear Screen 0x00 — Clears all written pixels. Reverse Mode 0x12 Green-on-black pixel display. Splash Screen 0x13 Toggles sparkfun logo at boot. Set Backlight 0x02 0:100d The number is decimal. Set Baud Rate 0x07 “1:6” Retained during power cycling. Drawing Command Byte Argument Description Set X Coordinate 0x18 0:127d Moves cursor for text generator. Set Y Coordinate 0x19 0:63d Set/Reset Pixel 0x10 x, y, 0:1d 0: set (x,y) pixel, 1: reset (x,y) pixel Draw Line 0x02 x1, y1, x2, y2, 0:1d (x1,y1) to (x2,y2), 0: draw, 1: erase Draw Circle 0x07 x, y, r, 0:1d (x,y) center, r: radius, 0: draw, 1: erase Draw Box 0x0F Erase Block 0x05 x1, y1, x2, y2 Entire box is erased.
34
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. $GPRMC, ,A, ,N, ,E,2.69,79.65,100106,,,A*53 Name Example Units Description Message ID $GPRMC RMC protocol header UTC Time hhmmss.sss Status A A = data valid or V=data not valid Latitude ddmm.mmmm N/S Indicator N N=north or S=south Longitude dddmm.mmmm E/W Indicator E E=east or W=west Speed over ground 2.69 Knots True Course over ground 79.65 Degrees Date 100106 ddmmyy Magnetic variation Variation sense E=east or W=west (not shown) Mode A=autonomous, D=DGPS, E=DR Checksum *53 <CR><LF> End of message termination
35
Bike Buddy Temperature Sensor
36
Pull-up Supply Voltage
Parameter Symbol Condition Min Typ Max Units Supply Voltage VDD Local Power 3.0 - 5.5 V Pull-up Supply Voltage VPU Parasite Power Sink Current IL VI/O =0.4V 4.0 mA Standby Current IDDS 750 1000 nA Active Current IDD VDD=5V 1 1.5 DQ Input Current IDQ 5 µA
37
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) Parameter Supply Voltage Symbol VDD Min 4.5 Typ 5.0 Max 5.5 Units V
38
DS1625 Pin 1 SDA Pin 2 SCL Pin 3 Tout Pin 4 GND Pin 5 A2 Pin 6 A1
Data input/output pin for 2-wire serial communication port Pin 2 SCL Clock input/output pin for 2-wire serial communication port Pin 3 Tout Thermostat output. Active when temperature exceeds TH; will reset when temperature falls below TL Pin 4 GND Ground pin Pin 5 A2 Address input pin Pin 6 A1 Pin 7 A0 Pin 8 VDD Supply voltage 5V input power pin
39
Digital Output (Binary)
DS1625 MSB LSB 1 = -25°C Temperature Digital Output (Binary) Digital output (Hex) +125°C 7B00h +25°C 1900h +1/2°C 0080h +0°C 007Fh -1/2°C FF80h -25°C E700h -55°C C900h Temperature is represented in the DS1625 in terms of a 0.5°C LSB. Not Using, Remains 0
40
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
41
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.
42
Two Wire Interface Address packet -Address packet is 9 bits long
-MSB first -Address “ ” 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)
43
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
44
USB
45
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. USB has been become popular everywhere now , not only for the data source, but as power source
46
USB Types Parameter Requirement DC voltage, high-power port
4.75V to 5.25V DC voltage, low-power port 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
47
USB Powering
48
USB Specs Pin No. Signal Cable Color 1 + VCC Red 2 Data - White 3 Data + Green 4 GND Black Figure 3.22 shows demention and materials of female part of USB. It is most common type of USB, and it is rectangle shape. As it shown, it is small, it can be installed without limitation of space. USB port will be installed in the front side of the bike. This female part of USB will be covered with non-metalic materials to avoid any major or minor problems that could be occuer, and also protect it from outside circumstance.
49
Budget Product/Part Vendor/Service Actual Cost
ATmega128L dev board (STK300) Kanda.com $104.00 Serial graphic LCD 128x64 Sparkfun.com $100.00 Bike generator 12V 6W Bike World USA $16.99 LS20031 GPS receiver $60.00 2x 2-cell Li-Ion Battery packs Powerizer.com $40.00 Temperature sensor circuit Digikey/Mouser $20.00 USB port (female) $4.00 Power supply circuit $300.00 Battery charger circuit $100 Battery switching circuit Packaging/Misc. Hardware Skycraft, … $200 Extra cost $300 Total ~$1300
50
Milestones Feb Mar Apr Feb. 26 Assemble prototypes of hardware systems
Build and test power supply April 24 reBuild and retest power supply Mar Battery circuit built and tested Feb Mar Apr Feb Successfully implement USART devices Mar Finish programming Apr. 3-4 Assemble unit and attach to bicycle for final testing Feb. 19 Complete part acquisition Mar. 10 Complete basic software control flow
51
Bike Buddy Group 15
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.