PNP ECU for Vw/Audi ME7 #51

Hardware inside and outside of the ECU
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 »

Just quickly made a schematic with op-amp and 0603 arrays.

Actually it's much better than I expected.

(Without Bias/pull-downs)
Op-Amp.jpg
Op-Amp.jpg (65.24 KiB) Viewed 16685 times
Op-amp_kicad.jpg
Op-amp_kicad.jpg (87.68 KiB) Viewed 16685 times
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: PNP ECU for Vw/Audi ME7 #51

Post by kb1gtt »

I believe your tps is the signal that is measured from the etb. Is the thottle's 100 to 1000 range similar to the etb's range? It sounds like the intergal term is winding up. Could you try it with 0 for the intergal term? Can you verify the input and output of the pid have the same range.

Sorry have not looked into the analog.
Welcome to the friendlier side of internet crazy :)
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 »

kb1gtt wrote:
Sun Apr 21, 2019 11:44 pm
I believe your tps is the signal that is measured from the etb. Is the thottle's 100 to 1000 range similar to the etb's range? It sounds like the intergal term is winding up. Could you try it with 0 for the intergal term? Can you verify the input and output of the pid have the same range.

Sorry have not looked into the analog.
The thing that really messed up the ETB was the BIAS Curve.

I didnt know it existed.

When changed to -6 to 20 and interpolate, the strange behaveor was gone.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: PNP ECU for Vw/Audi ME7 #51

Post by kb1gtt »

Great to hear. I'm ignorant about the bias thing. I'll have to learn that some day and see what @ did in software. Good to hear you got over the hurdle.
Welcome to the friendlier side of internet crazy :)
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 »

kb1gtt wrote:
Mon Apr 22, 2019 12:14 am
Great to hear. I'm ignorant about the bias thing. I'll have to learn that some day and see what @ did in software. Good to hear you got over the hurdle.
Can anything be removed from the Op-amp version of the analog inputs?

Now the clamping diodes are the most extensive, and place consuming.
Can they be removed?
Op-Amp.jpg
Op-Amp.jpg (214.89 KiB) Viewed 16656 times
User avatar
Dron_Gus
contributor
contributor
Posts: 450
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: PNP ECU for Vw/Audi ME7 #51

Post by Dron_Gus »

960 wrote:
Mon Apr 22, 2019 3:35 pm
Now the clamping diodes are the most extensive, and place consuming.
Can they be removed?
Check section 4.1.2 of MCP6004 datasheet "INPUT VOLTAGE AND CURRENT LIMITS"
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 »

Dron_Gus wrote:
Mon Apr 22, 2019 3:43 pm
960 wrote:
Mon Apr 22, 2019 3:35 pm
Now the clamping diodes are the most extensive, and place consuming.
Can they be removed?
Check section 4.1.2 of MCP6004 datasheet "INPUT VOLTAGE AND CURRENT LIMITS"

Is there any other Op-amps that will be fine without?

How about one with higher input voltage range?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: PNP ECU for Vw/Audi ME7 #51

Post by kb1gtt »

I'm not sure the op-amp's clamping diodes. Those likely exist, and are likely redundant to your external clamping diodes.

Also keep in mind that rail to rail op-amps typically do not reach rail to rail. You likely need to steer clear of the rails in your normal range of input voltages.

Sorry short on time, I do not have a suggested other op-amp right now.
Welcome to the friendlier side of internet crazy :)
User avatar
Dron_Gus
contributor
contributor
Posts: 450
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: PNP ECU for Vw/Audi ME7 #51

Post by Dron_Gus »

960 wrote:
Mon Apr 22, 2019 4:11 pm
Is there any other Op-amps that will be fine without?

How about one with higher input voltage range?
This is common limitation for general purpose opamps: input voltage should be within supply voltage range.

Why are you trying to save board space? I thought you have a lot of free space.
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 »

Dron_Gus wrote:
Tue Apr 23, 2019 10:27 am

This is common limitation for general purpose opamps: input voltage should be within supply voltage range.

Why are you trying to save board space? I thought you have a lot of free space.
I have a lot of space at this board, but are planning another.

It's not the space that bothers me, but the component count.

More components = more mess, more to fail, more to make small inaccuracies big combined, harder to troubleshoot, and worse to place all components away from disturbing signals.

Will the Op-amps fry with overvoltage?
I just need them to survive if shorted to 12V
User avatar
Dron_Gus
contributor
contributor
Posts: 450
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: PNP ECU for Vw/Audi ME7 #51

Post by Dron_Gus »

960 wrote:
Tue Apr 23, 2019 1:22 pm
Will the Op-amps fry with overvoltage?
I just need them to survive if shorted to 12V
Depend on current.
Its operation during overvoltage is unpredictable. Moreover one overvotaged amp can affect other is same package. Or shift power rail.
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 »

Dron_Gus wrote:
Tue Apr 23, 2019 1:50 pm
Depend on current.
Its operation during overvoltage is unpredictable. Moreover one overvotaged amp can affect other is same package. Or shift power rail.
Current can be limited by the in series resistors?

But if a Op-amp has a input range of 0 - 18V or something, why cant it handle more than the supply voltage?
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 »

Or could just the supply voltage be 12v, and the dividers after 10K and 15K?

Then letting the MCU clamp it?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: PNP ECU for Vw/Audi ME7 #51

Post by kb1gtt »

