PNP ECU for Vw/Audi ME7 #51

Hardware inside and outside of the ECU
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

https://github.com/rusefi/rusefi/issues/779

rusEfi already seems to be sending VAG CLT?

Code: Select all

	commonTxInit(CAN_VAG_CLT);
	setShortValue(&txmsg, (int) ((engine->sensors.clt + 48.373) / 0.75), 1); //Coolant Temp
	sendCanMessage();
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
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

russian wrote:
Tue Apr 30, 2019 8:17 pm
https://github.com/rusefi/rusefi/issues/779

rusEfi already seems to be sending VAG CLT?

Code: Select all

	commonTxInit(CAN_VAG_CLT);
	setShortValue(&txmsg, (int) ((engine->sensors.clt + 48.373) / 0.75), 1); //Coolant Temp
	sendCanMessage();

Just confirmed everything working with CAN-Sniffer today.

Will add more messages now that it's working so I can see the output.
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

The fan control seems to be a little more complicated.

In this model they are controlled by both AC and ECU.

The control electronics in the master has its own power amplifier for each fan. The control is independent, but in normal operation with the same duty cycle (TVH). The speed is controlled by a pulse width modulated signal (PWM signal) at a frequency of 25 Hz provided by the engine control unit (MSG).

In the absence of a PWM signal (constant high or low) and existing voltage at terminal 15/87, both (!) Fans are operated in emergency mode (maximum speed)! With a TVH <5%, the fans also go into emergency mode. The emergency starts at the earliest after 10 s!

So I will need a permanent 25HZ output.

The nominal ranges are expressed as:
~15% ≤ low speed ≤ high speed ≤ ~95%

Can I set this in TS somehow, or do I need code for it?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

960 wrote:
Thu May 02, 2019 1:23 am
So I will need a permanent 25HZ output.

The nominal ranges are expressed as:
~15% ≤ low speed ≤ high speed ≤ ~95%
This sounds like a job for https://rusefi.com/wiki/index.php?title=Manual:Flexible_Logic

So, you would need to configure
1) output pin
2) Hz frequency = 25
3) formula. let's start with simply "0.2" which should mean 20% duty cycle

Looks for other FSIO examples in the code and in the settings
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
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

Thanks, Ill give that a try tomorrow.

I have looked at the FSIO stuff, but still dont understand.

All the tables are rpm/load based, all the examples I have found are rpm related.

I also have Thermostat, VVT and N75 valve that I have to control.

But the Tle8888 pins are not in the fsio settings.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

You are not helping when you mix issues, my small brain explodes. Let's talk one thing at a time.

FSIO does not require a table, for your simple case there will be no table just a formula - constant value to begin with and a longer formula based on CLT later.

https://github.com/rusefi/rusefi/commit/64a7cad1a33a8300818c01735ddebef8b57cbcdf to allow smart pins for FSIO

Open question how high frequency we can go with smart pins but I would expect 25Hz to work just fine. Only one way to know :)
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
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

This trick actually kept the fans out of emergency mode :-)

Now we need to figure out the expression :-)

Can you add the TLE pins to alternator and Auxpid also?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

960 wrote:
Thu May 02, 2019 2:38 pm
Now we need to figure out the expression :-)
Please describe the logic you are interested in
CLT as input, duty cycle as output.
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
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

Not sure, but something like 15% at 90 degrees to 100% at 110 degrees

But that might require a map?


For the electric thermostat I think it should just open at 90 degrees, and close under 90
cyrille
Posts: 21
Joined: Sun Jul 02, 2017 8:37 am

Re: PNP ECU for Vw/Audi ME7 #51

Post by cyrille »

Hello,
The thermostat driven electrically is only used when driving "sporty",
I explain.
To reduce consumption, a high engine temperature is required, approximately 105 ° C.
The thermostat works like all normal thermostats in the low and medium load ranges.
When you fully open the throttle, or in sport mode, the thermostat is electrically controlled to open at 85 ° C.
It works like that at BMW and Porsche, I guess VW is the same.
I hope to make understand

Sincerely, Cyril.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

1) Take console 20190502 or newer
2) run

Code: Select all

