work in progress rusEfi own wide band controller board add-on using CJ125

Hardware inside and outside of the ECU
User avatar
kb1gtt
contributor
contributor
Posts: 3681
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: rusEfi own wide band controller board add-on using CJ125

Post by kb1gtt »

Yellow, purple, green traces???
What hardware is this? Pictures please. Is this Frankenso, Frankenstein, other? Do you have a schematic / repo for this hardware? What CJ125 board are you using?

I think you are saying that you have a problem with the digital SO line, as it is very rounded.
Welcome to the friendlier side of internet crazy :)

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

Not easy to me to communicate in English, because it's not my native language at all. Learned it in school much ten years ago and all practice during this period was reading datasheets and talking to Chinese on aliexpress, so if I missed something and you don't understand something, please feel free to ask additional questions.
Oscilloscope signals are SS, SI, SO, CLK from top to bottom. Now I don't have problems with digital part. Just thought it is good if I share some results I have found during debug process. As I understand, CJ123 keeps SO in HiZ state while register address is not recognized as valid. And if firmware tries reed its contents before CJ125 pulls line low, data may be corrupted.
But after I have checked all analogue values both on sensor and IC, I'm rather sure that it works fine.
That's how signals look (SO yellow, CLK green, same packet).
No pulldown:
photo_2019-09-03_10-47-52.jpg
photo_2019-09-03_10-47-52.jpg (105.08 KiB) Viewed 7935 times
2k2 external pulldown:
photo_2019-09-03_10-48-00.jpg
photo_2019-09-03_10-48-00.jpg (104.69 KiB) Viewed 7935 times
Seems if last bit of previous packet was 1, SO keeps weak 1 till next strong 1 in next package.

Schematic is partially based on frankenzo, but with changes made by my own based on components I can find and sensors I need. CJ125 schematic is taken from here: https://rusefi.com/forum/download/file.php?id=5077
Switching N-transistor changed to intelligent high-side switching IC, so DIAHD is inverted with OPAMP to match CJ125 current input requirements. Checked currents through pin and measurements show -650uA DIAHD current at heater on and 1500uA at heater off.

As I said before, CJ125 works fin (at least analog part of it). Voltages at UA and UR present, they change if I force sensor warmup and change atmosphere to pure CO2. But O2 channel readout in TS remains zero, like ADC measures didn,t start.
What are mandatory conditions for firmware to work with CJ125?

As I'm not a high-level programmer, my competence is hardware, ASM and HDL, I hardly understand firmware soucecode. I hope for the help of knowledgeable people.

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

Just found these:
https://rusefi.com/wiki/index.php?title=Manual:Debug_fields
Debug fields of CJ125 are:
f1: 0.15
f2: 0
f3: 0
f4: 1.47 (voltage after divider is 0.738V, on CJ125 pin 1.55V)
f5: 1.315 (1.3V after divider, real voltage on CJ 125 pin is 2.74)
f6: 1.426
f7: 0.2716
i1: 1
i2: 255

rst pin is 5v
Is it helpful?

User avatar
kb1gtt
contributor
contributor
Posts: 3681
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: rusEfi own wide band controller board add-on using CJ125

Post by kb1gtt »

In TS do you see an AFR noted on the gauge? It is still not clear to me what the problem is? I think you are expecting the gauge to indicate something and your gauge is not doing what you expect. What is the problem?

I think you are also saying you have configured code 25, and you see analog values which seem to match expectations.

I don't think the SO rounding is a concern. I think SO is simply not being driven, and kind of floats.

I'm American, so I don't know English either :)
Welcome to the friendlier side of internet crazy :)

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

Exactly. AFR gauge shows zero and heater PWM doesn't change its duty cycle.

User avatar
kb1gtt
contributor
contributor
Posts: 3681
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: rusEfi own wide band controller board add-on using CJ125

Post by kb1gtt »

Can you log the values above in the code 25. Can you start the log, then with a cold WO2, let it heat up, then put a lighter or similar near it. Then post the log. If you could video what you are doing, that would be great as well.
Welcome to the friendlier side of internet crazy :)

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

It doesn't heat up, because ecu doesn't change heater duty cycle. I can only do it manually with external power source. So it won't react on CO2 from lighter. But I'll try to make correct experiment.

