Page 1 of 3

F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Apr 24, 2022 9:52 am
by Dron_Gus
Hi.

Here is dual channel wideband AFR controller supporting LSU4.2, 4.9 and ADV. Based on design from @mck1117 .
Screenshot from 2022-04-24 12-51-07.png
Screenshot from 2022-04-24 12-51-07.png (374.2 KiB) Viewed 63976 times

https://github.com/rusefi/rusefi-hardware/tree/main/lambda-x2

Pinout https://rusefi.com/docs/pinouts/lambda-x2/

Reviewers are welcomed.

Andrey.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Apr 24, 2022 9:56 am
by Dron_Gus
Designed for this enclosure.
Hae2d45a2b8a24907b5623a0d678d4e8aD.jpg
Hae2d45a2b8a24907b5623a0d678d4e8aD.jpg (1.15 MiB) Viewed 63973 times

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Apr 24, 2022 10:13 am
by Dron_Gus
2x AFR: Bosch LSU4.2, LSU4.9 or LSU_ADV. Heater control - BTS3028.
2x EGT: MAX31855KASA or MAX31856
2x analog inputs: 0..5V with pull-up or pull-down (configurable by soldering resistor). One can be used to source 5V to external sensor.
2x analog outputs: 0..5V. Also can be used for slow PWM signal output.
2x Open Drain outputs: BTS3028 (5A)
CAN interface.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Apr 24, 2022 1:04 pm
by AndreyB
Dron_Gus wrote:
Sun Apr 24, 2022 10:13 am
2x EGT: MAX31855KASA or MAX31856
What package have you used? Looks like SOIC-8 is not very available right now while 14-Pin TSSOP is available right now.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Apr 24, 2022 1:11 pm
by Dron_Gus
AndreyB wrote:
Sun Apr 24, 2022 1:04 pm
Dron_Gus wrote:
Sun Apr 24, 2022 10:13 am
2x EGT: MAX31855KASA or MAX31856
What package have you used? Looks like SOIC-8 is not very available right now while 14-Pin TSSOP is available right now.
Both.
Screenshot from 2022-04-24 16-11-50.png
Screenshot from 2022-04-24 16-11-50.png (146.14 KiB) Viewed 63943 times
MAX31855KASA is SOIC-8. And it is available on JLCBCB for ~$5.
MAX31856 is exist only in TSSOP. And now is not available on JLCPCB. This one is more featured, but cost twice more (on JLCPCB).

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Apr 24, 2022 1:22 pm
by AndreyB
Dron_Gus wrote:
Sun Apr 24, 2022 10:13 am
2x Open Drain outputs: BTS3028 (5A)
VND14NV04 are pretty available that would give 12A :)

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Apr 24, 2022 1:42 pm
by Dron_Gus
AndreyB wrote:
Sun Apr 24, 2022 1:22 pm
Dron_Gus wrote:
Sun Apr 24, 2022 10:13 am
2x Open Drain outputs: BTS3028 (5A)
VND14NV04 are pretty available that would give 12A :)
Available on JLCPCB? Or?
12A is good, but require adequate pin in connector. 12A over current connector can possibly vaporize pin :)

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Wed Apr 27, 2022 6:50 am
by JRD McLAREN
another 2 analog outputs for "display" .. ??
Lambda1 = 1Volt .. ??

https://rusefi.com/forum/viewtopic.php?p=44963#p44963

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Wed Apr 27, 2022 2:11 pm
by Dron_Gus
JRD McLAREN wrote:
Wed Apr 27, 2022 6:50 am
another 2 analog outputs for "display" .. ??
Lambda1 = 1Volt .. ??

https://rusefi.com/forum/viewtopic.php?p=44963#p44963
Do it need to be "another"? We have 2 analog output with no clear purpose.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Wed Apr 27, 2022 6:36 pm
by JRD McLAREN
2 per one controller / sensor ..??

(is enough pins on MCU .. ??) :roll:

BTW:
This WBO2 controller might be bigger then MRE ...

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Thu Apr 28, 2022 8:43 am
by Dron_Gus
JRD McLAREN wrote:
Wed Apr 27, 2022 6:36 pm
2 per one controller / sensor ..??

(is enough pins on MCU .. ??) :roll:

BTW:
This WBO2 controller might be bigger then MRE ...
Two per controller.

Few problems:
1. All pins on 24-pin connector are used. Switch to another box with 32pin connector? Remove some other functionality?
2. All pins of 48-pin MCU package are also used. Switch to 64-pin package?
2a. Pin allocation for timers/pwm to generate analog output.

Yes. It is almost the same size as MRE. But because it is prototype.
Only 75% of PCB space is used. Also there are two types of termocouple ICs, just for evaluation.
So PCB size can be reduced at least twice.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Thu Apr 28, 2022 8:45 am
by Dron_Gus
Also I'd like to change 4 separate switches to something like TLE6228 or something similar. This can also save some PCB space.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Thu Apr 28, 2022 11:18 am
by JRD McLAREN
..maybe ... use the same type of Molex connector for the future ...
due to use the same pins as MRE have .. (24 or 32 pin)

