initial commit

This commit is contained in:
2021-03-07 22:42:23 -08:00
commit bc48517da6
17 changed files with 81399 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*-bak

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "kicad-libs"]
path = kicad-libs
url = /home/salfter/git/kicad-libs

5
code/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch

7
code/.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}

39
code/include/README Normal file
View File

@@ -0,0 +1,39 @@
This directory is intended for project header files.
A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.
```src/main.c
#include "header.h"
int main (void)
{
...
}
```
Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.
In C, the usual convention is to give header files names that end with `.h'.
It is most portable to use only letters, digits, dashes, and underscores in
header file names, and at most one dot.
Read more about using header files in official GCC documentation:
* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html

46
code/lib/README Normal file
View File

@@ -0,0 +1,46 @@
This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into executable file.
The source code of each library should be placed in a an own separate directory
("lib/your_library_name/[here are source files]").
For example, see a structure of the following two libraries `Foo` and `Bar`:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
and a contents of `src/main.c`:
```
#include <Foo.h>
#include <Bar.h>
int main (void)
{
...
}
```
PlatformIO Library Dependency Finder will find automatically dependent
libraries scanning project source files.
More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html

14
code/platformio.ini Normal file
View File

@@ -0,0 +1,14 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:ATtiny1614]
platform = atmelmegaavr
board = ATtiny1614
framework = arduino

9
code/src/main.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include <Arduino.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}

11
code/test/README Normal file
View File

@@ -0,0 +1,11 @@
This directory is intended for PlatformIO Unit Testing and project tests.
Unit Testing is a software testing method by which individual units of
source code, sets of one or more MCU program modules together with associated
control data, usage procedures, and operating procedures, are tested to
determine whether they are fit for use. Unit testing finds problems early
in the development cycle.
More information about PlatformIO Unit Testing:
- https://docs.platformio.org/page/plus/unit-testing.html

View File

@@ -0,0 +1,128 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# Amplifier_Operational_TLV2372
#
DEF Amplifier_Operational_TLV2372 U 0 5 Y Y 3 L N
F0 "U" 0 200 50 H V L CNN
F1 "Amplifier_Operational_TLV2372" 0 -200 50 H V L CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
ALIAS LM358 AD8620 LMC6062 LMC6082 TL062 TL072 TL082 NE5532 SA5532 RC4558 RC4560 RC4580 LMV358 TS912 TSV912IDT TSV912IST TLC272 TLC277 MCP602 OPA1678 OPA2134 OPA2340 OPA2376xxD OPA2376xxDGK MC33078 MC33178 LM4562 OP249 OP275 ADA4075-2 MCP6002-xP MCP6002-xSN MCP6002-xMS LM7332 OPA2333xxD OPA2333xxDGK LMC6482 LT1492 LTC6081xMS8 LM6172 MCP6L92 NJM2043 NJM2114 NJM4556A NJM4558 NJM4559 NJM4560 NJM4580 NJM5532 ADA4807-2ARM OPA2691 LT6234 OPA2356xxD OPA2356xxDGK OPA1612AxD MC33172 OPA1602 TLV2372 LT6237 OPA2277 MCP6022 MCP6V67EMS
$FPLIST
SOIC*3.9x4.9mm*P1.27mm*
DIP*W7.62mm*
TO*99*
OnSemi*Micro8*
TSSOP*3x3mm*P0.65mm*
TSSOP*4.4x3mm*P0.65mm*
MSOP*3x3mm*P0.65mm*
SSOP*3.9x4.9mm*P0.635mm*
LFCSP*2x2mm*P0.5mm*
*SIP*
SOIC*5.3x6.2mm*P1.27mm*
$ENDFPLIST
DRAW
P 4 1 1 10 -200 200 200 0 -200 -200 -200 200 f
P 4 2 1 10 -200 200 200 0 -200 -200 -200 200 f
X ~ 1 300 0 100 L 50 50 1 1 O
X - 2 -300 -100 100 R 50 50 1 1 I
X + 3 -300 100 100 R 50 50 1 1 I
X + 5 -300 100 100 R 50 50 2 1 I
X - 6 -300 -100 100 R 50 50 2 1 I
X ~ 7 300 0 100 L 50 50 2 1 O
X V- 4 -100 -300 150 U 50 50 3 1 W
X V+ 8 -100 300 150 D 50 50 3 1 W
ENDDRAW
ENDDEF
#
# Device_CP
#
DEF Device_CP C 0 10 N Y 1 F N
F0 "C" 25 100 50 H V L CNN
F1 "Device_CP" 25 -100 50 H V L CNN
F2 "" 38 -150 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
CP_*
$ENDFPLIST
DRAW
S -90 20 90 40 0 1 0 N
S 90 -20 -90 -40 0 1 0 F
P 2 0 1 0 -70 90 -30 90 N
P 2 0 1 0 -50 110 -50 70 N
X ~ 1 0 150 110 D 50 50 1 1 P
X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_R_US
#
DEF Device_R_US R 0 0 N Y 1 F N
F0 "R" 100 0 50 V V C CNN
F1 "Device_R_US" -100 0 50 V V C CNN
F2 "" 40 -10 50 V I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
R_*
$ENDFPLIST
DRAW
P 2 0 1 0 0 -90 0 -100 N
P 2 0 1 0 0 90 0 100 N
P 5 0 1 0 0 -30 40 -45 0 -60 -40 -75 0 -90 N
P 5 0 1 0 0 30 40 15 0 0 -40 -15 0 -30 N
P 5 0 1 0 0 90 40 75 0 60 -40 45 0 30 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# power_+5V
#
DEF power_+5V #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -150 50 H I C CNN
F1 "power_+5V" 0 140 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
P 2 0 1 0 -30 50 0 100 N
P 2 0 1 0 0 0 0 100 N
P 2 0 1 0 0 100 30 50 N
X +5V 1 0 0 0 U 50 50 1 1 W N
ENDDRAW
ENDDEF
#
# power_GND
#
DEF power_GND #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -250 50 H I C CNN
F1 "power_GND" 0 -150 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
X GND 1 0 0 0 D 50 50 1 1 W N
ENDDRAW
ENDDEF
#
# tsl1401cl_TSL1401CL
#
DEF tsl1401cl_TSL1401CL U 0 40 Y Y 1 F N
F0 "U" -300 450 59 H V L CNN
F1 "tsl1401cl_TSL1401CL" 150 -450 59 H V L CNN
F2 "tsl1401cl:tsl1401cl" 550 -550 50 H I C CNN
F3 "" 0 0 50 H I C CNN
DRAW
S -300 400 300 -400 1 0 0 f
X SI 1 -400 100 100 R 50 50 1 0 I
X CLK 2 -400 -100 100 R 50 50 1 0 I
X AO 3 400 0 100 L 50 50 1 0 O
X VDD 4 0 500 100 D 50 50 1 0 W
X NC 5 500 -100 200 L 50 50 1 0 N N
X GND 6 -100 -500 100 U 50 50 1 0 W
X GND 7 100 -500 100 U 50 50 1 0 W
X NC 8 500 100 200 L 50 50 1 0 N N
ENDDRAW
ENDDEF
#
#End Library

View File

@@ -0,0 +1 @@
(kicad_pcb (version 4) (host kicad "dummy file") )

View File

@@ -0,0 +1,33 @@
update=22/05/2015 07:44:53
version=1
last_client=kicad
[general]
version=1
RootSch=
BoardNm=
[pcbnew]
version=1
LastNetListRead=
UseCmpFile=1
PadDrill=0.600000000000
PadDrillOvalY=0.600000000000
PadSizeH=1.500000000000
PadSizeV=1.500000000000
PcbTextSizeV=1.500000000000
PcbTextSizeH=1.500000000000
PcbTextThickness=0.300000000000
ModuleTextSizeV=1.000000000000
ModuleTextSizeH=1.000000000000
ModuleTextSizeThickness=0.150000000000
SolderMaskClearance=0.000000000000
SolderMaskMinWidth=0.000000000000
DrawSegmentWidth=0.200000000000
BoardOutlineThickness=0.100000000000
ModuleOutlineThickness=0.150000000000
[cvpcb]
version=1
NetIExt=net
[eeschema]
version=1
LibDir=
[eeschema/libraries]

180
filament-sensor-updated.sch Normal file
View File

@@ -0,0 +1,180 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Device:R_US R?
U 1 1 60458E90
P 4000 3200
F 0 "R?" V 3795 3200 50 0000 C CNN
F 1 "3.3k" V 3886 3200 50 0000 C CNN
F 2 "" V 4040 3190 50 0001 C CNN
F 3 "~" H 4000 3200 50 0001 C CNN
1 4000 3200
0 1 1 0
$EndComp
$Comp
L power:GND #PWR?
U 1 1 604598FD
P 4300 3750
F 0 "#PWR?" H 4300 3500 50 0001 C CNN
F 1 "GND" H 4305 3577 50 0000 C CNN
F 2 "" H 4300 3750 50 0001 C CNN
F 3 "" H 4300 3750 50 0001 C CNN
1 4300 3750
1 0 0 -1
$EndComp
$Comp
L Device:CP C?
U 1 1 6045A090
P 4300 3400
F 0 "C?" H 4418 3446 50 0000 L CNN
F 1 "22" H 4418 3355 50 0000 L CNN
F 2 "" H 4338 3250 50 0001 C CNN
F 3 "~" H 4300 3400 50 0001 C CNN
1 4300 3400
1 0 0 -1
$EndComp
Wire Wire Line
4300 3750 4300 3550
Wire Wire Line
3850 3200 3650 3200
$Comp
L power:GND #PWR?
U 1 1 6045E637
P 5400 4300
F 0 "#PWR?" H 5400 4050 50 0001 C CNN
F 1 "GND" H 5405 4127 50 0000 C CNN
F 2 "" H 5400 4300 50 0001 C CNN
F 3 "" H 5400 4300 50 0001 C CNN
1 5400 4300
1 0 0 -1
$EndComp
$Comp
L power:+5V #PWR?
U 1 1 6045EC70
P 5400 3700
F 0 "#PWR?" H 5400 3550 50 0001 C CNN
F 1 "+5V" H 5415 3873 50 0000 C CNN
F 2 "" H 5400 3700 50 0001 C CNN
F 3 "" H 5400 3700 50 0001 C CNN
1 5400 3700
1 0 0 -1
$EndComp
Wire Wire Line
4600 3550 4600 3400
Wire Wire Line
5200 3300 5250 3300
$Comp
L Amplifier_Operational:TLV2372 U?
U 1 1 6045A618
P 4900 3300
F 0 "U?" H 4900 3667 50 0000 C CNN
F 1 "TLV2372" H 4900 3576 50 0000 C CNN
F 2 "" H 4900 3300 50 0001 C CNN
F 3 "http://www.ti.com/lit/ds/symlink/tlv2375.pdf" H 4900 3300 50 0001 C CNN
1 4900 3300
1 0 0 -1
$EndComp
$Comp
L Amplifier_Operational:TLV2372 U?
U 2 1 604619F6
P 5750 3200
F 0 "U?" H 5750 3567 50 0000 C CNN
F 1 "TLV2372" H 5750 3476 50 0000 C CNN
F 2 "" H 5750 3200 50 0001 C CNN
F 3 "http://www.ti.com/lit/ds/symlink/tlv2375.pdf" H 5750 3200 50 0001 C CNN
2 5750 3200
1 0 0 -1
$EndComp
$Comp
L Amplifier_Operational:TLV2372 U?
U 3 1 604648A7
P 5500 4000
F 0 "U?" H 5458 4046 50 0000 L CNN
F 1 "TLV2372" H 5458 3955 50 0000 L CNN
F 2 "" H 5500 4000 50 0001 C CNN
F 3 "http://www.ti.com/lit/ds/symlink/tlv2375.pdf" H 5500 4000 50 0001 C CNN
3 5500 4000
1 0 0 -1
$EndComp
Wire Wire Line
5250 3550 5250 3300
Wire Wire Line
4600 3550 5250 3550
Connection ~ 5250 3300
Wire Wire Line
5250 3300 5450 3300
Wire Wire Line
4150 3200 4300 3200
Wire Wire Line
4300 3250 4300 3200
Connection ~ 4300 3200
Wire Wire Line
4300 3200 4600 3200
Text Notes 3450 3250 0 50 ~ 0
PWM
Wire Wire Line
5450 3100 5200 3100
Wire Wire Line
5200 3100 5200 2850
Text Notes 6100 3250 0 50 ~ 0
Threshold\nOutput
Wire Wire Line
3250 2850 5200 2850
$Comp
L power:+5V #PWR?
U 1 1 60491778
P 2850 2350
F 0 "#PWR?" H 2850 2200 50 0001 C CNN
F 1 "+5V" H 2865 2523 50 0000 C CNN
F 2 "" H 2850 2350 50 0001 C CNN
F 3 "" H 2850 2350 50 0001 C CNN
1 2850 2350
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR?
U 1 1 60491D37
P 2750 3350
F 0 "#PWR?" H 2750 3100 50 0001 C CNN
F 1 "GND" H 2755 3177 50 0000 C CNN
F 2 "" H 2750 3350 50 0001 C CNN
F 3 "" H 2750 3350 50 0001 C CNN
1 2750 3350
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR?
U 1 1 60492153
P 2950 3350
F 0 "#PWR?" H 2950 3100 50 0001 C CNN
F 1 "GND" H 2955 3177 50 0000 C CNN
F 2 "" H 2950 3350 50 0001 C CNN
F 3 "" H 2950 3350 50 0001 C CNN
1 2950 3350
1 0 0 -1
$EndComp
$Comp
L tsl1401cl:TSL1401CL U?
U 1 1 60493AFE
P 2850 2850
F 0 "U?" H 2550 3300 59 0000 L CNN
F 1 "TSL1401CL" H 3000 2400 59 0000 L CNN
F 2 "tsl1401cl:tsl1401cl" H 3400 2300 50 0001 C CNN
F 3 "https://ams.com/tsl1401cl" H 2850 2850 50 0001 C CNN
1 2850 2850
1 0 0 -1
$EndComp
$EndSCHEMATC

80914
fp-info-cache Normal file
View File

File diff suppressed because it is too large Load Diff

4
fp-lib-table Normal file
View File

@@ -0,0 +1,4 @@
(fp_lib_table
(lib (name tsl1401cl)(type KiCad)(uri ${KIPRJMOD}/kicad-libs/tsl1401cl.pretty)(options "")(descr ""))
(lib (name db19)(type KiCad)(uri ${KIPRJMOD}/kicad-libs/db19.pretty)(options "")(descr ""))
)

1
kicad-libs Submodule

Submodule kicad-libs added at 1e1480a39d

3
sym-lib-table Normal file
View File

@@ -0,0 +1,3 @@
(sym_lib_table
(lib (name tsl1401cl)(type Legacy)(uri ${KIPRJMOD}/kicad-libs/tsl1401cl.lib)(options "")(descr ""))
)