]> www.fi.muni.cz Git - bike-lights.git/commitdiff
pins.txt: different expected pin-out, design notes
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sun, 2 Sep 2012 21:50:40 +0000 (23:50 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Sun, 2 Sep 2012 21:50:58 +0000 (23:50 +0200)
pins.txt

index efb35b7b04a7490dccee9f3415ef31dc5e814ec2..a1121ea99fd3c6e91593fb6962f3443e13574f35 100644 (file)
--- a/pins.txt
+++ b/pins.txt
@@ -1,25 +1,57 @@
-     (MOSI/DI/SDA/!OC1A/PCINT8) PB0 MOSI,SW2    SENSE2+ PA0 (ADC0/DI/SDA/PCINT0)
-          (MISO/DO/OC1A/PCINT9) PB1 MISO,PWM1  SENSE23- PA1 (ADC1/DO/PCINT1)
-   (SCK/USCK/SCL/!OC1B/PCINT10) PB2 SCK,LED2    SENSE3+ PA2 (ADC2/INT1/USCK/SCL/PCINT2)
-                 (OC1B/PCINT11) PB3 PWM2       --free-- PA3 (AREF/PCINT3)
+     (MOSI/DI/SDA/!OC1A/PCINT8) PB0 MOSI,LED1   SENSE1+ PA0 (ADC0/DI/SDA/PCINT0)
+          (MISO/DO/OC1A/PCINT9) PB1 MISO,PWM1  SENSE12- PA1 (ADC1/DO/PCINT1)
+   (SCK/USCK/SCL/!OC1B/PCINT10) PB2 SCK,LED2    SENSE2+ PA2 (ADC2/INT1/USCK/SCL/PCINT2)
+                 (OC1B/PCINT11) PB3 PWM2            SW2 PA3 (AREF/PCINT3)
                                 VCC                     AGND
                                 GND                     AVCC
-(ADC7/!OC1D/CLKI/XTAL1/PCINT12) PB4 LED1        SENSE1+ PA4 (ADC3/ICP0/PCINT4)
- (ADC8/OC1D/CLKO/XTAL2/PCINT13) PB5 PWM3        AMBIENT PA5 (ADC4/AIN2/PCINT5)
-         (ADC9/INT0/T0/PCINT14) PB6 SW1      VBAT_SENSE PA6 (ADC5/AIN0/PCINT6)
-          (ADC10/RESET/PCINT15) PB7 RST      VB_SEN_ENA PA7 (ADC6/AIN1/PCINT7)
-
-
-PWM1 - rear spotlight
-PWM2 - read wide light
-PWM3 - front light
-SENSE1
-SENSE2
-SENSE3
-Ambient sense
-Analog-on
-SW1 - on/off button
-SW2 - temporary light boost
-LED1
-LED2
+(ADC7/!OC1D/CLKI/XTAL1/PCINT12) PB4 !PWM3        SENSE5 PA4 (ADC3/ICP0/PCINT4)
+ (ADC8/OC1D/CLKO/XTAL2/PCINT13) PB5 PWM3        SENSE3+ PA5 (ADC4/AIN2/PCINT5)
+         (ADC9/INT0/T0/PCINT14) PB6 SW1        SENSE34- PA6 (ADC5/AIN0/PCINT6)
+          (ADC10/RESET/PCINT15) PB7 RST         SENSE4+ PA7 (ADC6/AIN1/PCINT7)
+
+
+Lights:
+1 - front light
+2 - rear spotlight
+3 - rear LED strip
+
+PWM1
+PWM2
+PWM3
+SENSE1 - light 1
+SENSE2 - light 2
+SENSE3 - light 3
+SENSE4 - ambient light sensor
+SENSE5 - battery voltage sense
+SW1 - mode switch
+SW2 - temporary light boost or whatever
+LED1 - speedometer illumination LED
+LED2 - status LED
+
+
+ADC
+single-ended resolution:
+0.00107 V
+differential resolution 8x gain:
+0.00013 V
+differential resolution 32x gain:
+0.000036 V
+analog input resistance 100 MOhm
+
+Battery sense
+range 5-15 V
+1.5M..15k
+cca 10  uA @15V
+    3.3 uA  @5V
+
+Ambient light sense
+20 lx -- cca 333 kOhm
+200 lx -- cca 35 kOhm
+
+lx:
+1lx == full moon
+400 lx == sunset/sunrise
+10 klx == full daylight
+
+need probably 1-1k lux scale