2 AUX outs per one WBO2 controller is enough ... (I think)

https://www.aliexpress.com/item/4000043947422.html?spm=a2g0o.store_pc_groupList.8148356.10.4a29135b2kCSW3
https://www.aliexpress.com/item/4000219781241.html?spm=a2g0o.store_pc_groupList.8148356.2.6c7113b3WjIW7q

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Thu Apr 28, 2022 12:16 pm
by Dron_Gus
May be. Any wished are wellcomed for Rev 1. :)

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Fri Apr 29, 2022 10:28 am
by chaoschris
>> May be. Any wished are wellcomed for Rev 1. :)

If you build such a big external Lambda-/EGT-controller, it should be as universal as possible and work in all possible ecosystems, also out of the rusefi-world.
This means:

-data transfer to ECU via can bus and also via analog out. Every lambda controller should get its own wideband analog out 0-5V and a and if possible a narrow band simulation with 0-1V.
-start signal to heat the controllers should be possible via can bus and via digital in. If you start the heating of the lambda sondes as soon as power supply connects, this will lead to cracked nernst cells as the preheated/hot sonde don't like any water from condensation of a cold motor.

-EGT should be at least 2 Channels for any V6 or V8 engines. datatransfer to ECU also via can bus, but having a 0-5V analog out per channel will make this unit versatile and usable on any other programmable ECU. If there is any room for 4 Channels it would be more versatile to use it on 4 cylinder turbo engines.

But these wishes seems to be out of sight with a 24 pin connector... ;-)

Best regards,
Chris

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sat Apr 30, 2022 9:16 am
by Dron_Gus
chaoschris wrote:
Fri Apr 29, 2022 10:28 am
If you build such a big external Lambda-/EGT-controller, it should be as universal as possible and work in all possible ecosystems, also out of the rusefi-world.
This means:

-data transfer to ECU via can bus and also via analog out. Every lambda controller should get its own wideband analog out 0-5V and a and if possible a narrow band simulation with 0-1V.
-start signal to heat the controllers should be possible via can bus and via digital in. If you start the heating of the lambda sondes as soon as power supply connects, this will lead to cracked nernst cells as the preheated/hot sonde don't like any water from condensation of a cold motor.

-EGT should be at least 2 Channels for any V6 or V8 engines. datatransfer to ECU also via can bus, but having a 0-5V analog out per channel will make this unit versatile and usable on any other programmable ECU. If there is any room for 4 Channels it would be more versatile to use it on 4 cylinder turbo engines.

But these wishes seems to be out of sight with a 24 pin connector... ;-)

Best regards,
Chris
Yes. Two analog outputs per channel is out of connector capabilities. I believe CAN should be primary (and the only one) channel for data logging.

Start signal. Currently +12 to AFR heater is connected outside this controller. Only Heater- is routed through controller. And we have separate +12 for controller power.
So user can connect heater's +12 through IGN line or use relay + output from main ECU or switch.
As we have EGT on board we can wait until exhaust reached some threshold temperature before starting heating AFR.
Also we can wait until battery voltage rise above +12.5 (for example) to be sure that engine is running.
BTW current (one channel) FW waits for "allow heating" signal from ECU. This is RusEFI specific.

How does AEM (and others) AFR gauges prevent nerst cell cracking? AFAIR it starts heating as soon as powered.

EGT is two channel. Currently no dedicated analog outputs. We can make two available analog outputs configurable to be able to output EGT too.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sat Apr 30, 2022 9:18 am
by Dron_Gus
JRD McLAREN wrote:
Thu Apr 28, 2022 11:18 am
..maybe ... use the same type of Molex connector for the future ...
due to use the same pins as MRE have .. (24 or 32 pin)

2 AUX outs per one WBO2 controller is enough ... (I think)

https://www.aliexpress.com/item/4000043947422.html?spm=a2g0o.store_pc_groupList.8148356.10.4a29135b2kCSW3
https://www.aliexpress.com/item/4000219781241.html?spm=a2g0o.store_pc_groupList.8148356.2.6c7113b3WjIW7q
Good connector and enclosure.
To add any further feature we need to go 64 or 100 pin STM32.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sat Apr 30, 2022 9:24 am
by Dron_Gus
BTW does anyone know is there any special rules for termocouple wiring?
Will the signal be affected if routed through general purpose connector and using copper wires?
I mean Tref point temperature should be known to calculate correct termocouple temperature. But if we have chromel/alluminium to copper connection somewhere outside controller (under hood)... Will this affect accuracy?

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sat Apr 30, 2022 10:17 am
by MHTSOS
AFAIK you are not allowed to use copper wire to extend thermocouple cables since every wire connection will act as a separate thermocouple junction and alter the reading. Ideally the thermocouple should be connected to a suitable connector right next to the IC so that it's cold junction compensation can cansel out the error induced by the junction formed between the leads and the connector metal.