JRD McLAREN
contributor
contributor
Posts: 150
Joined: Mon Mar 04, 2019 10:19 pm

Re: rusEfi own wide band controller board add-on using CJ125

Post by JRD McLAREN »

..engine must run ...

try to use simulator - https://rusefi.com/wiki/index.php?title=Manual:Software:User/en

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

And it is (self ecu stimulation)

JRD McLAREN
contributor
contributor
Posts: 150
Joined: Mon Mar 04, 2019 10:19 pm

Re: rusEfi own wide band controller board add-on using CJ125

Post by JRD McLAREN »

Yes

User avatar
AndreyB
Site Admin
Posts: 10828
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: rusEfi own wide band controller board add-on using CJ125

Post by AndreyB »

Just implemented https://github.com/rusefi/rusefi/issues/914

Prior to this change we had a compile-time parameter for UR connection style, now this could be adjusted via Tuner Studio - hopefully this additional flexibility would not kill any sensors.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

kb1gtt wrote:
Tue Sep 03, 2019 4:04 pm
Can you log the values above in the code 25. Can you start the log, then with a cold WO2, let it heat up, then put a lighter or similar near it. Then post the log. If you could video what you are doing, that would be great as well.
prescaler on UR is now removed, because i found these:
Снимок.PNG
Снимок.PNG (10 KiB) Viewed 7892 times
Video:

Log:
2019-09-04_10.54.48.zip
(88.6 KiB) Downloaded 169 times

User avatar
kb1gtt
contributor
contributor
Posts: 3681
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: rusEfi own wide band controller board add-on using CJ125

Post by kb1gtt »

Can you manually control the heater with the console? That would help show that this is not a wiring issue.
Welcome to the friendlier side of internet crazy :)

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

I don't know how... What is the command I shall execute?
And I take heater signal shape directly from sensor heater pin, wiring was checked first. And more then one time. Much more...

JRD McLAREN
contributor
contributor
Posts: 150
Joined: Mon Mar 04, 2019 10:19 pm

Re: rusEfi own wide band controller board add-on using CJ125

Post by JRD McLAREN »

so ... you need to have backup battery ...

and then try to run "cj125_calibrate" command in rusefi console on cold lsu sensor ...
..after successful calibration try to "run engine" .. and see whats happened ...

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

EngineState: cj125: Check ident=0x60 diag=0xFF init1=0x89 init2=0x10
EngineState: cj125: Starting calibration...
EngineState: cj125: Done! Saving calibration data (6138 1546).

After 15 seconds of ecu runnung:
EngineState: cj125 ERROR: Sensor overheating.
EngineState: cj125: Controller Shutdown!

Afr gauge now shows 14,7 on cold and growing while heating, f1 (duty cycle) growth is linear. Heater PID I Term & Heater PID Err remains equal zero.
TS log:
newlog.zip
(37.8 KiB) Downloaded 179 times

JRD McLAREN
contributor
contributor
Posts: 150
Joined: Mon Mar 04, 2019 10:19 pm

Re: rusEfi own wide band controller board add-on using CJ125

Post by JRD McLAREN »

Same scenario as my ... :roll:

Heater PWN grow to 80%, and then you will see "overheating" message .. right ..?

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

JRD McLAREN wrote:
Wed Sep 04, 2019 4:33 pm
Same scenario as my ... :roll:

Heater PWN grow to 80%, and then you will see "overheating" message .. right ..?
Depends on UB

User avatar
AndreyB
Site Admin
Posts: 10828
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: rusEfi own wide band controller board add-on using CJ125

Post by AndreyB »

Fantomiaso wrote:
Wed Sep 04, 2019 10:12 am
prescaler on UR is now removed, because i found these:
This compile-time option was removed two days ago to reduce confusion - this is now a configurable runtime parameter, see https://github.com/rusefi/rusefi/issues/914
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
kb1gtt
contributor
contributor
Posts: 3681
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: rusEfi own wide band controller board add-on using CJ125

Post by kb1gtt »

I'm more of a hardware guy. It sounds like the hardware is good so I'll comment less now. Cool to hear your doing cool things. Keep it up.
Welcome to the friendlier side of internet crazy :)

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

