Skip to the content
PCBKitNew board
2 layers117.5 × 55 mmGeneric module, the printed circuit board in 3D

A Car based automation framework, fully integrated with Node-Red!

Size
117.5 × 55 mm
Copper layers
2
Thickness
1.6 mm
Parts
73
Nets
134
Pads
514
Tracks, vias
940, 159
Pours
3
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
12 Jul 2022
Updated
7 Sep 2022

Overview

Generic module is an open-source printed circuit board by monsterzack5, from the monsterzack5/AutoMato repository on GitHub. It is a 2-layer board of 117.5 × 55 mm with 73 parts on 134 nets, routed with 940 tracks and 159 vias.

It is built around the AMSROL-7805NZ, ESP-12F and ESP32-S3-WROOM-1-N8, with the ESP32-WROOM-32, TJA1050T/CM and TXS0108EPW among its other parts. Its parts include 14 capacitors, 8 ICs, 7 connectors, 5 resistors and 1 inductor. It belongs with the ESP32 and ESP8266 boards of this library.

Main components

7

README

readme.md

Although near completely functional, AutoMato and generally everything in this repository are in an alpha state. Error handling and reliability are areas that are definitely lacking, and need to be improved before we can recommend actually using this inside of your car.

AutoMato

A car specific framework for automation to breathe new life into an old car.

About

We all have things we wish our car could do, especially if you have an older one. AutoMato seeks to give users the ability to program automations to make that happen. AutoMato is an extensible framework that allows users to create modules that control features of the car based on events or user input.

AutoMato implements 3 things to help abstract away all the complexities of car automation:

  • AutoMato Embedded Library

    • Provides an easy yet powerful way for user created modules to talk to the rest of the AutoMato framework, along with options to customize and extend it.
  • CanRed

    • The centralized control program for all the modules, handles communication between the modules and Node Red along with fundamental infrastructure that is necessary for the system to function.
  • NodeRed Integration

    • An intuitive interface that allows you to easily build event based automation flows using a flowchart style interface.

Modules

Modules are pieces of hardware that contain a microcontroller and specific circuitry to control features of the car such as the windows, climate controls, or windshield wipers. Modules can be connected together via CANBUS or serial by default, but other interfaces can be added in through our library. Modules can be powered all the time (S0) or can be powered only when the car is in ACC (S1). It is planned to have a module to make the car go into ACC to access any S1 modules that are in an offline flow.

users are encouraged to control as much as they can with a single module due to power draw. Simply put, the fewer modules the car has the less quiescent current will be drawn when the car is off.

Automation

Automation flows can be created very easily using NodeRed and the AutoMato plugin for it. The modules that are connected to the system will be added dynamically to the interface with the help of CanRed when you add them to the network.

There are two types of flows that can be created:

  • Online Event Flows

Online event flows require the SBC (ex: Raspberry Pi) to be powered up in order for them to work. These are generally meant to be used only when the car is running because it has a high power draw. With this configuration, NodeRed is actively handling module events and issuing commands. This allows you to use the powerful existing library of NodeRed nodes with your flows.
For example: using a PID control node for the cabin temperature of your car.

  • Offline Event Flows

Offline event flows can be run when the car is on or off, allowing you to have flows that can be run 24/7. These are compiled from NodeRed into "Event Blocks" and spread throughout the modules used in the flow.
For example: using a rain sensor to roll up the windows in your car.

Documentation

Information about specific systems and general development info can be found in /Documentation. The docs are only loosely organized and are by no-means extensive. In the future, as more systems get ironed out, documentation will improve drastically.

How to Use

In the "finished" system, CanRed and NodeRed are both ideally ran on an SBC (ex: Raspberry Pi) inside of your car with the ability to turn itself off to conserve power. As mentioned above, modules can either be connected to a fulltime 12v source, or the cars ACC line. CanRed can be linked to the modules via a CANBUS network or the modules can be daisy chained to each other via Serial. You can even mix and match depending on what is best suited for your application.

Modules are intended to be user programmed, where the user can create specific functions to do specific tasks, and then register these with the AutoMato library so that they can be called from anywhere. A rough example of that:

cpp
AutomatoReturnData LockAllCarDoors(const void*)
{
    bool did_doors_lock = lock_all_the_doors();

    if (did_doors_lock) {
        return automato_return(true);
    } else {
        return automato_return(false);
    }
}

int main() {
    Automato automato(configuration_string);

    // The "1" here corresponds to the ID of the function,
    // ideally you'll be able to leave this out in the future.
    automato.register_callback(1, LockAllCarDoors);

    while (true) {
        automato.loop();
        // Other user specific code here
    }
}

Working Features

  • Module to central controller communication (Star Networking)
  • Supports Zephyr and Arduino frameworks
  • JSON based unix socket API (Working, but very limited)
  • Module linking via Serial or CANBUS
  • "Online" Automation, using NodeRed
  • "Offline" Automation, without needing NodeRed
  • Independent sub-networks
  • Easily extensible API for modifying several parts of the system.