Στάλθηκε από το VOG-L29 μου χρησιμοποιώντας Tapatalk


Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sat Apr 30, 2022 2:36 pm
by puff
finding the proper connector for the thermocouple of a certain type is a quest in itself. however, if you look at cheap thermocouple plugs used in some multimeters - you might think there is nothing special in them - the wire's end forms a loop, which is just fixed to the plug with a screw. but you can't be sure what exactly alloy is used in those plugs or screws..

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun May 01, 2022 7:58 pm
by JRD McLAREN
how accuracy we need for thermocouple ..?

5 or 10degC ,, ??

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun May 01, 2022 8:24 pm
by puff
that is yet another good question, and if 10degC is enough, probably it won't matter what sort of connector you use ;-)

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun May 01, 2022 8:40 pm
by JRD McLAREN
look at VWAG EGT sensors for DPF filters ...
or other marks ...
they have "stock" connectors ...

and inaccuracy is about 5-7 degC

(sensor have aprox. 2-3 degC itself)

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Jun 19, 2022 4:24 pm
by Dron_Gus
Some progress.
20220619_145143.jpg
20220619_145143.jpg (2.37 MiB) Viewed 62236 times
Screenshot from 2022-06-19 19-24-05.png
Screenshot from 2022-06-19 19-24-05.png (349.76 KiB) Viewed 62237 times

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Tue Jun 28, 2022 1:10 am
by kjn260
Dron_Gus wrote:
Sat Apr 30, 2022 9:24 am
BTW does anyone know is there any special rules for termocouple wiring?
Will the signal be affected if routed through general purpose connector and using copper wires?
I mean Tref point temperature should be known to calculate correct termocouple temperature. But if we have chromel/alluminium to copper connection somewhere outside controller (under hood)... Will this affect accuracy?
In high level motorsport applications, they make Chromel / Alumel contacts for Autosport connectors to maintain accuracy. I suspect in this case the difference would be marginal over the required range for exhaust temperature measurement, its also very easy to add an offset in software.

Might I suggest considering something like a MCP4728 with a buffered output for the DAC in a future version? I've used this before in applications where we required to "emulate" a 0-5V (or 0-1.2V Narrow Band) its a great chip (although very hard to get at the moment to be honest, $29 at LCSC, unavailable everywhere else) - "usually" they are $2-3 - but that price point might be a year away still.

Benefits:
-Use existing i2c bus on the F103, releasing PB14 and PB15 for other uses
-Gives you 4x Analog outputs, with programmable voltage ranges (e.g. 0-1.2v for narrowband output, 0-5v for lambda, 0-5v for thermocouples etc)
-Very easy to implement in software

also +1 vote on the 32-pin enclosure!

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Jul 03, 2022 11:27 am
by Dron_Gus
kjn260 wrote:
Tue Jun 28, 2022 1:10 am
In high level motorsport applications, they make Chromel / Alumel contacts for Autosport connectors to maintain accuracy. I suspect in this case the difference would be marginal over the required range for exhaust temperature measurement, its also very easy to add an offset in software.

Might I suggest considering something like a MCP4728 with a buffered output for the DAC in a future version? I've used this before in applications where we required to "emulate" a 0-5V (or 0-1.2V Narrow Band) its a great chip (although very hard to get at the moment to be honest, $29 at LCSC, unavailable everywhere else) - "usually" they are $2-3 - but that price point might be a year away still.

Benefits:
-Use existing i2c bus on the F103, releasing PB14 and PB15 for other uses
-Gives you 4x Analog outputs, with programmable voltage ranges (e.g. 0-1.2v for narrowband output, 0-5v for lambda, 0-5v for thermocouples etc)
-Very easy to implement in software

also +1 vote on the 32-pin enclosure!
Thanks for feedback!
I been using single channel version of MCP4728 in few project for DCDC converters reference. EEPROM is cool feature that allows us to setup and save output voltage before shipping device to customer.
Due to chips shortage everything costs too much. Going to sync with our HW engineer, they just ordered new batch of devices - I wonder if they where able to found this chip or changed it to something more available.
Going to add some DAC as option. And rework current PWM to analog with this trick https://www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction/ .

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Dec 18, 2022 11:58 pm
by AndreyB

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Mon Dec 19, 2022 11:19 pm
by Dron_Gus
Full Optimized – High Speed mode over UART@115200.

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sun Feb 05, 2023 1:00 am
by AndreyB
Status update - at least it heats the sensors up and something is displayed :) Also clearly a bug of some sort with wrong heater voltage only on one channel.

This board has C10 & C35 removed in light of BOM bug https://github.com/rusefi/rusefi-hardware/issues/172

This video was done with forked https://github.com/dron0gus/wideband firmware hopefully one day this would be merged into upstream completely.



Log file attached

Re: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

Posted: Sat Feb 11, 2023 12:51 am
by AndreyB
with capacitors replaced https://github.com/rusefi/rusefi-hardware/issues/172 dual channel board shows something reasonable on a real vehicle
image.png
image.png (70.49 KiB) Viewed 58248 times