Wideband Controller: Fully Custom, no ASIC!

Hardware inside and outside of the ECU
JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

MCP6004 is out of stock ... :cry:

what kind of OP Amp can be used ..?? LM2902PT or TL084IPT

EDITED:
maybe MCP6L04T ..
.. some Proteus and microRusEFI for sale in Europe ..
User avatar
MHTSOS
Posts: 74
Joined: Sun Jun 02, 2019 6:46 pm
Github Username: MHTSOSVOODOO
Slack: Dimitri C

Re: Wideband Controller: Fully Custom, no ASIC!

Post by MHTSOS »

TP6004. It's a clone of MCP6004. Are you ordering from lcsc?

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

JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

NO ... from TME ..
.. some Proteus and microRusEFI for sale in Europe ..
JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

waintig for FCM32F042 ...

..and MCP6L04T is used as opamp ...
Attachments
DSCN5794.JPG
DSCN5794.JPG (1.26 MiB) Viewed 92707 times
.. some Proteus and microRusEFI for sale in Europe ..
JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

chinese MCU are here ...
Attachments
DSCN5837.JPG
DSCN5837.JPG (1.16 MiB) Viewed 92581 times
.. some Proteus and microRusEFI for sale in Europe ..
joaodh
Posts: 13
Joined: Thu Nov 25, 2021 7:25 pm
Location: Portugal

Re: Wideband Controller: Fully Custom, no ASIC!

Post by joaodh »

JRD McLAREN wrote:
Fri Apr 29, 2022 8:08 am
chinese MCU are here ...
These are original? Did you get at reasonable price?
JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

it is FCM32F042C6T6 ... for testing ...
for 25$ ...
.. some Proteus and microRusEFI for sale in Europe ..
JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

FCM32F046 was soldered, programed, but, LEDs blinks different ...

..not tested with sensor yet ..
Attachments
DSCN5850.JPG
DSCN5850.JPG (1.26 MiB) Viewed 92352 times
fcm32f042c6.png
fcm32f042c6.png (114.21 KiB) Viewed 92384 times
.. some Proteus and microRusEFI for sale in Europe ..
hugovw1976
Posts: 68
Joined: Fri Oct 16, 2020 3:10 pm
Github Username: hugovw1976

Re: Wideband Controller: Fully Custom, no ASIC!

Post by hugovw1976 »

Hi, I need help with firmware, I clone repository from: https://github.com/mck1117/wideband/ and compile firmware (from f0_module), I upload firmware to my board but green and blue led blink alternating quickly at boot and then slowly (Firmware integrity check fail).
I upload bin file from https://github.com/mck1117/wideband/tree/master/for_rusefi and board work fine.
The problem I have it's I set can to 1 Mbps because I use haltech dash.
My plan was to modify firmware for 1Mbps, In port_shared.cpp I change:

Code: Select all

{
    CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP,
    /*
     For 48MHz http://www.bittiming.can-wiki.info/ gives us Pre-scaler=6, Seq 1=13 and Seq 2=2. Subtract '1' for register values
    */
    CAN_BTR_SJW(0) | CAN_BTR_BRP(5)  | CAN_BTR_TS1(12) | CAN_BTR_TS2(1),
};

to:

Code: Select all

{
    CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP,
    /*
     For 48MHz http://www.bittiming.can-wiki.info/ gives us Pre-scaler=6, Seq 1=13 and Seq 2=2. Subtract '1' for register values
    */
    CAN_BTR_SJW(0) | CAN_BTR_BRP(2)  | CAN_BTR_TS1(12) | CAN_BTR_TS2(1),
};
But stock and modify firmware fail the same way.
It's posible to get firmware for 1Mbps.
Thanks.
mck1117
running engine in first post
running engine in first post
Posts: 1495
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Wideband Controller: Fully Custom, no ASIC!

Post by mck1117 »

hugovw1976 wrote:
Wed May 18, 2022 1:49 am
I upload firmware to my board but green and blue led blink alternating quickly at boot and then slowly (Firmware integrity check fail).
You need to either:
  • Disable the bootloader. Set USE_BOOTLOADER=o in f0_module/board.mk, then flash the resulting wideband.bin to your board.
  • Build using the script f0_module/build_wideband.sh. This will build a complete image of the bootloader, firmware, and checksum.
The reason the integrity check fails is that your firmware image is just the firmware, without the required crc at the end, which the bootloader checks to ensure that a firmware update didn't get mis-flashed.
hugovw1976
Posts: 68
Joined: Fri Oct 16, 2020 3:10 pm
Github Username: hugovw1976

Re: Wideband Controller: Fully Custom, no ASIC!

Post by hugovw1976 »

