Bike Lamp Controller Hardware
(Back to the bike lamp project)
This bike lamp involves some logic as well as inter-IC communication. As such, an AVR 8-bit microcontroller based controller board was developed. The controller board is responsible of controlling the dimming and flashing of the leds through PWM, monitoring the battery capacity through the use of the gas gauge as well as responding to the user's feedback. The ATMega168 was choosen for it's ease of use and it's IO capabilities. In order to provide the best possible user interface, a BQ2013 gas gauge from Texas Instruments was added to the circuit.
Design Considerations
While designing the bike lamp controller the following criteria had to be taken into account:
- Low power
- Wide input voltage range
- Low cost
- Expandability
The use of the ATMega168 is especially well suited for this as it can achieve very low power consumption through the use of the sleep functions and has plenty of inputs and outputs for expandability.
Things to reconsider
Although a lower power version (such as the ATMega168V) could have been chosen, the gain seemed margin for the use. It is, however, something to consider for production. Another thing to reconsidered is to add proper decoupling (cap and inductor) on AVcc to provide smoother ADC. After the work on the switching regulator is done maybe I'd move the drivers on the board too.
Schematic & PCB Files
You can download the Eagle CAD files here or view the latest version in the browser.
Note: The current version of the circuit uses the LT3080 LDO voltage regulator which is not well suited for this application! This will be replaced with a TLV1117 in future revisions.
If you use the circuit as it is currently described, Vin should not exceed around 6v'''''
Schematics
Parts List
Part Value Device Package Library Sheet C1 1µF C-USC1206 C1206 rcl 1 C2 2.2µF C-USC1206 C1206 rcl 1 C3 0.1µF C-USC1206 C1206 rcl 1 C4 10µF C-EUC1206 C1206 rcl 1 C5 0.1µF C-EUC1206 C1206 rcl 1 C6 0.1µF C-EUC1206 C1206 rcl 1 C7 220µF 20V CPOL-EUE3.5-8 E3,5-8 rcl 1 C9 10µF C-EUC1206 C1206 rcl 1 C10 10µF C-EUC1206 C1206 rcl 1 IC1 MEGA168-P MEGA8-P DIL28-3 atmel 1 IC2 BQ2013H BQ2013HSOIC16 SO-16 texas 1 IC3 LT3080 LT3080 SOT223 mlalonde 1 JP1 LED_Back PINHD-1X3 1X03 pinhead 1 JP2 PD5 PINHD-1X2 1X02 pinhead 1 JP3 ISP PINHD-2X3 2X03 pinhead 1 JP4 SW1 PINHD-1X2 1X02 pinhead 1 JP5 PD3 PINHD-1X2 1X02 pinhead 1 JP6 PD2 PINHD-1X2 1X02 pinhead 1 JP7 RS232 PINHD-1X2 1X02 pinhead 1 JP8 LED_Front PINHD-1X3 1X03 pinhead 1 JP9 PINHD-1X3 1X03 pinhead 1 JP10 PINHD-1X3 1X03 pinhead 1 JP11 PC0 PINHD-1X2 1X02 pinhead 1 JP12 PINHD-1X3 1X03 pinhead 1 JP13 PC1 PINHD-1X2 1X02 pinhead 1 JP14 PINHD-1X3 1X03 pinhead 1 JP15 PD4 PINHD-1X2 1X02 pinhead 1 JP16 PINHD-1X3 1X03 pinhead 1 JP17 PINHD-1X4 1X04 pinhead 1 LED1 LED5MM LED5MM led 1 LED2 LED5MM LED5MM led 1 R1 50 R-US_M1206 M1206 rcl 1 R2 10K R-US_0204/2V 0204V rcl 1 R3 50 R-US_M1206 M1206 rcl 1 R4 10K R-US_0204/2V 0204V rcl 1 R5 50 R-US_R1206 R1206 rcl 1 R6 10K R-US_M1206 M1206 rcl 1 R7 10K R-US_M1206 M1206 rcl 1 R8 2M7 R-US_M1206 M1206 rcl 1 R9 300 R-US_M1206 M1206 rcl 1 R10 10K R-US_M1206 M1206 rcl 1 R11 10K R-US_M1206 M1206 rcl 1 R12 50 R-US_M1206 M1206 rcl 1 R13 10K R-US_M1206 M1206 rcl 1 R14 100K R-US_M1206 M1206 rcl 1 R15 400K R-US_M1206 M1206 rcl 1 R16 100K R-US_M1206 M1206 rcl 1 R17 200 R-US_M1206 M1206 rcl 1 R18 200K R-US_M1206 M1206 rcl 1 R19 200K R-US_M1206 M1206 rcl 1 R20 200K R-US_M1206 M1206 rcl 1 R21 200K R-US_M1206 M1206 rcl 1 R22 10K R-US_M1206 M1206 rcl 1 R23 200K R-US_M1206 M1206 rcl 1 R24 200K R-US_M1206 M1206 rcl 1 R25 10K R-US_M1206 M1206 rcl 1 R26 4.7K R-US_M1206 M1206 rcl 1 R27 R-US_M1206 M1206 rcl 1 R28 R-US_M1206 M1206 rcl 1 R29 10K R-US_M1206 M1206 rcl 1 R30 100K R-US_0204/2V 0204V rcl 1 S1 10-XX B3F-10XX switch-omron 1 T1 2N2222 2N2222 TO18 transistor 1 T2 2N2222 2N2222 TO18 transistor 1 R0 0.0075 SHUNT STO220 mlalonde 1
(Back to top)


