Page 1 of 1

smallCANboard also known as Small CAN Board

Posted: Tue Jun 20, 2023 1:46 am
by AndreyB
Not sure what this is but it seems to consume under 0.003A while waiting for (any) CAN bus activity to wake it up. First usage of new https://github.com/andreika-git/hellen-one/tree/master/modules/mega-mcu64/ module - that's the smallest package for stm32f40x

More details see https://rusefi.com/s/scan


Re: smallCANboard also known as Small CAN Board

Posted: Thu Jun 22, 2023 2:41 am
by mtmotorsport
How much lua program space?

Re: smallCANboard also known as Small CAN Board

Posted: Thu Jun 22, 2023 4:00 am
by AndreyB
mtmotorsport wrote:
Thu Jun 22, 2023 2:41 am
How much lua program space?
How much do you need? At the moment it's 50K

How would you use it?

If I have orders I can try using STM32F413 or STM32L496RG. STM32F413 actually has third CAN bus if anyone has a use-case for third CAN bus.

Re: smallCANboard also known as Small CAN Board

Posted: Thu Jun 22, 2023 9:02 pm
by mtmotorsport
I was thinking along two lines.

One is a CAN gateway. Something to communicate with different buses (at different speeds). For things like OEM chassis integration, or passing info from one bus to another. Having the ECU broadcast at 500k, and then this device can pass some messages to a 250k bus, or a 1M bus. Most race car data aquisition systems are 1M can bus, but if you are trying to integrate some 250k bus data and some 500k bus data it could be useful to have 3 can bus lines.

Second is a generic I/O extender. Like this has 4 low side outputs that can be used to control non time critical devices (warning lights, rad fans, etc) so an ECU that is either limited by I/O like a MRE, or by connection to an OEM wiring harness such as the Hellen based direct plugin ECUs. Add this small can board to get IO that you either don't have physical pins for, or don't have wiring in the stock harness for.

Re: smallCANboard also known as Small CAN Board

Posted: Fri Jun 23, 2023 12:06 am
by mtmotorsport
AndreyB wrote:
Thu Jun 22, 2023 4:00 am
How much do you need? At the moment it's 50K
Lua memory heap usage: 29830 / 60000 bytes = 49.7%

Re: smallCANboard also known as Small CAN Board

Posted: Mon Aug 28, 2023 11:58 pm
by mck1117
do these exist? possible to buy one somewhere?

Re: smallCANboard also known as Small CAN Board

Posted: Tue Aug 29, 2023 12:18 am
by AndreyB
mck1117 wrote:
Mon Aug 28, 2023 11:58 pm
do these exist? possible to buy one somewhere?
will ship you one tomorrow

Re: smallCANboard also known as Small CAN Board

Posted: Thu Sep 07, 2023 8:07 am
by mck1117
is the schematic shared somewhere? looks like the links on the wiki are broken.

Re: smallCANboard also known as Small CAN Board

Posted: Thu Sep 07, 2023 11:22 am
by AndreyB
mck1117 wrote:
Thu Sep 07, 2023 8:07 am
is the schematic shared somewhere? looks like the links on the wiki are broken.
yes, just fixed https://github.com/rusefi/rusefi/wiki/Small-CAN-Board

Re: smallCANboard also known as Small CAN Board

Posted: Wed Oct 11, 2023 1:54 am
by AndreyB

Re: smallCANboard also known as Small CAN Board

Posted: Thu Nov 02, 2023 4:05 am
by mtmotorsport
Just got mine, plan to play around with it soon

Re: smallCANboard also known as Small CAN Board

Posted: Thu Nov 02, 2023 2:36 pm
by zed65
Is there a standard in CAN communication between ECU's?
Can you use this board on a different ECU or can RusEfi communicate with a box from say MaxxEcu or Haltech?

Re: smallCANboard also known as Small CAN Board

Posted: Thu Nov 02, 2023 2:46 pm
by AndreyB
zed65 wrote:
Thu Nov 02, 2023 2:36 pm
Can you use this board on a different ECU or can RusEfi communicate with a box from say MaxxEcu or Haltech?
There is no standard unfortunately.
This box is a very flexible but pretty advanced tool - it allows a high degree of customization using Lua scripting language. For instance https://github.com/rusefi/rusefi/blob/master/firmware/controllers/lua/examples/ms29bit.txt is an integration between rusEFI and a 3rd party control unit - someone had to develop that script for that specific application.

Re: smallCANboard also known as Small CAN Board

Posted: Thu Nov 02, 2023 3:28 pm
by mtmotorsport
AndreyB wrote:
Thu Jun 22, 2023 4:00 am
mtmotorsport wrote:
Thu Jun 22, 2023 2:41 am
How much lua program space?
How much do you need? At the moment it's 50K

How would you use it?

If I have orders I can try using STM32F413 or STM32L496RG. STM32F413 actually has third CAN bus if anyone has a use-case for third CAN bus.
Looks like 25K?

Code: Select all

2023-11-02_11_27_21_789: EngineState: Lua memory heap usage: 14163 / 25000 bytes = 56.6%
2023-11-02_11_27_21_790: EngineState: confirmation_luamemory:9

Re: smallCANboard also known as Small CAN Board

Posted: Thu Nov 02, 2023 3:54 pm
by AndreyB
mtmotorsport wrote:
Thu Nov 02, 2023 3:28 pm
Looks like 25K?
Let's see if https://github.com/rusefi/rusefi/commit/dac73c6b8a446c39bb966fdf99bbc6ba4e22a0ed fixes it, please update to latest snapshot in a couple of hours. I do see 50K working locally

Code: Select all

2023-11-02_11_53_00_833: EngineState: Lua memory heap usage: 14163 / 50000 bytes = 28.3%

Re: smallCANboard also known as Small CAN Board

Posted: Thu Nov 02, 2023 8:55 pm
by mtmotorsport

Code: Select all

2023-11-02_14_36_35_284: EngineState: Added Lua CAN RX filter id 0x18EFFF21 mask 0x1FFFFFFF without custom function
2023-11-02_14_36_35_284: EngineState: Added Lua CAN RX filter id 0x18EFFF18 mask 0x1FFFFFFF without custom function
2023-11-02_14_36_35_284: EngineState: Added Lua CAN RX filter id 0x14EF111E mask 0x1FFFFFFF without custom function
2023-11-02_14_36_35_284: EngineState: Added Lua CAN RX filter id 0x14EF1121 mask 0x1FFFFFFF without custom function
2023-11-02_14_36_35_284: EngineState: Added Lua CAN RX filter id 0x18EF2100 mask 0x1FFFFFFF without custom function
2023-11-02_14_36_35_284: EngineState: Added Lua CAN RX filter id 0x11223344 mask 0x1FFFFFFF without custom function
2023-11-02_14_36_35_285: EngineState: LUA script loaded successfully!
2023-11-02_14_36_35_285: EngineState: Lua memory heap usage: 29822 / 50000 bytes = 59.6%
great succes.