java -jar ../java_console_binary/rusefi_console.jar compile "0.15 + (max(90, min(coolant, 120)) - 90) / 30 * 0.8"
which would give you the RPN formula for FSIO

https://github.com/rusefi/rusefi/commit/cc8ff767f3b83b222a701134e586aae495d5e1c8 has some details
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
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

Not sure if I got it right.

But this is what should be in the formula field?

0.15 + (max(90, min(coolant, 120)) - 90) / 30 * 0.8

Just found a explanation in the oem file:



***********************************************************************************************
******************** Variant Detection for Fans (Fan1 and Fan2)*******************************
***********************************************************************************************

Every car has different types of Fan fitted to it. The main difference is if it is a EC
(Electrical commutator) or DC(Direct current) fans.This can be checked using an application
label. Fan variant detection involves the selection of fan variant for both EC and DC fans.This
means, even if the fan is of EC type, the specification might be different for different types
of EC fans. EC fans are speed controlled. For different variants of EC fans, this speed might
be different.
There are three variants for both DC and EC fans => Variant 1,2 and 3.
How it is done?
The MSG sends a default duty cycle (a calibration value, 10%),for an calibratable time t1(apprx
600ms) after T15 ON.After this it sends a low signal for about 800ms(t2). This is a signal to
KLE(Fan ECU) that variant detection is about to begin. After this MSG waits for about 800ms(t3)
for the response from Fan ECU. The KLE responds by sending a low signal in the PWM line for a
period(t4) depending on the variant. The PWM line is bidirectional!
t4 = 1, Variant 1
t4 = 2, Variant 2
t4 = 3, Variant 3
There are tolerances applicable to t4 which is -0.4 and +0.5

Error Reporting:
If the wait/pause time t3 is more than 1second, an error is reported.
Similarly when the KLE does not respond with a proper time (t4) indicating a particular variant
an error is reported.

Variant detection is done for 5 continous driving cycles. If the same variant is detected in 5
continuous driving cycles, variant detection is not done after that. If during these 5 driving
cycles, there is an error in finding out the variant, the variant is made 0 and the counter is
reset.If during these 5 checks, the variant detected is not consistent, the counter is made 1
and the variant detected is retained.

The variant detected and the counter value is stored in EEPROM. A tester interface which
enables clearing of the variant detected and the counter is also supported!
**********************************************************************************************/

/* Enable condition for fan variant detection */
/* power on reset (because KLE just gets switched supply voltage information) */
/* Counter value read from EEPROM is < Fan_ctMaxVarDet_C */
/* Fan running normally, i.e, no flash programming,no sticky main relay! */
/* Variant detection not over for this driving cycle */
/* Fan in standsill */
/* A calibratable time has passed after T15 ON */