If op-amp is connected to 5V rail, and your input goes above 5V, say 12V, then your 12V will dump via rail clamping diode. So consider the amps to flow into the 5V rail to be (12V - 5V) / resistance. How much you can safely dump into the 5V rail depends on how much is being consumed by the 5V rail, and how much the op-amp can handle in it's clamping diode. I would certainly aim for less than 1mA. So at minim for a 12V protection, I would suggest a series resistor of greater than (12-5) / 0.001A = 7k ohm.

Also take note, that most rail clamping diodes are protecting against inductive spikes, so more commonly designed for short term spikes of 50V to 100V not your 12V steady state.
Welcome to the friendlier side of internet crazy :)
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 »

So it's still all about current, not volts?

Will this be ok?
Op-amp_kicad.jpg
Op-amp_kicad.jpg (412.89 KiB) Viewed 16591 times
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: PNP ECU for Vw/Audi ME7 #51

Post by kb1gtt »

Current and volts are both related via ohms law. You have current and voltage limits. The rail clamping diodes kick in when you exceed a voltage, then they have a max amps they can conduct before they break. When they break, then the input voltage is no longer protected and voltage on the input then exceeds spec. Basically it all works until it doesn't then it all goes wrong very quickly.
Welcome to the friendlier side of internet crazy :)
User avatar
Dron_Gus
contributor
contributor
Posts: 450
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: PNP ECU for Vw/Audi ME7 #51

Post by Dron_Gus »

Here is good ap note about ap amp input protection https://www.analog.com/media/en/training-seminars/tutorials/MT-036.pdf .
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 »

Dron_Gus wrote:
Wed Apr 24, 2019 10:12 am
Here is good ap note about ap amp input protection https://www.analog.com/media/en/training-seminars/tutorials/MT-036.pdf .
Looks like this is the one I will need:

https://no.mouser.com/datasheet/2/609/ADA4096-2_4096-4-878151.pdf
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 »

Is this a hardware issue with this board or not? Sudden changes in ETB duty cycle should probably not be rebooting stm32?

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 has not been a issue with the build I have used now, newer happened when testing in car.
I compiled it one-two weeks ago.

I have tried to compile again the last days, and had lots of those errors.
They showed up before I tested in car, so dont know more.

By luck I saved the flash, and used the old one.

I use only the F7 now BTW.
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 »

reboot has to be hardware not software issue. i strongly suggest using f4 and official builds, otherwise we are introducing unneeded differences between our setups with zero benefits
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 Apr 26, 2019 11:56 pm
reboot has to be hardware not software issue. i strongly suggest using f4 and official builds, otherwise we are introducing unneeded differences between our setups with zero benefits
I changed to F7 at this board when I didn't get the TLE8888 work.

With the F7 it worked, so I switched.
From then it has worked just fine with no issues.

I dont want to push limits by replacing MCU at this boards more times, but I am about to order the next revision now.

I can solder MCU's to them and ship to you.

Have you tried to reproduce the issue with the F7 board?
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 »

What kind of hardware issue can it be?
I know the routing are not ideal on that revision.
Can you see it with debugging?
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:
Sat Apr 27, 2019 12:25 am
What kind of hardware issue can it be?
the stm32 chip reboots. Debugging would not help since well, you cannot debug a reboot - it has to be a reboot due to voltage spike up or down or something like that?

in order to get the issue you need to hit ETB with a massive bias curve change so that it gets shocked. Smooth changes do not cause the reboot but a hard full open or hard full close cause the reboot.
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 »

Sure it's not your power supply?

The H-Bridges has separate caps and diode, so I dont think its there.

Is it the same with both H-Bridges?
Have you tried with UBHR disconnected?
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: PNP ECU for Vw/Audi ME7 #51

Post by mck1117 »

Do you have an oscilloscope handy?

Probe the 5v and 3.3v rails while doing the thing that causes that to happen. I bet you're having power supply issues. How's this setup powered?
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 »

mck1117 wrote:
Sat Apr 27, 2019 1:03 am
Do you have an oscilloscope handy?

Probe the 5v and 3.3v rails while doing the thing that causes that to happen. I bet you're having power supply issues. How's this setup powered?
I think you are right.

The issue is seen right when doing what pull most amps thru the H-Bridge.
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 »

mck1117 wrote:
Sat Apr 27, 2019 1:03 am
Do you have an oscilloscope handy? How's this setup powered?
eBay 12v 6A power supply on this desk. I have a baby oscilloscope but I am not too comfortable with it :( Easier for me to move to a PC power supply.
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: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: PNP ECU for Vw/Audi ME7 #51

Post by mck1117 »

russian wrote:
Sat Apr 27, 2019 2:18 am
mck1117 wrote:
Sat Apr 27, 2019 1:03 am
How's this setup powered?
eBay
Hmmmmmmmm. I would be 0% surprised if that power supply has a pretty crappy step response.
russian wrote:
Sat Apr 27, 2019 2:18 am
Easier for me to move to a PC power supply.
That might not be much better. Computers don't have to deal with any heavy inductive loads like a DC motor slamming on and off. I'd try powering the setup with a battery, not a switching power supply. Even a small battery like a security system battery would work fine for a load like this. For bench work like this, a good combo is a small lead acid battery like a 7Ah security system battery with a lead acid charger. It'll keep the battery topped up, and the battery will prevent any big drops.
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 »

thank you for a detailed explanation! i have a spare miata not huge battery i will switch to it. need to grab a pine board and build a better overall setup.
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
Post Reply