A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Your chance to introduce yourself and your vehicle
Post Reply
tmbryhn
Posts: 58
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by tmbryhn »

Hi!

I've already designed my own hardware based on the Proteus schematics, and done some bench-testing before installation in my vehicle:

Original project thread:
https://rusefi.com/forum/viewtopic.php?f=2&t=1820

Hardware demo:
IMG_20201014_134349.jpg
IMG_20201014_134349.jpg (3.44 MiB) Viewed 1090 times
IMG_20201021_003601.jpg
IMG_20201021_003601.jpg (3.63 MiB) Viewed 1090 times

During the planning stage, I decided to implement my own standalone LSU WBO2 controller that I've been running for years on a range of prior ECU designs. The circuit was implemented such that I initially could attach one of my stand-alone units as a stand-off board, containing the small Microchip MCU that takes care of the closed-loop heater control and the linear 0-5V output connected to one of the analog inputs on the ECU PCB
(See attached "tmbryhn_WBO2" schematic).
tmbryhn_WBO2.pdf
(71.78 KiB) Downloaded 50 times
IMG_20201019_205408.jpg
IMG_20201019_205408.jpg (2.51 MiB) Viewed 1090 times
I simultaneously futureproofed the design based on the idea of directly implementing the heater control and Pump_I reading functions into the RusEFi source code, thus eliminating the need for a separate MCU, resulting in a more integrated solution.
(See "WBO2_RusEFi-ECU" schematic).
WBO2_RusEFi-ECU.pdf
(174.62 KiB) Downloaded 52 times

Relevant doc:
LSU49 - Pump_I & Nernst temp.xls
(49 KiB) Downloaded 45 times
LSU49 - Pump_I & Nernst temp.pdf
(292 KiB) Downloaded 42 times
bosch_lsu49_2013_Datasheet.pdf
(455.25 KiB) Downloaded 37 times
bosch_lsu49_2005_Technical Product Information.pdf
(379.83 KiB) Downloaded 39 times

Goals:
I'd like to give something back to the community by sharing some of my prior tried and tested solutions. The CJ125 seem like a somewhat tricky part to obtain, so an alternative route might be beneficial to those who'd like to implement an on-board WBO2 controller on future designs.

I'm strictly self taught on C programming, and my prior coding experience is more or less limited to the development of the WBO2 controller and a dual channel DBW module - both currently serving as functional units in my car.
I've got ChibiOS + Eclipse up and running, and have just started to look into the RusEFi source code. Seems a bit daunting at the moment, but hopefully it'll start to make sense as I continue with the familiarization.

I'd like to make this particular implementation a learning experience, while other fresh coders still on the fence also might benefit from observing form a fellow novices point of view in order to get a nudge in the right direction. I'd therefore also like for this thread to be open for more generic coding related questions. If such a thread already exist, please leave a link.

All tips on where to get started on the code or relevant info is of course welcomed, and if some of the more experienced contributors would like to get started on this particular firmware implementation, please go ahead :)
User avatar
AndreyB
Site Admin
Posts: 11416
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by AndreyB »

Matt has just shipped 0.2 revision of non-CJ125 WBO to fabrication see https://github.com/mck1117/wideband

https://app.slack.com/client/T4NJHQ8QZ/CF71CQPBQ will have some relevant messages for the next ~20 days until those are purged by Slack
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
User avatar
AndreyB
Site Admin
Posts: 11416
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by AndreyB »

That's unexpected connector orientation, does case back cover close like that? or is this connector symmetrical and you can solder from any side?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
tmbryhn
Posts: 58
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by tmbryhn »

AndreyB wrote:
Thu Dec 03, 2020 4:34 pm
Matt has just shipped 0.2 revision of non-CJ125 WBO to fabrication see https://github.com/mck1117/wideband

https://app.slack.com/client/T4NJHQ8QZ/CF71CQPBQ will have some relevant messages for the next ~20 days until those are purged by Slack
That's funny! This thread seem rather redundant then. I guess Matts code could be tweaked to work with my controller and somehow be implemented in a build for the ECUs main MCU.

I'll get on that slack ;)
AndreyB wrote:
Thu Dec 03, 2020 4:34 pm
That's unexpected connector orientation, does case back cover close like that? or is this connector symmetrical and you can solder from any side?
The connector could be soldered either way, but the board is laid out that way in order to take advantage of the cases heatsink capabilities through the thermal pads on the opposite side of the output driver FETs & IGBTs.
mck1117
running engine in first post
running engine in first post
Posts: 880
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by mck1117 »