/* Check if variant detection has already started, once started it should proceed without any
interruption. This is required because once variant detection is started a change in the
value of Fan_r or Fan_r2 (if they bacome greater than Fan_rFanStandStillHi_C) should not
interrupt variant detection from proceeding further
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

960 wrote:
Fri May 03, 2019 4:31 am
But this is what should be in the formula field?

0.15 + (max(90, min(coolant, 120)) - 90) / 30 * 0.8
No.

At the moment FSIO uses Reverse Polish Notation for technical reasons, so you would need to convert human-readable popular Infix notation to RPN using relevant rusEfi console features.

Infix notation:
0.15 + (max(90, min(coolant, 120)) - 90) / 30 * 0.8

Command to convert:
java -jar ../java_console_binary/rusefi_console.jar compile "0.15 + (max(90, min(coolant, 110)) - 90) / 20 * 0.8"

Conversion result to use in rusEfi formula:
0.15 90 coolant 120 min max 90 - 30 / 0.8 * +


https://github.com/rusefi/rusefi/commit/ea5618dd3051fca77f4843c391826d13226a5ae6
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
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

I did not understand much of this, but I made a folder named java_console_binary in rusefi folder and put the console from build server in it.

Then it seems to work, but I get a "unexpected line" error with the command.

I dont know what it are supposed to do either.

Sorry, but this sentence are like greek or chinese to me :-)

"At the moment FSIO uses Reverse Polish Notation for technical reasons, so you would need to convert human-readable popular Infix notation to RPN using relevant rusEfi console features."

I am completly blank at this area.

Will putting this line in the formula field do the same?

0.15 90 coolant 120 min max 90 - 30 / 0.8 * +
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

960 wrote:
Fri May 03, 2019 2:19 pm
Then it seems to work, but I get a "unexpected line" error with the command.
"Take console 20190502 or newer" - is there a chance that your console is not 20190502?

960 wrote:
Fri May 03, 2019 2:19 pm
Will putting this line in the formula field do the same?

0.15 90 coolant 120 min max 90 - 30 / 0.8 * +
Yes, that is my expectation
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
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

russian wrote:
Fri May 03, 2019 4:31 pm


"Take console 20190502 or newer" - is there a chance that your console is not 20190502?
It says 20190502_1906.

I downloaded it from the build server.

I did not understand how to build it myself.
Remember, at this field I am a total retard :-)
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

Console version does not say 20190502_1906. Console version is displayed on the start dialog in the title bar.

You are confusing bundle timestamp with console version, those are different things.
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

How is your project going? :)

I really need to focus on https://rusefi.com/forum/viewtopic.php?f=3&t=1631 so I thought it would be a great time to reactivate your account. See you on Slack if you have time and desire to give a hand with some of B6 details.
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
deaner
Posts: 56
Joined: Sat Jan 09, 2021 2:02 am

Re: PNP ECU for Vw/Audi ME7 #51

Post by deaner »

AndreyB wrote:
Sun Oct 11, 2020 3:02 pm
How is your project going? :)

I really need to focus on https://rusefi.com/forum/viewtopic.php?f=3&t=1631 so I thought it would be a great time to reactivate your account. See you on Slack if you have time and desire to give a hand with some of B6 details.
I think hes selling a finished product. Ive spoken with him about it after this ECU being posted up on a couple of Audi groups.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

deaner wrote:
Sun Jan 10, 2021 7:55 am
I think hes selling a finished product. Ive spoken with him about it after this ECU being posted up on a couple of Audi groups.
Oh, great to hear rusEFI is useful! What is it called? Any URLs?
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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

7,500 Norwegian Krone equals 890.56 United States Dollar

Cool stuff!
image.png
image.png (331.74 KiB) Viewed 19484 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
deaner
Posts: 56
Joined: Sat Jan 09, 2021 2:02 am

Re: PNP ECU for Vw/Audi ME7 #51

Post by deaner »

AndreyB wrote:
Sun Jan 10, 2021 4:20 pm
7,500 Norwegian Krone equals 890.56 United States Dollar

Cool stuff!
image.png
For sure! I almost bought one a few weeks ago but couldnt justify the price vs the features at this time in its development. For a little more you can get a feature packed Ignitron ECU(I've had one for 2 years.) Super nice guy for sure and as development continues, I think itll catch on!
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

deaner wrote:
Sun Jan 10, 2021 5:34 pm
For sure! I almost bought one a few weeks ago but couldnt justify the price vs the features at this time in its development. For a little more you can get a feature packed Ignitron ECU(I've had one for 2 years.) Super nice guy for sure and as development continues, I think itll catch on!
The ecus have been running nice and stable for a good while now.

It has been a lot of work and revisions to make the hardware interact right with other controllers.
Combined, the ecus have ran several 100K Kilometers in daily drives.
I have driven over 100K myself.

The firmware is a mix derived from rusefi.

There are a lot of skilled people here that does great work.
No doubt the firmware runs good!

The price levels here are a lot higher compared to other countries.

I could probably have dumped the price and sold more, but I am not interested in selling large quantities.
I just dont have the support capacity for it, as this is done at my spare time.

At first I actually gave away ecus to get some real-world testers.
It turned out that targeted the wrong group, as those ecus still have never been used.
I guess those poor guys are just waiting for someone to give them a free car to use it in :-)
So selling some worked way better.

Been updating the documentation a little, but there are still a lot left.
deaner
Posts: 56
Joined: Sat Jan 09, 2021 2:02 am

Re: PNP ECU for Vw/Audi ME7 #51

Post by deaner »


The ecus have been running nice and stable for a good while now.

It has been a lot of work and revisions to make the hardware interact right with other controllers.
Combined, the ecus have ran several 100K Kilometers in daily drives.
I have driven over 100K myself.

The firmware is a mix derived from rusefi.

There are a lot of skilled people here that does great work.
No doubt the firmware runs good!

The price levels here are a lot higher compared to other countries.

I could probably have dumped the price and sold more, but I am not interested in selling large quantities.
I just dont have the support capacity for it, as this is done at my spare time.

At first I actually gave away ecus to get some real-world testers.
It turned out that targeted the wrong group, as those ecus still have never been used.
I guess those poor guys are just waiting for someone to give them a free car to use it in :-)
So selling some worked way better.

Been updating the documentation a little, but there are still a lot left.
I'll start off first by saying I hope there was no offense taken as that was not my intention. Even if on a small scale, I wasnt knocking what you've built. I would still love to try one out someday and hey, I've got a running and driving car! 😜
I can completely sympathize with you not wanting to sell large quantities. Tech and support can get out of hand quite quickly with too many out in the wild and only one guy doing tech support.

If you can get one of those ecus back that are just collecting dust, I'll gladly take one off your hands. I'd happily help with documentation, tech and support here in the US in partial trade, if you're interested at all. Either way, I look forward to watching your ecu develop and grow! 🍻
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: PNP ECU for Vw/Audi ME7 #51

Post by 960 »

deaner wrote:
Sat Jan 16, 2021 7:37 pm

I'll start off first by saying I hope there was no offense taken as that was not my intention. Even if on a small scale, I wasnt knocking what you've built. I would still love to try one out someday and hey, I've got a running and driving car! 😜
I can completely sympathize with you not wanting to sell large quantities. Tech and support can get out of hand quite quickly with too many out in the wild and only one guy doing tech support.

If you can get one of those ecus back that are just collecting dust, I'll gladly take one off your hands. I'd happily help with documentation, tech and support here in the US in partial trade, if you're interested at all. Either way, I look forward to watching your ecu develop and grow! 🍻
No offence :-)

I have no plans for larger scale in near future, as this is mostly a hobby/time-consume.
That involves to much work and stress vs income compared to my other work.

But maybe once in the future.. never know..

The ecu's they got are replaced by new hardware revision, and I dont support those ecus anymore.
The rest I had of them actually vent in the trash :-)

Yeah, I got a bit of "support panic", as I was selling tons of diagnosis computers many years back.
At a point, I was at TeamViewer, answering mails and calls so much I couldnt get my work done.
And no spare-time at all.

It took years after I stopped selling it until it calmed down.
So I learned the hard way what it involves :-)
kacperoooni
Posts: 2
Joined: Tue Feb 02, 2021 11:05 pm

Re: PNP ECU for Vw/Audi ME7 #51

Post by kacperoooni »

960 wrote:
Thu May 02, 2019 1:23 am
The fan control seems to be a little more complicated.

In this model they are controlled by both AC and ECU.

The control electronics in the master has its own power amplifier for each fan. The control is independent, but in normal operation with the same duty cycle (TVH). The speed is controlled by a pulse width modulated signal (PWM signal) at a frequency of 25 Hz provided by the engine control unit (MSG).

In the absence of a PWM signal (constant high or low) and existing voltage at terminal 15/87, both (!) Fans are operated in emergency mode (maximum speed)! With a TVH <5%, the fans also go into emergency mode. The emergency starts at the earliest after 10 s!

So I will need a permanent 25HZ output.

The nominal ranges are expressed as:
~15% ≤ low speed ≤ high speed ≤ ~95%

Can I set this in TS somehow, or do I need code for it?
Did this work?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: PNP ECU for Vw/Audi ME7 #51

Post by AndreyB »

yes, same worked on my B6
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
kacperoooni
Posts: 2
Joined: Tue Feb 02, 2021 11:05 pm

Re: PNP ECU for Vw/Audi ME7 #51

Post by kacperoooni »

Will the calibration prodecure be needed (mentioned in one of previous posts)? I need to program arduino to control FANs in B7 by taking temperature from CAN. I want to skip programming this procedure if needed, since I could use simplex communication microcontroler -> fan controller only.
Post Reply