I'm hardware engineer too. Prefere making CPUs rather programming them ) After 7 years of FPGA/CPLD experience and logic automata synthesis it makes me to convulse when trying to understand high-level programming languages )

Today I'll take the latest firmware and try it. If it still will not work, then I don't know what to do. I think there is some problem in PID coefficients.

Added:
Yeap, problem still persists

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

Oh, how hard is to be an idiot... Finaly, it works. Now I know, that if it is 301 marking on SMD resistor, double check it is not flipped 10E one...

stefanst
contributor
contributor
Posts: 649
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: rusEfi own wide band controller board add-on using CJ125

Post by stefanst »

Fantomiaso wrote:
Tue Sep 10, 2019 8:59 am
Oh, how hard is to be an idiot... Finaly, it works. Now I know, that if it is 301 marking on SMD resistor, double check it is not flipped 10E one...
In my extensive experience, being an idiot is one of the easiest things....

JRD McLAREN
contributor
contributor
Posts: 150
Joined: Mon Mar 04, 2019 10:19 pm

Re: rusEfi own wide band controller board add-on using CJ125

Post by JRD McLAREN »

Fantomiaso wrote:
Tue Sep 10, 2019 8:59 am
Oh, how hard is to be an idiot... Finaly, it works. Now I know, that if it is 301 marking on SMD resistor, double check it is not flipped 10E one...
Which one is it ..??

..I have some problem..maybe...

Fantomiaso
Posts: 46
Joined: Fri Jun 14, 2019 12:48 pm
Location: Belarus

Re: rusEfi own wide band controller board add-on using CJ125

Post by Fantomiaso »

I used existing schematics just for reference, but build my own schematic. Yours may differ from mine.

User avatar
AndreyB
Site Admin
Posts: 10828
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: rusEfi own wide band controller board add-on using CJ125

Post by AndreyB »

russian wrote:
Thu Sep 05, 2019 12:54 pm
This compile-time option was removed two days ago to reduce confusion - this is now a configurable runtime parameter, see https://github.com/rusefi/rusefi/issues/914
@JRD McLAREN did you have a chance to look around there? with different setting on latest firmware where it's flexible?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

JRD McLAREN
contributor
contributor
Posts: 150
Joined: Mon Mar 04, 2019 10:19 pm

Re: rusEfi own wide band controller board add-on using CJ125

Post by JRD McLAREN »

I'm so busy at this time ... and have no energy to test new firmware and CJ125 WBO2 controllers. (on frankenstein)

The actual problem "in my setup" is voltage readings "by rusefi" ..
I will it explain tomorrow ..

Ahmad
Posts: 33
Joined: Mon Aug 12, 2019 10:44 pm
Location: Iran

Re: rusEfi own wide band controller board add-on using CJ125

Post by Ahmad »

Are you sure CJ125 works with 3.3V SPI?
Attachments
CJ125_SPI_Voltages.png
CJ125_SPI_Voltages.png (107.61 KiB) Viewed 7533 times

JRD McLAREN
contributor
contributor
Posts: 150
Joined: Mon Mar 04, 2019 10:19 pm

Re: rusEfi own wide band controller board add-on using CJ125

Post by JRD McLAREN »

SPI works from 0.7V to VVC+0.3V ...
..if VCC = 5.0V , then HIGH level for SPI can be 5.3V maximum...

Here is some prinscreen of my IMF WBO2 control program ...
..see voltage levels ...
Attachments
imf_wbo2_unconected.JPG
imf_wbo2_unconected.JPG (76.75 KiB) Viewed 7530 times
imf_wbo2_hot_sensor_engRUN.JPG
imf_wbo2_hot_sensor_engRUN.JPG (69.74 KiB) Viewed 7530 times
imf_wbo2_hot_sensor_engOFF.JPG
imf_wbo2_hot_sensor_engOFF.JPG (75.38 KiB) Viewed 7530 times

Ahmad
Posts: 33
Joined: Mon Aug 12, 2019 10:44 pm
Location: Iran

Re: rusEfi own wide band controller board add-on using CJ125

Post by Ahmad »

Thanks a lot.
Gui is excellent :shock:
but 0.7VCC = 3.5V

Post Reply