Hardware CAN BUS Button Box

Hardware inside and outside of the ECU
Post Reply
gurov
Posts: 46
Joined: Wed Feb 07, 2024 10:43 pm
Location: nj
Github Username: ggurov
Slack: ggurov
Contact:

Hardware CAN BUS Button Box

Post by gurov »

Howdy all,

I've come up with a way to add a hardware button box, over canbus with a very low level of effort.

observe:

that's the button box:
image.png

and video configuring it to call some functions inside of ECU:


and some of it in action switching ETB pedal to etb maps:



"log button":




code for the hid to can bus bridge: https://github.com/ggurov/USB_HID_CAN_BRIDGE

essentially, it's a USB keypad, of some sort, connected via OTG-USB to esp32-s3-otg board with a CAN BUS transceiver that sends the key code pressed as a TS button to a particular index in rusefi, from there, it's routed via the lookup table (curve) in the video, and translated to function id, the function ids i've come up with so far that are functional in my version of firmware are:


ETB_MAP_UP - next ETB pps to tps map
ETB_MAP_DOWN - previous ETB pps to tps map
ETB_MAP_RESET - reset ETB pps to tps map to default
ETB_MAP_1 - map1
ETB_MAP_2 - map2
ETB_MAP_3 - map3
ETB_MAP_4 - map4

AFR_TRIM_UP - afr target ADD - leaner
AFR_TRIM_DOWN - afr target SUBTRACT - richer
AFR_TRIM_RESET - reset afr trim to 0
AFR_TRIM_MAX - leanest trim setting
AFR_TRIM_MIN - richest trim setting

ALL_TRIM_RESET - reset ETB map, AFR trim, and allowed toggles to 0 ( defaults )

CAN_BUTTON_TOGGLE1 - launch control override
CAN_BUTTON_TOGGLE2 - DFCO enable invert, enable when disabled, disable when enabled
CAN_BUTTON_TOGGLE3 - user idle up request

CAN_BUTTON_TOGGLE4 - unassigned
CAN_BUTTON_TOGGLE5 - unassigned
CAN_BUTTON_TOGGLE6 - unassigned
CAN_BUTTON_TOGGLE7 - unassigned
CAN_BUTTON_TOGGLE8 - unassigned

CAN_LUA_COMMAND_1 - trigger LUA_COMMAND_1
CAN_LUA_COMMAND_2 - trigger LUA_COMMAND_2
CAN_LUA_COMMAND_3 - trigger LUA_COMMAND_3
CAN_LUA_COMMAND_4 - trigger LUA_COMMAND_4

it still needs a bit of work, for example to implement using button boxes like this:
image.png
and adding more features into the ECU to make use of this.

https://www.amazon.com/dp/B0B6HT7V7P?ref=ppx_yo2ov_dt_b_fed_asin_title
https://www.amazon.com/dp/B07W4VZ2F2?ref=ppx_yo2ov_dt_b_fed_asin_title
https://www.amazon.com/dp/B08JZ5FVLC?ref_=ppx_hzsearch_conn_dt_b_fed_asin_title_3
https://www.amazon.com/dp/B0DNZGHZH3?ref=ppx_yo2ov_dt_b_fed_asin_title

+ key board/keypad/halfkey/etc


hardware
You do not have the required permissions to view the files attached to this post.
1994 6speed supra turbo [ single turbo/1000cc ID/twin fuel pumps/bc2 262 cams ]. J&S safeguard for knock , UAEFI / 407 disco with rusefi / AEM EMS v2 / MS3pro PNP / Speeduino (mega2560 / teensy41 / stm32f411)
2020 BMW X3m - bootmod3 stage1
Adam_86
Posts: 3
Joined: Sun Sep 10, 2023 2:06 am
Github Username: Adamg-86

Re: Hardware CAN BUS Button Box

Post by Adam_86 »

awesome stuff, I had this idea last nigh to use a num pad as a can button board. But of course you already figured it out. Is Rusefi take can input as analog input as of right now without Lua script?
Post Reply