{"id":13741840,"url":"https://github.com/nopnop2002/esp-idf-CANBus-Monitor","last_synced_at":"2025-05-08T22:32:35.748Z","repository":{"id":42224977,"uuid":"280543254","full_name":"nopnop2002/esp-idf-CANBus-Monitor","owner":"nopnop2002","description":"Monitor Canbus traffic","archived":false,"fork":false,"pushed_at":"2024-07-30T20:46:41.000Z","size":83,"stargazers_count":117,"open_issues_count":1,"forks_count":24,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-09T18:12:02.600Z","etag":null,"topics":["can","can-bus","esp-idf","esp32"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nopnop2002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-17T23:21:14.000Z","updated_at":"2024-10-28T10:06:40.000Z","dependencies_parsed_at":"2023-11-29T23:31:15.693Z","dependency_job_id":"f6538270-971d-463c-a534-721e4a1ffa47","html_url":"https://github.com/nopnop2002/esp-idf-CANBus-Monitor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2Fesp-idf-CANBus-Monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2Fesp-idf-CANBus-Monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2Fesp-idf-CANBus-Monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2Fesp-idf-CANBus-Monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nopnop2002","download_url":"https://codeload.github.com/nopnop2002/esp-idf-CANBus-Monitor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224782100,"owners_count":17369085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["can","can-bus","esp-idf","esp32"],"created_at":"2024-08-03T04:01:03.180Z","updated_at":"2025-05-08T22:32:35.724Z","avatar_url":"https://github.com/nopnop2002.png","language":"C","funding_links":[],"categories":["Hardware"],"sub_categories":["Espressif Systems (ESP8266, ESP32)"],"readme":"# esp-idf-CANBus-Monitor\nMonitor Canbus traffic.\n\n![USBCAN-V800](https://user-images.githubusercontent.com/6020549/86580074-2cd17180-bfb9-11ea-99b5-16e32ab5cc47.jpg)\n\n# Background\n\nWindows application for monitoring CANBus is published [here](https://github.com/SeeedDocument/USB-CAN-Analyzer/tree/master/res/Program).   \nThis tool is designed to be used with this hardware.   \n![bazaar487719_1](https://user-images.githubusercontent.com/6020549/86521939-b9811000-be91-11ea-8dfc-2bc8e24d7f0c.jpg)\n\nSo, I made the hardware side with ESP32.   \n\n\n# Application structure\n```\n+-------------+           +-------------+           +-------------+            +-------------+\n| Windows     |           |   USB-TTL   |           |             |            | SN65HVD23x  |\n| Application |\u003c--(USB)--\u003e|  Converter  |\u003c--(TTL)--\u003e|    ESP32    |\u003c--(TWAI)--\u003e|   CAN-BUS   |\u003c--(CAN BUS)--\u003eCAN Network\n|             |           |             |           |             |            | Transceiver |\n+-------------+           +-------------+           +-------------+            +-------------|\n```\nOn the ESP32S2/S3, you can use USB instead of UART.   \n```\n+-------------+                                     +-------------+            +-------------+\n| Windows     |                                     |             |            | SN65HVD23x  |\n| Application |\u003c--------------(USB)----------------\u003e| ESP32S2/S3  |\u003c--(TWAI)--\u003e|   CAN-BUS   |\u003c--(CAN BUS)--\u003eCAN Network\n|             |                                     |             |            | Transceiver |\n+-------------+                                     +-------------+            +-------------|\n```\n\n# Software requirement    \nESP-IDF V5.0 or later.   \nESP-IDF V4.4 release branch reached EOL in July 2024.   \n\n# Hardware requirements\n\n1. Windows PC   \nWindows applications can be downloaded from here.\n   - [V7.10](https://github.com/SeeedDocument/USB-CAN_Analyzer/tree/master/res/USB-CAN%20software%20and%20drive(v7.10)/Program)   \n   - [V7.20](https://github.com/SeeedDocument/USB-CAN-Analyzer/tree/master/res/V7.20)   \n   - [V8.00](https://github.com/SeeedDocument/USB-CAN-Analyzer/tree/master/res/Program)   \n\n2. USB-TTL Converter    \nESP32 development board has USB.   \nThis USB connects to Linux and is used for writing the firmware and displaying the LOG.   \nNeed converter to connect with Windows PC.   \n\n|Converter||ESP32|ESP32-S2/S3|ESP32-C3/C6||\n|:-:|:-:|:-:|:-:|:-:|:-:|\n|RXD|--|GPIO4|GPIO4|GPIO4|(*1)|\n|TXD|--|GPIO5|GPIO5|GPIO5|(*1)|\n|GND|--|GND|GND|GND||\n\n(*1) You can change using menuconfig.   \n\nESP32-S2/S3 has a full-speed USB OTG peripheral with integrated transceivers and is compliant with the USB 1.1 specification.   \nGPIO19 and GPIO20 can be used as D- and D + of USB respectively.   \nOn the ESP32S2/S3, you can use USB instead of UART.   \nI used this USB Connector.   \n![usb-connector](https://user-images.githubusercontent.com/6020549/124848149-3714ba00-dfd7-11eb-8344-8b120790c5c5.JPG)\n\n```\nESP32-S2/S3 BOARD          USB CONNECTOR\n                           +--+\n                           | || VCC\n    [GPIO 19]    --------\u003e | || D-\n    [GPIO 20]    --------\u003e | || D+\n    [  GND  ]    --------\u003e | || GND\n                           +--+\n```\n\n3. SN65HVD23x CAN-BUS Transceiver   \nSN65HVD23x series has 230/231/232.   \nThey differ in standby/sleep mode functionality.   \nOther features are the same.   \n\n4. Termination resistance   \nI used 150 ohms.   \n\n# Wireing   \n|SN65HVD23x||ESP32|ESP32-S2/S3|ESP32-C3/C6||\n|:-:|:-:|:-:|:-:|:-:|:-:|\n|D(CTX)|--|GPIO21|GPIO0|GPIO0|(*1)|\n|GND|--|GND|GND|GND||\n|Vcc|--|3.3V|3.3V|3.3V||\n|R(CRX)|--|GPIO22|GPIO1|GPIO1|(*1)|\n|Vref|--|N/C|N/C|N/C||\n|CANL|--||||To CAN Bus|\n|CANH|--||||To CAN Bus|\n|RS|--|GND|GND|GND|(*2)|\n\n(*1) You can change using menuconfig.   \n\n(*2) N/C for SN65HVD232\n\n# Test Circuit   \n```\n   +-----------+   +-----------+   +-----------+ \n   | Atmega328 |   | Atmega328 |   |   ESP32   | \n   |           |   |           |   |           | \n   | Transmit  |   | Receive   |   | 21    22  | \n   +-----------+   +-----------+   +-----------+ \n     |       |       |       |       |       |   \n   +-----------+   +-----------+     |       |   \n   |           |   |           |     |       |   \n   |  MCP2515  |   |  MCP2515  |     |       |   \n   |           |   |           |     |       |   \n   +-----------+   +-----------+     |       |   \n     |       |       |       |       |       |   \n   +-----------+   +-----------+   +-----------+ \n   |           |   |           |   | D       R | \n   |  MCP2551  |   |  MCP2551  |   |   VP230   | \n   | H      L  |   | H      L  |   | H       L | \n   +-----------+   +-----------+   +-----------+ \n     |       |       |       |       |       |   \n     +--^^^--+       |       |       +--^^^--+\n     |   R1  |       |       |       |   R2  |   \n |---+-------|-------+-------|-------+-------|---| BackBorn H\n             |               |               |\n             |               |               |\n             |               |               |\n |-----------+---------------+---------------+---| BackBorn L\n\n      +--^^^--+:Terminaror register\n      R1:120 ohms\n      R2:150 ohms(Not working at 120 ohms)\n```\n\n# Installation\n```\ngit clone https://github.com/nopnop2002/esp-idf-CANBus-Monitor\ncd esp-idf-CANBus-Monitor\nidf.py set-target {esp32/esp32s2/esp32s3/esp32c3/esp32c6}\nidf.py menuconfig\nidf.py flash\n```\n\n# Configuration\n![config-main](https://user-images.githubusercontent.com/6020549/126859035-9c83d0b7-14ba-4bc0-8246-0a394887cffa.jpg)\n![config-app](https://github.com/nopnop2002/esp-idf-CANBus-Monitor/assets/6020549/3dd5b3d2-ce48-4881-ac67-36eb4e45fefc)\n\n## CAN Setting\n![config-can](https://user-images.githubusercontent.com/6020549/126859050-bf104e35-c149-4059-9182-f4f9d2e2f853.jpg)\n\n## UART Setting\n- Using UART   \n\t![Image](https://github.com/user-attachments/assets/9d51cec4-e042-44f2-bb54-6563cf0e8245)\n- Using USB   \n\t![Image](https://github.com/user-attachments/assets/fbf99b97-608d-4f49-b1c7-777362310bc6)\n\n# How to use   \n- Add ESP32 to CanBus.   \n- Write firmware to ESP32.   \n- Connect ESP32 and Windows PC using USB-TTL Converter or USB.   \n- Start a Windows application.   \n\n# Windows application User manual   \nSee [here](https://github.com/nopnop2002/esp-idf-CANBus-Monitor/tree/master/UserManual).   \n\nOfficial document is [here](https://github.com/SeeedDocument/USB-CAN-Analyzer/tree/master/res/Document).\n\n\n# Reference   \n\nhttps://github.com/nopnop2002/esp-idf-candump\n\nhttps://github.com/nopnop2002/esp-idf-can2http\n\nhttps://github.com/nopnop2002/esp-idf-can2mqtt\n\nhttps://github.com/nopnop2002/esp-idf-can2usb\n\nhttps://github.com/nopnop2002/esp-idf-can2websocket\n\nhttps://github.com/nopnop2002/esp-idf-can2socket\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnopnop2002%2Fesp-idf-CANBus-Monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnopnop2002%2Fesp-idf-CANBus-Monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnopnop2002%2Fesp-idf-CANBus-Monitor/lists"}