Planned / In Development

  • Module to module communication (This works for the event system, but not for user functions)
  • Module health checks (Currently half-baked)
  • An easy to use error system, where module runtime errors can be sent to CanRed
  • Many more JSON IPC features
  • Integrating with other Automation frameworks, such as HomeAssistant
  • Integrating a SIM7000A module for LTE/CAT-M1 network contectivity
  • Support for STM32Cube and Expressif frameworks

Going into a bit more depth

  • Online and Offline Automation

    • Online Automation Flows

      • flows that are created inside of NodeRed using online event nodes. These flows can use any NodeRed nodes including third party ones. We utilize CanRed to read the message from the module, interpret which node it is from, and tell NodeRed that an event happened. For commands, NodeRed sends the command to the correct module based on the information provided in the node to CanRed.
    • Offline Automation Flows

      • flows that are also created inside of NodeRed except users must use offline event nodes. These flows are limited to other offline event nodes as they need to be parsed and compiled into "Event Blocks" that are saved to the modules. When an "Event Block" is triggered, the initilization module runs a command and/or sends a command to another module with an event ID. That module will then run its own "Event Block". This will continue until the flow has completed. NodeRed simply acts as an interface to construct these offline flows, it is not actively involved in the flows as the modules communicate in a mesh style.
  • JSON UNIX Socket API

CanRed creates and listens to any socket connections to /tmp/CanRed/red.sock. This API can be used as an IPC system for any other programs running on the Raspberry Pi. Internally it's how NodeRed talks to CanRed, and vise versa.

  • Independent Sub-networks

Modules can be connected to each other in all sorts of ways, this allows flexibility and the ability to overcome device number limits on busses if neccessary.

For example, this is a perfectly valid setup:

text
                                                ------------            ----------------
                                             >  | Module 2 | <-CANBUS-> | Non-Automato |
                                             |  ------------            |    Module    |
----------            ------------           |  ------------            ----------------
| CanRed | <-Serial-> | Module 1 | <- CANBUS +> | Module 3 | 
----------            ------------           |  ------------
                            ^                |  ------------
                            |                >  | Module 4 |
                            |                   ------------
                            | Serial
                            |   ------------    
                            - > | Module 5 |
                                ------------

Using the translate_between_layers API, you can have multiple networks and sub-networks happily interact with each other.

  • Easily extensible API

Currently this system uses runtime-polymorphism since it was the easiest to implement, but avoiding the overhead of vtables is planned in the future. The API is subject to drastically change in the future.

Although the AutoMato library tries to implement specialized wrapper code for interacting with EEPROM and connecting to a network (Like CANBUS/Serial), sometimes you want to be able to use something else, LINBUS or Z-Wave. We allow users to be able to implement this themselves by passing the implementation to either the AutoMato constructor (in the case of a custom EEPROM or NVS implementation) or by using the .add_interface API for custom bus interfaces.

Parts

73
QtyValueFootprintReferences
7100nFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC3, C4, C5, C6, C11, C12, C13
510kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1, R2, R3, R4, R5
4 Connector_PinHeader_2.54mm:PinHeader_1x17_P2.54mm_Vertical , , ,
4 Connector_PinHeader_2.54mm:PinHeader_1x19_P2.54mm_Vertical , , ,
322uF 12vCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC8, C9, C10
215pFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1, C2
2RJ45_ShieldedConnector_RJ:RJ45_Ninigi_GEJ1, J2
1 Connector_PinHeader_2.54mm:PinHeader_1x16_P2.54mm_Vertical
1 Connector_PinHeader_2.54mm:PinHeader_1x13_P2.54mm_Vertical
1 Connector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_Vertical
1100pFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC14
110uF 50VCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC7
112V INTerminalBlock:TerminalBlock_bornier-2_P5.08mmJ3
13v3_ATestPoint:TestPoint_Pad_D2.0mmTP14
13v3_BTestPoint:TestPoint_Pad_D2.0mmTP15
13v3_CTestPoint:TestPoint_Pad_D2.0mmTP16
13v3_DTestPoint:TestPoint_Pad_D2.0mmTP17
147uHrandom:SDEI054TL1
15V_ENTestPoint:TestPoint_Pad_D2.0mmTP9
15v_ATestPoint:TestPoint_Pad_D2.0mmTP10
15v_BTestPoint:TestPoint_Pad_D2.0mmTP11
15v_CTestPoint:TestPoint_Pad_D2.0mmTP12
15v_DTestPoint:TestPoint_Pad_D2.0mmTP13
1ACC|BATJumper:SolderJumper-3_P1.3mm_Open_Pad1.0x1.5mmJP1
1AMSROL-7805NZrandom:amsrol_78XXnzU2
1AP2213Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU1
1CLKOUTTestPoint:TestPoint_Pad_D2.0mmTP22
1CSTestPoint:TestPoint_Pad_D2.0mmTP20
1ESP-12FRF_Module:ESP-12EU8
1ESP32-S3-WROOM!esps2:ESP32-S3-WROOM-1-N8U7
1ESP32-WROOM-32RF_Module:ESP32-WROOM-32U6
1ESP_FLASH_BTNButton_Switch_THT:SW_PUSH_6mmFLASH
1ESP_RESET_BTNButton_Switch_THT:SW_PUSH_6mmRESET
1INTTestPoint:TestPoint_Pad_D2.0mmTP1
1JTAGConnector_PinHeader_1.27mm:PinHeader_2x05_P1.27mm_VerticalJ4
1MCP2515-xSOPackage_SO:SOIC-18W_7.5x11.6mm_P1.27mmU4
1MISOTestPoint:TestPoint_Pad_D2.0mmTP19
1MOSITestPoint:TestPoint_Pad_D2.0mmTP18
1PROGConnector_PinHeader_1.27mm:PinHeader_2x03_P1.27mm_VerticalJ5
1RASPI_ZEROrandom:RASPI_ZERO(W)J8
1RH100random:RH100Y1
1RSTTestPoint:TestPoint_Pad_D2.0mmTP7
1RX0TestPoint:TestPoint_Pad_D2.0mmTP2
1RX1TestPoint:TestPoint_Pad_D2.0mmTP3
1SCKTestPoint:TestPoint_Pad_D2.0mmTP21
1SIM7000A headerrandom:SIM7000_MODULEJ6
1SIM7000_3v3/5vJumper:SolderJumper-3_P1.3mm_Bridged2Bar12_Pad1.0x1.5mmGNS5V|3V3
1TJA1050TPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1TX0TestPoint:TestPoint_Pad_D2.0mmTP4
1TX1TestPoint:TestPoint_Pad_D2.0mmTP5
1TX2TestPoint:TestPoint_Pad_D2.0mmTP6
1TXS0108EPWPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU5

