├── .gitignore
├── .vscode
└── c_cpp_properties.json
├── Coding
└── fw
│ ├── .gitignore
│ ├── .vscode
│ ├── extensions.json
│ └── settings.json
│ ├── README.md
│ ├── data
│ ├── STACredentials.html
│ ├── css
│ │ └── style.css
│ ├── index.html
│ ├── js
│ │ └── ws.js
│ ├── pictures
│ │ ├── NewTec_Logo.png
│ │ └── favicon.ico
│ ├── setCredentials.html
│ └── ws.html
│ ├── doc
│ ├── CANHacker.md
│ ├── Glosary.md
│ ├── Media
│ │ ├── DataFlow.png
│ │ ├── EnvironmentDiagram.png
│ │ ├── HW_Case1.png
│ │ ├── HW_Case2.png
│ │ ├── HW_Case3.png
│ │ ├── HW_Case4.png
│ │ ├── HW_Final1.JPG
│ │ ├── HW_Final2.jpg
│ │ ├── HW_Final3.jpg
│ │ ├── HW_Final4.JPG
│ │ ├── PCB_Back.png
│ │ ├── PCB_Front.png
│ │ ├── Software_Environment.png
│ │ ├── Use_Environment.png
│ │ └── WebPage Design.png
│ ├── Node-Red
│ │ ├── Data_Collection.png
│ │ ├── PIDFlow.json
│ │ ├── README.md
│ │ ├── Vehicle_Data.png
│ │ └── Vehicle_Data_Dashboard.png
│ ├── README.md
│ ├── design
│ │ ├── Architecture_Lawicel.plantuml
│ │ ├── Architecture_Webpages.plantuml
│ │ ├── Architecture_Webserver.plantuml
│ │ ├── Architecture_Websocket.plantuml
│ │ ├── FW_Hierarchy.plantuml
│ │ ├── Hardware_Overview.plantuml
│ │ ├── Interactions Diagram.plantuml
│ │ ├── Mainloop_Sequence.plantuml
│ │ ├── Serial _Sequence_Lawicel.plantuml
│ │ ├── SetUpProcess.plantuml
│ │ ├── StateMachine.plantuml
│ │ ├── UseCaseAnalyzer.plantuml
│ │ └── UseCaseSoftware.plantuml
│ └── doxyfile
│ ├── include
│ └── README
│ ├── lib
│ ├── CAN
│ │ ├── .piopm
│ │ ├── .travis.yml
│ │ ├── API.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── examples
│ │ │ ├── CANReceiver
│ │ │ │ └── CANReceiver.ino
│ │ │ ├── CANReceiverCallback
│ │ │ │ └── CANReceiverCallback.ino
│ │ │ ├── CANSender
│ │ │ │ └── CANSender.ino
│ │ │ └── OBDII
│ │ │ │ ├── EngineRPM
│ │ │ │ └── EngineRPM.ino
│ │ │ │ ├── SupportedPIDs
│ │ │ │ └── SupportedPIDs.ino
│ │ │ │ └── VINReader
│ │ │ │ └── VINReader.ino
│ │ ├── keywords.txt
│ │ ├── library.properties
│ │ └── src
│ │ │ ├── CAN.h
│ │ │ ├── CANController.cpp
│ │ │ ├── CANController.h
│ │ │ ├── ESP32SJA1000.cpp
│ │ │ ├── ESP32SJA1000.h
│ │ │ ├── MCP2515.cpp
│ │ │ └── MCP2515.h
│ ├── IO
│ │ ├── Board.cpp
│ │ ├── Board.h
│ │ ├── io.cpp
│ │ ├── io.h
│ │ └── library.json
│ ├── Lawicel
│ │ ├── CANInterface.h
│ │ ├── Lawicel.cpp
│ │ ├── Lawicel.h
│ │ ├── NVMInterface.h
│ │ ├── README.md
│ │ ├── SerialInterface.h
│ │ └── library.json
│ ├── README.md
│ ├── Settings
│ │ ├── FlashMem.cpp
│ │ ├── FlashMem.h
│ │ ├── WLAN.cpp
│ │ ├── WLAN.h
│ │ └── library.json
│ ├── Test
│ │ ├── Arduino.h
│ │ ├── Print.cpp
│ │ ├── Print.h
│ │ └── WString.h
│ └── WebServer
│ │ ├── CaptivePortal.cpp
│ │ ├── CaptivePortal.h
│ │ ├── ESP_Server.cpp
│ │ ├── ESP_Server.h
│ │ ├── Pages.cpp
│ │ ├── Pages.h
│ │ ├── Web_Config.cpp
│ │ ├── Web_Config.h
│ │ ├── Websocket.cpp
│ │ ├── Websocket.h
│ │ └── library.json
│ ├── platformio.ini
│ ├── project.cppcheck
│ ├── src
│ ├── Adapters
│ │ ├── CANAdapter.h
│ │ ├── NVMAdapter.h
│ │ ├── SerialAdapter.h
│ │ └── WebSocketAdapter.h
│ ├── README.md
│ └── main.cpp
│ └── test
│ ├── README.md
│ ├── TestMain.cpp
│ ├── test_can_adapter.h
│ ├── test_nvm_adapter.h
│ └── test_serial_adapter.h
├── Hardware
├── 010_Implementation
│ ├── BOM.xlsx
│ ├── Board Library
│ │ ├── 2020-11-09_14-09-29.dcm
│ │ ├── 2020-11-09_14-09-29.lib
│ │ ├── 2716-106.lib
│ │ ├── 2N7002.lib
│ │ ├── ADG1334BRSZ.lib
│ │ ├── ESP32-DEVKITC-32D.lib
│ │ ├── FDV304P.lib
│ │ ├── G2R2A.lib
│ │ ├── G5V-2-DC5.lib
│ │ ├── LT1086CM-3.3_PBF.lib
│ │ ├── PESD1CAN.lib
│ │ ├── SN65HVD233-HT.lib
│ │ ├── SN74LVC2G14DBVR.lib
│ │ ├── SS24.lib
│ │ ├── SamacSys_Parts.3dshapes
│ │ │ └── NE555DR.stp
│ │ ├── SamacSys_Parts.dcm
│ │ ├── SamacSys_Parts.lib
│ │ └── SamacSys_Parts.pretty
│ │ │ └── WE-SLM77.kicad_mod
│ ├── Board-cache.lib
│ ├── Board-rescue.dcm
│ ├── Board-rescue.lib
│ ├── Board.dcm
│ ├── Board.kicad_pcb
│ ├── Board.lib
│ ├── Board.net
│ ├── Board.pdf
│ ├── Board.pretty
│ │ ├── 2606-3356.kicad_mod
│ │ ├── ADG1334BRSZ.kicad_mod
│ │ ├── AST 045-08.kicad_mod
│ │ ├── DIOM5336X265N.kicad_mod
│ │ ├── DPAK254P1394X457-4N.kicad_mod
│ │ ├── G2R2A.kicad_mod
│ │ ├── INDPM5550X300N.kicad_mod
│ │ ├── IND_74404043220A.kicad_mod
│ │ ├── MODULE_ESP32-DEVKITC-32D.kicad_mod
│ │ ├── NE555DR.kicad_mod
│ │ ├── P-250-106.kicad_mod
│ │ ├── P-2716-106.kicad_mod
│ │ ├── P-804-106.kicad_mod
│ │ ├── PCA82C251.kicad_mod
│ │ ├── RELAY_G5V-2-DC5.kicad_mod
│ │ ├── SN74LVC2G14DBVR.kicad_mod
│ │ ├── SOIC127P600X175.kicad_mod
│ │ ├── SOT23-3.kicad_mod
│ │ └── WE-SPC_48XX78.kicad_mod
│ ├── Board.pro
│ ├── Board.sch
│ ├── CAN_Transceiver.sch
│ ├── EXT_MF_Switch.sch
│ ├── MCU.sch
│ ├── Netzteil.sch
│ ├── OBD_MF_Switch.sch
│ ├── Serial Connection.sch
│ ├── USB_MF_Switch.sch
│ ├── connector.sch
│ └── sym-lib-table
├── 020_Production
│ ├── V1.0
│ │ ├── Board-B_Cu.gbr
│ │ ├── Board-B_Mask.gbr
│ │ ├── Board-B_Paste.gbr
│ │ ├── Board-B_SilkS.gbr
│ │ ├── Board-F_Cu.gbr
│ │ ├── Board-F_Mask.gbr
│ │ ├── Board-F_Paste.gbr
│ │ ├── Board-F_SilkS.gbr
│ │ ├── Board-NPTH-drl.gbr
│ │ ├── Board-PTH-drl.gbr
│ │ └── Layer Output.pdf
│ └── V1.1
│ │ ├── Board-B_Cu.gbr
│ │ ├── Board-B_Mask.gbr
│ │ ├── Board-B_Paste.gbr
│ │ ├── Board-B_SilkS.gbr
│ │ ├── Board-F_Cu.gbr
│ │ ├── Board-F_Mask.gbr
│ │ ├── Board-F_Paste.gbr
│ │ ├── Board-F_SilkS.gbr
│ │ ├── Board-NPTH-drl.gbr
│ │ ├── Board-PTH-drl.gbr
│ │ └── Layer Output.pdf
├── 030_3D_Modell
│ ├── Board.step
│ ├── Casing_Bot.stl
│ └── Casing_Top.stl
├── 040_Data_Sheets
│ ├── G2R-2A-DC24.pdf
│ ├── WAGO 2716-106 .pdf
│ ├── esp32-devkit Schematic.jpg
│ ├── esp32-wroom-32d.pdf
│ └── sn65hvd233-ht.pdf
└── README.md
├── LICENSE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | Coding/fw/firmware.map
2 | Coding/fw/doc/html
3 | Coding/fw/project-cppcheck-build-dir
--------------------------------------------------------------------------------
/.vscode/c_cpp_properties.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "name": "Win32",
5 | "includePath": [
6 | "${workspaceFolder}/**",
7 | "C:/Program Files (x86)/Arduino/hardware/"
8 | ],
9 | "defines": [
10 | "_DEBUG",
11 | "UNICODE",
12 | "_UNICODE"
13 | ],
14 | "intelliSenseMode": "clang-x64",
15 | "compilerPath": "C:/MinGW/bin/g++.exe"
16 | }
17 | ],
18 | "version": 4
19 | }
--------------------------------------------------------------------------------
/Coding/fw/.gitignore:
--------------------------------------------------------------------------------
1 | .pio
2 | .vscode/.browse.c_cpp.db*
3 | .vscode/c_cpp_properties.json
4 | .vscode/launch.json
5 | .vscode/ipch
6 | *.map
7 | Coding/fw/firmware.map
8 |
--------------------------------------------------------------------------------
/Coding/fw/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "platformio.platformio-ide"
6 | ],
7 | "unwantedRecommendations": [
8 | "ms-vscode.cpptools-extension-pack"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/Coding/fw/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.associations": {
3 | "*.tcc": "cpp",
4 | "fstream": "cpp",
5 | "iosfwd": "cpp",
6 | "istream": "cpp",
7 | "limits": "cpp",
8 | "sstream": "cpp",
9 | "streambuf": "cpp",
10 | "array": "cpp",
11 | "deque": "cpp",
12 | "string": "cpp",
13 | "unordered_map": "cpp",
14 | "unordered_set": "cpp",
15 | "vector": "cpp",
16 | "memory": "cpp",
17 | "random": "cpp",
18 | "initializer_list": "cpp",
19 | "regex": "cpp",
20 | "cstdio": "cpp",
21 | "exception": "cpp",
22 | "new": "cpp",
23 | "cmath": "cpp",
24 | "functional": "cpp",
25 | "bitset": "cpp",
26 | "ostream": "cpp"
27 | },
28 | "cmake.configureOnOpen": false
29 | }
--------------------------------------------------------------------------------
/Coding/fw/data/STACredentials.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
ESP32 CAN-Analyzer
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 | Change Station Credentials
22 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Coding/fw/data/css/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | (c) NewTec GmbH 2020 - www.newtec.de
3 | $URL: https://github.com/NewTec-GmbH/esp32-can-iot $
4 | */
5 |
6 | html {
7 | font-family: Arial, Helvetica, sans-serif;
8 | }
9 |
10 | h1 {
11 | font-size: 1.8rem;
12 | color: black;
13 | }
14 |
15 | h2 {
16 | font-size: 1.5rem;
17 | font-weight: bold;
18 | color: white;
19 | }
20 |
21 | h4 {
22 | float: left;
23 | width: 33.33%;
24 | }
25 |
26 | .topnav {
27 | overflow: hidden;
28 | background-color: #143642;
29 | }
30 |
31 | .topnav a {
32 | float: left;
33 | color: #f2f2f2;
34 | text-align: center;
35 | padding: 14px 16px;
36 | text-decoration: none;
37 | font-size: 17px;
38 | }
39 |
40 | .topnav a:hover {
41 | background-color: #ddd;
42 | color: black;
43 | }
44 |
45 | .topnav a.active {
46 | background-color: #4CAF50;
47 | color: white;
48 | }
49 |
50 | body {
51 | margin: 0;
52 | }
53 |
54 | .content {
55 | padding: 30px;
56 | max-width: 600px;
57 | margin: 0 auto;
58 | }
59 |
60 | .card {
61 | background-color: #F8F7F9;
62 | ;
63 | box-shadow: 2px 2px 12px 1px rgba(140, 140, 140, .5);
64 | padding-top: 10px;
65 | padding-bottom: 20px;
66 | }
67 |
68 | .button {
69 | padding: 15px 50px;
70 | font-size: 24px;
71 | text-align: center;
72 | outline: none;
73 | color: #fff;
74 | background-color: #0f8b8d;
75 | border: none;
76 | border-radius: 5px;
77 | -webkit-touch-callout: none;
78 | -webkit-user-select: none;
79 | -khtml-user-select: none;
80 | -moz-user-select: none;
81 | -ms-user-select: none;
82 | user-select: none;
83 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
84 | }
85 |
86 |
87 | /*.button:hover {background-color: #0f8b8d}*/
88 |
89 | .button:active {
90 | background-color: #0f8b8d;
91 | box-shadow: 2 2px #CDCDCD;
92 | transform: translateY(2px);
93 | }
94 |
95 | .state {
96 | font-size: 1.5rem;
97 | color: #8c8c8c;
98 | font-weight: bold;
99 | }
100 |
101 | table,
102 | th,
103 | td {
104 | border: 1px solid black;
105 | border-collapse: collapse;
106 |
107 | }
108 |
109 |
110 | .table {
111 | width: 100%;
112 | }
113 |
114 | .table2 {
115 | border: none !important;
116 | }
117 |
118 | .column {
119 | float: left;
120 | width: 50%;
121 | }
122 |
123 |
124 | /* Clear floats after the columns */
125 |
126 | .row:after {
127 | content: "";
128 | display: table;
129 | clear: both;
130 | }
--------------------------------------------------------------------------------
/Coding/fw/data/index.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 | ESP32 CAN-Analyzer
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
38 |
39 |
40 |
41 |
ESP32 CAN-Analyzer
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
About this Project
54 |
ISO 11898-2 Compliant
55 |
This is a CAN-Bus Analyzer based on the ESP32 microcontroller. Communication is done either through
56 | USB or an on-board server so that the CAN messages are interpreted or sent.
57 |
For more information, please refer to the Github Repository.
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | Connected to:
70 | AP SSID:
71 | AP Password:
72 |
73 |
74 | %STATION_SSID%
75 | %AP_SSID%
76 | %AP_PASS%
77 |
78 |
79 |
80 |
81 |
82 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Coding/fw/data/pictures/NewTec_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/data/pictures/NewTec_Logo.png
--------------------------------------------------------------------------------
/Coding/fw/data/pictures/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/data/pictures/favicon.ico
--------------------------------------------------------------------------------
/Coding/fw/data/setCredentials.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | ESP32 CAN-Analyzer
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
30 |
31 |
32 |
33 |
34 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
Changing Credentials
54 |
The system will reboot in a few seconds...
55 |
Back
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/Coding/fw/data/ws.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 | ESP Web Server
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
27 |
28 |
29 |
30 |
33 |
34 | CAN Communication
35 |
36 |
37 |
38 |
39 | AutoStart
40 | CAN Baudrate [kbps]
41 | Timestamp
42 | Channel
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | Lawicel Command:
59 |
60 | Send Command
61 |
62 |
63 |
64 |
65 |
95 |
96 |
97 |
98 |
99 |
Pause
100 |
101 |
102 |
103 | Msg
104 | ID
105 | RTR
106 | DLC
107 | Byte 1
108 | Byte 2
109 | Byte 3
110 | Byte 4
111 | Byte 5
112 | Byte 6
113 | Byte 7
114 | Byte 8
115 | Timestamp
116 |
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/Coding/fw/doc/CANHacker.md:
--------------------------------------------------------------------------------
1 | # Connection to CANHacker Software
2 |
3 | CANHacker is a Graphical Interface for CAN Adapters that communicate using the Lawicel Protocol, such as this project.
4 |
5 | In order to connect to this application, the Serial Adapter must be used instead of the WebSocket.
6 |
7 | ## Main.cpp
8 | The correct "main.cpp" would look like this:
9 |
10 | ```cpp
11 |
12 | // Includes
13 | #include
14 | #include "Lawicel.h"
15 | #include "Board.h"
16 | #include "SerialAdapter.h"
17 | #include "CANAdapter.h"
18 | #include "NVMAdapter.h"
19 |
20 | static SerialAdapter gSerialAdapter; /**< Serial Adapter Instance */
21 | static CANAdapter gSja1000Adapter; /**< CAN Adapter Instance */
22 | static NVMAdapter gFlashAdapter; /**< NVM Adapter Instance */
23 |
24 | /** Lawicel Protocol Instance */
25 | static Lawicel gProtocolLawicel(gSerialAdapter, gSja1000Adapter, gFlashAdapter);
26 |
27 | /**
28 | * Initialization of Application
29 | */
30 | void setup()
31 | {
32 | Board::init();
33 | if (!gProtocolLawicel.begin())
34 | {
35 | Board::haltSystem();
36 | }
37 | }
38 |
39 | /**
40 | * Application Loop
41 | */
42 | void loop()
43 | {
44 | gProtocolLawicel.executeCycle();
45 | }
46 | ```
47 |
48 | ## CANHAcker
49 |
50 | Using the latest CANHacker Version (V.2.00.02), the connection is performed in two steps:
51 |
52 | - Settings Windows: Set the `COM Port`, `Serial Baudrate` (default. 115200 bit/s), and `CAN Baudrate`. Other options such as "Listen Only" and "Timestamp" can be selected here too.
53 |
54 | - Connect Button: Performs the connection to the device itself.
55 |
56 | To check if your device is succesfully connected, the bottom bar should display the current state as "Connected to <<`CAN Baudrate`>> kbit/s" and the current Firmware Version (current: V1.01)
--------------------------------------------------------------------------------
/Coding/fw/doc/Glosary.md:
--------------------------------------------------------------------------------
1 | # Glosary
2 |
3 | ## AP
4 | Abbreviation of Access Point.
5 | Device that creates a Wireless Area Network (WLAN).
6 |
7 | ## NVM
8 | Abbreviation of Non-Volatile Memory.
9 | Memory that does not need energy to contain data. The information is still saved even after a power cycle
10 |
11 | ## STA
12 | Abbreviation of Station.
13 | Device connects itself to a Wireless Area Network.
14 |
15 | ## SSID
16 | Abbreviation of Service Set Identifier.
17 | Name of the Wireless Area Network to be connected to in Station Mode, or to create as Access Point Mode
18 |
19 | ## WS
20 | Abbreviation of Web Socket.
21 | Full-Duplex and bidirectional communication protocol for communication through an unique Socket between Client and Server.
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/DataFlow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/DataFlow.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/EnvironmentDiagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/EnvironmentDiagram.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/HW_Case1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/HW_Case1.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/HW_Case2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/HW_Case2.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/HW_Case3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/HW_Case3.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/HW_Case4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/HW_Case4.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/HW_Final1.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/HW_Final1.JPG
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/HW_Final2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/HW_Final2.jpg
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/HW_Final3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/HW_Final3.jpg
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/HW_Final4.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/HW_Final4.JPG
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/PCB_Back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/PCB_Back.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/PCB_Front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/PCB_Front.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/Software_Environment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/Software_Environment.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/Use_Environment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/Use_Environment.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Media/WebPage Design.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Media/WebPage Design.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Node-Red/Data_Collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Node-Red/Data_Collection.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Node-Red/README.md:
--------------------------------------------------------------------------------
1 | # Node-Red Integration
2 |
3 | Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.
4 |
5 | It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.
6 |
7 | For this project, a Node-Red Flow has been developed to monitor the state of a car through its CAN Bus. It is based on using PID Requests to the Car's ECU using the [SAE Standard](https://en.wikipedia.org/wiki/OBD-II_PIDs).
8 |
9 | # Data Collection
10 | 
11 |
12 | This Flow receives the information from the WebSocket and parses the CAN Frame using the Lawicel Protocol. Then only the Frames which comply with the SAE Standard are allowed through to be analyzed/displayed.
13 |
14 | # Vehicle Data
15 | 
16 |
17 | Here are the PIDs received and the Vehicle Data extracted from the Frame's data bytes. Then the information is sent to the Dashboard
18 |
19 | # Dashboard
20 | 
21 |
22 | The Node-Red Dashboard includes several types of gauges and displays to show the information in the best way possible. Here we have 4 Gauges, one Donut and one text block.
--------------------------------------------------------------------------------
/Coding/fw/doc/Node-Red/Vehicle_Data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Node-Red/Vehicle_Data.png
--------------------------------------------------------------------------------
/Coding/fw/doc/Node-Red/Vehicle_Data_Dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Coding/fw/doc/Node-Red/Vehicle_Data_Dashboard.png
--------------------------------------------------------------------------------
/Coding/fw/doc/README.md:
--------------------------------------------------------------------------------
1 | # Documentation
2 | This folder contains the Documentation for the ESP32 CAN-Analyzer Project.
3 |
4 | ## Design
5 | The Project is described using numerous UML Diagrams in order to give a better image and perspective of how Software and Hardware are composed. These are written using PlantUML and are included in several of the ReadMe files on this project.
6 |
7 | ## Software Environment
8 | 
9 |
10 | This project has been developed using PlatformIO IDE as a plugin of Visual Studio Code. This platform provides the libraries and drivers needed to work with the chosen microcontroller.
11 |
12 | The Firmware has been written using C++, while the Web-application has been developed using JavaScript.
13 |
14 | ## Doxygen
15 | The software for this project has been documented using Doxygen, using a [Doxyfile](./doxyfile) to store the configuration.
16 | It is possible to parse the Documentation using the [Doxywizard](https://www.doxygen.nl/download.html) Programm and this configuration file.
17 |
18 | ## Media
19 | This folder contains images of the project
20 |
21 | ## Node-Red
22 | Here are the referencial images and Flows for the complementary Node-Red Flows
--------------------------------------------------------------------------------
/Coding/fw/doc/design/Architecture_Webpages.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | Title Webpages Navigation
4 |
5 | STACredentials : Page to input new STA Credentials
6 | SetCredentials : Inform the user of the \n success of their request
7 | Index : Shows the basic information of the device
8 | Index : Links to the Lawicel_Communication
9 | Lawicel_Communication : Hosts the Websocket to use Lawicel \n to comunicate with CAN Bus
10 |
11 | [*] --> STACredentials : AP_Mode.
12 | note on link
13 | Captive Portal Initiated
14 | end note
15 |
16 | STACredentials --> SetCredentials : New Credentials set
17 | SetCredentials --> [*] : Restart
18 |
19 |
20 | [*] --> Index : STA_Mode
21 | note on link
22 | Pages Initiated
23 | end note
24 | Index --> Lawicel_Communication
25 |
26 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/Architecture_Webserver.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | Title Application Diagram (WebServer)
3 |
4 | Class Application
5 |
6 | package WebServer <>
7 | {
8 | Class WebConfig
9 | Class Pages
10 | Class CaptivePortal
11 |
12 | Application *.. ESPServer
13 | ESPServer *-- WebConfig : <>
14 | ESPServer *-- Pages : <>
15 | ESPServer *-- CaptivePortal : <>
16 | ESPServer *-- WebSocket : <>
17 | }
18 |
19 | package Espressif_ESP32_Library{
20 | Class Settings{
21 |
22 | -Preferences flashMemory
23 | }
24 | Class SPIFFS
25 |
26 | WebConfig --> Settings : <>
27 | Pages o-- SPIFFS : <>
28 | CaptivePortal o-- SPIFFS : <>
29 | }
30 |
31 | package ESPAsyncWebServer <>
32 | {
33 | Class AsyncWebServer
34 | }
35 |
36 | WebServer o-- ESPAsyncWebServer : <>
37 |
38 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/Architecture_Websocket.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | title Architecture Websocket
3 |
4 | package Lawicel <>{
5 | Interface SerialInterface{
6 | +SerialInterface()
7 | +virtual ~SerialInterface()
8 | +virtual bool begin() = 0
9 | +virtual bool end() = 0
10 | +virtual bool setBaudrate(uint32_t baudrate) = 0
11 | +virtual bool read(char &c) = 0
12 | +virtual void print(const String &string) = 0
13 | +virtual void print(uint32_t num) = 0
14 | +virtual void print(char c) = 0
15 | }
16 | }
17 |
18 | Class WebSocketAdapter{
19 | -WSAdapter() : SerialInterface()
20 | }
21 |
22 | SerialInterface <|.down. WebSocketAdapter : <>
23 |
24 | package AsyncWebServer <>{
25 | class AsyncWebServer
26 | class AsyncWebSocket
27 | }
28 |
29 | package WebServer <>{
30 | Class ESPServer
31 | Class WebSocket{
32 | +bool init()
33 | +void send(String Mesage)
34 | +bool receive(char &c)
35 | }
36 |
37 | ESPServer o-- WebSocket : <>
38 | }
39 |
40 | AsyncWebSocket *-- AsyncWebServer : <>
41 | WebSocket o-- AsyncWebSocket : <>
42 | WebSocketAdapter o-- WebSocket : <>
43 |
44 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/FW_Hierarchy.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | title Hierarchy Diagram
4 |
5 | node {
6 | package src{
7 | component Main
8 | component Adapters
9 | }
10 |
11 | Main -right-> Adapters
12 |
13 | package lib{
14 | component CAN
15 | component IO
16 | component Lawicel
17 | component Settings
18 | component WebServer
19 |
20 | component ESP32SJA1000
21 | component Board
22 | component FlashMem
23 | component WLAN
24 | component AsyncWebServer
25 | }
26 |
27 | Main --> Lawicel
28 | Main --> Settings
29 | Main --> IO
30 |
31 | Adapters --> Lawicel
32 | Adapters --> CAN
33 | Adapters --> WebServer
34 |
35 | CAN --> ESP32SJA1000
36 | IO --> Board
37 | Settings --> FlashMem
38 | Settings --> WLAN
39 | WebServer --> AsyncWebServer
40 |
41 | package Service{
42 | component CANController
43 | component GPIO
44 | component WiFi
45 | component Preferences
46 | component AsyncTCP
47 | }
48 |
49 | ESP32SJA1000 --> CANController
50 | Board --> GPIO
51 | FlashMem --> Preferences
52 | WLAN --> WiFi
53 | AsyncWebServer --> AsyncTCP
54 |
55 | package HAL {
56 | component Arduino
57 | }
58 |
59 | CANController --> Arduino
60 | GPIO --> Arduino
61 | Preferences --> Arduino
62 | WiFi --> Arduino
63 | AsyncTCP --> Arduino
64 |
65 | package Hardware{
66 | interface WiFi_Anthena
67 | interface USB
68 | interface CAN_Transceiver
69 | interface Button
70 | interface LEDs
71 | }
72 |
73 | Arduino --> WiFi_Anthena
74 | Arduino --> USB
75 | Arduino --> CAN_Transceiver
76 | Arduino --> Button
77 | Arduino --> LEDs
78 | }
79 |
80 | component Laptop
81 | component CAN_BUS
82 | component User
83 |
84 | LEDs --> User
85 | Button --> User
86 | CAN_Transceiver --> CAN_BUS
87 | USB --> Laptop
88 | WiFi_Anthena --> Laptop
89 |
90 |
91 |
92 |
93 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/Hardware_Overview.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | title ESP CAN-Bus Adapter
4 |
5 | component "External CAN/OBD-II Bus" as CANBUS
6 |
7 | interface "DSUB-9" as DSUB
8 | interface "USB" as usb
9 | interface "WiFi" as internet
10 |
11 | package "PCB" {
12 |
13 | package "Power Supply"{
14 | component "Step-Down Converter" as PowerSupply
15 | }
16 |
17 | package "CAN Transceiver" as Transceiver
18 |
19 | component "ESP32 DevKitV1" as esp32
20 |
21 |
22 | interface "JTAG" as iJtag
23 |
24 | interface "GPIO" as GPIO
25 |
26 | interface "WiFi Mode Button" as userButton
27 |
28 | interface "WiFi Mode LEDs" as LEDs
29 |
30 | }
31 |
32 | CANBUS --( DSUB
33 | DSUB -- PowerSupply : 12V VCC (only with OBD)
34 | DSUB -- Transceiver : Data
35 |
36 | PowerSupply -- esp32 : 5V
37 |
38 | esp32 -- iJtag : input/output
39 | esp32 -- Transceiver : Data and 3V3
40 | esp32 -- userButton: input
41 | esp32 -- GPIO : input/output
42 | esp32 -- LEDs : output
43 | esp32 -- usb
44 | esp32 -- internet
45 |
46 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/Interactions Diagram.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | Title Interaction Diagram
4 |
5 | autoactivate on
6 |
7 | participant Mainloop
8 | participant Lawicel
9 | participant CAN_Adapter as m_selectedCAN
10 | participant WebSocket_Adapter as m_selectedSerial
11 | participant AsyncWebSocket
12 | participant ESPAsyncWebServer as Server
13 | participant Client
14 | activate Client
15 |
16 |
17 | group Asynchronous
18 | Client ->> Server : Send Lawicel Command
19 | Server -> AsyncWebSocket : WebSocket Event
20 | AsyncWebSocket -> AsyncWebSocket : handle Text Message
21 | AsyncWebSocket -> AsyncWebSocket : Add Message to Input Queue
22 | return
23 | return
24 | return
25 | return
26 | end
27 |
28 | Mainloop -> Lawicel #0055F0: executeCycle()
29 |
30 | == Read CAN ==
31 |
32 | Lawicel -> Lawicel #005500 : autopoll()
33 | Lawicel -> m_selectedCAN : getChannelState()
34 | return channelState
35 | Lawicel -> m_selectedCAN : pollSingle(&frame)
36 | m_selectedCAN -> m_selectedCAN : parsePacket()
37 | return
38 | return
39 | Lawicel -> Lawicel : Parse Lawicel String from Frame
40 | return
41 | Lawicel -> m_selectedSerial : Print Message
42 | m_selectedSerial -> AsyncWebSocket : Send Message
43 | AsyncWebSocket -> AsyncWebSocket : Add Message to Output Queue
44 | return
45 | return
46 | return
47 | return success
48 |
49 |
50 |
51 | == Read Serial ==
52 |
53 | Lawicel -> m_selectedSerial : Read Incoming Chararacter
54 | m_selectedSerial -> AsyncWebSocket : Read Input Queue
55 | return c
56 | return c
57 | Lawicel -> Lawicel : Process Lawicel Command
58 | return success
59 | return success
60 |
61 | == Write Serial ==
62 |
63 | Mainloop -> Mainloop : Check if 50ms \nhave passed since last \nWebsocket Buffer sent
64 | Mainloop -> AsyncWebSocket : Send Output Buffer
65 | AsyncWebSocket -> Server : Send Buffer
66 | Server -> Client : Send WebSocket Message
67 | return
68 | return
69 | return success
70 | return
71 |
72 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/Mainloop_Sequence.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | Title Mainloop Sequence
4 |
5 | group Setup
6 | Mainloop --> Board : init()
7 | Board --> Mainloop
8 | Mainloop --> Lawicel : begin()
9 | Lawicel --> Lawicel : Set up Adapters
10 |
11 | alt WebSocket Adapter Configured
12 | Lawicel --> ESPServer : begin()
13 | ESPServer --> WebConfig : importSettings()
14 | WebConfig --> ESPServer : return bool success
15 | ESPServer --> WLAN : begin()
16 | WLAN --> Board : checkUserButton()
17 | Board --> WLAN : return bool buttonPressed
18 | WLAN --> WLAN : Initialize selected \nWiFi Mode
19 | WLAN --> ESPServer : return bool success
20 | ESPServer --> ESPServer : Set up Web Pages
21 | ESPServer --> Lawicel : return bool success
22 | end
23 |
24 | Lawicel --> Mainloop : return bool success
25 |
26 | else Initialization returns false
27 |
28 | Mainloop --> Board : set Error LED \nand System halt
29 | Board --> Board : wait for error handling\nfrom user and restart
30 | end
31 |
32 | group loop
33 | Mainloop --> Lawicel : executeCycle()
34 | Lawicel --> Mainloop : return bool success
35 |
36 | Mainloop --> WLAN : Check Connection Status
37 | WLAN --> Mainloop : return bool success
38 |
39 | else Restart requested
40 | ESPServer --> Mainloop : restart()
41 | Mainloop --> Lawicel : end()
42 | Mainloop --> ESPServer : end()
43 | Mainloop --> Board : esp.restart()
44 | end
45 |
46 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/Serial _Sequence_Lawicel.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | Title Serial Process
4 | skinparam responseMessageBelowArrow true
5 | mainloop --> Lawicel : executeCycle()
6 | Lawicel --> serialAdapter : read(c)
7 | serialAdapter --> serialAdapter : Read a Char from Serial \n and write it in "c"
8 | serialAdapter --> Lawicel : Add "c" to serialInput String
9 |
10 | alt "c" equals "CR"
11 | Lawicel --> Lawicel : process Message
12 | Lawicel --> serialAdapter : return answer
13 | end
14 | Lawicel --> mainloop : return bool success
15 |
16 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/SetUpProcess.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | title Startup
3 |
4 | start
5 | :Initialize hardware.;
6 | :Check user button state.;
7 |
8 | if (Is pressed?) then (no)
9 |
10 | :Check WiFi Credentials.;
11 |
12 | if (Valid Credentials?) then (no)
13 | :System Halt.;
14 | stop
15 |
16 | else(yes)
17 |
18 | if (Connection successful established?) then (no)
19 | :System Halt.;
20 | stop
21 | else (yes)
22 | :Start CAN-Controller to desired Bus Speed.;
23 | if (successful) then (yes)
24 | stop
25 | else(no)
26 | :System Halt.;
27 | stop
28 | endif
29 | endif
30 |
31 | endif
32 |
33 | else(yes)
34 |
35 | :Setting up access-point (AP).;
36 |
37 | if (successful?) then (no)
38 | :System Halt.;
39 | stop
40 | else (yes)
41 | :Enter Credentials Setup.;
42 | :Restart.;
43 | stop
44 | endif
45 |
46 | endif
47 |
48 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/StateMachine.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 |
3 | title System State Machine
4 |
5 | InitState: /entry: Initialize Board.
6 | InitState: /do: Get "WiFi _Mode" Button state.
7 | InitState: /do: Initialize Lawicel and its Adapters.
8 |
9 | AP_Mode: /entry: Setup Access Point.
10 | AP_Mode: /entry: Setup Captive Portal.
11 | AP_Mode: /entry: Start server.
12 | AP_Mode: /do: Handle client requests.
13 | AP_Mode: /do: Save new Credentials when given by user.
14 | AP_Mode: /exit: Stop server.
15 | AP_Mode: /exit: Shutdown access point.
16 |
17 | STA_Mode: /entry: Retrieve Access Point SSID and Password from NVM.
18 | STA_Mode: /entry: Connect to Network.
19 | STA_Mode: /entry: Setup Webpages.
20 | STA_Mode: /entry: Setup Websocket.
21 | STA_Mode: /entry: Start server.
22 | STA_Mode: /do: Handle client requests.
23 | STA_Mode: /do: Handle Lawicel Cycle.
24 |
25 | ErrorState: /do: Wait for manual reset.
26 |
27 |
28 | [*] --> InitState: Power up
29 | InitState --> AP_Mode: [Button is pressed]
30 | InitState --> STA_Mode: [Button is released]
31 | AP_Mode --> ErrorState: [Failed to start\nwifi access point]
32 | STA_Mode --> ErrorState: [Failed to connect \nto user's Network]
33 | ErrorState --> [*]: [Restart]
34 | AP_Mode --> [*]: [Restart]
35 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/UseCaseAnalyzer.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | title Use Case for ESP32 CAN-Analyzer
3 | left to right direction
4 |
5 | actor user as user
6 | actor CAN_Bus as bus
7 |
8 | package ESP_CAN_Analyzer{
9 | usecase "Send CAN Frame" as UC1
10 | usecase "Receive CAN Frame" as UC2
11 | usecase "Set Up CAN-Bus" as UC3
12 | usecase "Set up Credentials" as UC4
13 | }
14 |
15 | user <--> UC1
16 | user <--> UC2
17 | user --> UC3
18 | user --> UC4
19 |
20 | UC1 <--> bus
21 | UC2 <--> bus
22 |
23 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/doc/design/UseCaseSoftware.plantuml:
--------------------------------------------------------------------------------
1 | @startuml
2 | title Use Case for ESP32 Software/Hardware
3 | left to right direction
4 |
5 | package ESP_CAN_Analyzer{
6 | usecase "System State" as UC1
7 | usecase "WiFi Mode" as UC2
8 | usecase "CAN Communication" as UC3
9 | usecase "CAN Mode" as UC4
10 | }
11 |
12 | actor "Error LED" as error
13 | actor "CAN Mode LED" as CANMode
14 | actor "CAN Transceiver" as Transceiver
15 | actor "WiFi Anthena" as Wifi
16 | actor "Application" as app
17 |
18 | app --> UC1
19 | app --> UC2
20 | app --> UC3
21 | app --> UC4
22 |
23 | UC1 --> error
24 | UC2 --> Wifi
25 | UC3 --> Transceiver
26 | UC4 --> CANMode
27 |
28 | @enduml
--------------------------------------------------------------------------------
/Coding/fw/include/README:
--------------------------------------------------------------------------------
1 |
2 | This directory is intended for project header files.
3 |
4 | A header file is a file containing C declarations and macro definitions
5 | to be shared between several project source files. You request the use of a
6 | header file in your project source file (C, C++, etc) located in `src` folder
7 | by including it, with the C preprocessing directive `#include'.
8 |
9 | ```src/main.c
10 |
11 | #include "header.h"
12 |
13 | int main (void)
14 | {
15 | ...
16 | }
17 | ```
18 |
19 | Including a header file produces the same results as copying the header file
20 | into each source file that needs it. Such copying would be time-consuming
21 | and error-prone. With a header file, the related declarations appear
22 | in only one place. If they need to be changed, they can be changed in one
23 | place, and programs that include the header file will automatically use the
24 | new version when next recompiled. The header file eliminates the labor of
25 | finding and changing all the copies as well as the risk that a failure to
26 | find one copy will result in inconsistencies within a program.
27 |
28 | In C, the usual convention is to give header files names that end with `.h'.
29 | It is most portable to use only letters, digits, dashes, and underscores in
30 | header file names, and at most one dot.
31 |
32 | Read more about using header files in official GCC documentation:
33 |
34 | * Include Syntax
35 | * Include Operation
36 | * Once-Only Headers
37 | * Computed Includes
38 |
39 | https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
40 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/.piopm:
--------------------------------------------------------------------------------
1 | {"type": "library", "name": "CAN", "version": "0.3.1", "spec": {"owner": "sandeepmistry", "id": 2055, "name": "CAN", "requirements": null, "url": null}}
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/.travis.yml:
--------------------------------------------------------------------------------
1 | language: generic
2 | env:
3 | global:
4 | - IDE_VERSION=1.8.5
5 | matrix:
6 | - BOARD="arduino:avr:uno"
7 | - BOARD="arduino:samd:mkrzero"
8 | - BOARD="espressif:esp32:esp32"
9 | before_install:
10 | - wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz
11 | - tar xf arduino-$IDE_VERSION-linux64.tar.xz
12 | - mv arduino-$IDE_VERSION $HOME/arduino-ide
13 | - export PATH=$PATH:$HOME/arduino-ide
14 | - if [[ "$BOARD" =~ "arduino:samd:" ]]; then
15 | arduino --install-boards arduino:samd;
16 | fi
17 | - if [[ "$BOARD" =~ "espressif:esp32:" ]]; then
18 | mkdir -p $HOME/Arduino/hardware/espressif;
19 | git clone https://github.com/espressif/arduino-esp32.git $HOME/Arduino/hardware/espressif/esp32;
20 | pushd $HOME/Arduino/hardware/espressif/esp32/tools/;
21 | python get.py;
22 | popd;
23 | fi
24 | - buildExampleSketch() { arduino --verbose-build --verify --board $BOARD $PWD/examples/$1/$1.ino; }
25 | - buildExampleOBDIISketch() { arduino --verbose-build --verify --board $BOARD $PWD/examples/OBDII/$1/$1.ino; }
26 | install:
27 | - mkdir -p $HOME/Arduino/libraries
28 | - ln -s $PWD $HOME/Arduino/libraries/CAN
29 | script:
30 | - buildExampleSketch CANReceiver
31 | - buildExampleSketch CANReceiverCallback
32 | - buildExampleSketch CANSender
33 | - buildExampleOBDIISketch EngineRPM
34 | - buildExampleOBDIISketch SupportedPIDs
35 | - buildExampleOBDIISketch VINReader
36 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Sandeep Mistry
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/README.md:
--------------------------------------------------------------------------------
1 | # Arduino CAN
2 |
3 | [](https://travis-ci.org/sandeepmistry/arduino-CAN)
4 |
5 | An Arduino library for sending and receiving data using CAN bus.
6 |
7 | ## Compatible Hardware
8 |
9 | * [Microchip MCP2515](http://www.microchip.com/wwwproducts/en/en010406) based boards/shields
10 | * [Arduino MKR CAN shield](https://store.arduino.cc/arduino-mkr-can-shield)
11 | * [Espressif ESP32](http://espressif.com/en/products/hardware/esp32/overview)'s built-in [SJA1000](https://www.nxp.com/products/analog/interfaces/in-vehicle-network/can-transceiver-and-controllers/stand-alone-can-controller:SJA1000T) compatible CAN controller with an external 3.3V CAN transceiver
12 |
13 | ### Microchip MCP2515 wiring
14 |
15 | | Microchip MCP2515 | Arduino |
16 | | :---------------: | :-----: |
17 | | VCC | 5V |
18 | | GND | GND |
19 | | SCK | SCK |
20 | | SO | MISO |
21 | | SI | MOSI |
22 | | CS | 10 |
23 | | INT | 2 |
24 |
25 |
26 | `CS` and `INT` pins can be changed by using `CAN.setPins(cs, irq)`. `INT` pin is optional, it is only needed for receive callback mode. If `INT` pin is used, it **must** be interrupt capable via [`attachInterrupt(...)`](https://www.arduino.cc/en/Reference/AttachInterrupt).
27 |
28 | **NOTE**: Logic level converters must be used for boards which operate at 3.3V.
29 |
30 | ### Espressif ESP32 wiring
31 |
32 | Requires an external 3.3V CAN transceiver, such as a [TI SN65HVD230](http://www.ti.com/product/SN65HVD230).
33 |
34 | | CAN transceiver | ESP32 |
35 | | :-------------: | :---: |
36 | | 3V3 | 3V3 |
37 | | GND | GND |
38 | | CTX | 5 |
39 | | CRX | 4 |
40 |
41 | `CTX` and `CRX` pins can be changed by using `CAN.setPins(rx, tx)`.
42 |
43 | ## Installation
44 |
45 | ### Using the Arduino IDE Library Manager
46 |
47 | 1. Choose `Sketch` -> `Include Library` -> `Manage Libraries...`
48 | 2. Type `CAN` into the search box.
49 | 3. Click the row to select the library.
50 | 4. Click the `Install` button to install the library.
51 |
52 | ### Using Git
53 |
54 | ```sh
55 | cd ~/Documents/Arduino/libraries/
56 | git clone https://github.com/sandeepmistry/arduino-CAN CAN
57 | ```
58 |
59 | ## API
60 |
61 | See [API.md](API.md).
62 |
63 | ## Examples
64 |
65 | See [examples](examples) folder.
66 |
67 | ## License
68 |
69 | This library is [licensed](LICENSE) under the [MIT Licence](http://en.wikipedia.org/wiki/MIT_License).
70 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/examples/CANReceiver/CANReceiver.ino:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | #include
5 |
6 | void setup() {
7 | Serial.begin(9600);
8 | while (!Serial);
9 |
10 | Serial.println("CAN Receiver");
11 |
12 | // start the CAN bus at 500 kbps
13 | if (!CAN.begin(500E3)) {
14 | Serial.println("Starting CAN failed!");
15 | while (1);
16 | }
17 | }
18 |
19 | void loop() {
20 | // try to parse packet
21 | int packetSize = CAN.parsePacket();
22 |
23 | if (packetSize) {
24 | // received a packet
25 | Serial.print("Received ");
26 |
27 | if (CAN.packetExtended()) {
28 | Serial.print("extended ");
29 | }
30 |
31 | if (CAN.packetRtr()) {
32 | // Remote transmission request, packet contains no data
33 | Serial.print("RTR ");
34 | }
35 |
36 | Serial.print("packet with id 0x");
37 | Serial.print(CAN.packetId(), HEX);
38 |
39 | if (CAN.packetRtr()) {
40 | Serial.print(" and requested length ");
41 | Serial.println(CAN.packetDlc());
42 | } else {
43 | Serial.print(" and length ");
44 | Serial.println(packetSize);
45 |
46 | // only print packet data for non-RTR packets
47 | while (CAN.available()) {
48 | Serial.print((char)CAN.read());
49 | }
50 | Serial.println();
51 | }
52 |
53 | Serial.println();
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/examples/CANReceiverCallback/CANReceiverCallback.ino:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | #include
5 |
6 | void setup() {
7 | Serial.begin(9600);
8 | while (!Serial);
9 |
10 | Serial.println("CAN Receiver Callback");
11 |
12 | // start the CAN bus at 500 kbps
13 | if (!CAN.begin(500E3)) {
14 | Serial.println("Starting CAN failed!");
15 | while (1);
16 | }
17 |
18 | // register the receive callback
19 | CAN.onReceive(onReceive);
20 | }
21 |
22 | void loop() {
23 | // do nothing
24 | }
25 |
26 | void onReceive(int packetSize) {
27 | // received a packet
28 | Serial.print("Received ");
29 |
30 | if (CAN.packetExtended()) {
31 | Serial.print("extended ");
32 | }
33 |
34 | if (CAN.packetRtr()) {
35 | // Remote transmission request, packet contains no data
36 | Serial.print("RTR ");
37 | }
38 |
39 | Serial.print("packet with id 0x");
40 | Serial.print(CAN.packetId(), HEX);
41 |
42 | if (CAN.packetRtr()) {
43 | Serial.print(" and requested length ");
44 | Serial.println(CAN.packetDlc());
45 | } else {
46 | Serial.print(" and length ");
47 | Serial.println(packetSize);
48 |
49 | // only print packet data for non-RTR packets
50 | while (CAN.available()) {
51 | Serial.print((char)CAN.read());
52 | }
53 | Serial.println();
54 | }
55 |
56 | Serial.println();
57 | }
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/examples/CANSender/CANSender.ino:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | #include
5 |
6 | void setup() {
7 | Serial.begin(9600);
8 | while (!Serial);
9 |
10 | Serial.println("CAN Sender");
11 |
12 | // start the CAN bus at 500 kbps
13 | if (!CAN.begin(500E3)) {
14 | Serial.println("Starting CAN failed!");
15 | while (1);
16 | }
17 | }
18 |
19 | void loop() {
20 | // send packet: id is 11 bits, packet can contain up to 8 bytes of data
21 | Serial.print("Sending packet ... ");
22 |
23 | CAN.beginPacket(0x12);
24 | CAN.write('h');
25 | CAN.write('e');
26 | CAN.write('l');
27 | CAN.write('l');
28 | CAN.write('o');
29 | CAN.endPacket();
30 |
31 | Serial.println("done");
32 |
33 | delay(1000);
34 |
35 | // send extended packet: id is 29 bits, packet can contain up to 8 bytes of data
36 | Serial.print("Sending extended packet ... ");
37 |
38 | CAN.beginExtendedPacket(0xabcdef);
39 | CAN.write('w');
40 | CAN.write('o');
41 | CAN.write('r');
42 | CAN.write('l');
43 | CAN.write('d');
44 | CAN.endPacket();
45 |
46 | Serial.println("done");
47 |
48 | delay(1000);
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/examples/OBDII/EngineRPM/EngineRPM.ino:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | //
4 | //
5 | // This examples queries the engine RPM (OBD-II PID 0x0c) once a seconds and
6 | // prints the value to the serial monitor
7 | //
8 | #include
9 |
10 | // Most cars support 11-bit adddress, others (like Honda),
11 | // require 29-bit (extended) addressing, set the next line
12 | // to true to use extended addressing
13 | const bool useStandardAddressing = true;
14 |
15 | void setup() {
16 | Serial.begin(9600);
17 |
18 | Serial.println("CAN OBD-II engine RPM");
19 |
20 | // start the CAN bus at 500 kbps
21 | if (!CAN.begin(500E3)) {
22 | Serial.println("Starting CAN failed!");
23 | while (1);
24 | }
25 |
26 | // add filter to only receive the CAN bus ID's we care about
27 | if (useStandardAddressing) {
28 | CAN.filter(0x7e8);
29 | } else {
30 | CAN.filterExtended(0x18daf110);
31 | }
32 | }
33 |
34 | void loop() {
35 | if (useStandardAddressing) {
36 | CAN.beginPacket(0x7df, 8);
37 | } else {
38 | CAN.beginExtendedPacket(0x18db33f1, 8);
39 | }
40 | CAN.write(0x02); // number of additional bytes
41 | CAN.write(0x01); // show current data
42 | CAN.write(0x0c); // engine RPM
43 | CAN.endPacket();
44 |
45 | // wait for response
46 | while (CAN.parsePacket() == 0 ||
47 | CAN.read() < 3 || // correct length
48 | CAN.read() != 0x41 || // correct mode
49 | CAN.read() != 0x0c); // correct PID
50 |
51 | float rpm = ((CAN.read() * 256.0) + CAN.read()) / 4.0;
52 |
53 | Serial.print("Engine RPM = ");
54 | Serial.println(rpm);
55 |
56 | delay(1000);
57 | }
58 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/examples/OBDII/SupportedPIDs/SupportedPIDs.ino:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | //
4 | //
5 | // This examples queries the ECU for the Mode 01 OBD-II PID's it supports and prints the supported
6 | // OBD-II PID's to the serial monitor
7 | //
8 | // A full list of PID's and their meaning can be found here:
9 | // https://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_01
10 | //
11 | #include
12 |
13 | // Most cars support 11-bit adddress, others (like Honda),
14 | // require 29-bit (extended) addressing, set the next line
15 | // to true to use extended addressing
16 | const bool useStandardAddressing = true;
17 |
18 | void setup() {
19 | Serial.begin(9600);
20 |
21 | Serial.println("CAN OBD-II supported pids");
22 |
23 | // start the CAN bus at 500 kbps
24 | if (!CAN.begin(500E3)) {
25 | Serial.println("Starting CAN failed!");
26 | while (1);
27 | }
28 |
29 | // add filter to only receive the CAN bus ID's we care about
30 | if (useStandardAddressing) {
31 | CAN.filter(0x7e8);
32 | } else {
33 | CAN.filterExtended(0x18daf110);
34 | }
35 | }
36 |
37 | void loop() {
38 | for (int pid = 0x00; pid < 0xe0; pid += 0x20) {
39 | if (useStandardAddressing) {
40 | CAN.beginPacket(0x7df, 8);
41 | } else {
42 | CAN.beginExtendedPacket(0x18db33f1, 8);
43 | }
44 | CAN.write(0x02); // number of additional bytes
45 | CAN.write(0x01); // show current data
46 | CAN.write(pid); // PID
47 | CAN.endPacket();
48 |
49 | // wait for response
50 | while (CAN.parsePacket() == 0 ||
51 | CAN.read() < 6 || // correct length
52 | CAN.read() != 0x41 || // correct mode
53 | CAN.read() != pid); // correct PID
54 |
55 | unsigned long pidsSupported = 0;
56 |
57 | for (int i = 0; i < 4; i++) {
58 | pidsSupported <<= 8;
59 | pidsSupported |= CAN.read();
60 | }
61 |
62 | for (unsigned int i = 31; i > 0; i--) {
63 | if (pidsSupported & (1UL << i)) {
64 | int pidSupported = pid + (32 - i);
65 |
66 | Serial.print("0x");
67 | if (pidSupported < 16) {
68 | Serial.print("0");
69 | }
70 | Serial.println(pidSupported, HEX);
71 | }
72 | }
73 |
74 | if ((pidsSupported & 0x00000001) == 0x00000000) {
75 | // next round not supported, all done
76 | break;
77 | }
78 | }
79 |
80 | Serial.println("That's all folks!");
81 |
82 | while (1); // all done
83 | }
84 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/examples/OBDII/VINReader/VINReader.ino:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 | //
4 | //
5 | // This examples queries the ECU for the car's Vehicle Identification Number (VIN) and
6 | // prints it out to the serial monitor using Mode 09 and OBD-II PID 0x02
7 | //
8 | #include
9 |
10 | // Most cars support 11-bit adddress, others (like Honda),
11 | // require 29-bit (extended) addressing, set the next line
12 | // to true to use extended addressing
13 | const bool useStandardAddressing = true;
14 |
15 | void setup() {
16 | Serial.begin(9600);
17 |
18 | Serial.println("CAN OBD-II VIN reader");
19 |
20 | // start the CAN bus at 500 kbps
21 | if (!CAN.begin(500E3)) {
22 | Serial.println("Starting CAN failed!");
23 | while (1);
24 | }
25 |
26 | // add filter to only receive the CAN bus ID's we care about
27 | if (useStandardAddressing) {
28 | CAN.filter(0x7e8);
29 | } else {
30 | CAN.filterExtended(0x18daf110);
31 | }
32 | }
33 |
34 | void loop() {
35 | // send the request for the first chunk
36 | if (useStandardAddressing) {
37 | CAN.beginPacket(0x7df, 8);
38 | } else {
39 | CAN.beginExtendedPacket(0x18db33f1, 8);
40 | }
41 | CAN.write(0x02); // Number of additional bytes
42 | CAN.write(0x09); // Request vehicle information
43 | CAN.write(0x02); // Vehicle Identification Number (VIN)
44 | CAN.endPacket();
45 |
46 | // wait for response
47 | while (CAN.parsePacket() == 0 ||
48 | CAN.read() != 0x10 || CAN.read() != 0x14 || // correct length
49 | CAN.read() != 0x49 || // correct mode
50 | CAN.read() != 0x02 || // correct PID
51 | CAN.read() != 0x01);
52 |
53 | // print out
54 | while (CAN.available()) {
55 | Serial.write((char)CAN.read());
56 | }
57 |
58 | // read in remaining chunks
59 | for (int i = 0; i < 2; i++) {
60 | // send the request for the next chunk
61 | if (useStandardAddressing) {
62 | CAN.beginPacket(0x7e0, 8);
63 | } else {
64 | CAN.beginExtendedPacket(0x18db33f1, 8);
65 | }
66 | CAN.write(0x30);
67 | CAN.endPacket();
68 |
69 | // wait for response
70 | while (CAN.parsePacket() == 0 ||
71 | CAN.read() != (0x21 + i)); // correct sequence number
72 |
73 | // print out
74 | while (CAN.available()) {
75 | Serial.write((char)CAN.read());
76 | }
77 | }
78 |
79 | Serial.println("That's all folks!");
80 |
81 | while (1); // all done
82 | }
83 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map For CAN
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | CAN KEYWORD1
10 |
11 | #######################################
12 | # Methods and Functions (KEYWORD2)
13 | #######################################
14 |
15 | begin KEYWORD2
16 | end KEYWORD2
17 |
18 | beginPacket KEYWORD2
19 | beginExtendedPacket KEYWORD2
20 | endPacket KEYWORD2
21 |
22 | parsePacket KEYWORD2
23 | packetId KEYWORD2
24 | packetExtended KEYWORD2
25 | packetRtr KEYWORD2
26 | packetDlc KEYWORD2
27 |
28 | write KEYWORD2
29 |
30 | available KEYWORD2
31 | read KEYWORD2
32 | peek KEYWORD2
33 | flush KEYWORD2
34 |
35 | onReceive KEYWORD2
36 | filter KEYWORD2
37 | filterExtended KEYWORD2
38 | loopback KEYWORD2
39 | sleep KEYWORD2
40 | wakeup KEYWORD2
41 |
42 | setPins KEYWORD2
43 | setSPIFrequency KEYWORD2
44 | setClockFrequency KEYWORD2
45 | dumpRegisters KEYWORD2
46 |
47 | #######################################
48 | # Constants (LITERAL1)
49 | #######################################
50 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/library.properties:
--------------------------------------------------------------------------------
1 | name=CAN
2 | version=0.3.1
3 | author=Sandeep Mistry
4 | maintainer=Sandeep Mistry
5 | sentence=An Arduino library for sending and receiving data using CAN bus.
6 | paragraph=Supports Microchip MCP2515 based boards/shields and the Espressif ESP32's built-in SJA1000 compatible CAN controller.
7 | category=Communication
8 | url=https://github.com/sandeepmistry/arduino-CAN
9 | architectures=*
10 | includes=CAN.h
11 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/src/CAN.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | #ifndef CAN_H
5 | #define CAN_H
6 |
7 | #ifdef ARDUINO_ARCH_ESP32
8 | #include "ESP32SJA1000.h"
9 | #else
10 | #include "MCP2515.h"
11 | #endif
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/src/CANController.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | #include "CANController.h"
5 |
6 | CANControllerClass::CANControllerClass() :
7 | _onReceive(NULL),
8 |
9 | _packetBegun(false),
10 | _txId(-1),
11 | _txExtended(-1),
12 | _txRtr(false),
13 | _txDlc(0),
14 | _txLength(0),
15 |
16 | _rxId(-1),
17 | _rxExtended(false),
18 | _rxRtr(false),
19 | _rxDlc(0),
20 | _rxLength(0),
21 | _rxIndex(0)
22 | {
23 | // overide Stream timeout value
24 | setTimeout(0);
25 | }
26 |
27 | CANControllerClass::~CANControllerClass()
28 | {
29 | }
30 |
31 | int CANControllerClass::begin(long /*baudRate*/)
32 | {
33 | _packetBegun = false;
34 | _txId = -1;
35 | _txRtr =false;
36 | _txDlc = 0;
37 | _txLength = 0;
38 |
39 | _rxId = -1;
40 | _rxRtr = false;
41 | _rxDlc = 0;
42 | _rxLength = 0;
43 | _rxIndex = 0;
44 |
45 | return 1;
46 | }
47 |
48 | void CANControllerClass::end()
49 | {
50 | }
51 |
52 | int CANControllerClass::beginPacket(int id, int dlc, bool rtr)
53 | {
54 | if (id < 0 || id > 0x7FF) {
55 | return 0;
56 | }
57 |
58 | if (dlc > 8) {
59 | return 0;
60 | }
61 |
62 | _packetBegun = true;
63 | _txId = id;
64 | _txExtended = false;
65 | _txRtr = rtr;
66 | _txDlc = dlc;
67 | _txLength = 0;
68 |
69 | memset(_txData, 0x00, sizeof(_txData));
70 |
71 | return 1;
72 | }
73 |
74 | int CANControllerClass::beginExtendedPacket(long id, int dlc, bool rtr)
75 | {
76 | if (id < 0 || id > 0x1FFFFFFF) {
77 | return 0;
78 | }
79 |
80 | if (dlc > 8) {
81 | return 0;
82 | }
83 |
84 | _packetBegun = true;
85 | _txId = id;
86 | _txExtended = true;
87 | _txRtr = rtr;
88 | _txDlc = dlc;
89 | _txLength = 0;
90 |
91 | memset(_txData, 0x00, sizeof(_txData));
92 |
93 | return 1;
94 | }
95 |
96 | int CANControllerClass::endPacket()
97 | {
98 | if (!_packetBegun) {
99 | return 0;
100 | }
101 | _packetBegun = false;
102 |
103 | if (_txDlc >= 0) {
104 | _txLength = _txDlc;
105 | }
106 |
107 | return 1;
108 | }
109 |
110 | int CANControllerClass::parsePacket()
111 | {
112 | return -1; // Return changed to -1 to differenciate from DLC = 0
113 | }
114 |
115 | long CANControllerClass::packetId()
116 | {
117 | return _rxId;
118 | }
119 |
120 | bool CANControllerClass::packetExtended()
121 | {
122 | return _rxExtended;
123 | }
124 |
125 | bool CANControllerClass::packetRtr()
126 | {
127 | return _rxRtr;
128 | }
129 |
130 | int CANControllerClass::packetDlc()
131 | {
132 | return _rxDlc;
133 | }
134 |
135 | size_t CANControllerClass::write(uint8_t byte)
136 | {
137 | return write(&byte, sizeof(byte));
138 | }
139 |
140 | size_t CANControllerClass::write(const uint8_t *buffer, size_t size)
141 | {
142 | if (!_packetBegun) {
143 | return 0;
144 | }
145 |
146 | if (size > (sizeof(_txData) - _txLength)) {
147 | size = sizeof(_txData) - _txLength;
148 | }
149 |
150 | memcpy(&_txData[_txLength], buffer, size);
151 | _txLength += size;
152 |
153 | return size;
154 | }
155 |
156 | int CANControllerClass::available()
157 | {
158 | return (_rxLength - _rxIndex);
159 | }
160 |
161 | int CANControllerClass::read()
162 | {
163 | if (!available()) {
164 | return -1;
165 | }
166 |
167 | return _rxData[_rxIndex++];
168 | }
169 |
170 | int CANControllerClass::peek()
171 | {
172 | if (!available()) {
173 | return -1;
174 | }
175 |
176 | return _rxData[_rxIndex];
177 | }
178 |
179 | void CANControllerClass::flush()
180 | {
181 | }
182 |
183 | void CANControllerClass::onReceive(void(*callback)(int))
184 | {
185 | _onReceive = callback;
186 | }
187 |
188 | int CANControllerClass::filter(int /*id*/, int /*mask*/)
189 | {
190 | return 0;
191 | }
192 |
193 | int CANControllerClass::filterExtended(long /*id*/, long /*mask*/)
194 | {
195 | return 0;
196 | }
197 |
198 | int CANControllerClass::observe()
199 | {
200 | return 0;
201 | }
202 |
203 | int CANControllerClass::loopback()
204 | {
205 | return 0;
206 | }
207 |
208 | int CANControllerClass::sleep()
209 | {
210 | return 0;
211 | }
212 |
213 | int CANControllerClass::wakeup()
214 | {
215 | return 0;
216 | }
217 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/src/CANController.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | #ifndef CAN_CONTROLLER_H
5 | #define CAN_CONTROLLER_H
6 |
7 | #include
8 |
9 | class CANControllerClass : public Stream {
10 |
11 | public:
12 | virtual int begin(long baudRate);
13 | virtual void end();
14 |
15 | int beginPacket(int id, int dlc = -1, bool rtr = false);
16 | int beginExtendedPacket(long id, int dlc = -1, bool rtr = false);
17 | virtual int endPacket();
18 |
19 | virtual int parsePacket();
20 | long packetId();
21 | bool packetExtended();
22 | bool packetRtr();
23 | int packetDlc();
24 |
25 | // from Print
26 | virtual size_t write(uint8_t byte);
27 | virtual size_t write(const uint8_t *buffer, size_t size);
28 |
29 | // from Stream
30 | virtual int available();
31 | virtual int read();
32 | virtual int peek();
33 | virtual void flush();
34 |
35 | virtual void onReceive(void(*callback)(int));
36 |
37 | virtual int filter(int id) { return filter(id, 0x7ff); }
38 | virtual int filter(int id, int mask);
39 | virtual int filterExtended(long id) { return filterExtended(id, 0x1fffffff); }
40 | virtual int filterExtended(long id, long mask);
41 |
42 | virtual int observe();
43 | virtual int loopback();
44 | virtual int sleep();
45 | virtual int wakeup();
46 |
47 | protected:
48 | CANControllerClass();
49 | virtual ~CANControllerClass();
50 |
51 | protected:
52 | void (*_onReceive)(int);
53 |
54 | bool _packetBegun;
55 | long _txId;
56 | bool _txExtended;
57 | bool _txRtr;
58 | int _txDlc;
59 | int _txLength;
60 | uint8_t _txData[8];
61 |
62 | long _rxId;
63 | bool _rxExtended;
64 | bool _rxRtr;
65 | int _rxDlc;
66 | int _rxLength;
67 | int _rxIndex;
68 | uint8_t _rxData[8];
69 | };
70 |
71 | #endif
72 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/src/ESP32SJA1000.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | #ifdef ARDUINO_ARCH_ESP32
5 |
6 | #ifndef ESP32_SJA1000_H
7 | #define ESP32_SJA1000_H
8 |
9 | #include "CANController.h"
10 |
11 | #define DEFAULT_CAN_RX_PIN GPIO_NUM_4
12 | #define DEFAULT_CAN_TX_PIN GPIO_NUM_5
13 |
14 | class ESP32SJA1000Class : public CANControllerClass
15 | {
16 |
17 | public:
18 | ESP32SJA1000Class();
19 | virtual ~ESP32SJA1000Class();
20 |
21 | virtual int begin(long baudRate);
22 | virtual void end();
23 |
24 | virtual int endPacket();
25 |
26 | virtual int parsePacket();
27 |
28 | virtual void onReceive(void (*callback)(int));
29 |
30 | using CANControllerClass::filter;
31 | virtual int filter(int id, int mask);
32 | using CANControllerClass::filterExtended;
33 | virtual int filterExtended(long id, long mask);
34 |
35 | bool setFilterMode(const uint8_t &mode); /**< Sets the Filter Mode for the SJA1000 CAN Controller of the ESP32. */
36 | bool setACRn(const uint8_t *acn); /**< Sets the Acceptance Register of the SJA1000 CAN Controller of the ESP32. */
37 | bool setAMRn(const uint8_t *amn); /**< Sets the Acceptance Mask Register of the SJA1000 CAN Controller of the ESP32 */
38 |
39 | virtual int observe();
40 | virtual int loopback();
41 | virtual int sleep();
42 | virtual int wakeup();
43 |
44 | void setPins(int rx, int tx);
45 |
46 | void dumpRegisters(Stream &out);
47 |
48 | private:
49 | void reset();
50 |
51 | void handleInterrupt();
52 |
53 | uint8_t readRegister(uint8_t address);
54 | void modifyRegister(uint8_t address, uint8_t mask, uint8_t value);
55 | void writeRegister(uint8_t address, uint8_t value);
56 |
57 | static void onInterrupt(void *arg);
58 |
59 | private:
60 | gpio_num_t _rxPin;
61 | gpio_num_t _txPin;
62 | bool _loopback;
63 | intr_handle_t _intrHandle;
64 | };
65 |
66 | extern ESP32SJA1000Class CAN;
67 |
68 | #endif
69 |
70 | #endif
71 |
--------------------------------------------------------------------------------
/Coding/fw/lib/CAN/src/MCP2515.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) Sandeep Mistry. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | #ifndef ARDUINO_ARCH_ESP32
5 |
6 | #ifndef MCP2515_H
7 | #define MCP2515_H
8 |
9 | #include
10 |
11 | #include "CANController.h"
12 |
13 | #define MCP2515_DEFAULT_CLOCK_FREQUENCY 16e6
14 |
15 | #if defined(ARDUINO_ARCH_SAMD) && defined(PIN_SPI_MISO) && defined(PIN_SPI_MOSI) && defined(PIN_SPI_SCK) && (PIN_SPI_MISO == 10) && (PIN_SPI_MOSI == 8) && (PIN_SPI_SCK == 9)
16 | // Arduino MKR board: MKR CAN shield CS is pin 3, INT is pin 7
17 | #define MCP2515_DEFAULT_CS_PIN 3
18 | #define MCP2515_DEFAULT_INT_PIN 7
19 | #else
20 | #define MCP2515_DEFAULT_CS_PIN 10
21 | #define MCP2515_DEFAULT_INT_PIN 2
22 | #endif
23 |
24 | class MCP2515Class : public CANControllerClass {
25 |
26 | public:
27 | MCP2515Class();
28 | virtual ~MCP2515Class();
29 |
30 | virtual int begin(long baudRate);
31 | virtual void end();
32 |
33 | virtual int endPacket();
34 |
35 | virtual int parsePacket();
36 |
37 | virtual void onReceive(void(*callback)(int));
38 |
39 | using CANControllerClass::filter;
40 | virtual int filter(int id, int mask);
41 | using CANControllerClass::filterExtended;
42 | virtual int filterExtended(long id, long mask);
43 |
44 | virtual int observe();
45 | virtual int loopback();
46 | virtual int sleep();
47 | virtual int wakeup();
48 |
49 | void setPins(int cs = MCP2515_DEFAULT_CS_PIN, int irq = MCP2515_DEFAULT_INT_PIN);
50 | void setSPIFrequency(uint32_t frequency);
51 | void setClockFrequency(long clockFrequency);
52 |
53 | void dumpRegisters(Stream& out);
54 |
55 | private:
56 | void reset();
57 |
58 | void handleInterrupt();
59 |
60 | uint8_t readRegister(uint8_t address);
61 | void modifyRegister(uint8_t address, uint8_t mask, uint8_t value);
62 | void writeRegister(uint8_t address, uint8_t value);
63 |
64 | static void onInterrupt();
65 |
66 | private:
67 | SPISettings _spiSettings;
68 | int _csPin;
69 | int _intPin;
70 | long _clockFrequency;
71 | };
72 |
73 | extern MCP2515Class CAN;
74 |
75 | #endif
76 |
77 | #endif
78 |
--------------------------------------------------------------------------------
/Coding/fw/lib/IO/io.cpp:
--------------------------------------------------------------------------------
1 | /* MIT License
2 | *
3 | * Copyright (c) 2019 - 2020 Andreas Merkle
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all
13 | * copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | * SOFTWARE.
22 | */
23 |
24 | /****************************************************************************************************/
25 | /**
26 | @brief I/O abstraction
27 | @author Andreas Merkle
28 | @addtogroup HAL
29 | @{
30 | @file io.cpp
31 | @ref io.h
32 |
33 | ***************************************************************************************************/
34 | /* INCLUDES ***************************************************************************************/
35 | #include
36 |
37 | /* C-Interface ************************************************************************************/
38 | extern "C"
39 | {
40 | }
41 |
42 | /* CONSTANTS **************************************************************************************/
43 |
44 | /* MACROS *****************************************************************************************/
45 |
46 | /* TYPES ******************************************************************************************/
47 |
48 | /* PROTOTYPES *************************************************************************************/
49 |
50 | /* VARIABLES **************************************************************************************/
51 |
52 | /* PUBLIC METHODES ********************************************************************************/
53 |
54 | /* PROTECTED METHODES *****************************************************************************/
55 |
56 | /* PRIVATE METHODES *******************************************************************************/
57 |
58 | /* EXTERNAL FUNCTIONS *****************************************************************************/
59 |
60 | /* INTERNAL FUNCTIONS *****************************************************************************/
61 |
62 | /** @} */
--------------------------------------------------------------------------------
/Coding/fw/lib/IO/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "IO",
3 | "version": "0.1.0",
4 | "description": "...",
5 | "authors": [{
6 | "name": "NewTec GmbH",
7 | "url": "https://github.com/NewTec-GmbH/esp32-can-iot",
8 | "maintainer": true
9 | }],
10 | "license": "BSD-3",
11 | "dependencies": [],
12 | "frameworks": "*",
13 | "platforms": "*"
14 | }
15 |
--------------------------------------------------------------------------------
/Coding/fw/lib/Lawicel/README.md:
--------------------------------------------------------------------------------
1 | # Lawicel Protocol
2 |
3 | This Project implements the Protocol found in the [CAN232 Website](http://www.can232.com/docs/can232_v3.pdf).
4 |
5 | # Changes to the Protocol
6 |
7 | All the specified Commands specified in the Document are implemented and work as described. In addition to these, one command was added to get the current configuration of the system:
8 |
9 | **D[CR]**
10 | Display System Information
11 | Returns: Dwxyz[CR]
12 | * D: Display Settings Command
13 | * w: Auto-start Status. 0=Deactivated, 1=Normal, 2=Listen Only
14 | * x: CAN Baudrate. Follows same numeration as Sn[CR] Command
15 | * y: Timestamp Status: 0=Deactivated, 1=Activated
16 | * z: Channel Status. 0=Closed, 1=Normal, 2=Listen Only
17 | * [CR]: Command Termination
18 |
19 |
--------------------------------------------------------------------------------
/Coding/fw/lib/Lawicel/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Lawicel",
3 | "version": "0.1.0",
4 | "description": "...",
5 | "authors": [{
6 | "name": "NewTec GmbH",
7 | "url": "https://github.com/NewTec-GmbH/esp32-can-iot",
8 | "maintainer": true
9 | }],
10 | "license": "BSD-3",
11 | "dependencies": [],
12 | "frameworks": "*",
13 | "platforms": "*"
14 | }
15 |
--------------------------------------------------------------------------------
/Coding/fw/lib/README.md:
--------------------------------------------------------------------------------
1 | # Libraries
2 |
3 | - [CAN](#CAN)
4 | - [IO](#IO)
5 | - [Lawicel](#Lawicel)
6 | - [Settings](#Settings)
7 | - [Test](#Test)
8 | - [WebServer](#WebServer)
9 |
10 | # CAN
11 | This folder contains an adaptation of the [Arduino-CAN](https://github.com/sandeepmistry/arduino-CAN) Library to be fully compatible with the Project. Changes made include access to the Raw Buffer, Return values when parsing frames and access to writing the registers of the SJA1000 CAN Controller.
12 |
13 | # IO
14 | Here is the Hardware Abstraction Layer (HAL) of the Project, providing an implementation of the Arduino and ESP32 GPIO functions.
15 |
16 | # Lawicel
17 | The Lawicel Protocol can be found here, as well as the 3 Interfaces needed for the correct operation of the protocol. The Procotol description is found [here](./Lawicel/README.md)
18 |
19 | # Settings
20 | The FlashMem Module interfaces directly with the Preferences Library, native to the ESP32 System.
21 | The WLAN Module takes care of the wireless communication for the device.
22 |
23 | # Test
24 | This project contains Unit Tests that run on the native environment declared in the .ini file.
25 | In this case, it runs on Windows, therefore an implementation of Arduino-Native functions is needed, for example, the implementation of the Class WString.
26 |
27 | # WebServer
28 | Using the WLAN Module as basis, the WebServer is run and configured in here, running in parallel from the rest of the program.
29 | It is an implementation of the [AsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) Library.
--------------------------------------------------------------------------------
/Coding/fw/lib/Settings/FlashMem.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | BSD 3-Clause License
3 |
4 |
5 | Copyright (c) 2020-2021, NewTec GmbH - www.newtec.de
6 | All rights reserved.
7 |
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 |
13 | 1. Redistributions of source code must retain the above copyright notice, this
14 | list of conditions and the following disclaimer.
15 |
16 |
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 |
21 |
22 | 3. Neither the name of the copyright holder nor the names of its
23 | contributors may be used to endorse or promote products derived from
24 | this software without specific prior written permission.
25 |
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | ***************************************************************************************************/
38 | /**
39 | @addtogroup Settings
40 | @{
41 | @file FlashMem.h
42 |
43 | Handler for ESP32 Preferences in Flash Memory
44 |
45 | ***************************************************************************************************/
46 | #ifndef FLASH_MEM_H_
47 | #define FLASH_MEM_H_
48 |
49 | /* INCLUDES ***************************************************************************************/
50 | #include
51 |
52 | /* C-Interface ************************************************************************************/
53 | extern "C"
54 | {
55 | }
56 |
57 | /* FORWARD DECLARATIONS ***************************************************************************/
58 |
59 | /*
60 | * Implementation of the Preferences Library for the project. Initial values and commands are
61 | * saved and called through this class.
62 | */
63 | namespace Settings
64 | {
65 | /**
66 | * Saves uint32_t value to Flash memory
67 | *
68 | * @param[in] directory Directory where information is stored
69 | * @param[in] key Name of Memory Location
70 | * @param[in] value Value to be stored
71 | * @return success
72 | */
73 | bool save(const String &directory, const String &key, const uint32_t &value);
74 |
75 | /**
76 | * Saves String to Flash memory
77 | *
78 | * @param[in] directory Directory where information is stored
79 | * @param[in] key Name of Memory Location
80 | * @param[in] value String to be stored
81 | * @return success
82 | */
83 | bool save(const String &directory, const String &key, const String &value);
84 |
85 | /**
86 | * Gets uint32_t value from Flash memory
87 | *
88 | * @param[in] directory Directory where information is stored
89 | * @param[in] key Name of Memory Location
90 | * @param[out] value Variable to write the value to
91 | * @param[in] defaultValue Default value returned if no value stored in memory
92 | * @return success
93 | */
94 | bool get(const String &directory, const String &key, uint32_t &value, const uint32_t defaultValue = 0U);
95 |
96 | /**
97 | * Gets String from Flash memory
98 | *
99 | * @param[in] directory Directory where information is stored
100 | * @param[in] key Name of Memory Location
101 | * @param[out] value Variable to write the string to
102 | * @param[in] defaultValue Default value returned if no value stored in memory
103 | * @return success
104 | */
105 | bool get(const String &directory, const String &key, String &value, const String &defaultValue = "");
106 |
107 | /**
108 | * Clears all entries on a directory
109 | *
110 | * @param[in] directory Directory to clear
111 | * @return success
112 | */
113 | bool clear(const String &directory);
114 |
115 | }; /** namespace Settings */
116 |
117 | /* INLINE FUNCTIONS ***************************************************************************/
118 |
119 | /* PROTOTYPES *********************************************************************************/
120 |
121 | #endif /* FLASH_MEM_H_ */
122 |
123 | /** @} */
--------------------------------------------------------------------------------
/Coding/fw/lib/Settings/WLAN.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | BSD 3-Clause License
3 |
4 |
5 | Copyright (c) 2020-2021, NewTec GmbH - www.newtec.de
6 | All rights reserved.
7 |
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 |
13 | 1. Redistributions of source code must retain the above copyright notice, this
14 | list of conditions and the following disclaimer.
15 |
16 |
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 |
21 |
22 | 3. Neither the name of the copyright holder nor the names of its
23 | contributors may be used to endorse or promote products derived from
24 | this software without specific prior written permission.
25 |
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | ***************************************************************************************************/
38 | /**
39 | @addtogroup Settings
40 | @{
41 | @file WLAN.h
42 |
43 | WiFi configuration of ESP32
44 |
45 | ***************************************************************************************************/
46 | #ifndef WLAN_H_
47 | #define WLAN_H_
48 |
49 | /* INCLUDES ***************************************************************************************/
50 | /* C-Interface ************************************************************************************/
51 | extern "C"
52 | {
53 | }
54 |
55 | /* CONSTANTS **************************************************************************************/
56 |
57 | /**
58 | * Handler Class for WiFi Connection
59 | */
60 | namespace wlan
61 | {
62 | const String &getSTA_SSID(); /**< Get saved Station SSID */
63 | const String &getSTA_PASS(); /**< Get saved Station Password */
64 | const String &getAP_SSID(); /**< Get saved Access Point SSID */
65 | const String &getAP_PASS(); /**< Get saved Access Point Password */
66 | bool getAP_MODE(); /**< Get Access Point Mode Status */
67 | bool checkConnection(void); /**< Checks WiFi Connection */
68 | const IPAddress &getIPAddress(void); /**< Get the IP Address of the ESP */
69 | void saveConfig(const String &key, const String &value); /**< Saves the desired value in the memory "key" */
70 | bool begin(); /**< Starts the WiFi Connection */
71 |
72 | } /** namespace wlan */
73 |
74 | /* FORWARD DECLARATIONS **************************************************************************/
75 |
76 | /* INLINE FUNCTIONS ******************************************************************************/
77 |
78 | /* PROTOTYPES ************************************************************************************/
79 | #endif /* WEB_CONFIG_H_ */
80 |
81 | /** @} */
--------------------------------------------------------------------------------
/Coding/fw/lib/Settings/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Settings",
3 | "version": "0.1.0",
4 | "description": "...",
5 | "authors": [{
6 | "name": "NewTec GmbH",
7 | "url": "https://github.com/NewTec-GmbH/esp32-can-iot",
8 | "maintainer": true
9 | }],
10 | "license": "BSD-3",
11 | "dependencies": [],
12 | "frameworks": "*",
13 | "platforms": "*"
14 | }
15 |
--------------------------------------------------------------------------------
/Coding/fw/lib/Test/Arduino.h:
--------------------------------------------------------------------------------
1 | /* MIT License
2 | *
3 | * Copyright (c) 2019 - 2020 Andreas Merkle
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all
13 | * copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | * SOFTWARE.
22 | */
23 |
24 | /*******************************************************************************
25 | DESCRIPTION
26 | *******************************************************************************/
27 | /**
28 | * @brief Arduino stuff for test
29 | * @author Andreas Merkle
30 | *
31 | * @addtogroup test
32 | *
33 | * @{
34 | */
35 |
36 | #ifndef __ARDUINO_H__
37 | #define __ARDUINO_H__
38 |
39 | /******************************************************************************
40 | * Compile Switches
41 | *****************************************************************************/
42 |
43 | /******************************************************************************
44 | * Includes
45 | *****************************************************************************/
46 | #include
47 | #include
48 | #include
49 | #include
50 | #include
51 | #include
52 | #include
53 | #include
54 | #include
55 |
56 | #include "WString.h"
57 | #include "Print.h"
58 |
59 | /******************************************************************************
60 | * Macros
61 | *****************************************************************************/
62 |
63 | /******************************************************************************
64 | * Types and Classes
65 | *****************************************************************************/
66 |
67 | /** Arduino boolean */
68 | typedef bool boolean;
69 |
70 | /******************************************************************************
71 | * Functions
72 | *****************************************************************************/
73 |
74 | static unsigned long millis()
75 | {
76 | clock_t now = clock();
77 |
78 | return (now * 1000UL) / CLOCKS_PER_SEC;
79 | }
80 |
81 |
82 | double pow(double __x, double __y)
83 | {
84 | return __builtin_powl(__x, __y);
85 | }
86 |
87 |
88 | #endif /* __ARDUINO_H__ */
89 |
90 | /** @} */
--------------------------------------------------------------------------------
/Coding/fw/lib/WebServer/CaptivePortal.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | BSD 3-Clause License
3 |
4 |
5 | Copyright (c) 2020-2021, NewTec GmbH - www.newtec.de
6 | All rights reserved.
7 |
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 |
13 | 1. Redistributions of source code must retain the above copyright notice, this
14 | list of conditions and the following disclaimer.
15 |
16 |
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 |
21 |
22 | 3. Neither the name of the copyright holder nor the names of its
23 | contributors may be used to endorse or promote products derived from
24 | this software without specific prior written permission.
25 |
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | ***************************************************************************************************/
38 | /**
39 | @addtogroup Webserver
40 | @{
41 | @file CaptivePOrtal.h
42 |
43 | Captive Portal for ESP32 WebServer
44 |
45 | * @}
46 | ***************************************************************************************************/
47 | #ifndef CAPTIVE_PORTAL_H_
48 | #define CAPTIVE_PORTAL_H_
49 |
50 | /* INCLUDES ***************************************************************************************/
51 | #include
52 |
53 | /* C-Interface ************************************************************************************/
54 | extern "C"
55 | {
56 | }
57 |
58 | /* CONSTANTS **************************************************************************************/
59 |
60 | /* FORWARD DECLARATIONS **************************************************************************/
61 |
62 | /**
63 | * Captive Portal Handler
64 | */
65 | namespace CaptivePortal
66 | {
67 | /**
68 | * Registers the Captive Portal handler on the Server.
69 | *
70 | * @param[in] webServer AsyncWebserver Instance to register to.
71 | */
72 | void init(AsyncWebServer &webServer);
73 |
74 | /**
75 | * Verify if restart has been requested
76 | *
77 | * @return True if restart has been requested. False otherwise.
78 | */
79 | bool isRestartRequested();
80 |
81 | } /* namespace CaptivePortal */
82 |
83 | /* INLINE FUNCTIONS ******************************************************************************/
84 |
85 | /* PROTOTYPES ************************************************************************************/
86 |
87 | #endif /* CAPTIVE_PORTAL_H_ */
--------------------------------------------------------------------------------
/Coding/fw/lib/WebServer/ESP_Server.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | BSD 3-Clause License
3 |
4 |
5 | Copyright (c) 2020-2021, NewTec GmbH - www.newtec.de
6 | All rights reserved.
7 |
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 |
13 | 1. Redistributions of source code must retain the above copyright notice, this
14 | list of conditions and the following disclaimer.
15 |
16 |
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 |
21 |
22 | 3. Neither the name of the copyright holder nor the names of its
23 | contributors may be used to endorse or promote products derived from
24 | this software without specific prior written permission.
25 |
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | ***************************************************************************************************/
38 | /**
39 | @addtogroup Webserver
40 | @{
41 | @file ESP_Server.h
42 |
43 | Handler for ESP32 WebServer
44 |
45 | * @}
46 | ***************************************************************************************************/
47 | #ifndef ESP_SERVER_H_
48 | #define ESP_SERVER_H_
49 |
50 | /* INCLUDES ***************************************************************************************/
51 | #include
52 | #include
53 | #include "Web_config.h"
54 |
55 | /* C-Interface ************************************************************************************/
56 | extern "C"
57 | {
58 | }
59 |
60 | /* FORWARD DECLARATIONS ***************************************************************************/
61 |
62 | /**
63 | * Abstraction of the ESPAsyncWebServer Library
64 | */
65 | namespace ESPServer
66 | {
67 | bool begin(void); /**< Initialization of AsyncWebServer, DNS and WiFi capabilities. */
68 | bool end(void); /**< Disconnects and disables the WebServer */
69 | bool isRestartRequested(void); /**< Returns true if restart requested by Web Server */
70 | } /** namespace ESPServer */
71 |
72 | /* INLINE FUNCTIONS ***************************************************************************/
73 |
74 | /* PROTOTYPES *********************************************************************************/
75 |
76 | #endif /* ESP_SERVER_H */
--------------------------------------------------------------------------------
/Coding/fw/lib/WebServer/Pages.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | BSD 3-Clause License
3 |
4 |
5 | Copyright (c) 2020-2021, NewTec GmbH - www.newtec.de
6 | All rights reserved.
7 |
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 |
13 | 1. Redistributions of source code must retain the above copyright notice, this
14 | list of conditions and the following disclaimer.
15 |
16 |
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 |
21 |
22 | 3. Neither the name of the copyright holder nor the names of its
23 | contributors may be used to endorse or promote products derived from
24 | this software without specific prior written permission.
25 |
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | ***************************************************************************************************/
38 | /**
39 | @addtogroup Webserver
40 | @{
41 | @file Pages.h
42 |
43 | Web Pages for ESP32 WebServer
44 |
45 | * @}
46 | ***************************************************************************************************/
47 | #ifndef PAGES_H_
48 | #define PAGES_H_
49 |
50 | /* INCLUDES ***************************************************************************************/
51 | #include
52 |
53 | /* C-Interface ************************************************************************************/
54 | extern "C"
55 | {
56 | }
57 |
58 | /* CONSTANTS **************************************************************************************/
59 |
60 | /**
61 | * Handler of available Web Pages
62 | */
63 | namespace Pages
64 | {
65 | /**
66 | * Initialize all web pages and register them on the web server.
67 | *
68 | * @param[in] webServer Web server
69 | */
70 | void init(AsyncWebServer &webServer);
71 |
72 | } /* namespace Pages */
73 |
74 | /* FORWARD DECLARATIONS **************************************************************************/
75 |
76 | /* INLINE FUNCTIONS ******************************************************************************/
77 |
78 | /* PROTOTYPES ************************************************************************************/
79 |
80 | #endif /* PAGES_H_ */
--------------------------------------------------------------------------------
/Coding/fw/lib/WebServer/Web_Config.cpp:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | BSD 3-Clause License
3 |
4 |
5 | Copyright (c) 2020-2021, NewTec GmbH - www.newtec.de
6 | All rights reserved.
7 |
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 |
13 | 1. Redistributions of source code must retain the above copyright notice, this
14 | list of conditions and the following disclaimer.
15 |
16 |
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 |
21 |
22 | 3. Neither the name of the copyright holder nor the names of its
23 | contributors may be used to endorse or promote products derived from
24 | this software without specific prior written permission.
25 |
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | ***************************************************************************************************/
38 | /**
39 | @addtogroup Webserver
40 | @{
41 | @file Web_Config.cpp
42 |
43 | Stores the Credentials and configuration of the Webserver. @ref Web_config.h
44 |
45 | * @}
46 | ***************************************************************************************************/
47 | /* INCLUDES ***************************************************************************************/
48 | #include "Web_Config.h"
49 |
50 | /* C-Interface ************************************************************************************/
51 | extern "C"
52 | {
53 | }
54 |
55 | /* CONSTANTS **************************************************************************************/
56 |
57 | static const String DIRECTORY = "Server"; /**< Directory to which information is saved */
58 | static const String WEB_USER = "admin"; /**< Web Username */
59 | static const String WEB_PASSWORD = "admin"; /**< Web Password */
60 |
61 | /* MACROS *****************************************************************************************/
62 |
63 | /* TYPES ******************************************************************************************/
64 |
65 | /* PROTOTYPES *************************************************************************************/
66 |
67 | /* VARIABLES **************************************************************************************/
68 |
69 | /* PUBLIC METHODES ********************************************************************************/
70 |
71 | /**************************************************************************************************/
72 |
73 | /**
74 | * Get Username for Authentification of Webpages
75 | *
76 | * @return Web Username
77 | */
78 | const String &WebConfig::getWEB_USER()
79 | {
80 | return WEB_USER;
81 | }
82 |
83 | /**************************************************************************************************/
84 |
85 | /**
86 | * Get Password for Authentification of Webpages
87 | *
88 | * @return Web Password
89 | */
90 | const String &WebConfig::getWEB_PASS()
91 | {
92 | return WEB_PASSWORD;
93 | }
94 |
95 | /* PROTECTED METHODES *****************************************************************************/
96 |
97 | /* PRIVATE METHODES *******************************************************************************/
98 |
99 | /* EXTERNAL FUNCTIONS *****************************************************************************/
100 |
101 | /* INTERNAL FUNCTIONS *****************************************************************************/
102 |
--------------------------------------------------------------------------------
/Coding/fw/lib/WebServer/Web_Config.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | BSD 3-Clause License
3 |
4 |
5 | Copyright (c) 2020-2021, NewTec GmbH - www.newtec.de
6 | All rights reserved.
7 |
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 |
13 | 1. Redistributions of source code must retain the above copyright notice, this
14 | list of conditions and the following disclaimer.
15 |
16 |
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 |
21 |
22 | 3. Neither the name of the copyright holder nor the names of its
23 | contributors may be used to endorse or promote products derived from
24 | this software without specific prior written permission.
25 |
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | ***************************************************************************************************/
38 | /**
39 | @addtogroup Webserver
40 | @{
41 | @file Web_config.h
42 |
43 | Configuration of ESP32 WebServer
44 |
45 | * @}
46 | ***************************************************************************************************/
47 | #ifndef WEB_CONFIG_H_
48 | #define WEB_CONFIG_H_
49 |
50 | /* INCLUDES ***************************************************************************************/
51 | #include "FlashMem.h"
52 |
53 | /* C-Interface ************************************************************************************/
54 | extern "C"
55 | {
56 | }
57 |
58 | /* CONSTANTS **************************************************************************************/
59 |
60 | /**
61 | * Handler of Web Configuration and HTML Responses
62 | */
63 | namespace WebConfig
64 | {
65 | static const uint32_t DNS_PORT = 53U; /**< DNS Port */
66 | static const uint32_t WEBSERVER_PORT = 80U; /**< HTTP Port */
67 |
68 | const String &getWEB_USER(); /**< Get saved Webserver Username */
69 | const String &getWEB_PASS(); /**< Get saved Webserver Password */
70 |
71 | /**
72 | * HTTP Status Codes for as Responses for Client Requests
73 | */
74 | enum StatusCodes
75 | {
76 | HTTP_OK = 200, /**< OK */
77 | HTTP_BAD_REQUEST = 400, /**< Bad Request */
78 | HTTP_UNAUTHORIZED = 401, /**< Unauthorized */
79 | HTTP_NOT_FOUND = 404 /**< Not Found */
80 | };
81 |
82 | } /* namespace WebConfig */
83 |
84 | /* FORWARD DECLARATIONS **************************************************************************/
85 |
86 | /* INLINE FUNCTIONS ******************************************************************************/
87 |
88 | /* PROTOTYPES ************************************************************************************/
89 | #endif /* WEB_CONFIG_H_ */
--------------------------------------------------------------------------------
/Coding/fw/lib/WebServer/Websocket.h:
--------------------------------------------------------------------------------
1 | /***************************************************************************************************
2 | BSD 3-Clause License
3 |
4 |
5 | Copyright (c) 2020-2021, NewTec GmbH - www.newtec.de
6 | All rights reserved.
7 |
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 |
13 | 1. Redistributions of source code must retain the above copyright notice, this
14 | list of conditions and the following disclaimer.
15 |
16 |
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 |
21 |
22 | 3. Neither the name of the copyright holder nor the names of its
23 | contributors may be used to endorse or promote products derived from
24 | this software without specific prior written permission.
25 |
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 | ***************************************************************************************************/
38 | /**
39 | @addtogroup Webserver
40 | @{
41 | @file Websocket.h
42 |
43 | Configuration of ESP32 WebSocket
44 |
45 | * @}
46 | ***************************************************************************************************/
47 | #ifndef WEBSOCKET_H_
48 | #define WEBSOCKET_H_
49 | /* INCLUDES ***************************************************************************************/
50 | #include
51 |
52 | /* C-Interface ************************************************************************************/
53 | extern "C"
54 | {
55 | }
56 |
57 | /* CONSTANTS **************************************************************************************/
58 |
59 | /**
60 | * Handler of Web Socket
61 | */
62 | namespace websocket
63 | {
64 | void init(AsyncWebServer &server); /**< Initializes the WebSocket Service */
65 | void send(const String &message); /**< Sends a WebSocket Message */
66 | bool receive(char &c); /**< Receives a WebSocket Message */
67 | bool sendBuffer(); /**< Sends the Buffered Websocket Messages */
68 |
69 | }; /* namespace websocket */
70 |
71 | /* FORWARD DECLARATIONS **************************************************************************/
72 |
73 | /* INLINE FUNCTIONS ******************************************************************************/
74 |
75 | /* PROTOTYPES ************************************************************************************/
76 |
77 | #endif /* WEBSOCKET_H_ */
--------------------------------------------------------------------------------
/Coding/fw/lib/WebServer/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "WebServer",
3 | "version": "0.1.0",
4 | "description": "...",
5 | "authors": [{
6 | "name": "NewTec GmbH",
7 | "url": "https://github.com/NewTec-GmbH/esp32-can-iot",
8 | "maintainer": true
9 | }],
10 | "license": "BSD-3",
11 | "dependencies": [{
12 | "owner": "me-no-dev",
13 | "name": "ESP Async WebServer",
14 | "version": "^1.2.3"
15 | }, {
16 | "name": "DNSServer"
17 | }],
18 | "frameworks": "*",
19 | "platforms": "*"
20 | }
21 |
--------------------------------------------------------------------------------
/Coding/fw/platformio.ini:
--------------------------------------------------------------------------------
1 | ; PlatformIO Project Configuration File
2 | ;
3 | ; Build options: build flags, source filter
4 | ; Upload options: custom upload port, speed and extra flags
5 | ; Library options: dependencies, extra library storages
6 | ; Advanced options: extra scripting
7 | ;
8 | ; Please visit documentation for the other options and examples
9 | ; https://docs.platformio.org/page/projectconf.html
10 |
11 | [env:esp32_HW_Ver_1.1]
12 | platform = espressif32 @ 5.3.0
13 | board = esp32dev
14 | framework = arduino
15 | lib_deps =
16 | FS
17 | SPIFFS
18 | CAN
19 | WebServer
20 | me-no-dev/AsyncTCP @ ^1.1.1
21 | https://github.com/me-no-dev/ESPAsyncWebServer.git
22 | build_flags=
23 | -std=c++11
24 | -Wall
25 | -Wextra
26 | -O3
27 | -Wl,-Map,firmware.map
28 | -I./src/Adapters
29 | build_unflags =
30 | -Os
31 | -g3
32 | lib_ignore =
33 | Test
34 | upload_port = COM20
35 | monitor_port = COM20
36 | monitor_speed = 115200
37 |
38 | [env:native]
39 | platform = native
40 | build_flags =
41 | -std=c++11
42 | -DARDUINO=100
43 | -DPROGMEM=
44 | -DNATIVE
45 | lib_deps =
46 | lib_ignore =
47 | IO
48 | CAN
49 | WebServer
50 | Settings
--------------------------------------------------------------------------------
/Coding/fw/project.cppcheck:
--------------------------------------------------------------------------------
1 |
2 |
3 | project-cppcheck-build-dir
4 | Unspecified
5 | false
6 | true
7 | false
8 | 2
9 | 100
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Coding/fw/src/README.md:
--------------------------------------------------------------------------------
1 | # Main Application
2 | The ESP32 CAN-Analyzer main application is composed of the Main Loop, and the Adapters corresponding to the Lawicel Interfaces for Serial, NVM and CAN Modules. These Adapters are specific to the platform, hardware and libraries being used.
3 |
4 | - [Main Loop](#Main-Loop)
5 | - [Adapters](#Adapters)
6 | - [CAN Adapter](#CAN-Adapter)
7 | - [NVM Adapter](#NVM-Adapter)
8 | - [Serial Adapter](#Serial-Adapter)
9 |
10 | # Main Loop
11 | This contains the standard Arduino "Setup" and "Loop" functions, which control the whole program. The instances of the Adapters and the Lawicel Protocol are also defined in this file. It is important to note that the application stops running if a catastrophioc error is encountered, for example, being unable to connect to the user-given Wireless Network
12 |
13 | # Adapters
14 | These are the implementations of the Lawicel Interfaces. The Protocol required one adapter of each kind to work properly:
15 |
16 | ## CAN Adapter
17 | This file contains the methods used by the CAN Controller.
18 |
19 | Its objetive is to receive the Frames from the Bus and write them in the format of the Frame Struct, which gets passed onto the Lawicel Protocol for its processing.
20 |
21 | On the other side, it also receives the Frames from the Lawicel Protocol which get sent onto the connected Bus.
22 |
23 | This section is also responsible for setting the user-selected configuration of the CAN Device, such as Baudrate, Filters, and current Status.
24 |
25 | For this project, the Adapter wraps around the [Arduino-CAN](https://github.com/sandeepmistry/arduino-CAN) Library, but it has been copied onto the libs folder to be able to fully implement the Lawicel Commands for the integrated SJA1000 Controller.
26 |
27 | ## NVM Adapter
28 | This file contains the methods for saving and retrieving data from the non-volatile memory of the ESP32, using the Preferences Library as base.
29 |
30 | As there are some parameters that need to be saved between power cycles, such as the wireless credentials, this adapter simplifies and centralizes the access to the saved data. This is achieved using keys and directories to order and store the data, as well as the easy retrieval when requested.
31 |
32 | ## Serial Adapter
33 | Here is the interface between the Device and Humans found. The Serial Adapter trasmits the output of the Lawicel Protocol, as well as the user input into Lawicel. For the project, two versions of the Serial Adapter have been developed: serialAdapter and WebSocketAdapter.
34 |
35 | SerialAdapter interfaces with the Arduino Serial (UART) interface, while the WebSocketAdapter connects to the WebSocket, so the system can be used through a Wireless network. By default, the WebSocketAdapter is configured.
--------------------------------------------------------------------------------
/Coding/fw/test/README.md:
--------------------------------------------------------------------------------
1 | # Unit Testing
2 | This directory is intended for PIO Unit Testing and project tests.
3 |
4 |
5 | # Purpose
6 | Unit Testing is a software testing method by which individual units of
7 | source code, sets of one or more MCU program modules together with associated
8 | control data, usage procedures, and operating procedures, are tested to
9 | determine whether they are fit for use. Unit testing finds problems early
10 | in the development cycle.
11 |
12 | More information about PIO Unit Testing:
13 | https://docs.platformio.org/page/plus/unit-testing.html
14 |
15 | # Test Environment
16 | In the [platformio.ini](../platformio.ini) file is the *native* environment defined in order to run these tests. This means that the unit tests are not run on the ESP32 but on Windows.
17 |
18 | For this to work is necesary to install a [C++ Compiler](https://dev.to/gamegods3/how-to-install-gcc-in-windows-10-the-easier-way-422j) and use the [Test](../lib/Test) Library in order to emulate the Arduino native libraries.
19 |
20 | # Test Main
21 | In this page are located the Tests which are going to be executed.
22 | The "main" function calls the individual tests between an UNITY_BEGIN() and UNITY_END() commands.
23 | Each Test contains individual checks depending for each variable that we want to observate.
24 | For example:
25 | - TEST_ASSERT_TRUE(condition): Checks if in the current state the condition is true.
26 | - TEST_ASSERT_EQUAL(expected, current): Checks if the current value equals the expected value.
27 |
28 | If any of these checks fail, the whole test will be failed and the main function skips onto the next test.
29 |
30 | In this case we are testing the possible Lawicel Commands that can be sent to the Device, for example:
31 |
32 | ```cpp
33 | void test_version(void)
34 | {
35 | runProtocolExecute(testingSerialAdapter.writeInput("V"));
36 | TEST_ASSERT_EQUAL_STRING("V0101\r", testingSerialAdapter.m_outputString.c_str());
37 | }
38 | ```
39 | The input Command "V" is written as input for the Lawicel Protocol, and gets processed. The result should be a serial output of V followed by the Software Version (0101 in this case), and with '\r' as terminator (as Lawicel specifies). The TEST_ASSERT_EQUAL_STRING method compared the expected string (first parameter) with the output string after the command gets processed (second parameter). If everything works as intended, the check is successful and the Test is Passed.
40 |
41 |
42 | # Test Adapters
43 | Are the implementations of the Lawicel Interfaces in order to test inputs and outputs of the Protocol.
--------------------------------------------------------------------------------
/Hardware/010_Implementation/BOM.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/010_Implementation/BOM.xlsx
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/2020-11-09_14-09-29.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | #End Doc Library
4 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/2020-11-09_14-09-29.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.4
2 | #encoding utf-8
3 | #
4 | # 2606-3356
5 | #
6 | DEF 2606-3356 J 0 10 Y N 1 L N
7 | F0 "J" 350 250 60 H V C CNN
8 | F1 "2606-3356" 400 -800 60 H V C CNN
9 | F2 "CONN_2606-3356_WAG" 400 -860 60 H I C CNN
10 | F3 "" 0 0 60 H V C CNN
11 | $FPLIST
12 | CONN_2606-3356_WAG
13 | $ENDFPLIST
14 | DRAW
15 | A 300 -1100 5 -900 900 1 1 5 N 300 -1105 300 -1105
16 | A 300 -1000 5 -900 900 1 1 5 N 300 -1005 300 -1005
17 | A 300 -900 5 -900 900 1 1 5 N 300 -905 300 -905
18 | A 300 -900 5 -900 900 1 1 5 N 300 -905 300 -905
19 | A 300 -800 5 -900 900 1 1 5 N 300 -805 300 -805
20 | A 300 -800 5 -900 900 1 1 5 N 300 -805 300 -805
21 | A 300 -700 5 -900 900 1 1 5 N 300 -705 300 -705
22 | A 300 -600 5 -900 900 1 1 5 N 300 -605 300 -605
23 | A 300 -500 5 -900 900 1 1 5 N 300 -505 300 -505
24 | A 300 -400 5 -900 900 1 1 5 N 300 -405 300 -405
25 | A 300 -300 5 -900 900 1 1 5 N 300 -305 300 -305
26 | A 300 -300 5 -900 900 1 1 5 N 300 -305 300 -305
27 | A 300 -200 5 -900 900 1 1 5 N 300 -205 300 -205
28 | A 300 -200 5 -900 900 1 1 5 N 300 -205 300 -205
29 | A 300 -100 5 -900 900 1 1 5 N 300 -105 300 -105
30 | A 300 0 5 -900 900 1 1 5 N 300 -5 300 -5
31 | C 300 -1100 5 1 1 5 N
32 | C 300 -1000 5 1 1 5 N
33 | C 300 -900 5 1 1 5 N
34 | C 300 -900 5 1 1 5 N
35 | C 300 -800 5 1 1 5 N
36 | C 300 -800 5 1 1 5 N
37 | C 300 -700 5 1 1 5 N
38 | C 300 -600 5 1 1 5 N
39 | C 300 -500 5 1 1 5 N
40 | C 300 -400 5 1 1 5 N
41 | C 300 -300 5 1 1 5 N
42 | C 300 -300 5 1 1 5 N
43 | C 300 -200 5 1 1 5 N
44 | C 300 -200 5 1 1 5 N
45 | C 300 -100 5 1 1 5 N
46 | C 300 0 5 1 1 5 N
47 | P 2 1 1 5 200 -1200 500 -1200 N
48 | P 2 1 1 5 200 100 200 -1200 N
49 | P 2 1 1 5 300 -1000 300 -1100 N
50 | P 2 1 1 5 300 -800 300 -900 N
51 | P 2 1 1 5 300 -800 300 -900 N
52 | P 2 1 1 5 300 -600 300 -700 N
53 | P 2 1 1 5 300 -400 300 -500 N
54 | P 2 1 1 5 300 -200 300 -300 N
55 | P 2 1 1 5 300 -200 300 -300 N
56 | P 2 1 1 5 300 0 300 -100 N
57 | P 2 1 1 5 400 -1100 200 -1100 N
58 | P 2 1 1 5 400 -1100 350 -1133 N
59 | P 2 1 1 5 400 -1100 350 -1067 N
60 | P 2 1 1 5 400 -1000 200 -1000 N
61 | P 2 1 1 5 400 -1000 350 -1033 N
62 | P 2 1 1 5 400 -1000 350 -967 N
63 | P 2 1 1 5 400 -900 200 -900 N
64 | P 2 1 1 5 400 -900 350 -933 N
65 | P 2 1 1 5 400 -900 350 -867 N
66 | P 2 1 1 5 400 -800 200 -800 N
67 | P 2 1 1 5 400 -800 350 -833 N
68 | P 2 1 1 5 400 -800 350 -767 N
69 | P 2 1 1 5 400 -700 200 -700 N
70 | P 2 1 1 5 400 -700 350 -733 N
71 | P 2 1 1 5 400 -700 350 -667 N
72 | P 2 1 1 5 400 -600 200 -600 N
73 | P 2 1 1 5 400 -600 350 -633 N
74 | P 2 1 1 5 400 -600 350 -567 N
75 | P 2 1 1 5 400 -500 200 -500 N
76 | P 2 1 1 5 400 -500 350 -533 N
77 | P 2 1 1 5 400 -500 350 -467 N
78 | P 2 1 1 5 400 -400 200 -400 N
79 | P 2 1 1 5 400 -400 350 -433 N
80 | P 2 1 1 5 400 -400 350 -367 N
81 | P 2 1 1 5 400 -300 200 -300 N
82 | P 2 1 1 5 400 -300 350 -333 N
83 | P 2 1 1 5 400 -300 350 -267 N
84 | P 2 1 1 5 400 -200 200 -200 N
85 | P 2 1 1 5 400 -200 350 -233 N
86 | P 2 1 1 5 400 -200 350 -167 N
87 | P 2 1 1 5 400 -100 200 -100 N
88 | P 2 1 1 5 400 -100 350 -133 N
89 | P 2 1 1 5 400 -100 350 -67 N
90 | P 2 1 1 5 400 0 200 0 N
91 | P 2 1 1 5 400 0 350 -33 N
92 | P 2 1 1 5 400 0 350 33 N
93 | P 2 1 1 5 500 -1200 500 100 N
94 | P 2 1 1 5 500 100 200 100 N
95 | X 1 1 0 0 200 R 59 59 1 1 B
96 | X 10 10 0 -900 200 R 59 59 1 1 B
97 | X 11 11 0 -1000 200 R 59 59 1 1 B
98 | X 12 12 0 -1100 200 R 59 59 1 1 B
99 | X 2 2 0 -100 200 R 59 59 1 1 B
100 | X 3 3 0 -200 200 R 59 59 1 1 B
101 | X 4 4 0 -300 200 R 59 59 1 1 B
102 | X 5 5 0 -400 200 R 59 59 1 1 B
103 | X 6 6 0 -500 200 R 59 59 1 1 B
104 | X 7 7 0 -600 200 R 59 59 1 1 B
105 | X 8 8 0 -700 200 R 59 59 1 1 B
106 | X 9 9 0 -800 200 R 59 59 1 1 B
107 | ENDDRAW
108 | ENDDEF
109 | #
110 | #End Library
111 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/2716-106.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # 2716-106
7 | #
8 | DEF 2716-106 X 0 40 Y N 1 L N
9 | F0 "X" -300 1319 50 H V L BNN
10 | F1 "2716-106" -301 -1332 50 H V L BNN
11 | F2 "P-2716-106" 0 0 50 H I L BNN
12 | DRAW
13 | P 2 0 0 8 -300 1200 200 1200 N
14 | P 2 0 0 8 200 -1200 -300 -1200 N
15 | P 2 0 0 8 -300 1200 -300 800 N
16 | P 2 0 0 8 200 1200 200 800 N
17 | P 2 0 0 8 200 800 -300 800 N
18 | P 2 0 0 8 -300 800 -300 400 N
19 | P 2 0 0 8 200 800 200 400 N
20 | P 2 0 0 8 200 400 -300 400 N
21 | P 2 0 0 8 -300 400 -300 0 N
22 | P 2 0 0 8 200 400 200 0 N
23 | P 2 0 0 8 200 0 -300 0 N
24 | P 2 0 0 8 -300 0 -300 -400 N
25 | P 2 0 0 8 200 0 200 -400 N
26 | P 2 0 0 8 200 -400 -300 -400 N
27 | P 2 0 0 8 -300 -400 -300 -800 N
28 | P 2 0 0 8 200 -400 200 -800 N
29 | P 2 0 0 8 200 -800 200 -1200 N
30 | P 2 0 0 8 200 -800 -300 -800 N
31 | P 2 0 0 8 -300 -800 -300 -1200 N
32 | X ~ L1.1 0 1100 100 R 40 40 0 0 B I
33 | X ~ L1.2 -200 1100 100 R 40 40 0 0 B I
34 | X ~ L2.1 0 700 100 R 40 40 0 0 B I
35 | X ~ L2.2 -200 700 100 R 40 40 0 0 B I
36 | X ~ L3.1 0 300 100 R 40 40 0 0 B I
37 | X ~ L3.2 -200 300 100 R 40 40 0 0 B I
38 | X ~ L4.1 0 -100 100 R 40 40 0 0 B I
39 | X ~ L4.2 -200 -100 100 R 40 40 0 0 B I
40 | X ~ L5.1 0 -500 100 R 40 40 0 0 B I
41 | X ~ L5.2 -200 -500 100 R 40 40 0 0 B I
42 | X ~ L6.1 0 -900 100 R 40 40 0 0 B I
43 | X ~ L6.2 -200 -900 100 R 40 40 0 0 B I
44 | X ~ L1.3 0 900 100 R 40 40 0 0 B I
45 | X ~ L2.3 0 500 100 R 40 40 0 0 B I
46 | X ~ L3.3 0 100 100 R 40 40 0 0 B I
47 | X ~ L4.3 0 -300 100 R 40 40 0 0 B I
48 | X ~ L5.3 0 -700 100 R 40 40 0 0 B I
49 | X ~ L6.3 0 -1100 100 R 40 40 0 0 B I
50 | X ~ L1.4 -200 900 100 R 40 40 0 0 B I
51 | X ~ L2.4 -200 500 100 R 40 40 0 0 B I
52 | X ~ L3.4 -200 100 100 R 40 40 0 0 B I
53 | X ~ L4.4 -200 -300 100 R 40 40 0 0 B I
54 | X ~ L5.4 -200 -700 100 R 40 40 0 0 B I
55 | X ~ L6.4 -200 -1100 100 R 40 40 0 0 B I
56 | ENDDRAW
57 | ENDDEF
58 | #
59 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/2N7002.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # 2N7002
7 | #
8 | DEF 2N7002 Q 0 40 N N 1 L N
9 | F0 "Q" -450 100 50 H V L BNN
10 | F1 "2N7002" -450 0 50 H V L BNN
11 | F2 "SOT23" 0 0 50 H I L BNN
12 | DRAW
13 | P 2 0 0 6 -100 -100 -48 -100 N
14 | P 2 0 0 10 0 30 0 0 N
15 | P 2 0 0 10 0 0 0 -30 N
16 | P 2 0 0 10 0 145 0 55 N
17 | P 2 0 0 10 75 25 25 0 N
18 | P 2 0 0 10 75 -25 25 0 N
19 | P 2 0 0 6 0 0 25 0 N
20 | P 2 0 0 6 25 0 100 0 N
21 | P 2 0 0 6 100 0 100 -100 N
22 | P 2 0 0 10 0 -55 0 -145 N
23 | P 2 0 0 10 -45 100 -45 -100 N
24 | X ~ 3 200 100 200 L 40 40 0 0 P
25 | X ~ 2 200 -100 200 L 40 40 0 0 P
26 | X ~ 1 -200 -100 100 R 40 40 0 0 P
27 | ENDDRAW
28 | ENDDEF
29 | #
30 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/ADG1334BRSZ.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3 Date: 21-02-2013 11:13:20
2 | #encoding utf-8
3 | #
4 | # ADG1334BRSZ
5 | #
6 | DEF ADG1334BRSZ U 0 10 Y Y 1 L N
7 | F0 "U" 1100 400 60 H V C CNN
8 | F1 "ADG1334BRSZ" 1100 300 60 H V C CNN
9 | F2 "RS_20_ADI" 1100 240 60 H I C CNN
10 | F3 "~" 0 0 60 H V C CNN
11 | $FPLIST
12 | RS_20_ADI
13 | RS_20_ADI-M
14 | RS_20_ADI-L
15 | $ENDFPLIST
16 | DRAW
17 | X IN1 1 0 0 300 R 59 59 1 1 I
18 | X S1A 2 0 -100 300 R 59 59 1 1 B
19 | X D1 3 0 -200 300 R 59 59 1 1 B
20 | X S1B 4 0 -300 300 R 59 59 1 1 B
21 | X VSS 5 0 -400 300 R 59 59 1 1 W
22 | X GND 6 0 -500 300 R 59 59 1 1 W
23 | X S2B 7 0 -600 300 R 59 59 1 1 B
24 | X D2 8 0 -700 300 R 59 59 1 1 B
25 | X S2A 9 0 -800 300 R 59 59 1 1 B
26 | X IN2 10 0 -900 300 R 59 59 1 1 I
27 | X IN3 11 2200 -900 300 L 59 59 1 1 I
28 | X S3A 12 2200 -800 300 L 59 59 1 1 B
29 | X D3 13 2200 -700 300 L 59 59 1 1 B
30 | X S3B 14 2200 -600 300 L 59 59 1 1 B
31 | X NC 15 2200 -500 300 L 59 59 1 1 N
32 | X VDD 16 2200 -400 300 L 59 59 1 1 W
33 | X S4B 17 2200 -300 300 L 59 59 1 1 B
34 | X D4 18 2200 -200 300 L 59 59 1 1 B
35 | X S4A 19 2200 -100 300 L 59 59 1 1 B
36 | X IN4 20 2200 0 300 L 59 59 1 1 I
37 | P 2 1 1 5 300 200 300 -1100 N
38 | P 2 1 1 5 300 -1100 1900 -1100 N
39 | P 2 1 1 5 1900 -1100 1900 200 N
40 | P 2 1 1 5 1900 200 300 200 N
41 | ENDDRAW
42 | ENDDEF
43 | #
44 | #End Library
45 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/ESP32-DEVKITC-32D.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # ESP32-DEVKITC-32D
7 | #
8 | DEF ESP32-DEVKITC-32D U 0 40 Y Y 1 L N
9 | F0 "U" -601 1026 50 H V L BNN
10 | F1 "ESP32-DEVKITC-32D" -601 -1101 50 H V L BNN
11 | F2 "MODULE_ESP32-DEVKITC-32D" 0 0 50 H I L BNN
12 | F3 "Espressif Systems" 0 0 50 H I L BNN
13 | F4 "4" 0 0 50 H I L BNN
14 | DRAW
15 | P 2 0 0 10 -600 1000 600 1000 N
16 | P 2 0 0 10 600 1000 600 -1000 N
17 | P 2 0 0 10 600 -1000 -600 -1000 N
18 | P 2 0 0 10 -600 -1000 -600 1000 N
19 | X 3V3 1 -800 900 200 R 40 40 0 0 W
20 | X EN 2 -800 800 200 R 40 40 0 0 I
21 | X SENSOR_VP 3 -800 700 200 R 40 40 0 0 I
22 | X SENSOR_VN 4 -800 600 200 R 40 40 0 0 I
23 | X IO34 5 -800 500 200 R 40 40 0 0 B
24 | X IO35 6 -800 400 200 R 40 40 0 0 B
25 | X IO32 7 -800 300 200 R 40 40 0 0 B
26 | X IO33 8 -800 200 200 R 40 40 0 0 B
27 | X IO25 9 -800 100 200 R 40 40 0 0 B
28 | X IO26 10 -800 0 200 R 40 40 0 0 B
29 | X IO27 11 -800 -100 200 R 40 40 0 0 B
30 | X IO14 12 -800 -200 200 R 40 40 0 0 B
31 | X IO12 13 -800 -300 200 R 40 40 0 0 B
32 | X GND1 14 -800 -400 200 R 40 40 0 0 W
33 | X IO13 15 -800 -500 200 R 40 40 0 0 B
34 | X SD2 16 -800 -600 200 R 40 40 0 0 B
35 | X SD3 17 -800 -700 200 R 40 40 0 0 B
36 | X CMD 18 -800 -800 200 R 40 40 0 0 B
37 | X EXT_5V 19 -800 -900 200 R 40 40 0 0 W
38 | X CLK 38 800 -900 200 L 40 40 0 0 I C
39 | X SD0 37 800 -800 200 L 40 40 0 0 B
40 | X SD1 36 800 -700 200 L 40 40 0 0 B
41 | X IO15 35 800 -600 200 L 40 40 0 0 B
42 | X IO2 34 800 -500 200 L 40 40 0 0 B
43 | X IO0 33 800 -400 200 L 40 40 0 0 B
44 | X IO4 32 800 -300 200 L 40 40 0 0 B
45 | X IO16 31 800 -200 200 L 40 40 0 0 B
46 | X IO17 30 800 -100 200 L 40 40 0 0 B
47 | X IO5 29 800 0 200 L 40 40 0 0 B
48 | X IO18 28 800 100 200 L 40 40 0 0 B
49 | X IO19 27 800 200 200 L 40 40 0 0 B
50 | X GND2 26 800 300 200 L 40 40 0 0 W
51 | X IO21 25 800 400 200 L 40 40 0 0 B
52 | X RXD0 24 800 500 200 L 40 40 0 0 I
53 | X TXD0 23 800 600 200 L 40 40 0 0 O
54 | X IO22 22 800 700 200 L 40 40 0 0 B
55 | X IO23 21 800 800 200 L 40 40 0 0 B
56 | X GND3 20 800 900 200 L 40 40 0 0 W
57 | ENDDRAW
58 | ENDDEF
59 | #
60 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/FDV304P.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # FDV304P
7 | #
8 | DEF FDV304P U 0 40 N N 1 L N
9 | F0 "U" 0 0 50 H I L BNN
10 | F1 "FDV304P" 0 0 50 H I L BNN
11 | F2 "SOT23-3" 0 0 50 H I L BNN
12 | DRAW
13 | P 2 0 0 10 -100 0 0 0 N
14 | P 2 0 0 10 0 0 0 100 N
15 | P 2 0 0 10 20 100 20 90 N
16 | P 2 0 0 10 20 90 20 80 N
17 | P 2 0 0 10 20 60 20 50 N
18 | P 2 0 0 10 20 50 20 40 N
19 | P 2 0 0 10 20 0 20 20 N
20 | P 2 0 0 10 20 0 100 0 N
21 | P 2 0 0 10 20 90 100 90 N
22 | P 2 0 0 10 100 90 100 50 N
23 | P 2 0 0 10 20 50 70 50 N
24 | P 2 0 0 10 70 50 90 50 N
25 | P 2 0 0 10 90 50 100 50 N
26 | P 2 0 0 10 90 50 80 60 N
27 | P 2 0 0 10 80 60 70 70 N
28 | P 2 0 0 10 70 70 70 50 N
29 | P 2 0 0 10 70 50 70 30 N
30 | P 2 0 0 10 70 30 80 40 N
31 | P 2 0 0 10 90 50 80 40 N
32 | P 2 0 0 10 80 40 70 50 N
33 | P 2 0 0 10 70 50 80 60 N
34 | P 2 0 0 10 100 -100 100 0 N
35 | P 2 0 0 10 100 100 100 90 N
36 | T 0 120 40 40 0 0 0 FDV304P Normal 0 L B
37 | P 2 0 0 10 100 200 100 100 N
38 | X ~ 1 -100 0 0 R 40 40 0 0 B
39 | X ~ 2 100 200 0 R 40 40 0 0 B
40 | X ~ 3 100 -100 0 R 40 40 0 0 B
41 | ENDDRAW
42 | ENDDEF
43 | #
44 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/G2R2A.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # G2R2A
7 | #
8 | DEF G2R2A K 0 40 Y N 3 L N
9 | F0 "K" 0 0 50 H I L BNN
10 | F1 "G2R2A" 50 115 50 H V L BNN
11 | F2 "G2R2A" 0 0 50 H I L BNN
12 | F3 "36M5257" 0 0 50 H I L BNN
13 | F4 "G2R-2A-DC24" 0 0 50 H I L BNN
14 | F5 "" 0 0 50 H I L BNN
15 | F6 "6985269" 0 0 50 H I L BNN
16 | DRAW
17 | P 2 1 0 10 -150 -75 -75 -75 N
18 | P 2 1 0 10 150 -75 150 75 N
19 | P 2 1 0 10 150 75 75 75 N
20 | P 2 1 0 10 -150 75 -150 -75 N
21 | P 2 1 0 6 0 -100 0 -75 N
22 | P 2 1 0 10 0 -75 150 -75 N
23 | P 2 1 0 6 0 100 0 75 N
24 | P 2 1 0 10 0 75 -150 75 N
25 | P 2 1 0 6 -75 -75 75 75 N
26 | P 2 1 0 10 -75 -75 0 -75 N
27 | P 2 1 0 10 75 75 0 75 N
28 | X ~ 2 0 -200 100 U 40 40 1 0 P
29 | X ~ 1 0 200 100 D 40 40 1 0 P
30 | P 2 2 0 10 0 125 0 75 N
31 | P 2 2 0 10 0 -125 0 -75 N
32 | P 2 2 0 10 0 -75 -50 75 N
33 | C 0 -75 5 2 0 16 N
34 | X ~ P1 0 -200 100 U 40 40 2 0 P
35 | X ~ S1 0 200 100 D 40 40 2 0 P
36 | P 2 3 0 10 0 125 0 75 N
37 | P 2 3 0 10 0 -125 0 -75 N
38 | P 2 3 0 10 0 -75 -50 75 N
39 | C 0 -75 5 3 0 16 N
40 | X ~ P2 0 -200 100 U 40 40 3 0 P
41 | X ~ S2 0 200 100 D 40 40 3 0 P
42 | ENDDRAW
43 | ENDDEF
44 | #
45 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/G5V-2-DC5.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # G5V-2-DC5
7 | #
8 | DEF G5V-2-DC5 K 0 40 Y N 1 L N
9 | F0 "K" -200 521 50 H V L BNN
10 | F1 "G5V-2-DC5" -200 -701 50 H V L BNN
11 | F2 "RELAY_G5V-2-DC5" 0 0 50 H I L BNN
12 | F3 "Relay; E-Mech; Low Signal; DPDT; Cur-Rtg 0.5/2AAC/ADC; Ctrl-V 5DC; Vol-Rtg 125/30AC/DC" 0 0 50 H I L BNN
13 | F4 "Omron Electronics" 0 0 50 H I L BNN
14 | F5 "QFN-68 Omron" 0 0 50 H I L BNN
15 | F6 "Unavailable" 0 0 50 H I L BNN
16 | F7 "None" 0 0 50 H I L BNN
17 | F8 "G5V-2-DC5" 0 0 50 H I L BNN
18 | DRAW
19 | P 2 0 0 10 300 500 300 400 N
20 | P 2 0 0 10 300 400 300 200 N
21 | P 2 0 0 10 300 200 300 0 N
22 | P 2 0 0 10 300 -500 300 -600 N
23 | P 2 0 0 10 300 -600 -200 -600 N
24 | P 2 0 0 10 -200 -600 -200 -400 N
25 | P 2 0 0 10 -200 400 -200 500 N
26 | P 2 0 0 10 -200 500 300 500 N
27 | A -105 335 65 2740 860 0 0 10 N -100 270 -100 400
28 | A -109 300 31 740 2860 0 0 10 N -100 330 -100 270
29 | A -122 250 83 2860 740 0 0 10 N -100 170 -100 330
30 | A -109 200 31 740 2860 0 0 10 N -100 230 -100 170
31 | A -123 150 83 2860 740 0 0 10 N -100 70 -100 230
32 | A -114 99 32 830 2960 0 0 10 N -110 130 -100 70
33 | P 2 0 0 10 300 400 100 400 N
34 | P 2 0 0 10 100 400 100 300 N
35 | P 2 0 0 10 300 0 100 0 N
36 | P 2 0 0 10 100 0 100 100 N
37 | P 2 0 0 10 300 200 200 200 N
38 | P 2 0 0 10 200 200 130 270 N
39 | P 2 0 0 10 100 300 130 330 N
40 | P 2 0 0 10 100 300 70 330 N
41 | P 2 0 0 10 100 100 130 70 N
42 | P 2 0 0 10 100 100 70 70 N
43 | P 2 0 0 10 -200 400 -100 400 N
44 | P 2 0 0 10 300 0 300 -100 N
45 | P 2 0 0 10 300 -100 300 -300 N
46 | P 2 0 0 10 300 -300 300 -500 N
47 | P 2 0 0 10 -200 -400 -200 400 N
48 | A -109 -100 31 740 2860 0 0 10 N -100 -70 -100 -130
49 | A -122 -150 83 2860 740 0 0 10 N -100 -230 -100 -70
50 | A -109 -200 31 740 2860 0 0 10 N -100 -170 -100 -230
51 | A -123 -250 83 2860 740 0 0 10 N -100 -330 -100 -170
52 | A -109 -300 31 740 2860 0 0 10 N -100 -270 -100 -330
53 | A -105 -335 65 2740 860 0 0 10 N -100 -400 -100 -270
54 | P 2 0 0 10 300 -100 100 -100 N
55 | P 2 0 0 10 100 -100 100 -200 N
56 | P 2 0 0 10 300 -500 100 -500 N
57 | P 2 0 0 10 100 -500 100 -400 N
58 | P 2 0 0 10 300 -300 200 -300 N
59 | P 2 0 0 10 200 -300 130 -230 N
60 | P 2 0 0 10 100 -200 130 -170 N
61 | P 2 0 0 10 100 -200 70 -170 N
62 | P 2 0 0 10 100 -400 130 -430 N
63 | P 2 0 0 10 100 -400 70 -430 N
64 | P 2 0 0 10 -200 -400 -100 -400 N
65 | A -116 50 80 2740 860 0 0 10 N -110 -30 -110 130
66 | A -114 1 32 640 2770 0 0 10 N -100 30 -110 -30
67 | A -122 -50 83 2860 740 0 0 10 N -100 -130 -100 30
68 | X ~ 1 -300 400 100 R 40 40 0 0 P
69 | X ~ 16 -300 -400 100 R 40 40 0 0 P
70 | X ~ 6 400 400 100 L 40 40 0 0 P
71 | X ~ 4 400 200 100 L 40 40 0 0 P
72 | X ~ 8 400 0 100 L 40 40 0 0 P
73 | X ~ 11 400 -100 100 L 40 40 0 0 P
74 | X ~ 13 400 -300 100 L 40 40 0 0 P
75 | X ~ 9 400 -500 100 L 40 40 0 0 P
76 | ENDDRAW
77 | ENDDEF
78 | #
79 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/LT1086CM-3.3_PBF.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # LT1086CM-3.3#PBF
7 | #
8 | DEF LT1086CM-3.3#PBF U 0 40 Y Y 1 L N
9 | F0 "U" -410 220 50 H V L BNN
10 | F1 "LT1086CM-3.3#PBF" -400 -300 50 H V L BNN
11 | F2 "DPAK254P1394X457-4N" 0 0 50 H I L BNN
12 | F3 "Linear Technology/Analog Devices" 0 0 50 H I L BNN
13 | F4 "IPC-7351B" 0 0 50 H I L BNN
14 | DRAW
15 | S -400 -200 400 200 0 0 6 f
16 | X VIN 3 -600 100 200 R 40 40 0 0 I
17 | X VOUT 2 600 100 200 L 40 40 0 0 O
18 | X VOUT 4 600 100 200 L 40 40 0 0 O
19 | X GND 1 600 -100 200 L 40 40 0 0 W
20 | ENDDRAW
21 | ENDDEF
22 | #
23 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/PESD1CAN.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # PESD1CAN
7 | #
8 | DEF PESD1CAN D 0 40 Y Y 1 L N
9 | F0 "D" 0 450 50 H V L BNN
10 | F1 "PESD1CAN" 0 -100 50 H V L BNN
11 | F2 "SOT23-3" 0 0 50 H I L BNN
12 | F3 "" 0 0 50 H I L BNN
13 | F4 "DIO-12501" 0 0 50 H I L BNN "PROD_ID"
14 | DRAW
15 | P 2 0 0 10 0 0 400 0 N
16 | P 2 0 0 10 400 0 400 400 N
17 | P 2 0 0 10 400 400 0 400 N
18 | P 2 0 0 10 0 400 0 300 N
19 | P 2 0 0 10 0 300 0 100 N
20 | P 2 0 0 10 0 100 0 0 N
21 | P 2 0 0 8 0 100 50 100 N
22 | P 2 0 0 8 50 100 250 100 N
23 | P 2 0 0 8 250 100 300 100 N
24 | P 2 0 0 8 0 300 50 300 N
25 | P 2 0 0 8 50 300 250 300 N
26 | P 2 0 0 8 250 300 300 300 N
27 | P 2 0 0 8 300 300 300 200 N
28 | P 2 0 0 8 300 200 300 100 N
29 | P 2 0 0 8 50 150 50 100 N
30 | P 2 0 0 8 50 100 50 50 N
31 | P 2 0 0 8 250 50 250 100 N
32 | P 2 0 0 8 250 100 250 150 N
33 | P 2 0 0 8 50 350 50 300 N
34 | P 2 0 0 8 50 300 50 250 N
35 | P 2 0 0 8 250 250 250 300 N
36 | P 2 0 0 8 250 300 250 350 N
37 | P 2 0 0 8 50 250 75 250 N
38 | P 2 0 0 8 50 50 75 50 N
39 | P 2 0 0 8 250 150 225 150 N
40 | P 2 0 0 8 250 350 225 350 N
41 | P 2 0 0 8 50 300 100 350 N
42 | P 2 0 0 8 100 350 100 250 N
43 | P 2 0 0 8 100 250 50 300 N
44 | P 2 0 0 8 250 300 200 350 N
45 | P 2 0 0 8 200 350 200 250 N
46 | P 2 0 0 8 200 250 250 300 N
47 | P 2 0 0 8 50 100 100 150 N
48 | P 2 0 0 8 100 150 100 50 N
49 | P 2 0 0 8 100 50 50 100 N
50 | P 2 0 0 8 250 100 200 150 N
51 | P 2 0 0 8 200 150 200 50 N
52 | P 2 0 0 8 200 50 250 100 N
53 | P 2 0 0 8 300 200 400 200 N
54 | X 1 1 -200 300 200 R 40 40 0 0 B
55 | X 2 2 -200 100 200 R 40 40 0 0 B
56 | X 3 3 600 200 200 L 40 40 0 0 B
57 | ENDDRAW
58 | ENDDEF
59 | #
60 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/SN65HVD233-HT.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # SN65HVD233-HT
7 | #
8 | DEF SN65HVD233-HT IC 0 40 Y Y 1 L N
9 | F0 "IC" -215 550 50 H V L BNN
10 | F1 "SN65HVD233-HT" -113 -725 50 H V L BNN
11 | F2 "SOIC127P600X175" 0 0 50 H I L BNN
12 | DRAW
13 | P 2 0 0 16 -500 500 -500 -600 N
14 | P 2 0 0 16 -500 -600 500 -600 N
15 | P 2 0 0 16 500 -600 500 500 N
16 | P 2 0 0 16 500 500 -500 500 N
17 | X VCC 3 -700 300 200 R 40 40 0 0 W
18 | X R 4 -700 100 200 R 40 40 0 0 I
19 | X D 1 -700 0 200 R 40 40 0 0 I
20 | X LBK 5 -700 -100 200 R 40 40 0 0 P
21 | X RS 8 -700 -200 200 R 40 40 0 0 I
22 | X GND 2 -700 -400 200 R 40 40 0 0 P
23 | X CANL 6 700 300 200 L 40 40 0 0 O
24 | X CANH 7 700 200 200 L 40 40 0 0 O
25 | ENDDRAW
26 | ENDDEF
27 | #
28 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/SN74LVC2G14DBVR.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3 Date: 21-02-2013 11:13:20
2 | #encoding utf-8
3 | #
4 | # SN74LVC2G14DBVR
5 | #
6 | DEF SN74LVC2G14DBVR U 0 10 Y Y 1 L N
7 | F0 "U" 800 400 60 H V C CNN
8 | F1 "SN74LVC2G14DBVR" 800 300 60 H V C CNN
9 | F2 "DBV6" 800 240 60 H I C CNN
10 | F3 "~" 0 0 60 H V C CNN
11 | $FPLIST
12 | DBV6
13 | DBV6-M
14 | DBV6-L
15 | $ENDFPLIST
16 | DRAW
17 | X 1A 1 0 0 300 R 59 59 1 1 I
18 | X GND 2 1600 -500 300 L 59 59 1 1 W
19 | X 2A 3 0 -100 300 R 59 59 1 1 I
20 | X 2Y 4 1600 -100 300 L 59 59 1 1 O
21 | X VCC 5 0 -500 300 R 59 59 1 1 W
22 | X 1Y 6 1600 0 300 L 59 59 1 1 O
23 | P 2 1 1 5 300 200 300 -700 N
24 | P 2 1 1 5 300 -700 1300 -700 N
25 | P 2 1 1 5 1300 -700 1300 200 N
26 | P 2 1 1 5 1300 200 300 200 N
27 | ENDDRAW
28 | ENDDEF
29 |
30 | #
31 | #End Library
32 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/SS24.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #(c) SnapEDA 2016 (snapeda.com)
4 | #This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
5 | #
6 | # SS24
7 | #
8 | DEF SS24 D 0 40 Y N 1 L N
9 | F0 "D" -200 100 50 H V L BNN
10 | F1 "SS24" -200 -150 50 H V L BNN
11 | F2 "DIOM5336X265N" 0 0 50 H I L BNN
12 | F3 "IPC 7351B" 0 0 50 H I L BNN
13 | F4 "2.65 mm" 0 0 50 H I L BNN
14 | F5 "ON Semiconductor" 0 0 50 H I L BNN
15 | F6 "1.1.2" 0 0 50 H I L BNN
16 | DRAW
17 | P 2 0 0 10 -50 -50 50 0 N
18 | P 2 0 0 10 50 0 -50 50 N
19 | P 2 0 0 10 75 50 50 50 N
20 | P 2 0 0 10 50 50 50 0 N
21 | P 2 0 0 10 -50 50 -50 0 N
22 | P 2 0 0 10 -50 0 -50 -50 N
23 | P 2 0 0 10 50 0 50 -50 N
24 | P 2 0 0 10 75 50 75 40 N
25 | P 2 0 0 10 50 -50 25 -50 N
26 | P 2 0 0 10 25 -40 25 -50 N
27 | P 2 0 0 10 -100 0 -50 0 N
28 | P 2 0 0 10 100 0 50 0 N
29 | X ~ C 200 0 100 L 40 40 0 0 P
30 | X ~ A -200 0 100 R 40 40 0 0 P
31 | ENDDRAW
32 | ENDDEF
33 | #
34 | # End Library
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/SamacSys_Parts.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | $CMP NE555DR
4 | D Single Precision Timer
5 | K
6 | F http://www.ti.com/lit/ds/symlink/ne555.pdf
7 | $ENDCMP
8 | #
9 | $CMP 744242510
10 | D Wurth WE-SLM Series Wire-wound SMD Inductor with a Ferrite Core, 51 uH +50/-30 400mA Idc
11 | K
12 | F http://uk.rs-online.com/web/p/products/6694181P
13 | $ENDCMP
14 | #
15 | $CMP 744242220
16 | D Wurth WE-SLM Series Wire-wound SMD Inductor with a Ferrite Core, 22 uH +50/-30 300mA Idc
17 | K
18 | F https://componentsearchengine.com/Datasheets/1/744242220.pdf
19 | $ENDCMP
20 | #
21 | #End Doc Library
22 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/SamacSys_Parts.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.3
2 | #encoding utf-8
3 | #SamacSys ECAD Model NE555DR
4 | #/6648/2/2.37/8/4/Integrated Circuit
5 | DEF NE555DR IC 0 30 Y Y 1 F N
6 | F0 "IC" 1050 600 50 H V L CNN
7 | F1 "NE555DR" 1050 500 50 H V L CNN
8 | F2 "SOIC127P600X175-8N" 1050 400 50 H I L CNN
9 | F3 "http://www.ti.com/lit/ds/symlink/ne555.pdf" 1050 300 50 H I L CNN
10 | F4 "Single Precision Timer" 1050 200 50 H I L CNN "Description"
11 | F5 "1.75" 1050 100 50 H I L CNN "Height"
12 | F6 "Texas Instruments" 1050 0 50 H I L CNN "Manufacturer_Name"
13 | F7 "NE555DR" 1050 -100 50 H I L CNN "Manufacturer_Part_Number"
14 | F8 "595-NE555DR" 1050 -200 50 H I L CNN "Mouser Part Number"
15 | F9 "https://www.mouser.com/Search/Refine.aspx?Keyword=595-NE555DR" 1050 -300 50 H I L CNN "Mouser Price/Stock"
16 | F10 "1218414" 1050 -400 50 H I L CNN "RS Part Number"
17 | F11 "http//uk.rs-online.com/web/p/products/1218414" 1050 -500 50 H I L CNN "RS Price/Stock"
18 | DRAW
19 | X GND 1 600 -1000 200 U 50 50 0 0 B
20 | X TRIG 2 0 -400 200 R 50 50 0 0 B
21 | X OUT 3 1200 -200 200 L 50 50 0 0 B
22 | X ~RESET 4 0 0 200 R 50 50 0 0 B
23 | X CONT 5 500 600 200 D 50 50 0 0 B
24 | X THRES 6 0 -300 200 R 50 50 0 0 B
25 | X DISCH 7 0 -100 200 R 50 50 0 0 B
26 | X VCC 8 700 600 200 D 50 50 0 0 B
27 | P 5 0 1 6 200 400 1000 400 1000 -800 200 -800 200 400 N
28 | ENDDRAW
29 | ENDDEF
30 | #
31 | #SamacSys ECAD Model 744242510
32 | #/464928/360090/2.47/2/0/Inductor
33 | DEF 744242510 L 0 30 Y Y 1 F N
34 | F0 "L" 650 250 50 H V L CNN
35 | F1 "744242510" 650 150 50 H V L CNN
36 | F2 "WE-SPC_48XX78" 650 50 50 H I L CNN
37 | F3 "http://uk.rs-online.com/web/p/products/6694181P" 650 -50 50 H I L CNN
38 | F4 "Wurth WE-SLM Series Wire-wound SMD Inductor with a Ferrite Core, 51 uH +50/-30 400mA Idc" 650 -150 50 H I L CNN "Description"
39 | F5 "" 650 -250 50 H I L CNN "Height"
40 | F6 "6694181P" 650 -350 50 H I L CNN "RS Part Number"
41 | F7 "http://uk.rs-online.com/web/p/products/6694181P" 650 -450 50 H I L CNN "RS Price/Stock"
42 | F8 "Wurth Elektronik" 650 -550 50 H I L CNN "Manufacturer_Name"
43 | F9 "744242510" 650 -650 50 H I L CNN "Manufacturer_Part_Number"
44 | DRAW
45 | X ~ 1 0 0 200 R 50 50 0 0 P
46 | X ~ 2 800 0 200 L 50 50 0 0 P
47 | A 250 -2 50 1777 -23 0 1 6 N 300 0 200 0
48 | A 350 -2 50 1777 -23 0 1 6 N 400 0 300 0
49 | A 450 -2 50 1777 -23 0 1 6 N 500 0 400 0
50 | A 550 -2 50 1777 -23 0 1 6 N 600 0 500 0
51 | ENDDRAW
52 | ENDDEF
53 | #
54 | #SamacSys ECAD Model 744242220
55 | #/464925/360090/2.47/4/0/Inductor
56 | DEF 744242220 L 0 30 Y Y 1 F N
57 | F0 "L" 650 300 50 H V L CNN
58 | F1 "744242220" 650 200 50 H V L CNN
59 | F2 "WE-SLM77" 650 100 50 H I L CNN
60 | F3 "https://componentsearchengine.com/Datasheets/1/744242220.pdf" 650 0 50 H I L CNN
61 | F4 "Wurth WE-SLM Series Wire-wound SMD Inductor with a Ferrite Core, 22 uH +50/-30 300mA Idc" 650 -100 50 H I L CNN "Description"
62 | F5 "" 650 -200 50 H I L CNN "Height"
63 | F6 "710-744242220" 650 -300 50 H I L CNN "Mouser Part Number"
64 | F7 "https://www.mouser.com/Search/Refine.aspx?Keyword=710-744242220" 650 -400 50 H I L CNN "Mouser Price/Stock"
65 | F8 "Wurth Elektronik" 650 -500 50 H I L CNN "Manufacturer_Name"
66 | F9 "744242220" 650 -600 50 H I L CNN "Manufacturer_Part_Number"
67 | DRAW
68 | X 3 1 0 0 200 R 50 50 0 0 P
69 | X 1 2 0 -100 200 R 50 50 0 0 P
70 | X 2 3 800 -100 200 L 50 50 0 0 P
71 | X 4 4 800 0 200 L 50 50 0 0 P
72 | P 5 0 1 6 200 100 600 100 600 -200 200 -200 200 100 N
73 | ENDDRAW
74 | ENDDEF
75 | #
76 | #End Library
77 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board Library/SamacSys_Parts.pretty/WE-SLM77.kicad_mod:
--------------------------------------------------------------------------------
1 | (module "WE-SLM77" (layer F.Cu)
2 | (descr "WE-SLM77")
3 | (tags "Inductor")
4 | (attr smd)
5 | (fp_text reference L** (at -3.6 -2.5) (layer F.SilkS)
6 | (effects (font (size 1.27 1.27) (thickness 0.254)))
7 | )
8 | (fp_text user %R (at -3.6 -2.5) (layer F.Fab)
9 | (effects (font (size 1.27 1.27) (thickness 0.254)))
10 | )
11 | (fp_text value "WE-SLM77" (at -3.6 -2.5) (layer F.SilkS) hide
12 | (effects (font (size 1.27 1.27) (thickness 0.254)))
13 | )
14 | (fp_line (start -2.2 -0.6) (end 2.2 -0.6) (layer F.Fab) (width 0.127))
15 | (fp_line (start -2.2 0.6) (end 2.2 0.6) (layer F.Fab) (width 0.127))
16 | (fp_line (start -2.5 -1.7) (end 2.5 -1.7) (layer F.SilkS) (width 0.127))
17 | (fp_line (start -2.5 1.7) (end 2.5 1.7) (layer F.SilkS) (width 0.127))
18 | (fp_line (start 2.5 -1.65) (end 2.5 1.65) (layer F.Fab) (width 0.127))
19 | (fp_line (start -2.5 -1.65) (end -2.5 1.65) (layer F.Fab) (width 0.127))
20 | (fp_line (start -3.5 -2) (end 3.5 -2) (layer F.CrtYd) (width 0.127))
21 | (fp_line (start 3.5 -2) (end 3.5 2) (layer F.CrtYd) (width 0.127))
22 | (fp_line (start 3.5 2) (end -3.5 2) (layer F.CrtYd) (width 0.127))
23 | (fp_line (start -3.5 2) (end -3.5 -2) (layer F.CrtYd) (width 0.127))
24 | (pad 1 smd rect (at -2.28 -0.63 0) (size 0.6 1.85) (layers F.Cu F.Paste F.Mask))
25 | (pad 4 smd rect (at 2.27 -0.63 0) (size 0.6 1.85) (layers F.Cu F.Paste F.Mask))
26 | (pad 2 smd rect (at -2.28 0.62 0) (size 0.6 1.85) (layers F.Cu F.Paste F.Mask))
27 | (pad 3 smd rect (at 2.27 0.62 0) (size 0.6 1.85) (layers F.Cu F.Paste F.Mask))
28 | )
29 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board-rescue.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | #End Doc Library
4 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board-rescue.lib:
--------------------------------------------------------------------------------
1 | EESchema-LIBRARY Version 2.4
2 | #encoding utf-8
3 | #
4 | # 2606-3356-2020-11-09_14-09-29
5 | #
6 | DEF 2606-3356-2020-11-09_14-09-29 J 0 10 Y N 1 L N
7 | F0 "J" 350 250 60 H V C CNN
8 | F1 "2606-3356-2020-11-09_14-09-29" 400 -800 60 H V C CNN
9 | F2 "CONN_2606-3356_WAG" 400 -860 60 H I C CNN
10 | F3 "" 0 0 60 H V C CNN
11 | $FPLIST
12 | CONN_2606-3356_WAG
13 | $ENDFPLIST
14 | DRAW
15 | A 300 -1100 5 -900 900 1 1 5 N 300 -1105 300 -1105
16 | A 300 -1000 5 -900 900 1 1 5 N 300 -1005 300 -1005
17 | A 300 -900 5 -900 900 1 1 5 N 300 -905 300 -905
18 | A 300 -900 5 -900 900 1 1 5 N 300 -905 300 -905
19 | A 300 -800 5 -900 900 1 1 5 N 300 -805 300 -805
20 | A 300 -800 5 -900 900 1 1 5 N 300 -805 300 -805
21 | A 300 -700 5 -900 900 1 1 5 N 300 -705 300 -705
22 | A 300 -600 5 -900 900 1 1 5 N 300 -605 300 -605
23 | A 300 -500 5 -900 900 1 1 5 N 300 -505 300 -505
24 | A 300 -400 5 -900 900 1 1 5 N 300 -405 300 -405
25 | A 300 -300 5 -900 900 1 1 5 N 300 -305 300 -305
26 | A 300 -300 5 -900 900 1 1 5 N 300 -305 300 -305
27 | A 300 -200 5 -900 900 1 1 5 N 300 -205 300 -205
28 | A 300 -200 5 -900 900 1 1 5 N 300 -205 300 -205
29 | A 300 -100 5 -900 900 1 1 5 N 300 -105 300 -105
30 | A 300 0 5 -900 900 1 1 5 N 300 -5 300 -5
31 | C 300 -1100 5 1 1 5 N
32 | C 300 -1000 5 1 1 5 N
33 | C 300 -900 5 1 1 5 N
34 | C 300 -900 5 1 1 5 N
35 | C 300 -800 5 1 1 5 N
36 | C 300 -800 5 1 1 5 N
37 | C 300 -700 5 1 1 5 N
38 | C 300 -600 5 1 1 5 N
39 | C 300 -500 5 1 1 5 N
40 | C 300 -400 5 1 1 5 N
41 | C 300 -300 5 1 1 5 N
42 | C 300 -300 5 1 1 5 N
43 | C 300 -200 5 1 1 5 N
44 | C 300 -200 5 1 1 5 N
45 | C 300 -100 5 1 1 5 N
46 | C 300 0 5 1 1 5 N
47 | P 2 1 1 5 200 -1200 500 -1200 N
48 | P 2 1 1 5 200 100 200 -1200 N
49 | P 2 1 1 5 300 -1000 300 -1100 N
50 | P 2 1 1 5 300 -800 300 -900 N
51 | P 2 1 1 5 300 -800 300 -900 N
52 | P 2 1 1 5 300 -600 300 -700 N
53 | P 2 1 1 5 300 -400 300 -500 N
54 | P 2 1 1 5 300 -200 300 -300 N
55 | P 2 1 1 5 300 -200 300 -300 N
56 | P 2 1 1 5 300 0 300 -100 N
57 | P 2 1 1 5 400 -1100 200 -1100 N
58 | P 2 1 1 5 400 -1100 350 -1133 N
59 | P 2 1 1 5 400 -1100 350 -1067 N
60 | P 2 1 1 5 400 -1000 200 -1000 N
61 | P 2 1 1 5 400 -1000 350 -1033 N
62 | P 2 1 1 5 400 -1000 350 -967 N
63 | P 2 1 1 5 400 -900 200 -900 N
64 | P 2 1 1 5 400 -900 350 -933 N
65 | P 2 1 1 5 400 -900 350 -867 N
66 | P 2 1 1 5 400 -800 200 -800 N
67 | P 2 1 1 5 400 -800 350 -833 N
68 | P 2 1 1 5 400 -800 350 -767 N
69 | P 2 1 1 5 400 -700 200 -700 N
70 | P 2 1 1 5 400 -700 350 -733 N
71 | P 2 1 1 5 400 -700 350 -667 N
72 | P 2 1 1 5 400 -600 200 -600 N
73 | P 2 1 1 5 400 -600 350 -633 N
74 | P 2 1 1 5 400 -600 350 -567 N
75 | P 2 1 1 5 400 -500 200 -500 N
76 | P 2 1 1 5 400 -500 350 -533 N
77 | P 2 1 1 5 400 -500 350 -467 N
78 | P 2 1 1 5 400 -400 200 -400 N
79 | P 2 1 1 5 400 -400 350 -433 N
80 | P 2 1 1 5 400 -400 350 -367 N
81 | P 2 1 1 5 400 -300 200 -300 N
82 | P 2 1 1 5 400 -300 350 -333 N
83 | P 2 1 1 5 400 -300 350 -267 N
84 | P 2 1 1 5 400 -200 200 -200 N
85 | P 2 1 1 5 400 -200 350 -233 N
86 | P 2 1 1 5 400 -200 350 -167 N
87 | P 2 1 1 5 400 -100 200 -100 N
88 | P 2 1 1 5 400 -100 350 -133 N
89 | P 2 1 1 5 400 -100 350 -67 N
90 | P 2 1 1 5 400 0 200 0 N
91 | P 2 1 1 5 400 0 350 -33 N
92 | P 2 1 1 5 400 0 350 33 N
93 | P 2 1 1 5 500 -1200 500 100 N
94 | P 2 1 1 5 500 100 200 100 N
95 | X 1 1 0 0 200 R 59 59 1 1 B
96 | X 10 10 0 -900 200 R 59 59 1 1 B
97 | X 11 11 0 -1000 200 R 59 59 1 1 B
98 | X 12 12 0 -1100 200 R 59 59 1 1 B
99 | X 2 2 0 -100 200 R 59 59 1 1 B
100 | X 3 3 0 -200 200 R 59 59 1 1 B
101 | X 4 4 0 -300 200 R 59 59 1 1 B
102 | X 5 5 0 -400 200 R 59 59 1 1 B
103 | X 6 6 0 -500 200 R 59 59 1 1 B
104 | X 7 7 0 -600 200 R 59 59 1 1 B
105 | X 8 8 0 -700 200 R 59 59 1 1 B
106 | X 9 9 0 -800 200 R 59 59 1 1 B
107 | ENDDRAW
108 | ENDDEF
109 | #
110 | # 744242220-SamacSys_Parts
111 | #
112 | DEF 744242220-SamacSys_Parts L 0 30 Y Y 1 F N
113 | F0 "L" 650 300 50 H V L CNN
114 | F1 "744242220-SamacSys_Parts" 650 200 50 H V L CNN
115 | F2 "WE-SLM77" 650 100 50 H I L CNN
116 | F3 "https://componentsearchengine.com/Datasheets/1/744242220.pdf" 650 0 50 H I L CNN
117 | F4 "Wurth WE-SLM Series Wire-wound SMD Inductor with a Ferrite Core, 22 uH +50/-30 300mA Idc" 650 -100 50 H I L CNN "Description"
118 | F5 "710-744242220" 650 -300 50 H I L CNN "Mouser Part Number"
119 | F6 "https://www.mouser.com/Search/Refine.aspx?Keyword=710-744242220" 650 -400 50 H I L CNN "Mouser Price/Stock"
120 | F7 "Wurth Elektronik" 650 -500 50 H I L CNN "Manufacturer_Name"
121 | F8 "744242220" 650 -600 50 H I L CNN "Manufacturer_Part_Number"
122 | DRAW
123 | P 5 0 1 6 200 100 600 100 600 -200 200 -200 200 100 N
124 | X 3 1 0 0 200 R 50 50 0 0 P
125 | X 1 2 0 -100 200 R 50 50 0 0 P
126 | X 2 3 800 -100 200 L 50 50 0 0 P
127 | X 4 4 800 0 200 L 50 50 0 0 P
128 | ENDDRAW
129 | ENDDEF
130 | #
131 | #End Library
132 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | $CMP 2716-106
4 | D WAGO Leiterplattenklemme
5 | F https://www.wago.com/de/leiterplattenanschluss/klemmenleiste-fuer-leiterplatten/p/2716-106
6 | $ENDCMP
7 | #
8 | $CMP 2N7002
9 | D N-Channel Enhancement Mode Field Effect Transistor
10 | F https://www.onsemi.com/pub/Collateral/NDS7002A-D.PDF
11 | $ENDCMP
12 | #
13 | $CMP ESP32-DEVKITC-32D
14 | D Espressif ESP-WROOM-32D Microprocessor with DevKit
15 | F https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf
16 | $ENDCMP
17 | #
18 | $CMP FDV304P
19 | D Digital FET, P-Channel
20 | F https://www.onsemi.com/pub/Collateral/FDV304P-D.PDF
21 | $ENDCMP
22 | #
23 | $CMP G2R2A
24 | D PCB Power Relay
25 | F https://omronfs.omron.com/en_US/ecb/products/pdf/en-g2r.pdf
26 | $ENDCMP
27 | #
28 | $CMP SN65HVD233-HT
29 | D 3.3-V CAN Transceiver
30 | F https://www.ti.com/lit/ds/symlink/sn65hvd233-ht.pdf?HQS=TI-null-null-alldatasheets-df-pf-SEP-wwe
31 | $ENDCMP
32 | #
33 | #End Doc Library
34 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/010_Implementation/Board.pdf
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/2606-3356.kicad_mod:
--------------------------------------------------------------------------------
1 | (module CONN_2606-3356_WAG (layer F.Cu)
2 | (fp_text reference REF** (at 30.250002 6.25) (layer F.SilkS)
3 | (effects (font (size 1 1) (thickness .15)))
4 | )
5 | (fp_text value CONN_2606-3356_WAG (at 30.250002 6.25) (layer F.SilkS)
6 | (effects (font (size 1 1) (thickness .15)))
7 | )
8 | (fp_text user "Copyright 2016 Accelerated Designs. All rights reserved." (at 0 0) (layer Cmts.User)
9 | (effects (font (size .127 .127) (thickness .002)))
10 | )
11 | (fp_text user "*" (at 0 0) (layer F.SilkS)
12 | (effects (font (size 1 1) (thickness .15)))
13 | )
14 | (fp_text user "*" (at 0 0) (layer F.Fab)
15 | (effects (font (size 1 1) (thickness .15)))
16 | )
17 | (fp_line (start -5.627498 16.430001) (end 66.127502 16.430001) (layer F.SilkS) (width .1524))
18 | (fp_line (start 66.127502 16.430001) (end 66.127502 -7.826999) (layer F.SilkS) (width .1524))
19 | (fp_line (start 66.127502 -7.826999) (end -5.627498 -7.826999) (layer F.SilkS) (width .1524))
20 | (fp_line (start -5.627498 -7.826999) (end -5.627498 16.430001) (layer F.SilkS) (width .1524))
21 | (fp_line (start -5.500498 16.303001) (end 66.000502 16.303001) (layer F.Fab) (width .1524))
22 | (fp_line (start 66.000502 16.303001) (end 66.000502 -7.699999) (layer F.Fab) (width .1524))
23 | (fp_line (start 66.000502 -7.699999) (end -5.500498 -7.699999) (layer F.Fab) (width .1524))
24 | (fp_line (start -5.500498 -7.699999) (end -5.500498 16.303001) (layer F.Fab) (width .1524))
25 | (fp_line (start -5.754498 -7.953999) (end -5.754498 16.557001) (layer F.CrtYd) (width .1524))
26 | (fp_line (start -5.754498 16.557001) (end 66.254502 16.557001) (layer F.CrtYd) (width .1524))
27 | (fp_line (start 66.254502 16.557001) (end 66.254502 -7.953999) (layer F.CrtYd) (width .1524))
28 | (fp_line (start 66.254502 -7.953999) (end -5.754498 -7.953999) (layer F.CrtYd) (width .1524))
29 | (fp_circle (center 0 -1.905) (end .381 -1.905) (layer F.Fab) (width .1524))
30 | (fp_circle (center -6.262498 0) (end -5.881498 0) (layer F.SilkS) (width .1524))
31 | (fp_circle (center -6.262498 0) (end -5.881498 0) (layer B.SilkS) (width .1524))
32 | (pad 1 thru_hole circle (at -.000001 0) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
33 | (pad 2 thru_hole circle (at -.000001 12.5) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
34 | (pad 3 thru_hole circle (at 12.499999 0) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
35 | (pad 4 thru_hole circle (at 12.499999 12.5) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
36 | (pad 5 thru_hole circle (at 24.999999 0) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
37 | (pad 6 thru_hole circle (at 24.999999 12.5) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
38 | (pad 7 thru_hole circle (at 37.500002 0) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
39 | (pad 8 thru_hole circle (at 37.500002 12.5) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
40 | (pad 9 thru_hole circle (at 50.000003 0) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
41 | (pad 10 thru_hole circle (at 50.000003 12.5) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
42 | (pad 11 thru_hole circle (at 62.500003 0) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
43 | (pad 12 thru_hole circle (at 62.500003 12.5) (size 2.6162 2.6162) (drill 2.1082) (layers *.Cu *.Mask))
44 | )
45 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/AST 045-08.kicad_mod:
--------------------------------------------------------------------------------
1 | (module "AST 045-08" (layer F.Cu) (tedit 5FBBF540)
2 | (fp_text reference REF** (at 19.845502 14.657001) (layer F.SilkS)
3 | (effects (font (size 1 1) (thickness 0.15)))
4 | )
5 | (fp_text value "AST 045-08" (at 19.765502 12.367001) (layer F.Fab)
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | )
8 | (fp_line (start 0 17) (end 40 17) (layer F.CrtYd) (width 0.1524))
9 | (fp_line (start 0 0) (end 0 17) (layer F.SilkS) (width 0.1524))
10 | (fp_line (start 0 0) (end 40 0) (layer F.SilkS) (width 0.1524))
11 | (fp_line (start 0 0) (end 0 17) (layer F.CrtYd) (width 0.1524))
12 | (fp_line (start 0 0) (end 40 0) (layer F.CrtYd) (width 0.1524))
13 | (fp_line (start 0 0) (end 40 0) (layer F.Fab) (width 0.1524))
14 | (fp_line (start 0 17) (end 40 17) (layer F.SilkS) (width 0.1524))
15 | (fp_line (start 40 0) (end 40 17) (layer F.SilkS) (width 0.1524))
16 | (fp_line (start 40 0) (end 40 17) (layer F.CrtYd) (width 0.1524))
17 | (fp_line (start 0 0) (end 0 17) (layer F.Fab) (width 0.1524))
18 | (fp_line (start 40 0) (end 40 17) (layer F.Fab) (width 0.1524))
19 | (fp_line (start 0 17) (end 40 17) (layer F.Fab) (width 0.1524))
20 | (pad 1 thru_hole circle (at 2 2.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
21 | (pad 2 thru_hole circle (at 6.88 2.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
22 | (pad 3 thru_hole circle (at 11.76 2.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
23 | (pad 4 thru_hole circle (at 16.64 2.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
24 | (pad 5 thru_hole circle (at 21.52 2.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
25 | (pad 6 thru_hole circle (at 26.4 2.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
26 | (pad 7 thru_hole circle (at 31.28 2.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
27 | (pad 8 thru_hole circle (at 36.16 2.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
28 | (pad 9 thru_hole circle (at 2 7.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
29 | (pad 10 thru_hole circle (at 6.88 7.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
30 | (pad 11 thru_hole circle (at 11.76 7.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
31 | (pad 12 thru_hole circle (at 16.64 7.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
32 | (pad 13 thru_hole circle (at 21.52 7.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
33 | (pad 14 thru_hole circle (at 26.4 7.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
34 | (pad 15 thru_hole circle (at 31.28 7.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
35 | (pad 16 thru_hole circle (at 36.16 7.36) (size 1.524 1.524) (drill 1) (layers *.Cu *.Mask))
36 | )
37 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/DIOM5336X265N.kicad_mod:
--------------------------------------------------------------------------------
1 |
2 | (module DIOM5336X265N (layer F.Cu) (tedit 5FA03053)
3 | (descr "")
4 | (fp_text reference REF** (at -0.325 -3.135 0) (layer F.SilkS)
5 | (effects (font (size 1.0 1.0) (thickness 0.015)))
6 | )
7 | (fp_text value DIOM5336X265N (at 4.755 3.135 0) (layer F.Fab)
8 | (effects (font (size 1.0 1.0) (thickness 0.015)))
9 | )
10 | (fp_circle (center -3.9 0.0) (end -3.8 0.0) (layer F.SilkS) (width 0.2))
11 | (fp_circle (center -3.9 0.0) (end -3.8 0.0) (layer F.Fab) (width 0.2))
12 | (fp_line (start -3.555 -2.063) (end -3.555 2.063) (layer F.CrtYd) (width 0.05))
13 | (fp_line (start -2.2 -1.8125) (end -2.2 1.8125) (layer F.Fab) (width 0.127))
14 | (fp_line (start -2.2 1.8125) (end 2.2 1.8125) (layer F.Fab) (width 0.127))
15 | (fp_line (start 2.2 1.8125) (end 2.2 -1.8125) (layer F.Fab) (width 0.127))
16 | (fp_line (start 2.2 -1.8125) (end -2.2 -1.8125) (layer F.Fab) (width 0.127))
17 | (fp_line (start 3.555 -2.063) (end -3.555 -2.063) (layer F.CrtYd) (width 0.05))
18 | (fp_line (start 2.2 -1.8125) (end -2.2 -1.8125) (layer F.SilkS) (width 0.127))
19 | (fp_line (start -2.2 1.8125) (end 2.2 1.8125) (layer F.SilkS) (width 0.127))
20 | (fp_line (start -2.2 -1.8125) (end -2.2 -1.38) (layer F.SilkS) (width 0.127))
21 | (fp_line (start -2.2 1.38) (end -2.2 1.8125) (layer F.SilkS) (width 0.127))
22 | (fp_line (start 2.2 -1.8125) (end 2.2 -1.38) (layer F.SilkS) (width 0.127))
23 | (fp_line (start 2.2 1.38) (end 2.2 1.8125) (layer F.SilkS) (width 0.127))
24 | (fp_line (start 3.555 2.063) (end 3.555 -2.063) (layer F.CrtYd) (width 0.05))
25 | (fp_line (start -3.555 2.063) (end 3.555 2.063) (layer F.CrtYd) (width 0.05))
26 | (pad A smd rect (at 2.16 0.0) (size 2.29 2.12) (layers F.Cu F.Mask F.Paste))
27 | (pad C smd rect (at -2.16 0.0) (size 2.29 2.12) (layers F.Cu F.Mask F.Paste))
28 | )
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/G2R2A.kicad_mod:
--------------------------------------------------------------------------------
1 |
2 | (module G2R2A (layer F.Cu) (tedit 5F55EFFC)
3 | (descr "RELAY 2 x norm. open, Omron")
4 | (fp_text reference REF** (at 25.792715 1.856865 900) (layer F.SilkS)
5 | (effects (font (size 1.40202362205 1.40202362205) (thickness 0.015)))
6 | )
7 | (fp_text value G2R2A (at 2.924505 0.635775 900) (layer F.Fab)
8 | (effects (font (size 1.40167716535 1.40167716535) (thickness 0.015)))
9 | )
10 | (fp_line (start -4.699 6.604) (end 24.384 6.604) (layer F.SilkS) (width 0.1524))
11 | (fp_line (start 24.384 -6.477) (end 24.384 6.604) (layer F.SilkS) (width 0.1524))
12 | (fp_line (start 24.384 -6.477) (end -4.699 -6.477) (layer F.SilkS) (width 0.1524))
13 | (fp_line (start -4.699 6.604) (end -4.699 -6.477) (layer F.SilkS) (width 0.1524))
14 | (fp_line (start -2.54 -2.0574) (end -2.54 -1.1938) (layer F.SilkS) (width 0.1524))
15 | (fp_line (start -0.6604 -1.1938) (end -0.6604 1.3208) (layer F.SilkS) (width 0.254))
16 | (fp_line (start -4.4196 1.3208) (end -4.4196 -1.1938) (layer F.SilkS) (width 0.254))
17 | (fp_line (start -4.4196 -1.1938) (end -2.54 -1.1938) (layer F.SilkS) (width 0.254))
18 | (fp_line (start -2.54 -1.1938) (end -1.2954 -1.1938) (layer F.SilkS) (width 0.254))
19 | (fp_line (start -3.7846 1.3208) (end -4.4196 1.3208) (layer F.SilkS) (width 0.254))
20 | (fp_line (start -1.2954 -1.1938) (end -3.7846 1.3208) (layer F.SilkS) (width 0.1524))
21 | (fp_line (start -1.2954 -1.1938) (end -0.6604 -1.1938) (layer F.SilkS) (width 0.254))
22 | (fp_line (start -0.6604 1.3208) (end -2.54 1.3208) (layer F.SilkS) (width 0.254))
23 | (fp_line (start -2.54 1.3208) (end -2.54 1.9304) (layer F.SilkS) (width 0.1524))
24 | (fp_line (start -2.54 1.3208) (end -3.7846 1.3208) (layer F.SilkS) (width 0.254))
25 | (fp_line (start 17.018 -0.889) (end 17.526 -1.397) (layer F.SilkS) (width 0.1524))
26 | (fp_line (start 18.1102 -0.8382) (end 22.479 -0.8382) (layer F.SilkS) (width 0.1524))
27 | (fp_line (start 22.479 -0.8382) (end 22.479 -1.9812) (layer F.SilkS) (width 0.1524))
28 | (fp_line (start 17.526 -1.905) (end 17.526 -1.397) (layer F.SilkS) (width 0.1524))
29 | (fp_line (start 17.018 0.762) (end 17.526 1.27) (layer F.SilkS) (width 0.1524))
30 | (fp_line (start 18.1102 0.7112) (end 22.479 0.7112) (layer F.SilkS) (width 0.1524))
31 | (fp_line (start 22.479 0.7112) (end 22.479 1.8542) (layer F.SilkS) (width 0.1524))
32 | (fp_line (start 17.526 1.778) (end 17.526 1.27) (layer F.SilkS) (width 0.1524))
33 | (pad 2 thru_hole oval (at -2.54 -3.81) (size 1.9812 3.9624) (drill 1.3208) (layers *.Cu *.Mask))
34 | (pad 1 thru_hole oval (at -2.54 3.683) (size 1.9812 3.9624) (drill 1.3208) (layers *.Cu *.Mask))
35 | (pad P1 thru_hole oval (at 17.4498 -3.81) (size 1.9812 3.9624) (drill 1.3208) (layers *.Cu *.Mask))
36 | (pad S1 thru_hole oval (at 22.4536 -3.81) (size 1.9812 3.9624) (drill 1.3208) (layers *.Cu *.Mask))
37 | (pad P2 thru_hole oval (at 17.4498 3.683) (size 1.9812 3.9624) (drill 1.3208) (layers *.Cu *.Mask))
38 | (pad S2 thru_hole oval (at 22.4536 3.683) (size 1.9812 3.9624) (drill 1.3208) (layers *.Cu *.Mask))
39 | )
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/INDPM5550X300N.kicad_mod:
--------------------------------------------------------------------------------
1 | (module "INDPM5550X300N" (layer F.Cu)
2 | (descr "ETQP3M4R7KVP")
3 | (tags "Inductor")
4 | (attr smd)
5 | (fp_text reference L** (at 0 0) (layer F.SilkS)
6 | (effects (font (size 1.27 1.27) (thickness 0.254)))
7 | )
8 | (fp_text user %R (at 0 0) (layer F.Fab)
9 | (effects (font (size 1.27 1.27) (thickness 0.254)))
10 | )
11 | (fp_text value "INDPM5550X300N" (at 0 0) (layer F.SilkS) hide
12 | (effects (font (size 1.27 1.27) (thickness 0.254)))
13 | )
14 | (fp_line (start -3.7 -2.95) (end 3.7 -2.95) (layer F.CrtYd) (width 0.05))
15 | (fp_line (start 3.7 -2.95) (end 3.7 2.95) (layer F.CrtYd) (width 0.05))
16 | (fp_line (start 3.7 2.95) (end -3.7 2.95) (layer F.CrtYd) (width 0.05))
17 | (fp_line (start -3.7 2.95) (end -3.7 -2.95) (layer F.CrtYd) (width 0.05))
18 | (fp_line (start -2.75 -2.5) (end 2.75 -2.5) (layer F.Fab) (width 0.1))
19 | (fp_line (start 2.75 -2.5) (end 2.75 2.5) (layer F.Fab) (width 0.1))
20 | (fp_line (start 2.75 2.5) (end -2.75 2.5) (layer F.Fab) (width 0.1))
21 | (fp_line (start -2.75 2.5) (end -2.75 -2.5) (layer F.Fab) (width 0.1))
22 | (fp_line (start 2.75 -2.5) (end -2.75 -2.5) (layer F.SilkS) (width 0.2))
23 | (fp_line (start -2.75 2.5) (end 2.75 2.5) (layer F.SilkS) (width 0.2))
24 | (pad 1 smd rect (at -2.35 0 0) (size 2.2 2.75) (layers F.Cu F.Paste F.Mask))
25 | (pad 2 smd rect (at 2.35 0 0) (size 2.2 2.75) (layers F.Cu F.Paste F.Mask))
26 | (model ETQP3M4R7KVP.stp
27 | (at (xyz 0 0 0))
28 | (scale (xyz 1 1 1))
29 | (rotate (xyz 0 0 0))
30 | )
31 | )
32 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/IND_74404043220A.kicad_mod:
--------------------------------------------------------------------------------
1 |
2 | (module IND_74404043220A (layer F.Cu) (tedit 5FA50143)
3 | (descr "")
4 | (fp_text reference REF** (at 0.415 -3.975 0) (layer F.SilkS)
5 | (effects (font (size 1.0 1.0) (thickness 0.015)))
6 | )
7 | (fp_text value IND_74404043220A (at 7.62 4.445 0) (layer F.Fab)
8 | (effects (font (size 1.0 1.0) (thickness 0.015)))
9 | )
10 | (fp_circle (center -2.725 0.0) (end -2.625 0.0) (layer F.SilkS) (width 0.2))
11 | (fp_circle (center -2.725 0.0) (end -2.625 0.0) (layer F.Fab) (width 0.2))
12 | (fp_line (start -2.1 -2.1) (end -2.1 2.1) (layer F.Fab) (width 0.127))
13 | (fp_line (start -0.455 -2.1) (end 0.455 -2.1) (layer F.SilkS) (width 0.127))
14 | (fp_line (start 2.1 2.1) (end 2.1 -2.1) (layer F.Fab) (width 0.127))
15 | (fp_line (start 2.1 2.1) (end -2.1 2.1) (layer F.Fab) (width 0.127))
16 | (fp_line (start -2.1 -2.1) (end 2.1 -2.1) (layer F.Fab) (width 0.127))
17 | (fp_line (start 0.455 2.1) (end -0.455 2.1) (layer F.SilkS) (width 0.127))
18 | (fp_line (start -2.525 -2.45) (end -2.525 2.45) (layer F.CrtYd) (width 0.05))
19 | (fp_line (start -2.525 -2.45) (end 2.525 -2.45) (layer F.CrtYd) (width 0.05))
20 | (fp_line (start 2.525 2.45) (end 2.525 -2.45) (layer F.CrtYd) (width 0.05))
21 | (fp_line (start 2.525 2.45) (end -2.525 2.45) (layer F.CrtYd) (width 0.05))
22 | (pad 1 smd rect (at -1.525 0.0) (size 1.5 4.4) (layers F.Cu F.Mask F.Paste))
23 | (pad 2 smd rect (at 1.525 0.0) (size 1.5 4.4) (layers F.Cu F.Mask F.Paste))
24 | )
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/MODULE_ESP32-DEVKITC-32D.kicad_mod:
--------------------------------------------------------------------------------
1 | (module MODULE_ESP32-DEVKITC-32D (layer F.Cu) (tedit 5FA93735)
2 | (fp_text reference REF** (at -10.829175 -23.366045) (layer F.SilkS)
3 | (effects (font (size 1.000386 1.000386) (thickness 0.015)))
4 | )
5 | (fp_text value MODULE_ESP32-DEVKITC-32D (at 1.24136 23.214535) (layer F.Fab)
6 | (effects (font (size 1.001047 1.001047) (thickness 0.015)))
7 | )
8 | (fp_circle (center -14.6 -19.9) (end -14.46 -19.9) (layer F.Fab) (width 0.28))
9 | (fp_circle (center -14.6 -19.9) (end -14.46 -19.9) (layer F.Fab) (width 0.28))
10 | (fp_line (start -14.2 22.42) (end -14.097 -22.352) (layer F.CrtYd) (width 0.05))
11 | (fp_line (start 14.2 22.42) (end -14.2 22.42) (layer F.CrtYd) (width 0.05))
12 | (fp_line (start 14.2 -22.32) (end 14.2 22.42) (layer F.CrtYd) (width 0.05))
13 | (fp_line (start -14.2 -22.32) (end 14.2 -22.32) (layer F.CrtYd) (width 0.05))
14 | (fp_line (start 13.95 22.17) (end -13.95 22.17) (layer F.SilkS) (width 0.127))
15 | (fp_line (start 13.97 -22.098) (end 13.95 22.098) (layer F.SilkS) (width 0.127))
16 | (fp_line (start -13.95 -22.07) (end 13.95 -22.07) (layer F.SilkS) (width 0.127))
17 | (fp_line (start -13.95 22.17) (end -13.95 -22.098) (layer F.SilkS) (width 0.127))
18 | (fp_line (start -13.95 22.17) (end -13.95 -22.098) (layer F.Fab) (width 0.127))
19 | (fp_line (start 13.95 22.17) (end -13.95 22.17) (layer F.Fab) (width 0.127))
20 | (fp_line (start -13.95 -22.07) (end 13.95 -22.07) (layer F.Fab) (width 0.127))
21 | (pad 30 thru_hole circle (at 12.573 15.673) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
22 | (pad 29 thru_hole circle (at 12.573 13.133) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
23 | (pad 28 thru_hole circle (at 12.573 10.593) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
24 | (pad 27 thru_hole circle (at 12.573 8.053) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
25 | (pad 26 thru_hole circle (at 12.573 5.513) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
26 | (pad 25 thru_hole circle (at 12.573 2.973) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
27 | (pad 24 thru_hole circle (at 12.573 0.433) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
28 | (pad 23 thru_hole circle (at 12.573 -2.107) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
29 | (pad 22 thru_hole circle (at 12.573 -4.647) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
30 | (pad 21 thru_hole circle (at 12.573 -7.187) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
31 | (pad 20 thru_hole circle (at 12.573 -9.727) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
32 | (pad 18 thru_hole circle (at 12.573 -14.807) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
33 | (pad 17 thru_hole circle (at 12.573 -17.347) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
34 | (pad 16 thru_hole circle (at 12.573 -19.887) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
35 | (pad 15 thru_hole circle (at -12.7 15.8) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
36 | (pad 14 thru_hole circle (at -12.7 13.26) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
37 | (pad 13 thru_hole circle (at -12.7 10.72) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
38 | (pad 12 thru_hole circle (at -12.7 8.18) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
39 | (pad 11 thru_hole circle (at -12.7 5.64) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
40 | (pad 10 thru_hole circle (at -12.7 3.1) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
41 | (pad 9 thru_hole circle (at -12.7 0.56) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
42 | (pad 8 thru_hole circle (at -12.7 -1.98) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
43 | (pad 7 thru_hole circle (at -12.7 -4.52) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
44 | (pad 6 thru_hole circle (at -12.7 -7.06) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
45 | (pad 5 thru_hole circle (at -12.7 -9.6) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
46 | (pad 4 thru_hole circle (at -12.7 -12.14) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
47 | (pad 3 thru_hole circle (at -12.7 -14.68) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
48 | (pad 19 thru_hole circle (at 12.573 -12.267) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
49 | (pad 2 thru_hole circle (at -12.7 -17.22) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
50 | (pad 1 thru_hole rect (at -12.7 -19.76) (size 1.56 1.56) (drill 1.04) (layers *.Cu *.Mask))
51 | )
52 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/NE555DR.kicad_mod:
--------------------------------------------------------------------------------
1 | (module SOIC127P600X175-8N (layer F.Cu)
2 | (descr "D (R-PDSO-G8)")
3 | (tags "Integrated Circuit")
4 | (attr smd)
5 | (fp_text reference IC** (at 0 0) (layer F.SilkS)
6 | (effects (font (size 1.27 1.27) (thickness 0.254)))
7 | )
8 | (fp_text value SOIC127P600X175-8N (at 0 0)(layer F.SilkS) hide
9 | (effects (font (size 1.27 1.27) (thickness 0.254)))
10 | )
11 | (fp_line (start -3.725 -2.75) (end 3.725 -2.75) (layer Dwgs.User) (width 0.05))
12 | (fp_line (start 3.725 -2.75) (end 3.725 2.75) (layer Dwgs.User) (width 0.05))
13 | (fp_line (start 3.725 2.75) (end -3.725 2.75) (layer Dwgs.User) (width 0.05))
14 | (fp_line (start -3.725 2.75) (end -3.725 -2.75) (layer Dwgs.User) (width 0.05))
15 | (fp_line (start -1.95 -2.45) (end 1.95 -2.45) (layer Dwgs.User) (width 0.1))
16 | (fp_line (start 1.95 -2.45) (end 1.95 2.45) (layer Dwgs.User) (width 0.1))
17 | (fp_line (start 1.95 2.45) (end -1.95 2.45) (layer Dwgs.User) (width 0.1))
18 | (fp_line (start -1.95 2.45) (end -1.95 -2.45) (layer Dwgs.User) (width 0.1))
19 | (fp_line (start -1.95 -1.18) (end -0.68 -2.45) (layer Dwgs.User) (width 0.1))
20 | (fp_line (start -1.6 -2.45) (end 1.6 -2.45) (layer F.SilkS) (width 0.2))
21 | (fp_line (start 1.6 -2.45) (end 1.6 2.45) (layer F.SilkS) (width 0.2))
22 | (fp_line (start 1.6 2.45) (end -1.6 2.45) (layer F.SilkS) (width 0.2))
23 | (fp_line (start -1.6 2.45) (end -1.6 -2.45) (layer F.SilkS) (width 0.2))
24 | (fp_line (start -3.475 -2.58) (end -1.95 -2.58) (layer F.SilkS) (width 0.2))
25 | (pad 1 smd rect (at -2.712 -1.905 90) (size 0.65 1.525) (layers F.Cu F.Paste))
26 | (pad 2 smd rect (at -2.712 -0.635 90) (size 0.65 1.525) (layers F.Cu F.Paste))
27 | (pad 3 smd rect (at -2.712 0.635 90) (size 0.65 1.525) (layers F.Cu F.Paste))
28 | (pad 4 smd rect (at -2.712 1.905 90) (size 0.65 1.525) (layers F.Cu F.Paste))
29 | (pad 5 smd rect (at 2.712 1.905 90) (size 0.65 1.525) (layers F.Cu F.Paste))
30 | (pad 6 smd rect (at 2.712 0.635 90) (size 0.65 1.525) (layers F.Cu F.Paste))
31 | (pad 7 smd rect (at 2.712 -0.635 90) (size 0.65 1.525) (layers F.Cu F.Paste))
32 | (pad 8 smd rect (at 2.712 -1.905 90) (size 0.65 1.525) (layers F.Cu F.Paste))
33 | (model "C:\\Users\\reyes\\Documents\\esp32-can-iot.git\\Hardware\\010_Implementation\\Board Library\\SamacSys_Parts.3dshapes\\NE555DR.stp"
34 | (at(xyz 0 0 0))
35 | (scale (xyz 1 1 1))
36 | (rotate(xyz 0 0 0))
37 | )
38 | )
39 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/PCA82C251.kicad_mod:
--------------------------------------------------------------------------------
1 | (module PCA82C251 (layer F.Cu) (tedit 5F50D47D)
2 | (descr "
SOT96-1 SO8: plastic small outline package; 8 leads; body width 3.9 mm JEDEC : MS-012IEC : 076E03 ")
3 | (fp_text reference REF** (at 5.5 -0.99) (layer F.SilkS)
4 | (effects (font (size 0.787402 0.787402) (thickness 0.015)))
5 | )
6 | (fp_text value PCA82C251 (at 6.5 0.5) (layer F.Fab)
7 | (effects (font (size 0.787402 0.787402) (thickness 0.015)))
8 | )
9 | (fp_line (start 2.4 -1.8) (end 2.4 1.4) (layer F.SilkS) (width 0.2032))
10 | (fp_line (start 2.4 1.4) (end 2.4 1.9) (layer F.Fab) (width 0.2032))
11 | (fp_line (start 2.4 1.9) (end -2.4 1.9) (layer F.Fab) (width 0.2032))
12 | (fp_line (start -2.4 1.9) (end -2.4 1.4) (layer F.Fab) (width 0.2032))
13 | (fp_line (start -2.4 1.4) (end -2.4 -1.8) (layer F.SilkS) (width 0.2032))
14 | (fp_line (start -2.4 -1.9) (end 2.4 -1.9) (layer F.Fab) (width 0.2032))
15 | (fp_line (start 2.4 1.4) (end -2.4 1.4) (layer F.SilkS) (width 0.2032))
16 | (fp_poly (pts (xy -2.1501 2) (xy -1.6599 2) (xy -1.6599 3.1001) (xy -2.1501 3.1001)) (layer F.Fab) (width 0.01))
17 | (fp_poly (pts (xy -0.8801 2) (xy -0.3899 2) (xy -0.3899 3.1001) (xy -0.8801 3.1001)) (layer F.Fab) (width 0.01))
18 | (fp_poly (pts (xy 0.3899 2) (xy 0.8801 2) (xy 0.8801 3.1001) (xy 0.3899 3.1001)) (layer F.Fab) (width 0.01))
19 | (fp_poly (pts (xy 1.6599 2) (xy 2.1501 2) (xy 2.1501 3.1001) (xy 1.6599 3.1001)) (layer F.Fab) (width 0.01))
20 | (fp_poly (pts (xy 1.6599 -3.1001) (xy 2.1501 -3.1001) (xy 2.1501 -2) (xy 1.6599 -2)) (layer F.Fab) (width 0.01))
21 | (fp_poly (pts (xy 0.3899 -3.1001) (xy 0.8801 -3.1001) (xy 0.8801 -2) (xy 0.3899 -2)) (layer F.Fab) (width 0.01))
22 | (fp_poly (pts (xy -0.8801 -3.1001) (xy -0.3899 -3.1001) (xy -0.3899 -2) (xy -0.8801 -2)) (layer F.Fab) (width 0.01))
23 | (fp_poly (pts (xy -2.1501 -3.1001) (xy -1.6599 -3.1001) (xy -1.6599 -2) (xy -2.1501 -2)) (layer F.Fab) (width 0.01))
24 | (fp_line (start -2.4 1.4) (end -2.4 -1.9) (layer F.Fab) (width 0.2032))
25 | (fp_line (start 2.4 -1.9) (end 2.4 1.4) (layer F.Fab) (width 0.2032))
26 | (fp_line (start -2.4 1.4) (end -2.4 1.8) (layer F.SilkS) (width 0.2032))
27 | (fp_line (start 2.4 1.4) (end 2.4 1.8) (layer F.SilkS) (width 0.2032))
28 | (fp_line (start -1.397 1.9) (end -1.143 1.9) (layer F.SilkS) (width 0.2032))
29 | (fp_line (start -0.127 1.9) (end 0.127 1.9) (layer F.SilkS) (width 0.2032))
30 | (fp_line (start 1.143 1.9) (end 1.397 1.9) (layer F.SilkS) (width 0.2032))
31 | (fp_line (start 1.143 -1.91) (end 1.397 -1.91) (layer F.SilkS) (width 0.2032))
32 | (fp_line (start -0.127 -1.91) (end 0.127 -1.91) (layer F.SilkS) (width 0.2032))
33 | (fp_line (start -1.397 -1.91) (end -1.143 -1.91) (layer F.SilkS) (width 0.2032))
34 | (fp_circle (center -1.905 0.889) (end -1.705 0.889) (layer F.SilkS) (width 0.1))
35 | (pad 8 smd rect (at -1.905 -2.65) (size 0.6 1.3) (layers F.Cu F.Paste F.Mask))
36 | (pad 7 smd rect (at -0.635 -2.65) (size 0.6 1.3) (layers F.Cu F.Paste F.Mask))
37 | (pad 6 smd rect (at 0.635 -2.65) (size 0.6 1.3) (layers F.Cu F.Paste F.Mask))
38 | (pad 5 smd rect (at 1.905 -2.65) (size 0.6 1.3) (layers F.Cu F.Paste F.Mask))
39 | (pad 4 smd rect (at 1.905 2.65) (size 0.6 1.3) (layers F.Cu F.Paste F.Mask))
40 | (pad 3 smd rect (at 0.635 2.65) (size 0.6 1.3) (layers F.Cu F.Paste F.Mask))
41 | (pad 2 smd rect (at -0.635 2.65) (size 0.6 1.3) (layers F.Cu F.Paste F.Mask))
42 | (pad 1 smd rect (at -1.905 2.65) (size 0.6 1.3) (layers F.Cu F.Paste F.Mask))
43 | )
44 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/RELAY_G5V-2-DC5.kicad_mod:
--------------------------------------------------------------------------------
1 | (module RELAY_G5V-2-DC5 (layer F.Cu) (tedit 5FA019C5)
2 | (fp_text reference REF** (at -6.9971 -6.99712) (layer F.SilkS)
3 | (effects (font (size 1.001732 1.001732) (thickness 0.015)))
4 | )
5 | (fp_text value RELAY_G5V-2-DC5 (at -0.635925 6.995815) (layer F.Fab)
6 | (effects (font (size 1.001551 1.001551) (thickness 0.015)))
7 | )
8 | (fp_line (start -10.25 5.05) (end -10.25 -5.05) (layer F.Fab) (width 0.127))
9 | (fp_line (start -10.25 -5.05) (end 10.25 -5.05) (layer F.Fab) (width 0.127))
10 | (fp_line (start 10.25 -5.05) (end 10.25 5.05) (layer F.Fab) (width 0.127))
11 | (fp_line (start 10.25 5.05) (end -10.25 5.05) (layer F.Fab) (width 0.127))
12 | (fp_circle (center -8.99 5.71) (end -8.79 5.71) (layer F.SilkS) (width 0.4))
13 | (fp_line (start -10.25 5.05) (end -10.25 -5.05) (layer F.SilkS) (width 0.127))
14 | (fp_line (start -10.25 -5.05) (end 10.25 -5.05) (layer F.SilkS) (width 0.127))
15 | (fp_line (start 10.25 -5.05) (end 10.25 5.05) (layer F.SilkS) (width 0.127))
16 | (fp_line (start 10.25 5.05) (end -10.25 5.05) (layer F.SilkS) (width 0.127))
17 | (fp_line (start -10.5 5.3) (end -10.5 -5.3) (layer F.CrtYd) (width 0.05))
18 | (fp_line (start -10.5 -5.3) (end 10.5 -5.3) (layer F.CrtYd) (width 0.05))
19 | (fp_line (start 10.5 -5.3) (end 10.5 5.3) (layer F.CrtYd) (width 0.05))
20 | (fp_line (start 10.5 5.3) (end -10.5 5.3) (layer F.CrtYd) (width 0.05))
21 | (pad 8 thru_hole circle (at 8.89 3.81) (size 1.508 1.508) (drill 1) (layers *.Cu *.Mask))
22 | (pad 9 thru_hole circle (at 8.89 -3.81) (size 1.508 1.508) (drill 1) (layers *.Cu *.Mask))
23 | (pad 11 thru_hole circle (at 3.81 -3.81) (size 1.508 1.508) (drill 1) (layers *.Cu *.Mask))
24 | (pad 6 thru_hole circle (at 3.81 3.81) (size 1.508 1.508) (drill 1) (layers *.Cu *.Mask))
25 | (pad 4 thru_hole circle (at -1.27 3.81) (size 1.508 1.508) (drill 1) (layers *.Cu *.Mask))
26 | (pad 13 thru_hole circle (at -1.27 -3.81) (size 1.508 1.508) (drill 1) (layers *.Cu *.Mask))
27 | (pad 16 thru_hole circle (at -8.89 -3.81) (size 1.508 1.508) (drill 1) (layers *.Cu *.Mask))
28 | (pad 1 thru_hole rect (at -8.89 3.81) (size 1.508 1.508) (drill 1) (layers *.Cu *.Mask))
29 | )
30 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/SOIC127P600X175.kicad_mod:
--------------------------------------------------------------------------------
1 |
2 | (module SOIC127P600X175 (layer F.Cu) (tedit 5F55D6A2)
3 | (descr "")
4 | (fp_text reference REF** (at 0.5334 -4.4196 0) (layer F.SilkS)
5 | (effects (font (size 1.64 1.64) (thickness 0.015)))
6 | )
7 | (fp_text value SOIC127P600X175 (at 9.8806 4.191 0) (layer F.Fab)
8 | (effects (font (size 1.64 1.64) (thickness 0.015)))
9 | )
10 | (fp_line (start -2.0066 -1.651) (end -2.0066 -2.159) (layer F.Fab) (width 0.1524))
11 | (fp_line (start -2.0066 -2.159) (end -3.0988 -2.159) (layer F.Fab) (width 0.1524))
12 | (fp_line (start -3.0988 -2.159) (end -3.0988 -1.651) (layer F.Fab) (width 0.1524))
13 | (fp_line (start -3.0988 -1.651) (end -2.0066 -1.651) (layer F.Fab) (width 0.1524))
14 | (fp_line (start -2.0066 -0.381) (end -2.0066 -0.889) (layer F.Fab) (width 0.1524))
15 | (fp_line (start -2.0066 -0.889) (end -3.0988 -0.889) (layer F.Fab) (width 0.1524))
16 | (fp_line (start -3.0988 -0.889) (end -3.0988 -0.381) (layer F.Fab) (width 0.1524))
17 | (fp_line (start -3.0988 -0.381) (end -2.0066 -0.381) (layer F.Fab) (width 0.1524))
18 | (fp_line (start -2.0066 0.889) (end -2.0066 0.381) (layer F.Fab) (width 0.1524))
19 | (fp_line (start -2.0066 0.381) (end -3.0988 0.381) (layer F.Fab) (width 0.1524))
20 | (fp_line (start -3.0988 0.381) (end -3.0988 0.889) (layer F.Fab) (width 0.1524))
21 | (fp_line (start -3.0988 0.889) (end -2.0066 0.889) (layer F.Fab) (width 0.1524))
22 | (fp_line (start -2.0066 2.159) (end -2.0066 1.651) (layer F.Fab) (width 0.1524))
23 | (fp_line (start -2.0066 1.651) (end -3.0988 1.651) (layer F.Fab) (width 0.1524))
24 | (fp_line (start -3.0988 1.651) (end -3.0988 2.159) (layer F.Fab) (width 0.1524))
25 | (fp_line (start -3.0988 2.159) (end -2.0066 2.159) (layer F.Fab) (width 0.1524))
26 | (fp_line (start 2.0066 1.651) (end 2.0066 2.159) (layer F.Fab) (width 0.1524))
27 | (fp_line (start 2.0066 2.159) (end 3.0988 2.159) (layer F.Fab) (width 0.1524))
28 | (fp_line (start 3.0988 2.159) (end 3.0988 1.651) (layer F.Fab) (width 0.1524))
29 | (fp_line (start 3.0988 1.651) (end 2.0066 1.651) (layer F.Fab) (width 0.1524))
30 | (fp_line (start 2.0066 0.381) (end 2.0066 0.889) (layer F.Fab) (width 0.1524))
31 | (fp_line (start 2.0066 0.889) (end 3.0988 0.889) (layer F.Fab) (width 0.1524))
32 | (fp_line (start 3.0988 0.889) (end 3.0988 0.381) (layer F.Fab) (width 0.1524))
33 | (fp_line (start 3.0988 0.381) (end 2.0066 0.381) (layer F.Fab) (width 0.1524))
34 | (fp_line (start 2.0066 -0.889) (end 2.0066 -0.381) (layer F.Fab) (width 0.1524))
35 | (fp_line (start 2.0066 -0.381) (end 3.0988 -0.381) (layer F.Fab) (width 0.1524))
36 | (fp_line (start 3.0988 -0.381) (end 3.0988 -0.889) (layer F.Fab) (width 0.1524))
37 | (fp_line (start 3.0988 -0.889) (end 2.0066 -0.889) (layer F.Fab) (width 0.1524))
38 | (fp_line (start 2.0066 -2.159) (end 2.0066 -1.651) (layer F.Fab) (width 0.1524))
39 | (fp_line (start 2.0066 -1.651) (end 3.0988 -1.651) (layer F.Fab) (width 0.1524))
40 | (fp_line (start 3.0988 -1.651) (end 3.0988 -2.159) (layer F.Fab) (width 0.1524))
41 | (fp_line (start 3.0988 -2.159) (end 2.0066 -2.159) (layer F.Fab) (width 0.1524))
42 | (fp_line (start -2.0066 2.4892) (end 2.0066 2.4892) (layer F.Fab) (width 0.1524))
43 | (fp_line (start 2.0066 2.4892) (end 2.0066 -2.4892) (layer F.Fab) (width 0.1524))
44 | (fp_line (start 2.0066 -2.4892) (end 0.3048 -2.4892) (layer F.Fab) (width 0.1524))
45 | (fp_line (start 0.3048 -2.4892) (end -0.3048 -2.4892) (layer F.Fab) (width 0.1524))
46 | (fp_line (start -0.3048 -2.4892) (end -2.0066 -2.4892) (layer F.Fab) (width 0.1524))
47 | (fp_line (start -2.0066 -2.4892) (end -2.0066 2.4892) (layer F.Fab) (width 0.1524))
48 | (fp_arc (start 0.0 -2.4892) (end -0.3048 -2.4892) (angle -180.0) (layer F.Fab) (width 0.0))
49 | (fp_text user * (at -3.302 -2.3368) (layer F.Fab)
50 | (effects (font (size 1.0 1.0) (thickness 0.015)))
51 | )
52 | (fp_line (start -1.3716 2.4892) (end 1.3716 2.4892) (layer F.SilkS) (width 0.1524))
53 | (fp_line (start 1.3716 -2.4892) (end 0.3048 -2.4892) (layer F.SilkS) (width 0.1524))
54 | (fp_line (start 0.3048 -2.4892) (end -0.3048 -2.4892) (layer F.SilkS) (width 0.1524))
55 | (fp_line (start -0.3048 -2.4892) (end -1.3716 -2.4892) (layer F.SilkS) (width 0.1524))
56 | (fp_arc (start 0.0 -2.4892) (end -0.3048 -2.4892) (angle -180.0) (layer F.SilkS) (width 0.0))
57 | (fp_text user * (at -3.302 -2.3368) (layer F.SilkS)
58 | (effects (font (size 1.0 1.0) (thickness 0.015)))
59 | )
60 | (pad 1 smd rect (at -2.4638 -1.905) (size 1.9812 0.5588) (layers F.Cu F.Mask F.Paste))
61 | (pad 2 smd rect (at -2.4638 -0.635) (size 1.9812 0.5588) (layers F.Cu F.Mask F.Paste))
62 | (pad 3 smd rect (at -2.4638 0.635) (size 1.9812 0.5588) (layers F.Cu F.Mask F.Paste))
63 | (pad 4 smd rect (at -2.4638 1.905) (size 1.9812 0.5588) (layers F.Cu F.Mask F.Paste))
64 | (pad 5 smd rect (at 2.4638 1.905) (size 1.9812 0.5588) (layers F.Cu F.Mask F.Paste))
65 | (pad 6 smd rect (at 2.4638 0.635) (size 1.9812 0.5588) (layers F.Cu F.Mask F.Paste))
66 | (pad 7 smd rect (at 2.4638 -0.635) (size 1.9812 0.5588) (layers F.Cu F.Mask F.Paste))
67 | (pad 8 smd rect (at 2.4638 -1.905) (size 1.9812 0.5588) (layers F.Cu F.Mask F.Paste))
68 | )
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/SOT23-3.kicad_mod:
--------------------------------------------------------------------------------
1 |
2 | (module SOT23-3 (layer F.Cu) (tedit 5FA8F50A)
3 | (descr "")
4 | (fp_text reference REF** (at 0.1906625 -1.9828825 0) (layer F.SilkS)
5 | (effects (font (size 0.320271653543 0.320271653543) (thickness 0.015)))
6 | )
7 | (fp_text value SOT23-3 (at 0.406692 -0.012709 0) (layer F.Fab)
8 | (effects (font (size 0.32022992126 0.32022992126) (thickness 0.015)))
9 | )
10 | (fp_line (start 1.4224 -0.6604) (end 1.4224 0.6604) (layer F.Fab) (width 0.1524))
11 | (fp_line (start 1.4224 0.6604) (end -1.4224 0.6604) (layer F.Fab) (width 0.1524))
12 | (fp_line (start -1.4224 0.6604) (end -1.4224 -0.6604) (layer F.Fab) (width 0.1524))
13 | (fp_line (start -1.4224 -0.6604) (end 1.4224 -0.6604) (layer F.Fab) (width 0.1524))
14 | (fp_line (start -0.8 -0.7) (end -1.4 -0.7) (layer F.SilkS) (width 0.2032))
15 | (fp_line (start -1.4 -0.7) (end -1.4 0.1) (layer F.SilkS) (width 0.2032))
16 | (fp_line (start 0.8 -0.7) (end 1.4 -0.7) (layer F.SilkS) (width 0.2032))
17 | (fp_line (start 1.4 -0.7) (end 1.4 0.1) (layer F.SilkS) (width 0.2032))
18 | (pad 3 smd rect (at 0.0 -1.1) (size 0.8 0.9) (layers F.Cu F.Mask F.Paste))
19 | (pad 2 smd rect (at 0.95 1.0) (size 0.8 0.9) (layers F.Cu F.Mask F.Paste))
20 | (pad 1 smd rect (at -0.95 1.0) (size 0.8 0.9) (layers F.Cu F.Mask F.Paste))
21 | )
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pretty/WE-SPC_48XX78.kicad_mod:
--------------------------------------------------------------------------------
1 | (module "WE-SPC_48XX78" (layer F.Cu)
2 | (descr "WE-SPC_48XX78")
3 | (tags "Inductor")
4 | (attr smd)
5 | (fp_text reference L** (at -3.81 5.08) (layer F.SilkS)
6 | (effects (font (size 1.27 1.27) (thickness 0.254)))
7 | )
8 | (fp_text user %R (at -3.81 5.08) (layer F.Fab)
9 | (effects (font (size 1.27 1.27) (thickness 0.254)))
10 | )
11 | (fp_text value "WE-SPC_48XX78" (at -3.81 5.08) (layer F.SilkS) hide
12 | (effects (font (size 1.27 1.27) (thickness 0.254)))
13 | )
14 | (fp_line (start -1.75 0) (end 1.75 0) (layer F.Fab) (width 0.25))
15 | (fp_line (start -2.4892 -2.8004) (end 2.4892 -2.8004) (layer F.SilkS) (width 0.127))
16 | (fp_line (start 2.4892 -2.8004) (end 2.4892 2.8004) (layer F.Fab) (width 0.127))
17 | (fp_line (start 2.4892 2.8004) (end -2.4892 2.8004) (layer F.SilkS) (width 0.127))
18 | (fp_line (start -2.4892 2.8004) (end -2.4892 -2.8004) (layer F.Fab) (width 0.127))
19 | (fp_line (start -3.25 -3.25) (end 3.25 -3.25) (layer F.CrtYd) (width 0.127))
20 | (fp_line (start 3.25 -3.25) (end 3.25 3.25) (layer F.CrtYd) (width 0.127))
21 | (fp_line (start 3.25 3.25) (end -3.25 3.25) (layer F.CrtYd) (width 0.127))
22 | (fp_line (start -3.25 3.25) (end -3.25 -3.25) (layer F.CrtYd) (width 0.127))
23 | (pad 1 smd rect (at -1.75 0 0) (size 2 5.3) (layers F.Cu F.Paste F.Mask))
24 | (pad 2 smd rect (at 1.75 0 0) (size 2 5.3) (layers F.Cu F.Paste F.Mask))
25 | )
26 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.pro:
--------------------------------------------------------------------------------
1 | update=04/02/2021 12:47:42
2 | version=1
3 | last_client=kicad
4 | [general]
5 | version=1
6 | RootSch=
7 | BoardNm=
8 | [cvpcb]
9 | version=1
10 | NetIExt=net
11 | [eeschema]
12 | version=1
13 | LibDir=
14 | [eeschema/libraries]
15 | [pcbnew]
16 | version=1
17 | PageLayoutDescrFile=
18 | LastNetListRead=Board.net
19 | CopperLayerCount=2
20 | BoardThickness=1.6
21 | AllowMicroVias=0
22 | AllowBlindVias=0
23 | RequireCourtyardDefinitions=0
24 | ProhibitOverlappingCourtyards=1
25 | MinTrackWidth=0.2
26 | MinViaDiameter=0.4
27 | MinViaDrill=0.3
28 | MinMicroViaDiameter=0.2
29 | MinMicroViaDrill=0.09999999999999999
30 | MinHoleToHole=0.25
31 | TrackWidth1=0.25
32 | TrackWidth2=0.5
33 | ViaDiameter1=0.8
34 | ViaDrill1=0.4
35 | dPairWidth1=0.2
36 | dPairGap1=0.25
37 | dPairViaGap1=0.25
38 | SilkLineWidth=0.12
39 | SilkTextSizeV=1
40 | SilkTextSizeH=1
41 | SilkTextSizeThickness=0.15
42 | SilkTextItalic=0
43 | SilkTextUpright=1
44 | CopperLineWidth=0.2
45 | CopperTextSizeV=1.5
46 | CopperTextSizeH=1.5
47 | CopperTextThickness=0.3
48 | CopperTextItalic=0
49 | CopperTextUpright=1
50 | EdgeCutLineWidth=0.05
51 | CourtyardLineWidth=0.05
52 | OthersLineWidth=0.15
53 | OthersTextSizeV=1
54 | OthersTextSizeH=1
55 | OthersTextSizeThickness=0.15
56 | OthersTextItalic=0
57 | OthersTextUpright=1
58 | SolderMaskClearance=0.05
59 | SolderMaskMinWidth=0
60 | SolderPasteClearance=0
61 | SolderPasteRatio=-0
62 | [pcbnew/Layer.F.Cu]
63 | Name=F.Cu
64 | Type=0
65 | Enabled=1
66 | [pcbnew/Layer.In1.Cu]
67 | Name=In1.Cu
68 | Type=0
69 | Enabled=0
70 | [pcbnew/Layer.In2.Cu]
71 | Name=In2.Cu
72 | Type=0
73 | Enabled=0
74 | [pcbnew/Layer.In3.Cu]
75 | Name=In3.Cu
76 | Type=0
77 | Enabled=0
78 | [pcbnew/Layer.In4.Cu]
79 | Name=In4.Cu
80 | Type=0
81 | Enabled=0
82 | [pcbnew/Layer.In5.Cu]
83 | Name=In5.Cu
84 | Type=0
85 | Enabled=0
86 | [pcbnew/Layer.In6.Cu]
87 | Name=In6.Cu
88 | Type=0
89 | Enabled=0
90 | [pcbnew/Layer.In7.Cu]
91 | Name=In7.Cu
92 | Type=0
93 | Enabled=0
94 | [pcbnew/Layer.In8.Cu]
95 | Name=In8.Cu
96 | Type=0
97 | Enabled=0
98 | [pcbnew/Layer.In9.Cu]
99 | Name=In9.Cu
100 | Type=0
101 | Enabled=0
102 | [pcbnew/Layer.In10.Cu]
103 | Name=In10.Cu
104 | Type=0
105 | Enabled=0
106 | [pcbnew/Layer.In11.Cu]
107 | Name=In11.Cu
108 | Type=0
109 | Enabled=0
110 | [pcbnew/Layer.In12.Cu]
111 | Name=In12.Cu
112 | Type=0
113 | Enabled=0
114 | [pcbnew/Layer.In13.Cu]
115 | Name=In13.Cu
116 | Type=0
117 | Enabled=0
118 | [pcbnew/Layer.In14.Cu]
119 | Name=In14.Cu
120 | Type=0
121 | Enabled=0
122 | [pcbnew/Layer.In15.Cu]
123 | Name=In15.Cu
124 | Type=0
125 | Enabled=0
126 | [pcbnew/Layer.In16.Cu]
127 | Name=In16.Cu
128 | Type=0
129 | Enabled=0
130 | [pcbnew/Layer.In17.Cu]
131 | Name=In17.Cu
132 | Type=0
133 | Enabled=0
134 | [pcbnew/Layer.In18.Cu]
135 | Name=In18.Cu
136 | Type=0
137 | Enabled=0
138 | [pcbnew/Layer.In19.Cu]
139 | Name=In19.Cu
140 | Type=0
141 | Enabled=0
142 | [pcbnew/Layer.In20.Cu]
143 | Name=In20.Cu
144 | Type=0
145 | Enabled=0
146 | [pcbnew/Layer.In21.Cu]
147 | Name=In21.Cu
148 | Type=0
149 | Enabled=0
150 | [pcbnew/Layer.In22.Cu]
151 | Name=In22.Cu
152 | Type=0
153 | Enabled=0
154 | [pcbnew/Layer.In23.Cu]
155 | Name=In23.Cu
156 | Type=0
157 | Enabled=0
158 | [pcbnew/Layer.In24.Cu]
159 | Name=In24.Cu
160 | Type=0
161 | Enabled=0
162 | [pcbnew/Layer.In25.Cu]
163 | Name=In25.Cu
164 | Type=0
165 | Enabled=0
166 | [pcbnew/Layer.In26.Cu]
167 | Name=In26.Cu
168 | Type=0
169 | Enabled=0
170 | [pcbnew/Layer.In27.Cu]
171 | Name=In27.Cu
172 | Type=0
173 | Enabled=0
174 | [pcbnew/Layer.In28.Cu]
175 | Name=In28.Cu
176 | Type=0
177 | Enabled=0
178 | [pcbnew/Layer.In29.Cu]
179 | Name=In29.Cu
180 | Type=0
181 | Enabled=0
182 | [pcbnew/Layer.In30.Cu]
183 | Name=In30.Cu
184 | Type=0
185 | Enabled=0
186 | [pcbnew/Layer.B.Cu]
187 | Name=B.Cu
188 | Type=0
189 | Enabled=1
190 | [pcbnew/Layer.B.Adhes]
191 | Enabled=1
192 | [pcbnew/Layer.F.Adhes]
193 | Enabled=1
194 | [pcbnew/Layer.B.Paste]
195 | Enabled=1
196 | [pcbnew/Layer.F.Paste]
197 | Enabled=1
198 | [pcbnew/Layer.B.SilkS]
199 | Enabled=1
200 | [pcbnew/Layer.F.SilkS]
201 | Enabled=1
202 | [pcbnew/Layer.B.Mask]
203 | Enabled=1
204 | [pcbnew/Layer.F.Mask]
205 | Enabled=1
206 | [pcbnew/Layer.Dwgs.User]
207 | Enabled=1
208 | [pcbnew/Layer.Cmts.User]
209 | Enabled=1
210 | [pcbnew/Layer.Eco1.User]
211 | Enabled=1
212 | [pcbnew/Layer.Eco2.User]
213 | Enabled=1
214 | [pcbnew/Layer.Edge.Cuts]
215 | Enabled=1
216 | [pcbnew/Layer.Margin]
217 | Enabled=1
218 | [pcbnew/Layer.B.CrtYd]
219 | Enabled=1
220 | [pcbnew/Layer.F.CrtYd]
221 | Enabled=1
222 | [pcbnew/Layer.B.Fab]
223 | Enabled=1
224 | [pcbnew/Layer.F.Fab]
225 | Enabled=1
226 | [pcbnew/Layer.Rescue]
227 | Enabled=0
228 | [pcbnew/Netclasses]
229 | [pcbnew/Netclasses/Default]
230 | Name=Default
231 | Clearance=0.2
232 | TrackWidth=0.25
233 | ViaDiameter=0.8
234 | ViaDrill=0.4
235 | uViaDiameter=0.3
236 | uViaDrill=0.1
237 | dPairWidth=0.2
238 | dPairGap=0.25
239 | dPairViaGap=0.25
240 | [schematic_editor]
241 | version=1
242 | PageLayoutDescrFile=
243 | PlotDirectoryName=./
244 | SubpartIdSeparator=0
245 | SubpartFirstId=65
246 | NetFmtName=Pcbnew
247 | SpiceAjustPassiveValues=0
248 | LabSize=50
249 | ERC_TestSimilarLabels=1
250 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/Board.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 4
2 | EELAYER 30 0
3 | EELAYER END
4 | $Descr A4 11693 8268
5 | encoding utf-8
6 | Sheet 1 5
7 | Title "CAN_Bus Analyzer - Block Overview"
8 | Date "2021-02-04"
9 | Rev "1.1"
10 | Comp "NewTec Gmbh."
11 | Comment1 "Reyes, Gabryel"
12 | Comment2 ""
13 | Comment3 ""
14 | Comment4 ""
15 | $EndDescr
16 | $Sheet
17 | S 4650 3625 1300 475
18 | U 5F562A6B
19 | F0 "CAN_Transceiver" 50
20 | F1 "CAN_Transceiver.sch" 50
21 | F2 "CAN_Rx" O R 5950 3925 50
22 | F3 "CAN_Tx" I R 5950 3825 50
23 | F4 "BUS_H" B L 4650 3825 50
24 | F5 "BUS_L" B L 4650 3925 50
25 | $EndSheet
26 | $Sheet
27 | S 6075 3625 1075 900
28 | U 5F52F099
29 | F0 "MCU" 50
30 | F1 "MCU.sch" 50
31 | F2 "CAN_Tx" O L 6075 3825 50
32 | F3 "CAN_Rx" I L 6075 3925 50
33 | F4 "OBD_Voltage_Check" I R 7150 4125 50
34 | F5 "~OBD~\\CAN" O L 6075 4325 50
35 | F6 "Relay_Supply" O L 6075 4440 50
36 | $EndSheet
37 | $Sheet
38 | S 3300 3625 1200 900
39 | U 5FA55ABF
40 | F0 "Connector" 50
41 | F1 "connector.sch" 50
42 | F2 "OBD_VDD" O L 3300 3750 50
43 | F3 "BUS_H" B R 4500 3825 50
44 | F4 "BUS_L" B R 4500 3925 50
45 | F5 "~OBD~\\CAN" I R 4500 4325 50
46 | F6 "Relay_Supply" I R 4500 4440 50
47 | $EndSheet
48 | Wire Wire Line
49 | 5950 3825 6075 3825
50 | Wire Wire Line
51 | 6075 3925 5950 3925
52 | Wire Wire Line
53 | 4500 3825 4650 3825
54 | Wire Wire Line
55 | 4650 3925 4500 3925
56 | Wire Wire Line
57 | 3300 3750 3175 3750
58 | Wire Wire Line
59 | 3175 3750 3175 3075
60 | Wire Wire Line
61 | 3175 3075 3900 3075
62 | Wire Wire Line
63 | 4500 4325 6075 4325
64 | Wire Wire Line
65 | 6725 2850 7525 2850
66 | Wire Wire Line
67 | 7525 2850 7525 4125
68 | Wire Wire Line
69 | 7525 4125 7150 4125
70 | $Sheet
71 | S 3900 2650 2825 525
72 | U 5F52EFB7
73 | F0 "Power Supply" 50
74 | F1 "Netzteil.sch" 50
75 | F2 "OBD_VDD" I L 3900 3075 50
76 | F3 "OBD_Voltage_Check" O R 6725 2850 50
77 | $EndSheet
78 | Wire Wire Line
79 | 4500 4440 6075 4440
80 | $EndSCHEMATC
81 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/EXT_MF_Switch.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 4
2 | EELAYER 30 0
3 | EELAYER END
4 | $Descr A4 11693 8268
5 | encoding utf-8
6 | Sheet 4 7
7 | Title "CAN_Bus Analyzer - Power Supply - EXT MF Switch"
8 | Date "2020-09-07"
9 | Rev "1.0"
10 | Comp "NewTec Gmbh."
11 | Comment1 "Reyes, Gabryel"
12 | Comment2 ""
13 | Comment3 ""
14 | Comment4 ""
15 | $EndDescr
16 | Text HLabel 8200 1500 2 50 Output ~ 0
17 | V_OUT
18 | Text HLabel 3600 1500 0 50 Input ~ 0
19 | V_IN
20 | Text HLabel 2100 3125 0 50 Input ~ 0
21 | EN
22 | Text HLabel 6425 4225 3 50 Input ~ 0
23 | GND
24 | Connection ~ 6425 3900
25 | Wire Wire Line
26 | 6425 3900 6425 4225
27 | Wire Wire Line
28 | 2675 3125 2100 3125
29 | $Comp
30 | L Device:R R?
31 | U 1 1 5F5D2774
32 | P 6425 2950
33 | AR Path="/5F52EFB7/5F56212F/5F5D2774" Ref="R?" Part="1"
34 | AR Path="/5F52EFB7/5F566EF5/5F5D2774" Ref="R4" Part="1"
35 | F 0 "R4" H 6495 2996 50 0000 L CNN
36 | F 1 "220" H 6495 2905 50 0000 L CNN
37 | F 2 "Resistor_SMD:R_2512_6332Metric_Pad1.52x3.35mm_HandSolder" V 6355 2950 50 0001 C CNN
38 | F 3 "~" H 6425 2950 50 0001 C CNN
39 | 1 6425 2950
40 | 1 0 0 -1
41 | $EndComp
42 | Wire Wire Line
43 | 6425 3100 6425 3225
44 | Wire Wire Line
45 | 3600 1500 5000 1500
46 | Connection ~ 6425 1500
47 | Wire Wire Line
48 | 6425 3225 7400 3225
49 | Wire Wire Line
50 | 7400 3225 7400 1800
51 | Connection ~ 6425 3225
52 | Wire Wire Line
53 | 7400 1800 5575 1800
54 | Wire Wire Line
55 | 6025 2925 5000 2925
56 | Wire Wire Line
57 | 5000 2925 5000 2350
58 | Wire Wire Line
59 | 6025 2925 6025 2400
60 | Connection ~ 5000 1500
61 | Wire Wire Line
62 | 5000 1500 5375 1500
63 | $Comp
64 | L Device:R R?
65 | U 1 1 5F5D2786
66 | P 5000 2200
67 | AR Path="/5F52EFB7/5F56212F/5F5D2786" Ref="R?" Part="1"
68 | AR Path="/5F52EFB7/5F566EF5/5F5D2786" Ref="R3" Part="1"
69 | F 0 "R3" H 5070 2246 50 0000 L CNN
70 | F 1 "220" H 5070 2155 50 0000 L CNN
71 | F 2 "Resistor_SMD:R_2512_6332Metric_Pad1.52x3.35mm_HandSolder" V 4930 2200 50 0001 C CNN
72 | F 3 "~" H 5000 2200 50 0001 C CNN
73 | 1 5000 2200
74 | 1 0 0 -1
75 | $EndComp
76 | Wire Wire Line
77 | 5000 2050 5000 1500
78 | $Comp
79 | L Board:FDV304P U?
80 | U 1 1 5F5D278D
81 | P 5575 1600
82 | AR Path="/5F52EFB7/5F56212F/5F5D278D" Ref="U?" Part="1"
83 | AR Path="/5F52EFB7/5F566EF5/5F5D278D" Ref="U6" Part="1"
84 | F 0 "U6" H 5575 1600 50 0001 L BNN
85 | F 1 "FDV304P" H 5575 1600 50 0001 L BNN
86 | F 2 "Board:SOT23-3" H 5575 1600 50 0001 L BNN
87 | F 3 "" H 5575 1600 50 0001 C CNN
88 | 1 5575 1600
89 | 0 -1 -1 0
90 | $EndComp
91 | Wire Wire Line
92 | 5575 1700 5575 1800
93 | Wire Wire Line
94 | 5675 1500 6425 1500
95 | $Comp
96 | L Board:FDV304P U?
97 | U 1 1 5F5D2795
98 | P 7400 1600
99 | AR Path="/5F52EFB7/5F56212F/5F5D2795" Ref="U?" Part="1"
100 | AR Path="/5F52EFB7/5F566EF5/5F5D2795" Ref="U8" Part="1"
101 | F 0 "U8" H 7400 1600 50 0001 L BNN
102 | F 1 "FDV304P" H 7400 1600 50 0001 L BNN
103 | F 2 "Board:SOT23-3" H 7400 1600 50 0001 L BNN
104 | F 3 "" H 7400 1600 50 0001 C CNN
105 | 1 7400 1600
106 | 0 1 -1 0
107 | $EndComp
108 | Wire Wire Line
109 | 7600 1500 8200 1500
110 | Wire Wire Line
111 | 7400 1700 7400 1800
112 | Connection ~ 7400 1800
113 | Wire Wire Line
114 | 6425 1500 7300 1500
115 | $Comp
116 | L Board:FDV304P U?
117 | U 1 1 5F5D279F
118 | P 6325 2400
119 | AR Path="/5F52EFB7/5F56212F/5F5D279F" Ref="U?" Part="1"
120 | AR Path="/5F52EFB7/5F566EF5/5F5D279F" Ref="U7" Part="1"
121 | F 0 "U7" H 6325 2400 50 0001 L BNN
122 | F 1 "FDV304P" H 6325 2400 50 0001 L BNN
123 | F 2 "Board:SOT23-3" H 6325 2400 50 0001 L BNN
124 | F 3 "" H 6325 2400 50 0001 C CNN
125 | 1 6325 2400
126 | 1 0 0 1
127 | $EndComp
128 | Wire Wire Line
129 | 6425 2600 6425 2800
130 | Wire Wire Line
131 | 6025 2400 6225 2400
132 | Wire Wire Line
133 | 6425 1500 6425 2300
134 | $Comp
135 | L Board:2N7002 Q?
136 | U 1 1 5F5D27A8
137 | P 6225 3525
138 | AR Path="/5F52EFB7/5F56212F/5F5D27A8" Ref="Q?" Part="1"
139 | AR Path="/5F52EFB7/5F566EF5/5F5D27A8" Ref="Q3" Part="1"
140 | F 0 "Q3" H 6225 3837 50 0000 C CNN
141 | F 1 "2N7002" H 6225 3746 50 0000 C CNN
142 | F 2 "Board:SOT23-3" H 6225 3525 50 0001 L BNN
143 | F 3 "" H 6225 3525 50 0001 C CNN
144 | 1 6225 3525
145 | 1 0 0 -1
146 | $EndComp
147 | Wire Wire Line
148 | 6425 3225 6425 3425
149 | Wire Wire Line
150 | 6425 3625 6425 3900
151 | Wire Wire Line
152 | 6025 2925 6025 3625
153 | Connection ~ 6025 2925
154 | $Comp
155 | L Board:2N7002 Q?
156 | U 1 1 5F5E0FC7
157 | P 2875 3025
158 | AR Path="/5F52EFB7/5F56212F/5F5E0FC7" Ref="Q?" Part="1"
159 | AR Path="/5F52EFB7/5F566EF5/5F5E0FC7" Ref="Q2" Part="1"
160 | F 0 "Q2" H 2875 3337 50 0000 C CNN
161 | F 1 "2N7002" H 2875 3246 50 0000 C CNN
162 | F 2 "Board:SOT23-3" H 2875 3025 50 0001 L BNN
163 | F 3 "" H 2875 3025 50 0001 C CNN
164 | 1 2875 3025
165 | 1 0 0 -1
166 | $EndComp
167 | Wire Wire Line
168 | 3075 3900 6425 3900
169 | Wire Wire Line
170 | 3075 3125 3075 3900
171 | Wire Wire Line
172 | 5000 2925 3075 2925
173 | Connection ~ 5000 2925
174 | $EndSCHEMATC
175 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/OBD_MF_Switch.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 4
2 | EELAYER 30 0
3 | EELAYER END
4 | $Descr A4 11693 8268
5 | encoding utf-8
6 | Sheet 3 7
7 | Title "CAN_Bus Analyzer - Power Supply - OBD MF Switch"
8 | Date "2020-09-07"
9 | Rev "1.0"
10 | Comp "NewTec Gmbh."
11 | Comment1 "Reyes, Gabryel"
12 | Comment2 ""
13 | Comment3 ""
14 | Comment4 ""
15 | $EndDescr
16 | Text HLabel 3125 1950 0 50 Input ~ 0
17 | V_IN
18 | Text HLabel 5950 4675 3 50 Input ~ 0
19 | GND
20 | Text HLabel 7725 1950 2 50 Output ~ 0
21 | V_OUT
22 | $Comp
23 | L Device:R R2
24 | U 1 1 5F5750B9
25 | P 5950 3400
26 | F 0 "R2" H 6020 3446 50 0000 L CNN
27 | F 1 "220" H 6020 3355 50 0000 L CNN
28 | F 2 "Resistor_SMD:R_2512_6332Metric_Pad1.52x3.35mm_HandSolder" V 5880 3400 50 0001 C CNN
29 | F 3 "~" H 5950 3400 50 0001 C CNN
30 | 1 5950 3400
31 | 1 0 0 -1
32 | $EndComp
33 | Wire Wire Line
34 | 5950 3550 5950 3675
35 | Wire Wire Line
36 | 3125 1950 4525 1950
37 | Connection ~ 5950 1950
38 | Wire Wire Line
39 | 5950 3675 6925 3675
40 | Wire Wire Line
41 | 6925 3675 6925 2250
42 | Connection ~ 5950 3675
43 | Wire Wire Line
44 | 6925 2250 5100 2250
45 | Wire Wire Line
46 | 5550 3375 4525 3375
47 | Wire Wire Line
48 | 4525 3375 4525 2800
49 | Wire Wire Line
50 | 5550 3375 5550 2850
51 | Connection ~ 4525 1950
52 | Wire Wire Line
53 | 4525 1950 4900 1950
54 | $Comp
55 | L Device:R R1
56 | U 1 1 5F5806DB
57 | P 4525 2650
58 | AR Path="/5F52EFB7/5F56212F/5F5806DB" Ref="R1" Part="1"
59 | AR Path="/5F52EFB7/5F566EF5/5F5806DB" Ref="R?" Part="1"
60 | F 0 "R1" H 4595 2696 50 0000 L CNN
61 | F 1 "220" H 4595 2605 50 0000 L CNN
62 | F 2 "Resistor_SMD:R_2512_6332Metric_Pad1.52x3.35mm_HandSolder" V 4455 2650 50 0001 C CNN
63 | F 3 "~" H 4525 2650 50 0001 C CNN
64 | 1 4525 2650
65 | 1 0 0 -1
66 | $EndComp
67 | Wire Wire Line
68 | 4525 2500 4525 1950
69 | $Comp
70 | L Board:FDV304P U3
71 | U 1 1 5F5BC3D1
72 | P 5100 2050
73 | F 0 "U3" V 5232 1906 50 0000 R CNN
74 | F 1 "FDV304P" H 5100 2050 50 0001 L BNN
75 | F 2 "Board:SOT23-3" H 5100 2050 50 0001 L BNN
76 | F 3 "" H 5100 2050 50 0001 C CNN
77 | 1 5100 2050
78 | 0 -1 -1 0
79 | $EndComp
80 | Wire Wire Line
81 | 5100 2150 5100 2250
82 | Wire Wire Line
83 | 5200 1950 5950 1950
84 | $Comp
85 | L Board:FDV304P U5
86 | U 1 1 5F5C0F63
87 | P 6925 2050
88 | F 0 "U5" H 6925 2050 50 0001 L BNN
89 | F 1 "FDV304P" H 6925 2050 50 0001 L BNN
90 | F 2 "Board:SOT23-3" H 6925 2050 50 0001 L BNN
91 | F 3 "" H 6925 2050 50 0001 C CNN
92 | 1 6925 2050
93 | 0 1 -1 0
94 | $EndComp
95 | Wire Wire Line
96 | 7125 1950 7725 1950
97 | Wire Wire Line
98 | 6925 2150 6925 2250
99 | Connection ~ 6925 2250
100 | Wire Wire Line
101 | 5950 1950 6825 1950
102 | $Comp
103 | L Board:FDV304P U4
104 | U 1 1 5F5C2DDB
105 | P 5850 2850
106 | F 0 "U4" H 5850 2850 50 0001 L BNN
107 | F 1 "FDV304P" H 5850 2850 50 0001 L BNN
108 | F 2 "Board:SOT23-3" H 5850 2850 50 0001 L BNN
109 | F 3 "" H 5850 2850 50 0001 C CNN
110 | 1 5850 2850
111 | 1 0 0 1
112 | $EndComp
113 | Wire Wire Line
114 | 5950 3050 5950 3250
115 | Wire Wire Line
116 | 5550 2850 5750 2850
117 | Wire Wire Line
118 | 5950 1950 5950 2750
119 | $Comp
120 | L Board:2N7002 Q1
121 | U 1 1 5F5C5255
122 | P 5750 3975
123 | F 0 "Q1" H 5750 4287 50 0000 C CNN
124 | F 1 "2N7002" H 5750 4196 50 0000 C CNN
125 | F 2 "Board:SOT23-3" H 5750 3975 50 0001 L BNN
126 | F 3 "" H 5750 3975 50 0001 C CNN
127 | 1 5750 3975
128 | 1 0 0 -1
129 | $EndComp
130 | Wire Wire Line
131 | 5950 3675 5950 3875
132 | Wire Wire Line
133 | 5950 4075 5950 4675
134 | Wire Wire Line
135 | 5550 3375 5550 4075
136 | Connection ~ 5550 3375
137 | $EndSCHEMATC
138 |
--------------------------------------------------------------------------------
/Hardware/010_Implementation/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (lib (name Board)(type Legacy)(uri ${KIPRJMOD}/Board.lib)(options "")(descr ""))
3 | (lib (name Board-rescue)(type Legacy)(uri ${KIPRJMOD}/Board-rescue.lib)(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/Hardware/020_Production/V1.0/Board-NPTH-drl.gbr:
--------------------------------------------------------------------------------
1 | %TF.GenerationSoftware,KiCad,Pcbnew,(5.1.8)-1*%
2 | %TF.CreationDate,2020-12-02T11:58:57+01:00*%
3 | %TF.ProjectId,Board,426f6172-642e-46b6-9963-61645f706362,rev?*%
4 | %TF.SameCoordinates,PX253b400PY7a67730*%
5 | %TF.FileFunction,NonPlated,1,2,NPTH*%
6 | %TF.FilePolarity,Positive*%
7 | %FSLAX46Y46*%
8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
9 | G04 Created by KiCad (PCBNEW (5.1.8)-1) date 2020-12-02 11:58:57*
10 | %MOMM*%
11 | %LPD*%
12 | G01*
13 | G04 APERTURE LIST*
14 | G04 APERTURE END LIST*
15 | M02*
16 |
--------------------------------------------------------------------------------
/Hardware/020_Production/V1.0/Layer Output.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/020_Production/V1.0/Layer Output.pdf
--------------------------------------------------------------------------------
/Hardware/020_Production/V1.1/Board-NPTH-drl.gbr:
--------------------------------------------------------------------------------
1 | %TF.GenerationSoftware,KiCad,Pcbnew,(5.1.6)-1*%
2 | %TF.CreationDate,2020-12-18T16:39:00+01:00*%
3 | %TF.ProjectId,Board,426f6172-642e-46b6-9963-61645f706362,rev?*%
4 | %TF.SameCoordinates,PX253b400PY7a67730*%
5 | %TF.FileFunction,NonPlated,1,2,NPTH*%
6 | %TF.FilePolarity,Positive*%
7 | %FSLAX46Y46*%
8 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
9 | G04 Created by KiCad (PCBNEW (5.1.6)-1) date 2020-12-18 16:39:00*
10 | %MOMM*%
11 | %LPD*%
12 | G01*
13 | G04 APERTURE LIST*
14 | G04 APERTURE END LIST*
15 | M02*
16 |
--------------------------------------------------------------------------------
/Hardware/020_Production/V1.1/Layer Output.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/020_Production/V1.1/Layer Output.pdf
--------------------------------------------------------------------------------
/Hardware/030_3D_Modell/Casing_Bot.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/030_3D_Modell/Casing_Bot.stl
--------------------------------------------------------------------------------
/Hardware/030_3D_Modell/Casing_Top.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/030_3D_Modell/Casing_Top.stl
--------------------------------------------------------------------------------
/Hardware/040_Data_Sheets/G2R-2A-DC24.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/040_Data_Sheets/G2R-2A-DC24.pdf
--------------------------------------------------------------------------------
/Hardware/040_Data_Sheets/WAGO 2716-106 .pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/040_Data_Sheets/WAGO 2716-106 .pdf
--------------------------------------------------------------------------------
/Hardware/040_Data_Sheets/esp32-devkit Schematic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/040_Data_Sheets/esp32-devkit Schematic.jpg
--------------------------------------------------------------------------------
/Hardware/040_Data_Sheets/esp32-wroom-32d.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/040_Data_Sheets/esp32-wroom-32d.pdf
--------------------------------------------------------------------------------
/Hardware/040_Data_Sheets/sn65hvd233-ht.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NewTec-GmbH/esp32-can-iot/d3df5774ba5a1c86fe7ca896e076eb6671396802/Hardware/040_Data_Sheets/sn65hvd233-ht.pdf
--------------------------------------------------------------------------------
/Hardware/README.md:
--------------------------------------------------------------------------------
1 | # Hardware Description
2 |
3 | - [Architecture](#Architecture)
4 | - [Implementation](#Implementation)
5 | - [CAN/OBD-II Switching](#CAN/OBD-II-Switching)
6 | - [Components](#Components)
7 | - [Version 1.0](#Version-1.0)
8 | - [Version 1.1](#Version-1.1)
9 |
10 | # Architecture
11 | 
12 |
13 | This deviced is based on the ESP32-WROOM-32E processor, which has a diverse number of interfaces such as digital and analog inputs and output, as well as an integrated CAN bus controller and WiFi capabilities, between many other characteristics. The ESP32 additionally needs a CAN Transceiver to receive the data from the CAN-H and CAN-L lines.
14 |
15 | The connection to the CAN Bus is done through a DSUB-9 connector, which is the standard for CAN busses. This connector can also provide a the device with power, but with a 12V voltage which has to be reduced to 5V before going into the ESP32 DevKit, where it will be transformed again into 3.3V.
16 |
17 | # Implementation
18 | The Project was developed using KiCad and all its Toolchain. This includes Eeschema, Pcbnew and GerbView.
19 |
20 | ## CAN/OBD-II Switching
21 | In order to implement this device in the automotive environment it is necessary to adapt the standard connector found in cars (OBD-II) to the standard CAN connector (D-SUB9).
22 | This is achieved by using an OBD-II to DB9 Cable, from Sparkfun for example. The problem with this solution is that the cable does not use the same pins for the High and Low signals of the CAN-Bus:
23 |
24 | | Pin | OBD-II | DSUB-9 |
25 | | :------: | :------: | :------: |
26 | | 2 | GND | CAN-LOW |
27 | | 3 | CAN-HIGH | GND |
28 | | 5 | CAN-LOW | --- |
29 | | 7 | --- | CAN-HIGH |
30 | | 9 | 12V | --- |
31 |
32 | The main issue is the connection of the CAN signals to Ground, as this would turn off the Bus in all of its nodes and this should be prevented at all costs.
33 |
34 | Our solution is the use of one analog pin on the microcontroller, which detects the incoming 12V at Pin 9 when using the OBD-II option (through a 10:1 voltage divider). If the analog signal is present, two relays are closed to change the connections of the D-SUB9 connector to the rest of the board.
35 |
36 | This solution has been proved effective and quick enough so no the bus is not distrubed in any way.
37 |
38 | ## Components
39 |
40 | The following components were selected for this project's PCB. Smaller components such as resistors and capacitors are not included in this list, but can be found on the [BOM](./010_Implementation/BOM.xlsx).
41 |
42 | | Component | Description |
43 | | :---------------: | :---------------: |
44 | | ESP32-DEVKITC-32D | Microprocessor used. Connected using socket strips |
45 | | SS24 | Safety diode for Microprocessor in case more than one power supply is being used |
46 | | TPS62160DGK | 12V 1A Step-down Converter |
47 | | R452002 | 12V Fuse |
48 | | SMAJ16A | Protective Diode at 12V input |
49 | | G5V-2-DC5 | Relay for "smart" switching between CAN and OBD Pinout |
50 | | BC817 | Transistor for Relay control |
51 | | 1N4148 | Diodes for Relay protection |
52 | | DSUB9 | Standard connector for CAN-Bus |
53 | | SN65HVD233-HT | CAN Transceiver |
54 | | 744242220 | Toroid for CAN-Bus Filtering |
55 | | PESD1CAN | Diode for CAN-Bus Filtering |
56 | | AST 045-08 | 8-position connector with latches for GPIO |
57 | | CAB-10087 | OBD-II to DB9 Cable |
58 |
59 | ## Version 1.0
60 | 
61 | 
62 |
63 | ## Version 1.1
64 | 2 Main Errors were found on Version 1.0:
65 | * Tx and Rx Signals from the CAN Transceiver were inverted
66 | * The 5V Supply for the Relays was located after a diode, which prevented the use of the relays when connected only through USB Supply.
67 |
68 | In the new version were these two changes made and after testing it resolved in success.
69 |
70 | Other minor errors were also repaired, such as the size of the holes for AST 045-08 Connector which were too small.
71 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2020-2021, NewTec GmbH
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | 3. Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ESP CAN-Analyzer
2 | An ESP32 based interface between CAN-Bus and IoT environments.
3 |
4 | This project has the main objective of interfacing a CAN Bus with the user through the use of the Lawicel Protocol (also known as SLCAN). Lawicel represents CAN Frames as strings of ASCII Symbols which can be easily interpreted by the user of by the numerous applications available online.
5 |
6 | 
7 |
8 | - [Technical Specifications](#Technical-Specifications)
9 | - [Software Requirements](#Software-Requirements)
10 | - [Hardware Requirements](#Hardware-Requirements)
11 | - [Extra/Optional Requirements](#Extra/Optional-Requirements)
12 | - [Context](#Context)
13 | - [Use Case](#Use-Case)
14 | - [Potential Optimization](#Potential-Optimization)
15 | - [Specialized Pages](#Specialized-Pages)
16 |
17 | # Technical Specifications
18 | ## Software Requirements
19 | * Support Standard and Extended frame formats
20 | * WiFi Mode Selection (AP or STA)
21 | * Support *Lawicel* Protocol
22 | * HTTP Server over WiFi
23 | * Server shall support authentication
24 | * AP credentials changed through Server
25 | * STA credentials changed through Server
26 | * Bit Timing and Filters changed through Server
27 | * CAN monitoring page (depending on available memory)
28 | * Send CAN frame on demand
29 | * Send CAN frame periodically
30 | * CAN BUS Termination on Demand
31 |
32 | ## Hardware Requirements
33 | * ESP32-based
34 | * ISO 11898 Compliant (CAN up to 1 Mbps)
35 | * CAN Bus Termination on Demand
36 | * Support CAN through DSUB-9
37 | * Support OBD through DSUB-9
38 | * Bus-off State
39 | * ISO 7637 compliant (Road vehicles -- Electrical disturbances from conduction and coupling)
40 | * Control Button
41 | * Red Error LED
42 | * 4 GPIOs via Clamps
43 |
44 | ## Extra/Optional Requirements
45 | * Identification of Error Message
46 | * Reset through Webserver (Save and Restart)
47 | * View OBD Messages (.dbc file?)
48 | * LAWICEL over websocket/mqtt (to nodejs/node-red)
49 |
50 | # Context
51 | 
52 |
53 | Based on the Lawicel Protocol, this project connects any standard CAN Bus to the user-end system. One example is its use on the Automotive Environment, where the CAN Bus is acquired through the DSUB-9 connector. The Frames are parsed through Lawicel into an ASCII String and sent through Serial to the Users Laptop. There is a second option, which is sending this String through a Websocket to the user. This enables the use of other IoT tools on the user's side, for example, Node-Red.
54 |
55 | # Use Case
56 | 
57 |
58 | The use case for this project is based on the direct connection to a CAN Bus, in order to obtain the information being sent between the members of this bus. On the other side of this communication we find a Serial Interface or a Websocket Interface which presents the information to the user. The user has to provide the device with the characteristics of the Bus it is connected to, in order to correctly acquire the data.
59 |
60 | # Potential Optimization
61 |
62 | Thisproject has the potential to be improved in many of its aspects, specially its Firmware. These are some of the points that have been noted during the development, which can be improved in order to increase the performance:
63 |
64 | * Lawicel commands active during AP Mode
65 | * Use of Binary Lawicel Commands instead of Strings
66 | * Optimize the Websocket Buffering of Messages (in both directions)
67 | * Use of both Cores for Tasking
68 | * Send Cyclic Frames using a Lawicel Command
69 | * Prevent reset after car's start/stop
70 |
71 | # Specialized Pages
72 |
73 | * [Hardware](./Hardware/README.md)
74 | * [Firmware](./Coding/fw/README.md)
75 | * [Documentation](./Coding/fw/doc/README.md)
76 | * [Libraries](./Coding/fw/lib/README.md)
77 | * [Lawicel Protocol](./Coding/fw/lib/Lawicel/README.md)
78 | * [CAN](./Coding/fw/lib/CAN/README.md)
79 | * [Application](./Coding/fw/src/README.md)
80 | * [Unit Test](./Coding/fw/test/README.md)
81 | * [Glosary](./Coding/fw/doc/Glosary.md)
--------------------------------------------------------------------------------