X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=pins.txt;h=ae2b6f6a02c5b6e61769acbfa8be9ee3fdd95f57;hb=263c74238768b7288fe324ca6e23e07df99a6a25;hp=a1121ea99fd3c6e91593fb6962f3443e13574f35;hpb=b3d93dde4d924e88f3f3dfad03717eb579ec6ee3;p=bike-lights.git diff --git a/pins.txt b/pins.txt index a1121ea..ae2b6f6 100644 --- a/pins.txt +++ b/pins.txt @@ -4,7 +4,7 @@ (OC1B/PCINT11) PB3 PWM2 SW2 PA3 (AREF/PCINT3) VCC AGND GND AVCC -(ADC7/!OC1D/CLKI/XTAL1/PCINT12) PB4 !PWM3 SENSE5 PA4 (ADC3/ICP0/PCINT4) +(ADC7/!OC1D/CLKI/XTAL1/PCINT12) PB4 LED3 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) @@ -31,13 +31,28 @@ LED2 - status LED ADC single-ended resolution: -0.00107 V +0.00107 V .. 1.1 V differential resolution 8x gain: -0.00013 V +0.00013 V .. 0.1375 V +differential resolution 20 gain: +0.000054 .. 0.055 V differential resolution 32x gain: -0.000036 V +0.000036 .. 0.03438 V analog input resistance 100 MOhm +LED current sense, 0.033R sensing resistor: + min gain max gain + 20 mA => 0.00066 V 8x + 100 mA => 0.0033 V + 150 mA => 0.0050 V + 300 mA => 0.0099 V + 350 mA => 0.0116 V + 700 mA => 0.0231 V + 1000 mA => 0.0330 V 32x + 1500 mA => 0.0495 V 20x 0.0495 W + 2000 mA => 0.0660 V 8x 0.066 W + 3000 mA => 0.0990 V 8x 0.1 W + Battery sense range 5-15 V 1.5M..15k @@ -55,3 +70,10 @@ lx: need probably 1-1k lux scale +Photodiode: +5 V, 1M5 resistor + photodiode: voltage at the photodiode +darkness: 3.71 V => 4.31 MOhm +bathroom without lights, only outside lights: 3.68 V => 4.18 MOhm +kitchen light: 3.29 V => 2.89 MOhm +bathroom halogen lights 0.02 V => 6 KOhm +battery light: 0.01 V => 3 KOhm