tmbryhn wrote:
Thu Dec 03, 2020 4:22 pm
The circuit was implemented such that I initially could attach one of my stand-alone units as a stand-off board, containing the small Microchip MCU that takes care of the closed-loop heater control and the linear 0-5V output connected to one of the analog inputs on the ECU PCB
Interesting - I did essentially the same thing, except the Nernst ESR sense and pump control loop are in software, not hardware. Also seems silly to read the pump current with an ADC, perform a transform in the MCU (linearize), then convert back to analog. Why not digital all the way thru?
tmbryhn
Posts: 58
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by tmbryhn »

mck1117 wrote:
Thu Dec 03, 2020 5:19 pm
tmbryhn wrote:
Thu Dec 03, 2020 4:22 pm
The circuit was implemented such that I initially could attach one of my stand-alone units as a stand-off board, containing the small Microchip MCU that takes care of the closed-loop heater control and the linear 0-5V output connected to one of the analog inputs on the ECU PCB
Interesting - I did essentially the same thing, except the Nernst ESR sense and pump control loop are in software, not hardware. Also seems silly to read the pump current with an ADC, perform a transform in the MCU (linearize), then convert back to analog. Why not digital all the way thru?
What does ESR stand for?

This has been my way of doing it for years with other ECUs. I had to do it that way because I don't have the competence to write code for the STM32 yet, and I wanted a way to get up and running with WB feedback from the start. I was therefore compelled to implement the controller as an "integrated stand-alone" so to speak, but making the more or less equal on-board WBO2 circuit ready to send the pump_I analog voltage and nernst temp voltage directly to two of the STM32s ADCs for direct reading and heater control once I got that far with the firmware (which you have already done in the meantime :lol: )
mck1117
running engine in first post
running engine in first post
Posts: 880
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by mck1117 »

tmbryhn wrote:
Thu Dec 03, 2020 5:29 pm
What does ESR stand for?
Equivalent series resistance - the temperature feedback from the sensor.
tmbryhn wrote:
Thu Dec 03, 2020 5:29 pm
but making the more or less equal on-board WBO2 circuit ready to send the pump_I analog voltage and nernst temp voltage directly to two of the STM32s ADCs for direct reading and heater control once I got that far with the firmware (which you have already done in the meantime :lol: )
This is a very very valid approach - you've essentially copied the cj125's functionality with discrete parts. Integration in to rusefi wouldn't be very hard as this is funadmentally the same as what the existing cj125 driver does. Two analog inputs, one for pump current and one for temperature feedback.
puff
contributor
contributor
Posts: 2861
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by puff »

that's yet another rusefi ecu, this time based on proteus board! nice! was it a batch?
User avatar
AndreyB
Site Admin
Posts: 11416
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by AndreyB »

puff wrote:
Thu Dec 03, 2020 5:48 pm
that's yet another rusefi ecu
that's kind of a bad thing :)
PS: maybe not bad, but definitely not white or black.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239
tmbryhn
Posts: 58
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by tmbryhn »

mck1117 wrote:
Thu Dec 03, 2020 5:39 pm
tmbryhn wrote:
Thu Dec 03, 2020 5:29 pm
What does ESR stand for?
Equivalent series resistance - the temperature feedback from the sensor.
Ahhh, ESR! *Brainfart* :lol: Yeah, Nernst ESR (I usually refer to it as impedance) is indeed key for temperature control of the sensor element.
mck1117 wrote:
Thu Dec 03, 2020 5:39 pm
tmbryhn wrote:
Thu Dec 03, 2020 5:29 pm
but making the more or less equal on-board WBO2 circuit ready to send the pump_I analog voltage and nernst temp voltage directly to two of the STM32s ADCs for direct reading and heater control once I got that far with the firmware (which you have already done in the meantime :lol: )
This is a very very valid approach - you've essentially copied the cj125's functionality with discrete parts. Integration in to rusefi wouldn't be very hard as this is funadmentally the same as what the existing cj125 driver does. Two analog inputs, one for pump current and one for temperature feedback.
Mhm. That was my plan and basically what I've been doing with my Microchip implementation up until now. I'll be checking out your standalone WBO2 source code, and also the CJ125 code already part of the official firmware build.
tmbryhn
Posts: 58
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: A n00bs endeavour: Integrating a non-CJ125 WBO2 controller

Post by tmbryhn »

puff wrote:
Thu Dec 03, 2020 5:48 pm
that's yet another rusefi ecu, this time based on proteus board! nice! was it a batch?
You may read about my original motivation for making this design in the original project thread linked in the first post :)
Post Reply