Suggestions for good ADC solution with minimum components

Hardware inside and outside of the ECU
Post Reply
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Suggestions for good ADC solution with minimum components

Post by 960 »

As topic I am looking for a solution for the ADC's.

I want as less components as nessecary, but need to be overvoltage protected.

I have a Link G4+ (Link are well known for its bulletproof inputs/outputs)
I opened it, and find it's got no massive circuits.
Link.jpg
Link.jpg (1.7 MiB) Viewed 13735 times
I find it has several analog switches

Two MAX313 and one MAX395EAG

Are they used as protection of the ADC somehow?

I have also found another interesting IC, ADG5462F (Not inside the Link).
Can this be useful?


The other IC's I have identified are

1 MC33074ADG
L9651 for outputs
TLE7209 H-Bridge
1 DsPic
ST10 MCU
1 VNQ660SP
Last edited by 960 on Fri Mar 22, 2019 8:06 pm, edited 3 times in total.
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: Suggestions for good ADC solution with minimum components

Post by AndreyB »

Does anyone know how often do we need MAP and TPS analog inputs?

https://rusefi.com/forum/viewtopic.php?f=4&t=1516 talks about"Kinetis MKE1xF as analog/trigger input software controller" while technically we might be able to run the whole rusEfi on Kinetis MKE1xF. At the moment Kinetis 5v arm chips seem to be limited at 100 pin packages, so about 80 io pins only :(
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: Suggestions for good ADC solution with minimum components

Post by 960 »

russian wrote:
Fri Mar 22, 2019 7:50 pm
Does anyone know how often do we need MAP and TPS analog inputs?

https://rusefi.com/forum/viewtopic.php?f=4&t=1516 talks about"Kinetis MKE1xF as analog/trigger input software controller" while technically we might be able to run the whole rusEfi on Kinetis MKE1xF. At the moment Kinetis 5v arm chips seem to be limited at 100 pin packages, so about 80 io pins only :(
I did not find anything useful in the datasheet for Kinetis MKE1xF.

What is better with that? For the ADC's only a voltage divider are needed to do the same job.

Every "board" takes up much more space than just the compnents do.

The problem is to make the ADC's overvoltage-protected without lots of components.
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: Suggestions for good ADC solution with minimum components

Post by AndreyB »

You've also mentioned ADS7957?

What problem are we trying to solve? We have a lot of great boards but not enough software developers to even use the existing boards up to potential.
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: Suggestions for good ADC solution with minimum components

Post by 960 »

russian wrote:
Mon Mar 25, 2019 3:01 am
You've also mentioned ADS7957?

What problem are we trying to solve? We have a lot of great boards but not enough software developers to even use the existing boards up to potential.
For my own use it's enough with just voltage divider arrays.

But for a ECU to sell, I need to have some overvoltage protection.

I also want to keep it as simple as possible.

I have found there are no need for external ADC, as it still needs protection components.

But I have found Analog switches both in the Link, and other ecu's.

Are they used as overvoltage protection somehow?

I have found the IC's I am probably going to use, ADG5462F +voltage divider arrays (0612).

They are made for the purpose, with both filtering and protection built in.
User avatar
Dron_Gus
contributor
contributor
Posts: 451
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Suggestions for good ADC solution with minimum components

Post by Dron_Gus »

960 wrote:
Mon Mar 25, 2019 4:04 am
I have found the IC's I am probably going to use, ADG5462F +voltage divider arrays (0612).
This IC will not allow to implement diagnostic of analog inputs.
"Under normal operating conditions, if the analog input signal levels on any Sx pin exceed positive fault voltage (POSFV) or negative fault voltage (NEGFV) by a threshold voltage (VT), the channel turns off and that Sx pin becomes high impedance."
So if some input is shorted to +12 this protection IC will switch off channel. And SW will not be able to detect overvoltage.

Why don't you like something like serial resistor + PESD5V2?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Suggestions for good ADC solution with minimum components

Post by kb1gtt »

Analog switches are typically used when your MCU does not have enough ADC's or does not already include a suitable MUX. I believe the STM chips we have considered here have a MUX and do not need an external analog switch. By using an MCU with internal MUX, you can commonly do things like drive the input via internal pull up to a high voltage, then verify that the ADC sees the high voltage. Same for pull down. These can be handy diagnostic features. However if you use an external ADC, you typically loose that diagnostics capability.

About surge suppression, you can typically do that with just a series resistor to the ADC. The ADC has an impedance around 10kOhm, if you add a series 10kOhm (which does not arc over and dead short), the STM's rail clamping diodes will suffice for clamping purposes. I believe a large part of the bullet proof design you reference is because it comes conformal coated which deals with the creepage and clearance issues that are often neglected in DIY projects.

I suggest surging, and other ADC protections should be included as part of the design intent. See my notes here https://rusefi.com/wiki/index.php?title=Manual:Hardware

For example, the ADC should survive a sustained 12V short, or short to GND, etc.
Welcome to the friendlier side of internet crazy :)
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

