WIP - hardware and software for motorizing a (very specific) manually controlled standing desk. I doubt it's useful to anyone but me, but it may contain some interesting bits of code.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

494 lines
11 KiB

EESchema Schematic File Version 4
EELAYER 26 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L MCU_Microchip_ATmega:ATmega328-AU U1
U 1 1 5D753A97
P 5100 3400
F 0 "U1" H 4200 2050 50 0000 C CNN
F 1 "ATmega328-AU" H 4200 2150 50 0000 C CNN
F 2 "Housings_QFP:TQFP-32_7x7mm_Pitch0.8mm" H 5100 3400 50 0001 C CIN
F 3 "http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega328_P%20AVR%20MCU%20with%20picoPower%20Technology%20Data%20Sheet%2040001984A.pdf" H 5100 3400 50 0001 C CNN
1 5100 3400
1 0 0 -1
$EndComp
$Comp
L Connector_Generic:Conn_01x04 J2
U 1 1 5D753B7C
P 9400 2250
F 0 "J2" H 9479 2242 50 0000 L CNN
F 1 "SSD1306" H 9479 2151 50 0000 L CNN
F 2 "Pin_Headers:Pin_Header_Straight_1x04_Pitch2.54mm" H 9400 2250 50 0001 C CNN
F 3 "~" H 9400 2250 50 0001 C CNN
1 9400 2250
1 0 0 -1
$EndComp
$Comp
L Connector_Generic:Conn_02x03_Odd_Even J1
U 1 1 5D753DE7
P 9350 3100
F 0 "J1" H 9400 3417 50 0000 C CNN
F 1 "PROG" H 9400 3326 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x03_Pitch2.54mm" H 9350 3100 50 0001 C CNN
F 3 "~" H 9350 3100 50 0001 C CNN
1 9350 3100
1 0 0 -1
$EndComp
Text GLabel 9150 3000 0 50 Input ~ 0
MISO
Text GLabel 9150 3100 0 50 Input ~ 0
SCK
Text GLabel 9150 3200 0 50 Input ~ 0
RST
Text GLabel 9650 3100 2 50 Input ~ 0
MOSI
$Comp
L power:+5V #PWR08
U 1 1 5D753EAE
P 9750 3000
F 0 "#PWR08" H 9750 2850 50 0001 C CNN
F 1 "+5V" H 9765 3173 50 0000 C CNN
F 2 "" H 9750 3000 50 0001 C CNN
F 3 "" H 9750 3000 50 0001 C CNN
1 9750 3000
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR09
U 1 1 5D753EEB
P 9750 3200
F 0 "#PWR09" H 9750 2950 50 0001 C CNN
F 1 "GND" H 9755 3027 50 0000 C CNN
F 2 "" H 9750 3200 50 0001 C CNN
F 3 "" H 9750 3200 50 0001 C CNN
1 9750 3200
1 0 0 -1
$EndComp
Wire Wire Line
9650 3000 9750 3000
Wire Wire Line
9650 3200 9750 3200
$Comp
L power:+5V #PWR04
U 1 1 5D753F2B
P 8900 2350
F 0 "#PWR04" H 8900 2200 50 0001 C CNN
F 1 "+5V" H 8915 2523 50 0000 C CNN
F 2 "" H 8900 2350 50 0001 C CNN
F 3 "" H 8900 2350 50 0001 C CNN
1 8900 2350
-1 0 0 1
$EndComp
$Comp
L power:GND #PWR06
U 1 1 5D753F42
P 9100 2450
F 0 "#PWR06" H 9100 2200 50 0001 C CNN
F 1 "GND" H 9105 2277 50 0000 C CNN
F 2 "" H 9100 2450 50 0001 C CNN
F 3 "" H 9100 2450 50 0001 C CNN
1 9100 2450
1 0 0 -1
$EndComp
Wire Wire Line
9100 2450 9200 2450
Wire Wire Line
9200 2350 8900 2350
Text GLabel 9200 2150 0 50 Input ~ 0
SDA
Text GLabel 9200 2250 0 50 Input ~ 0
SCL
$Comp
L power:+5V #PWR01
U 1 1 5D7540FC
P 900 900
F 0 "#PWR01" H 900 750 50 0001 C CNN
F 1 "+5V" H 915 1073 50 0000 C CNN
F 2 "" H 900 900 50 0001 C CNN
F 3 "" H 900 900 50 0001 C CNN
1 900 900
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR03
U 1 1 5D754134
P 900 1450
F 0 "#PWR03" H 900 1200 50 0001 C CNN
F 1 "GND" H 905 1277 50 0000 C CNN
F 2 "" H 900 1450 50 0001 C CNN
F 3 "" H 900 1450 50 0001 C CNN
1 900 1450
1 0 0 -1
$EndComp
$Comp
L power:PWR_FLAG #FLG02
U 1 1 5D754186
P 900 1450
F 0 "#FLG02" H 900 1525 50 0001 C CNN
F 1 "PWR_FLAG" H 900 1624 50 0000 C CNN
F 2 "" H 900 1450 50 0001 C CNN
F 3 "~" H 900 1450 50 0001 C CNN
1 900 1450
1 0 0 -1
$EndComp
$Comp
L power:PWR_FLAG #FLG01
U 1 1 5D7541A4
P 900 900
F 0 "#FLG01" H 900 975 50 0001 C CNN
F 1 "PWR_FLAG" H 900 1073 50 0000 C CNN
F 2 "" H 900 900 50 0001 C CNN
F 3 "~" H 900 900 50 0001 C CNN
1 900 900
-1 0 0 1
$EndComp
$Comp
L Device:C C3
U 1 1 5D754323
P 3900 2350
F 0 "C3" H 3785 2304 50 0000 R CNN
F 1 "100nF" H 3785 2395 50 0000 R CNN
F 2 "Capacitors_SMD:C_1206" H 3938 2200 50 0001 C CNN
F 3 "~" H 3900 2350 50 0001 C CNN
1 3900 2350
-1 0 0 1
$EndComp
$Comp
L power:GND #PWR07
U 1 1 5D75441A
P 3350 2750
F 0 "#PWR07" H 3350 2500 50 0001 C CNN
F 1 "GND" H 3355 2577 50 0000 C CNN
F 2 "" H 3350 2750 50 0001 C CNN
F 3 "" H 3350 2750 50 0001 C CNN
1 3350 2750
1 0 0 -1
$EndComp
$Comp
L Device:C C2
U 1 1 5D7545D2
P 3350 2350
F 0 "C2" H 3235 2304 50 0000 R CNN
F 1 "100nF" H 3235 2395 50 0000 R CNN
F 2 "Capacitors_SMD:C_1206" H 3388 2200 50 0001 C CNN
F 3 "~" H 3350 2350 50 0001 C CNN
1 3350 2350
-1 0 0 1
$EndComp
$Comp
L Device:C C1
U 1 1 5D75463E
P 2800 2350
F 0 "C1" H 2685 2304 50 0000 R CNN
F 1 "10uF" H 2685 2395 50 0000 R CNN
F 2 "Capacitors_Tantalum_SMD:CP_Tantalum_Case-D_EIA-7343-31_Reflow" H 2838 2200 50 0001 C CNN
F 3 "~" H 2800 2350 50 0001 C CNN
1 2800 2350
-1 0 0 1
$EndComp
Wire Wire Line
2800 2200 3100 2200
Wire Wire Line
3900 2200 4500 2200
$Comp
L power:+5V #PWR02
U 1 1 5D754E27
P 3100 1400
F 0 "#PWR02" H 3100 1250 50 0001 C CNN
F 1 "+5V" H 3115 1573 50 0000 C CNN
F 2 "" H 3100 1400 50 0001 C CNN
F 3 "" H 3100 1400 50 0001 C CNN
1 3100 1400
1 0 0 -1
$EndComp
Connection ~ 3100 2200
Wire Wire Line
3100 2200 3350 2200
Wire Wire Line
5200 1900 5200 1750
Wire Wire Line
5200 1750 5100 1750
Wire Wire Line
5100 1750 5100 1900
Wire Wire Line
5100 1750 3100 1750
Connection ~ 5100 1750
Wire Wire Line
3900 2500 3900 2650
Wire Wire Line
3900 2650 3350 2650
Wire Wire Line
3350 2650 3350 2750
Wire Wire Line
3350 2500 3350 2650
Connection ~ 3350 2650
Wire Wire Line
2800 2500 2800 2650
Wire Wire Line
2800 2650 3350 2650
NoConn ~ 4500 2400
NoConn ~ 4500 2500
Wire Wire Line
3100 1400 3100 1750
Connection ~ 3100 1750
Wire Wire Line
3100 1750 3100 2200
$Comp
L Device:C C4
U 1 1 5D75696A
P 6800 2700
F 0 "C4" V 7052 2700 50 0000 C CNN
F 1 "33pF" V 6961 2700 50 0000 C CNN
F 2 "Capacitors_SMD:C_1206" H 6838 2550 50 0001 C CNN
F 3 "~" H 6800 2700 50 0001 C CNN
1 6800 2700
0 -1 -1 0
$EndComp
$Comp
L Device:C C5
U 1 1 5D756A0E
P 6800 3150
F 0 "C5" V 7052 3150 50 0000 C CNN
F 1 "33pF" V 6961 3150 50 0000 C CNN
F 2 "Capacitors_SMD:C_1206" H 6838 3000 50 0001 C CNN
F 3 "~" H 6800 3150 50 0001 C CNN
1 6800 3150
0 -1 -1 0
$EndComp
$Comp
L power:GND #PWR010
U 1 1 5D756A8A
P 7100 3300
F 0 "#PWR010" H 7100 3050 50 0001 C CNN
F 1 "GND" H 7105 3127 50 0000 C CNN
F 2 "" H 7100 3300 50 0001 C CNN
F 3 "" H 7100 3300 50 0001 C CNN
1 7100 3300
1 0 0 -1
$EndComp
Wire Wire Line
6950 3150 7100 3150
Wire Wire Line
7100 3150 7100 3300
Wire Wire Line
6950 2700 7100 2700
Wire Wire Line
7100 2700 7100 3150
Connection ~ 7100 3150
$Comp
L Device:Crystal XTAL1
U 1 1 5D756FAB
P 6500 2950
F 0 "XTAL1" V 6550 3300 50 0000 R CNN
F 1 "16 Mhz" V 6450 3350 50 0000 R CNN
F 2 "Crystals:Crystal_HC49-U_Vertical" H 6500 2950 50 0001 C CNN
F 3 "~" H 6500 2950 50 0001 C CNN
1 6500 2950
0 -1 -1 0
$EndComp
Wire Wire Line
6500 2800 6500 2700
Wire Wire Line
6500 2700 6650 2700
Wire Wire Line
6500 3100 6500 3150
Wire Wire Line
6500 3150 6650 3150
Wire Wire Line
5700 2800 6050 2800
Wire Wire Line
6050 2800 6050 2700
Wire Wire Line
6050 2700 6500 2700
Connection ~ 6500 2700
Wire Wire Line
5700 2900 6050 2900
Wire Wire Line
6050 2900 6050 3150
Wire Wire Line
6050 3150 6500 3150
Connection ~ 6500 3150
Text GLabel 5700 3500 2 50 Input ~ 0
SDA
Text GLabel 5700 3600 2 50 Input ~ 0
SCL
Text GLabel 5700 2500 2 50 Input ~ 0
MOSI
Text GLabel 5700 2600 2 50 Input ~ 0
MISO
Text GLabel 5700 2700 2 50 Input ~ 0
SCK
$Comp
L Device:R R1
U 1 1 5D758534
P 6250 3550
F 0 "R1" H 6320 3596 50 0000 L CNN
F 1 "10k" H 6320 3505 50 0000 L CNN
F 2 "Resistors_SMD:R_0603" V 6180 3550 50 0001 C CNN
F 3 "~" H 6250 3550 50 0001 C CNN
1 6250 3550
1 0 0 -1
$EndComp
$Comp
L power:+5V #PWR011
U 1 1 5D7585CC
P 6250 3400
F 0 "#PWR011" H 6250 3250 50 0001 C CNN
F 1 "+5V" H 6265 3573 50 0000 C CNN
F 2 "" H 6250 3400 50 0001 C CNN
F 3 "" H 6250 3400 50 0001 C CNN
1 6250 3400
1 0 0 -1
$EndComp
Wire Wire Line
5700 3700 6250 3700
Text GLabel 6450 3700 2 50 Input ~ 0
RST
Wire Wire Line
6250 3700 6450 3700
Connection ~ 6250 3700
$Comp
L power:GND #PWR012
U 1 1 5D75920D
P 5100 4900
F 0 "#PWR012" H 5100 4650 50 0001 C CNN
F 1 "GND" H 5105 4727 50 0000 C CNN
F 2 "" H 5100 4900 50 0001 C CNN
F 3 "" H 5100 4900 50 0001 C CNN
1 5100 4900
1 0 0 -1
$EndComp
$Comp
L Switch:SW_Push SW1
U 1 1 5D759C24
P 6250 1600
F 0 "SW1" H 6250 1885 50 0000 C CNN
F 1 "SW_Push" H 6250 1794 50 0000 C CNN
F 2 "SMD-BUTTON:SW4-SMD-5.2X5.2X1.5MM" H 6250 1800 50 0001 C CNN
F 3 "" H 6250 1800 50 0001 C CNN
1 6250 1600
1 0 0 -1
$EndComp
$Comp
L Switch:SW_Push SW2
U 1 1 5D759CB0
P 6250 2000
F 0 "SW2" H 6250 2285 50 0000 C CNN
F 1 "SW_Push" H 6250 2194 50 0000 C CNN
F 2 "SMD-BUTTON:SW4-SMD-5.2X5.2X1.5MM" H 6250 2200 50 0001 C CNN
F 3 "" H 6250 2200 50 0001 C CNN
1 6250 2000
1 0 0 -1
$EndComp
$Comp
L Switch:SW_Push SW3
U 1 1 5D759CF0
P 6250 2400
F 0 "SW3" H 6250 2685 50 0000 C CNN
F 1 "SW_Push" H 6250 2594 50 0000 C CNN
F 2 "SMD-BUTTON:SW4-SMD-5.2X5.2X1.5MM" H 6250 2600 50 0001 C CNN
F 3 "" H 6250 2600 50 0001 C CNN
1 6250 2400
1 0 0 -1
$EndComp
Wire Wire Line
5700 2200 5800 2200
Wire Wire Line
5800 2200 5800 1600
Wire Wire Line
5800 1600 6050 1600
Wire Wire Line
5700 2300 5850 2300
Wire Wire Line
5850 2300 5850 2000
Wire Wire Line
5850 2000 6050 2000
Wire Wire Line
5700 2400 6050 2400
$Comp
L power:GND #PWR05
U 1 1 5D75B49B
P 6550 2400
F 0 "#PWR05" H 6550 2150 50 0001 C CNN
F 1 "GND" H 6555 2227 50 0000 C CNN
F 2 "" H 6550 2400 50 0001 C CNN
F 3 "" H 6550 2400 50 0001 C CNN
1 6550 2400
1 0 0 -1
$EndComp
Wire Wire Line
6450 2400 6550 2400
Wire Wire Line
6450 2000 6550 2000
Wire Wire Line
6550 2000 6550 2400
Connection ~ 6550 2400
Wire Wire Line
6450 1600 6550 1600
Wire Wire Line
6550 1600 6550 2000
Connection ~ 6550 2000
NoConn ~ 5700 3100
NoConn ~ 5700 3200
NoConn ~ 5700 3300
NoConn ~ 5700 3400
NoConn ~ 5700 4100
NoConn ~ 5700 4200
NoConn ~ 5700 4300
NoConn ~ 5700 4400
NoConn ~ 5700 4500
NoConn ~ 5700 4600
$Comp
L Connector_Generic:Conn_01x04 J3
U 1 1 5D7651C5
P 6500 4000
F 0 "J3" H 6650 4050 50 0000 L CNN
F 1 "L298" H 6580 3951 50 0000 L CNN
F 2 "Pin_Headers:Pin_Header_Straight_1x04_Pitch2.54mm" H 6500 4000 50 0001 C CNN
F 3 "~" H 6500 4000 50 0001 C CNN
1 6500 4000
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR014
U 1 1 5D765563
P 6150 4200
F 0 "#PWR014" H 6150 3950 50 0001 C CNN
F 1 "GND" H 6155 4027 50 0000 C CNN
F 2 "" H 6150 4200 50 0001 C CNN
F 3 "" H 6150 4200 50 0001 C CNN
1 6150 4200
1 0 0 -1
$EndComp
Wire Wire Line
5700 3900 6300 3900
Wire Wire Line
5700 4000 6300 4000
$Comp
L power:+5V #PWR013
U 1 1 5D767927
P 6000 4100
F 0 "#PWR013" H 6000 3950 50 0001 C CNN
F 1 "+5V" H 6015 4273 50 0000 C CNN
F 2 "" H 6000 4100 50 0001 C CNN
F 3 "" H 6000 4100 50 0001 C CNN
1 6000 4100
-1 0 0 1
$EndComp
Wire Wire Line
6000 4100 6300 4100
Wire Wire Line
6150 4200 6300 4200
$EndSCHEMATC