Page 5 of 7

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Tue Apr 19, 2022 6:14 am
by JRD McLAREN
MCP6004 is out of stock ... :cry:

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

EDITED:
maybe MCP6L04T ..

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Tue Apr 19, 2022 2:29 pm
by MHTSOS
TP6004. It's a clone of MCP6004. Are you ordering from lcsc?

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


Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Tue Apr 19, 2022 6:25 pm
by JRD McLAREN
NO ... from TME ..

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Sun Apr 24, 2022 9:52 am
by JRD McLAREN
waintig for FCM32F042 ...

..and MCP6L04T is used as opamp ...

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Fri Apr 29, 2022 8:08 am
by JRD McLAREN
chinese MCU are here ...

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Fri Apr 29, 2022 9:59 am
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?

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Fri Apr 29, 2022 11:11 am
by JRD McLAREN
it is FCM32F042C6T6 ... for testing ...
for 25$ ...

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Wed May 04, 2022 7:12 pm
by JRD McLAREN
FCM32F046 was soldered, programed, but, LEDs blinks different ...

..not tested with sensor yet ..

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Wed May 18, 2022 1:49 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Wed May 18, 2022 7:15 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Wed May 18, 2022 10:41 am
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.


Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Tue Jan 03, 2023 9:10 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Wed Jan 04, 2023 6:04 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Wed Jan 04, 2023 10:50 pm
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

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Wed Jan 04, 2023 10:52 pm
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?

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Thu Jan 05, 2023 1:07 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Thu Jan 05, 2023 9:43 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Thu Jan 05, 2023 9:44 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Thu Jan 05, 2023 11:25 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Thu Jan 05, 2023 11:25 am
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Thu Jan 05, 2023 1:15 pm
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Mon Jan 23, 2023 4:59 pm
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

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Thu Feb 02, 2023 10:32 am
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?

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Thu Feb 02, 2023 12:22 pm
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

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Fri Feb 03, 2023 9:23 pm
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 61577 times

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Fri Feb 03, 2023 11:43 pm
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

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Sat Feb 04, 2023 4:28 pm
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)

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Fri Apr 14, 2023 6:23 pm
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 60715 times
How it will be handled on software side .??

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Fri Apr 14, 2023 7:13 pm
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.

Re: Wideband Controller: Fully Custom, no ASIC!

Posted: Fri Apr 14, 2023 7:26 pm
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)