Thanks for your input

Yes, what I mean with bulletproof is shortage to max 12-14v or gnd by wrong wiring

Does the MCU survive 12v as long as there are enough series resistance?

I see the Bosch ECU's only have a 33k array in series before MCU and nothing else.

I have used 10K and 15k voltage dividers, so will that be enough for it to handle 12v?

I thought the switches was set up in a way that they turned off the input at overvoltage.

They have some kind of diagnostic function, but if they are not needed I just stay with the voltage dividers.

INTELLIGENT FAULT DETECTION
The ADG5462F digital output pin (FF) can interface with a
microprocessor or control system and be used as an interrupt
flag. This feature provides real-time diagnostic information on
the state of the device and the system to which it connects.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Suggestions for good ADC solution with minimum components

Post by kb1gtt »

If MCU consumes 1mA, and if you have a 5V MCU voltage, and if you have a 0.5V diode drop from the rail clamping diode, then you have a 12V on the input... Then you could potentially have as low as 12V - (5V + 0.5V) / 1mA = 6.5k ohm. However if you have multiple shorts, then of course you need higher ohms, or if you have different parameters you also have higher ohms. That's why you typically see 10k or higher values.

A bullet proof MCU should handle inductive kicks from things like spark EMI or injector kick backs spikes. So typically RF clamping as well as steady state surge.

I do not know your circuit, so I do not know if 10k and 15k divider would work. I need more information to help determine if that would suffice for a 12V short or a GND short.
Welcome to the friendlier side of internet crazy :)
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

This is what I have now.

Dont mind the resistor values. They are just for footprints for optional pull up/downs.

Analogs.jpg
Analogs.jpg (77.33 KiB) Viewed 13680 times
User avatar
Dron_Gus
contributor
contributor
Posts: 451
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Suggestions for good ADC solution with minimum components

Post by Dron_Gus »

Injecting current through pin clamp diodes can reduce accuracy of whole ADC.
I would suggest to use external protection diode with breakdown voltage less than maximum input voltage for adc.
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

Dron_Gus wrote:
Mon Mar 25, 2019 11:29 am
Injecting current through pin clamp diodes can reduce accuracy of whole ADC.
I would suggest to use external protection diode with breakdown voltage less than maximum input voltage for adc.
Can you explain a little more? What components to remove and what components I should place where :-)

I am fairly new to design, so I am still learning.

Maybe the pull up's/downs would be better to place before the dividers?
User avatar
Dron_Gus
contributor
contributor
Posts: 451
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Suggestions for good ADC solution with minimum components

Post by Dron_Gus »

960 wrote:
Mon Mar 25, 2019 11:35 am
Dron_Gus wrote:
Mon Mar 25, 2019 11:29 am
Injecting current through pin clamp diodes can reduce accuracy of whole ADC.
I would suggest to use external protection diode with breakdown voltage less than maximum input voltage for adc.
Can you explain a little more? What components to remove and what components I should place where :-)

I am fairly new to design, so I am still learning.

Maybe the pull up's/downs would be better to place before the dividers?
This reply was to kb1gtt.
Your schematic looks good for me. You can save some space using dual protection diodes like PESD5V2 as mentioned before.
I personally do not like connect protection diodes to power rails. But this is commonly used in automotive to. I suggest to add at leas one 0.1 uF cap from 5V to gnd somewhere close to protection diodes.
Pull ups, if you are going to use it to power some external sensor (like t NTC) then it should be before divider. Or you will need to do some math.
If it is just for detecting broken wire/sensor - then its position does not make much sense.
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

Dron_Gus wrote:
Mon Mar 25, 2019 12:52 pm
960 wrote:
Mon Mar 25, 2019 11:35 am
Dron_Gus wrote:
Mon Mar 25, 2019 11:29 am
Injecting current through pin clamp diodes can reduce accuracy of whole ADC.
I would suggest to use external protection diode with breakdown voltage less than maximum input voltage for adc.
Can you explain a little more? What components to remove and what components I should place where :-)

I am fairly new to design, so I am still learning.

Maybe the pull up's/downs would be better to place before the dividers?
This reply was to kb1gtt.
Your schematic looks good for me. You can save some space using dual protection diodes like PESD5V2 as mentioned before.
I personally do not like connect protection diodes to power rails. But this is commonly used in automotive to. I suggest to add at leas one 0.1 uF cap from 5V to gnd somewhere close to protection diodes.
Pull ups, if you are going to use it to power some external sensor (like t NTC) then it should be before divider. Or you will need to do some math.
If it is just for detecting broken wire/sensor - then its position does not make much sense.
Thanks!

The protection diodes helps saving space.

I have moved the Bias/Pull-downs before dividers.

Would you put the diodes before as well?
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

Something like this?



Analogs.jpg
Analogs.jpg (148 KiB) Viewed 13668 times
User avatar
Dron_Gus
contributor
contributor
Posts: 451
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Suggestions for good ADC solution with minimum components