The 72 most common of 73 parts.

Questions

How big is the Generic module PCB?

It measures 117.5 × 55 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Generic module use?

73 parts, built around the AMSROL-7805NZ, ESP-12F, ESP32-S3-WROOM-1-N8 and ESP32-WROOM-32. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Generic module KiCad files?

From the monsterzack5/AutoMato repository on GitHub, at the commit this page was made from: the board is Modules/Common/Schematics/generic_module/generic_module.kicad_pcb and its schematic Modules/Common/Schematics/generic_module/generic_module.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Generic module design in my own project?

Its repository states no licence, so its author keeps all rights: ask monsterzack5 before reusing the design.

More from monsterzack5/AutoMato

1
  • 2 layersGeneric module something, the printed circuit board in 3D

    Generic module something

    monsterzack5/AutoMato

    A Car based automation framework, fully integrated with Node-Red!

    62 parts1

Similar boards

  • 2 layers105.7 × 50.8 mmObd xp, the printed circuit board in 3D

    Obd xp

    MustSeeMelons/can_esp32

    The loose wire goes to 3rd pin from the bottom (DTR?).

    69 parts
  • 2 layers33 × 128.5 mmEncoder, the printed circuit board in 3D

    Encoder

    cukier/LoraProgrammer

    Firmware ESP32 (ESP-IDF) para programar e configurar módulos de rádio LoRa, expondo a configuração através de um servidor HTTP em Wi-Fi (SoftAP/STA), acessível também via mDNS (http:// .local/).

    84 partsMIT
  • 2 layers400 × 40 mmPTL RAIL, the printed circuit board in 3D

    PTL RAIL

    mayoogh-flexli/Meesho-Put-To-Light

    Modular, daisy-chained 5-node IR emitter/receiver rail for the Meesho put-to-light system. Each 400 mm board has five bin positions on an 84 mm pitch.

    147 parts
  • 4 layers100 × 68 mmDevKit, the printed circuit board in 3D

    DevKit

    kaminaris/GigaESC

    209 parts47
  • 2 layers39.9 × 45 mmCanBus Radio VAG, the printed circuit board in 3D

    CanBus Radio VAG

    AugustoS97/CanBus-Radio-VAG

    CANBUS PCB to control original functions of VAG (VW, SKODA, SEAT, AUDI) cars (such us original DSP and other functions).

    35 parts16
  • 2 layers100 × 70 mmMotorDriver, the printed circuit board in 3D

    MotorDriver

    JeyRunner/actonator

    3D printable robot actuator with belt-driven gearbox and custom FOC driver board.

    177 parts10MIT
  • 2 layers50.3 × 54 mmJK BMS CAN, the printed circuit board in 3D

    JK BMS CAN

    dremeier/Arduino-JK-BMS-To-Pylontech-CAN-PCB

    PCB and Case for the Arduino JK-BMS To Pylontech CAN converter

    66 parts9
  • 2 layers149.2 × 83.7 mmNodo BMS 1 1, the printed circuit board in 3D

    Nodo BMS 1 1

    AugustoS97/BMS-BatterySystem

    Repositorio con el diseño de un BMS y una batería como TFM

    117 parts7GPL-3.0