mck1117 wrote:You need to either:
  • Disable the bootloader. Set USE_BOOTLOADER=o in f0_module/board.mk, then flash the resulting wideband.bin to your board.
  • Build using the script f0_module/build_wideband.sh. This will build a complete image of the bootloader, firmware, and checksum.
The reason the integrity check fails is that your firmware image is just the firmware, without the required crc at the end, which the bootloader checks to ensure that a firmware update didn't get mis-flashed.
Thanks, I give it a try.

toalan
Posts: 5
Joined: Tue Jan 03, 2023 4:57 am

Re: Wideband Controller: Fully Custom, no ASIC!

Post by toalan »

mck1117 wrote:
Sun Nov 01, 2020 9:16 pm
deezums wrote:
Sun Nov 01, 2020 5:21 pm
Would it be possible to add support for the LSU-ADV sensor? It doesn't use a calibration resistor, so adapting it to a custom harness with this built into the ECU would be one step easier, right? I'm not sure what the difference on the board would need to be, could we populate a jumper for a 4.2/4.9 and a built in cal resistor for the ADV?

Edit: Actually looks like you could just add a resistor and only populate it if you plan on using an ADV sensor? Maybe no resistor at all?
Iirc the only difference is the AC nernst ESR measurement current, and pump current to lambda relationship. The former can be changed by swapping out a single resistor, and the latter is just software. The missing pin isn't a problem, just don't connect it. The signal is still there, it just stays inside the controller instead of also going to the sensor connector.

