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 (65.24 KiB) Viewed 17013 times
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.
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.
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?
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.
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
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.
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 (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.
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
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?
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?
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.