Page 4 of 6

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sun Apr 21, 2019 5:14 pm
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 17013 times
Op-amp_kicad.jpg
Op-amp_kicad.jpg (87.68 KiB) Viewed 17013 times

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sun Apr 21, 2019 11:44 pm
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sun Apr 21, 2019 11:55 pm
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Mon Apr 22, 2019 12:14 am
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Mon Apr 22, 2019 3:35 pm
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 16984 times

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Mon Apr 22, 2019 3:43 pm
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"

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Mon Apr 22, 2019 4:11 pm
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?

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Mon Apr 22, 2019 4:28 pm
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Tue Apr 23, 2019 10:27 am
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Tue Apr 23, 2019 1:22 pm
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

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Tue Apr 23, 2019 1:50 pm
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Tue Apr 23, 2019 2:42 pm
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?

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Tue Apr 23, 2019 2:46 pm
by 960
Or could just the supply voltage be 12v, and the dividers after 10K and 15K?

Then letting the MCU clamp it?

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Tue Apr 23, 2019 4:32 pm
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Tue Apr 23, 2019 7:54 pm
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 16919 times

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Tue Apr 23, 2019 10:16 pm
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Wed Apr 24, 2019 10:12 am
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 .

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Wed Apr 24, 2019 7:30 pm
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

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Fri Apr 26, 2019 2:43 am
by AndreyB
Is this a hardware issue with this board or not? Sudden changes in ETB duty cycle should probably not be rebooting stm32?


Re: PNP ECU for Vw/Audi ME7 #51

Posted: Fri Apr 26, 2019 11:53 pm
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Fri Apr 26, 2019 11:56 pm
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

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 12:13 am
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?

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 12:25 am
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?

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 12:30 am
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 12:40 am
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?

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 1:03 am
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?

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 2:10 am
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 2:18 am
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 5:43 am
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.

Re: PNP ECU for Vw/Audi ME7 #51

Posted: Sat Apr 27, 2019 5:48 am
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.