Post by Dron_Gus »

960 wrote:
Mon Mar 25, 2019 1:41 pm
Something like this?




Analogs.jpg
Yes.

But pull-ups and pull-down are after divider. If you are going to have some NTC, you need to move pull-ups/downs before dividers.
Or you pull up will be 2.7 K + 10K that is too much for 1K NTC.
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

Dron_Gus wrote:
Mon Mar 25, 2019 1:56 pm
960 wrote:
Mon Mar 25, 2019 1:41 pm
Something like this?




Analogs.jpg
Yes.

But pull-ups and pull-down are after divider. If you are going to have some NTC, you need to move pull-ups/downs before dividers.
Or you pull up will be 2.7 K + 10K that is too much for 1K NTC.
They are before. IN means in to MCU.

The whole schematic:
Analogs.jpg
Analogs.jpg (105.6 KiB) Viewed 13664 times
User avatar
Dron_Gus
contributor
contributor
Posts: 451
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Suggestions for good ADC solution with minimum components

Post by Dron_Gus »

Sorry. I thought inputs are from left, output at right.

Then move diodes to the left of U9. Then up resistor of divider will also limit maximum current through protection diodes.

That is what i mean.
Attachments
Screenshot from 2019-03-25 17-18-14.png
Screenshot from 2019-03-25 17-18-14.png (7.88 KiB) Viewed 13662 times
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

Does this look correct?





Analogs.jpg
Analogs.jpg (113.59 KiB) Viewed 13660 times
User avatar
Dron_Gus
contributor
contributor
Posts: 451
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: Suggestions for good ADC solution with minimum components

Post by Dron_Gus »

Yes. :) At least for me.
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

Dron_Gus wrote:
Mon Mar 25, 2019 3:27 pm
Yes. :) At least for me.
Thanks!

I can live with these circuits :-)

The arrays really make it very compact.

Also a lot of those Bias/Pull-downs goes away. I made one circuit and copied it.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Suggestions for good ADC solution with minimum components

Post by kb1gtt »

The MCU already has rail clamping diodes.

Your 2.7k ohms will negate the 10k. AKA a surge will pass through your 2.7k instead of your 10k. This will likely cause the 5V to go higher then 5V. The PESD5V2S2UT leaks 0.14uA, which is likely to skew your readings. Keep in mind 5V/(10k + 15k) = 200uA. The PESD5V2S2UT has 152 - 200 pF, so the 100pF is probably not doing what you are expecting. You already have a larger pF near by.

It is common for OEM's to use a series resistor to limit the energy dumped by the rail clamping diodes during a surge event. Then they use the internal capacitance, and impedance to function as an anti-aliasing filter.
Welcome to the friendlier side of internet crazy :)
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

kb1gtt wrote:
Mon Mar 25, 2019 4:30 pm
The MCU already has rail clamping diodes.

Your 2.7k ohms will negate the 10k. AKA a surge will pass through your 2.7k instead of your 10k. This will likely cause the 5V to go higher then 5V. The PESD5V2S2UT leaks 0.14uA, which is likely to skew your readings. Keep in mind 5V/(10k + 15k) = 200uA. The PESD5V2S2UT has 152 - 200 pF, so the 100pF is probably not doing what you are expecting. You already have a larger pF near by.

It is common for OEM's to use a series resistor to limit the energy dumped by the rail clamping diodes during a surge event. Then they use the internal capacitance, and impedance to function as an anti-aliasing filter.
I did not understand all of that, but the resistors valued 2.7K are just placed for the footprints. It's for the Bias/PD's.

Do you have any suggestions for improvement?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Suggestions for good ADC solution with minimum components

Post by kb1gtt »

What are the circuit(s) that are connected outside of the ECU to each of these ADC's? If you know the circuit, then you can optimize the input circuit. For example, it is common your 5V will go to a sensor, then back to the ECU which has a pull down resistor. With a circuit like that you are reasonably solid with a series resistor on your ADC. Also am I correct in assuming STM32?
Welcome to the friendlier side of internet crazy :)
960
contributor
contributor
Posts: 336
Joined: Mon Dec 10, 2018 1:22 am
Location: Norway

Re: Suggestions for good ADC solution with minimum components

Post by 960 »

kb1gtt wrote:
Tue Mar 26, 2019 1:15 am
What are the circuit(s) that are connected outside of the ECU to each of these ADC's? If you know the circuit, then you can optimize the input circuit. For example, it is common your 5V will go to a sensor, then back to the ECU which has a pull down resistor. With a circuit like that you are reasonably solid with a series resistor on your ADC. Also am I correct in assuming STM32?
Yes, its a F767.

Most modern sensors are just 0-5V potmeters with clean signals.
Some of them use pull-down, and the temperature-sensors need Bias-resistors.

The result:
Back_CU.jpg
Back_CU.jpg (189.88 KiB) Viewed 13542 times
Front_CU.jpg
Front_CU.jpg (270.05 KiB) Viewed 13542 times
Post Reply