The other option is to duplicate the AC generation circuit (it's just a series RC, after all), and select which one to use based on the sensor type. Leaving the MCU pin as a floating input would effectively disconnect the unused one from the system.
deezums wrote:
Sun Nov 01, 2020 5:21 pm
I have some spare 4.9 sensors and bungs in my exhaust and was about to place an order for some PCBs. Would logs compared to a 14point7 S3 ADV be helpful in any way?
Probably not necessary yet - I have a second bung on my exhaust already too, and was about to make exactly that comparison.
Your post is a good spot for me to interject with some considerations.

With the ADV sensor you only need to connect one end of the measurement resistor to the sensor, so that measurement resistor is also a current limiting resistor between the pump current drive circuitry of the controller and the pump cell of the sensor which is nice. Also you can run a much larger measurement resistor with the ADV sensor and it will not mess with the accuracy, so you could get rid of the pump current amplifier and rely on a large measurement resistor for the amplification.
toalan
Posts: 5
Joined: Tue Jan 03, 2023 4:57 am

Re: Wideband Controller: Fully Custom, no ASIC!

Post by toalan »

https://github.com/mck1117/wideband/blob/master/board_module/export/module_schematic.pdf

referring to the schematic above (it looks like the most upto date schematic on the git repo)

In the "Pump Driver" section of the circuit, why is "Vm" there?

In the "Nernst Sense" section of the circuit, instead of "LSU_Vm" consider a voltage divider with a voltage set to virtual ground + 0.45 volts. That way you are not amplifying the 0.45v common mode voltage and you can greatly increase the amplification.
User avatar
Dron_Gus
contributor
contributor
Posts: 460
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Wideband Controller: Fully Custom, no ASIC!

Post by Dron_Gus »

toalan wrote:
Wed Jan 04, 2023 6:04 am
In the "Nernst Sense" section of the circuit, instead of "LSU_Vm" consider a voltage divider with a voltage set to virtual ground + 0.45 volts. That way you are not amplifying the 0.45v common mode voltage and you can greatly increase the amplification.
Using "virtual ground + 0.45" for diff amp will produce negative voltage when Nernst voltage is below 0.45. Is not it?

Any comments on this schematic https://github.com/rusefi/rusefi-hardware/blob/main/lambda-x2/export/rev0/lambda-x2.pdf ?
Planing rev1 with some changes, so review of current schematic will be welcomed.
Changes planned to rev1:
1. switch to 64 pin stm32
2. use stm32 DAC (instead of PWM) for current source
mck1117
running engine in first post
running engine in first post
Posts: 1495
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Wideband Controller: Fully Custom, no ASIC!

Post by mck1117 »

Dron_Gus wrote:
Wed Jan 04, 2023 10:50 pm
Any comments on this schematic https://github.com/rusefi/rusefi-hardware/blob/main/lambda-x2/export/rev0/lambda-x2.pdf ?
Planing rev1 with some changes, so review of current schematic will be welcomed.
Changes planned to rev1:
1. switch to 64 pin stm32
2. use stm32 DAC (instead of PWM) for current source
did you try out the trick circuit to generate cleaner "aux analog output" pwm?
toalan
Posts: 5
Joined: Tue Jan 03, 2023 4:57 am

Re: Wideband Controller: Fully Custom, no ASIC!

Post by toalan »

Dron_Gus wrote:
Wed Jan 04, 2023 10:50 pm
toalan wrote:
Wed Jan 04, 2023 6:04 am
In the "Nernst Sense" section of the circuit, instead of "LSU_Vm" consider a voltage divider with a voltage set to virtual ground + 0.45 volts. That way you are not amplifying the 0.45v common mode voltage and you can greatly increase the amplification.
Using "virtual ground + 0.45" for diff amp will produce negative voltage when Nernst voltage is below 0.45. Is not it?

Any comments on this schematic https://github.com/rusefi/rusefi-hardware/blob/main/lambda-x2/export/rev0/lambda-x2.pdf ?
Planing rev1 with some changes, so review of current schematic will be welcomed.
Changes planned to rev1:
1. switch to 64 pin stm32
2. use stm32 DAC (instead of PWM) for current source
The actual voltage out of the opamp does not go negative though, so any negative value you get due to syntax. For instance, if your ADC is setup as a differential pair then naturally you will get negative ADC values when the negative end voltage is greater than the positive end voltage, but the voltage is never negative as in lower than ground potential.

On SCL Free 2, my virutal ground is 2.08v so I use a resister divider to get 2.53v and use that as input into an amp to amplify the Un signal.

On the Transistor you use to switch the heater, terminal 2 you should protect it with either a TVS diode or a forward conducting diode to 12v. When the heater is powered and the sensor is suddenly unplugged, there is enough inductance and the currents are high enough that terminal 2 will spike in voltage and the current will try to jump the gap between contacts.
mck1117
running engine in first post
running engine in first post
Posts: 1495
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Wideband Controller: Fully Custom, no ASIC!

Post by mck1117 »

toalan wrote:
Wed Jan 04, 2023 6:04 am
In the "Nernst Sense" section of the circuit, instead of "LSU_Vm" consider a voltage divider with a voltage set to virtual ground + 0.45 volts. That way you are not amplifying the 0.45v common mode voltage and you can greatly increase the amplification.
Because any amount of precision on the nernst sense doesn't actually matter. The pump error vs. nernst voltage gain is so astronomically high that it would even work fine to just plumb the nernst voltage from the sensor directly in to the STM32's ADC.
mck1117
running engine in first post
running engine in first post
Posts: 1495
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Wideband Controller: Fully Custom, no ASIC!

Post by mck1117 »

toalan wrote:
Thu Jan 05, 2023 1:07 am
On the Transistor you use to switch the heater, terminal 2 you should protect it with either a TVS diode or a forward conducting diode to 12v. When the heater is powered and the sensor is suddenly unplugged, there is enough inductance and the currents are high enough that terminal 2 will spike in voltage and the current will try to jump the gap between contacts.
It's not a bare mosfet, it's a protected lowside driver. Same pinout/form factor as an N-type mosfet, but has internal overvoltage/overtemp/overcurrent protection.
toalan
Posts: 5
Joined: Tue Jan 03, 2023 4:57 am

Re: Wideband Controller: Fully Custom, no ASIC!

Post by toalan »

mck1117 wrote:
Thu Jan 05, 2023 9:43 am
toalan wrote:
Wed Jan 04, 2023 6:04 am
In the "Nernst Sense" section of the circuit, instead of "LSU_Vm" consider a voltage divider with a voltage set to virtual ground + 0.45 volts. That way you are not amplifying the 0.45v common mode voltage and you can greatly increase the amplification.
Because any amount of precision on the nernst sense doesn't actually matter. The pump error vs. nernst voltage gain is so astronomically high that it would even work fine to just plumb the nernst voltage from the sensor directly in to the STM32's ADC.
I think you are on the right track about connecting nernst directly to the ADC and relying on oversampling to get additional resolution if needed. If you are going to use an amp, it would make the most sense to make the most of it by using vgnd + 0.45 and increasing the gain.
Last edited by toalan on Thu Jan 05, 2023 11:30 am, edited 2 times in total.
toalan
Posts: 5
Joined: Tue Jan 03, 2023 4:57 am

Re: Wideband Controller: Fully Custom, no ASIC!

Post by toalan »

mck1117 wrote:
Thu Jan 05, 2023 9:44 am
toalan wrote:
Thu Jan 05, 2023 1:07 am
On the Transistor you use to switch the heater, terminal 2 you should protect it with either a TVS diode or a forward conducting diode to 12v. When the heater is powered and the sensor is suddenly unplugged, there is enough inductance and the currents are high enough that terminal 2 will spike in voltage and the current will try to jump the gap between contacts.
It's not a bare mosfet, it's a protected lowside driver. Same pinout/form factor as an N-type mosfet, but has internal overvoltage/overtemp/overcurrent protection.
ok, my bad.
User avatar
Dron_Gus
contributor
contributor
Posts: 460
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Wideband Controller: Fully Custom, no ASIC!

Post by Dron_Gus »

mck1117 wrote:
Wed Jan 04, 2023 10:52 pm
did you try out the trick circuit to generate cleaner "aux analog output" pwm?
(https://www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction/)
Not yet. Switched to S105 ECU.
Hope to find some time during holidays to finish rev1.
SHOf429
Posts: 70
Joined: Sun May 24, 2020 11:37 pm

Re: Wideband Controller: Fully Custom, no ASIC!

Post by SHOf429 »

Possibly some good news for the availability of the original chip..
US $2.62 25%OFF | STM32F042K6T6 STM32 F042K6T6 LQFP-32 STM32F042 LQFP32 ARM Cortex-M0 32-bit Microcontroller MCU IC Controller Chip New Original
https://a.aliexpress.com/_mrgX13u
Josh
94 Ford Taurus SHO
Frankenso in progress
tobsec
Posts: 8
Joined: Thu Feb 02, 2023 10:16 am

Re: Wideband Controller: Fully Custom, no ASIC!

Post by tobsec »

Hi guys,
I found very little info documented about the differences of the multiple versions and revisions of the wideband controller which exists right now. Especially I see that progress is going on with the wideband-F103 which is now at rev5 and the wideband board_module. Also not sure if it is still identical to what is used in Hellen.
But what I'm currently confused about is what the lambda-x2 is based on in terms of hard- and software? Is the SW used common with the single channel wideband-F103?
I'm trying to build a dual channel lambda controller but I'm not sure if the lambda-x2 (rev0) is still compatible with the latest revisions of the controller and firmware or it's better to redesign based on some latest revision of another board or better go with two single channel etc?
User avatar
Dron_Gus
contributor
contributor
Posts: 460
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Wideband Controller: Fully Custom, no ASIC!

Post by Dron_Gus »

Lambda-x2 is currently in state of designing rev1. And debugging SW on rev0.
It is compatible with same SW as all other widebands based on mck1117's initial design. See https://github.com/mck1117/wideband/tree/master/firmware/boards . f1_dual = lambda-x2
SW development for lambda-x2 happens here https://github.com/dron0gus/wideband , but later will be merged to mck1117 repo (I hope)
Also please see https://rusefi.com/forum/viewtopic.php?f=4&t=2314
User avatar
AndreyB
Site Admin
Posts: 14368
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Wideband Controller: Fully Custom, no ASIC!

Post by AndreyB »

Matt, is there _any_ chance to add vbat sensing since you are now changing your design?

Dual F103 has heater neg with analog sensing in order to detect if sensor is wired/if mosfet is dead, and it uses same analog input to measure vbat. Would you be interested to do the same?

https://github.com/mck1117/wideband/issues/16
image.png
image.png (10.91 KiB) Viewed 89067 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mck1117
running engine in first post
running engine in first post
Posts: 1495
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Wideband Controller: Fully Custom, no ASIC!

Post by mck1117 »

AndreyB wrote:
Fri Feb 03, 2023 9:23 pm
and it uses same analog input to measure vbat
dron and I talked about this strategy and it has some real downsides (such as that it kind of doesn't work).

Regular "voltage divider to analog pin" vbatt sense implemented in https://github.com/mck1117/wideband/commit/6831f5a1ae87e985e1e40e1fd2b6fe2107d40a72
JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

Two new OPAmps are used for VBatt sense ..??

(and now you have one opamp unused, it can be used for Analog-Out ..? :roll: )
(but F072 is required)
.. some Proteus and microRusEFI for sale in Europe ..
JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

I'm looking for actual github repository ..
and current hw version have NERNST resistance sensing for "all type" of bosch wideband sensors (LSU4.9, LS4.2, ADV)
Screenshot_20230414_201609.png
Screenshot_20230414_201609.png (5.09 KiB) Viewed 88205 times
How it will be handled on software side .??
.. some Proteus and microRusEFI for sale in Europe ..
User avatar
Dron_Gus
contributor
contributor
Posts: 460
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Wideband Controller: Fully Custom, no ASIC!

Post by Dron_Gus »

JRD McLAREN wrote:
Fri Apr 14, 2023 6:23 pm
How it will be handled on software side .??
https://github.com/mck1117/wideband/blob/master/firmware/boards/f1_rev3/port.cpp#L78 for example.
JRD McLAREN
contributor
contributor
Posts: 435
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Wideband Controller: Fully Custom, no ASIC!

Post by JRD McLAREN »

Ok..

it is not implemented in port.cpp for f0_module ... RIGHT .. ??

I'm asking because I have a new version (and fabrication) planned for my add-on board ..
(and test analog outputs also)
.. some Proteus and microRusEFI for sale in Europe ..
Post Reply