Multichannel ADC instead of all analog circuitry (opamps, vr)

Hardware inside and outside of the ECU
Post Reply
User avatar
andreika
donator
donator
Posts: 461
Joined: Mon Feb 13, 2017 2:35 pm
Location: Kiev

Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by andreika »

Hi!

@Russian asked me to drop a few lines about the replacement of analog circuitry (opamps), digital inputs and... vr-interface.

The first candidate is ADS7953-Q1, 16-channel 12-bit 1MBSPS SPI ADC (automotive grade). Moreover, it has a programmable built-in comparator and GPIO outputs - potentially we can implement a VR-interface functionality with adaptive thresholds in software and throw MAX9926 away. And it's in a compact 38-pin package without excessive parallel interfaces etc. But alas, it accepts only 0-5V inputs (with poor overvoltage protection) and needs ac-coupling for bipolar signals like VR-sensor outputs. And it seems it requires an external vref/clock...

There are some ADCs with wide bipolar input range +-12V, like ADS8548 (14 bit would be enough?). It can be used as a replacement of any ECU input including direct 12V, or bipolar VR signals etc. But it's only 8-channel, has less sample rate, larger package and no (?) built-in comparator...

There are others like a monstrous AD7617 in 80-pin package (!), ADS868x series etc.

I wish I could find something in-between - like ADS7953, but with wide input range as in ADS8548...
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by kb1gtt »

Is an automotive PSoC something that should be considered?
http://www.cypress.com/documentation/datasheets/automotive-psocr-4-psoc-4000-family-datasheet-programmable-system-chip

It includes programmable op-amps, ADC, and MCU all in one chip. It can pass along an analog signal, or digital signal. With the programmable op-amps, you can create gain to look at low level signals. The switch cap devices allow many crazy options which might be of interested, especially when filtering. AKA they these filter do not require MCU cycles. They are similar to the LMF100. However they can be configured for many different typologies and many different applications. One of these chips might allow a full solution in one package. You may or may not need external clamping diodes.
Welcome to the friendlier side of internet crazy :)
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: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by AndreyB »

kb1gtt wrote:
Sat Dec 29, 2018 8:43 pm
Is an automotive PSoC something that should be considered?
http://www.cypress.com/documentation/datasheets/automotive-psocr-4-psoc-4000-family-datasheet-programmable-system-chip
This could require way more firmware development investment, this could too powerful a solution which would not give us a good cost/benefit ratio.
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
mobyfab
Posts: 139
Joined: Tue Oct 29, 2013 10:09 am
Location: Versailles, France

Re: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by mobyfab »

so if I understand correctly, you want to move the ADC stuff from the STM32 to another chip?
You'll never get rid of the analog circuitry because you still need protection and conditioning.

PSOC is a specific implementation, no go.
STM32F3 does PGAs, 25ns comparators and fast ADC, some 16 bits if needed.

Sounds like way more problems than benefits to me.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by kb1gtt »

For VR don't we primarily need PGA, small 2.5V reference, followed by an adjustable threshold comparator? Such that it can accept an input of 15mV to 50V and generate a digital pulse. Bare bones could rely on the primary CPU and it's ADC to determine gain, and receive the timing pulses.

Could we simply guess gain based on RPM? Do we need ADC sensing? If ADC sensing, do we need to be fast about it, or can we make a primary guess based on RPM, then ADC makes some modifications to the initial guess?

I've seen claims that a hot VR can produce 300V. Is that an un-realistic situation to plan for? I believe most are typically 50V. What is the max input voltage that should be considered in such a design?

Should we plan for some kind of advanced features? Like a bias current which detects if a wire has broken, or if a connection has higher than expected ohms. Small ohms in these wires can cause tank circuits which can cause high voltage failures.

I'm not seeing the "need" for an ADC. I guess the ADC could be used to auto scale the PGA. I see auto scaling as handy as it prevents you from needing to program a PGA per RPM lookup table. That look up table is probably cheap resources, while a dedicated ADC is likely costly.
Welcome to the friendlier side of internet crazy :)
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: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by AndreyB »

kb1gtt wrote:
Sun Dec 30, 2018 1:19 am
I'm not seeing the "need" for an ADC.
I believe the idea is to replace current 50 components (x3 op-amp + MAX9926 + 46 resistors and capacitors) with a much smaller number of components? Even removing 24 voltage diving resistors would save a lot of real estate and assembly complexity
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
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by kb1gtt »

Those multiple 0805's are because I designed it to be 300V tolerant. Each 0805 package has an operating voltage of around 150V. If we plan for 50V then receive a 300V signal even for a brief period of time, it will likely destroy the MCU. We can make it smaller if we decrease the VR's voltage ratings. However I fear the negative effects if we neglect a voltage spike caused by a tank circuit's resonant frequency.

If we pinch the hall, we can get rid of some 0805's. I think the only way to decrease the number of components is to decrease the number of features.

I fear we'll end up with more components, as we still need the 2.5V reference that is currently integrated into the MAX chip, as well the clamping diodes will likely be external. The MAX chip has larger than normal clamping diodes. We'll likely need equivalents of those diodes if we roll our own. I think we'll end up with a larger PCB area, with more components. However I think we can obtain lower cost components, with more control over the signals. AKA that idle time thing is a bugger for Subaru crank wheels. If we roll our own, we can deal with that AGC at low RPM issue. Granted we could also change the MAX circuit to allow the MCU to control the AGC.
Welcome to the friendlier side of internet crazy :)
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: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by AndreyB »

I thibk you are focusing on VR part but I was talking about 24 1.5K resistors on the output side of 12 analog channels with three op-amps. The question is if there is a way to reduce number of components in this area by using a fancy chip and SPI
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
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by kb1gtt »

Ah, I understand the analog circuits, not just VR. If we limit the design constraints we can shrink the circuit quite a bit. However we have lots of PCB real-estate back there and the parts cost pennies. Currently the inputs were intended to handle the below set of conditions. I'm not sure if I upheld these goals, but it was my design intent. Also I thought I wrote that down some where. Perhaps it's buried in the forum threads some where. I'm a fan of documenting both the implementation, as well as the design intent. Any how, from memory, these were several of my design intents.
-- Several design intents are posted here. https://rusefi.com/wiki/index.php?title=Manual:Hardware#General_suggested_environment
-- Can handle a high voltage, at least 50V. I think it was aiming to sniff around 150V. I recall the goal was to have the ability to sniff the injector kick back pulses. As well as protect against accidental connections to wrong circuits. Sniffing 300V to 400V was considered, for sniffing the ignition primary, but was put at a lower priority as that's just getting to crazy. I was trying to make these robust as the end user is going to be error prone. With a little bit of quality control, or with a bit less protection to the end user, these circuits can be made much smaller. AKA we can get rid of the op-amp all together.
-- I was aiming to allow pretty much any input to function as a kind of scope. AKA connect a wire to an un-used analog channel and look at analog data. This made these analog inputs much more universal than we often see on an dedicated ECU input.

I once did a kind of generic PCB, the goal of this PCB was to measure anything from 500V to 5mV. That is posted here. It has some similarities to this circuit. It uses a MCP6G01T-E/OT PGA which might be of some interest. I doubt it but figured I'd mention it.
https://sourceforge.net/p/daecu/code/HEAD/tree/Hardware/trunk/MCU_pin_protect_PCB_1channel/
Welcome to the friendlier side of internet crazy :)
User avatar
andreika
donator
donator
Posts: 461
Joined: Mon Feb 13, 2017 2:35 pm
Location: Kiev

Re: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by andreika »

Another option found: AD7328 x 2.
A 12-bit 8-channel 1MBPS ADC with 10V-tolerant bipolar inputs (has built-in clamp diodes capable of 10mA per each channel, so a series resistor array would be enough for input protection).
Pros: Small package (TSSOP-20), fully integrated (built-in 2.5V reference), capable of differential inputs (configurable), has built-in temperature indicator, has substitutes (cheaper AD7327 with 500MBPS bandwidth, and non pin-compatible ADS8638).
Cons: only 8 channels, not 16. No built-in trigger/comparator like in ADS7953 - we'll need a full software processing for adaptive threshold logic of VR-sensors)...
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: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by mck1117 »

Ooh, the 7328 looks pretty good. We could reduce each 8 channels of the analog system to a pair of 5k 4x resistor arrays, and one of those ICs.

Only trouble: in quantity 100, they're $11.18 each :o
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: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by mck1117 »

Also I think for VR inputs, the ASIC solution of max9926/7 is probably fine. I don't think the 9926 will go anywhere soon, and they're probably easy to replace later if necessary. Replacing the "normal" analog inputs saves quite a few more components and board area than replacing the VR inputs.
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: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by AndreyB »

andreika wrote:
Sun Dec 30, 2018 3:35 pm
Another option found: AD7328 x 2.
A 12-bit 8-channel 1MBPS ADC with 10V-tolerant bipolar inputs (has built-in clamp diodes capable of 10mA per each channel, so a series resistor array would be enough for input protection).
Pros: Small package (TSSOP-20), fully integrated (built-in 2.5V reference), capable of differential inputs (configurable), has built-in temperature indicator, has substitutes (cheaper AD7327 with 500MBPS bandwidth, and non pin-compatible ADS8638).
Cons: only 8 channels, not 16. No built-in trigger/comparator like in ADS7953 - we'll need a full software processing for adaptive threshold logic of VR-sensors)...
@ would you be available to make a small module board?

My motivation for external ADC is simply the shortage of ADC channels in stm32. Well, at least current implementation is short of ADC channels if we decide to go crazy like two TPS with two channels for safety each, two wideband cj125 sensors... I guess technically we can start using ADC3 and get ourselves 16 more ADC channels inside stm32. Or we can wait for the Kinetis :)
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: Multichannel ADC instead of all analog circuitry (opamps, vr)

Post by 960 »

russian wrote:
Sun May 05, 2019 5:41 pm
andreika wrote:
Sun Dec 30, 2018 3:35 pm
Another option found: AD7328 x 2.
A 12-bit 8-channel 1MBPS ADC with 10V-tolerant bipolar inputs (has built-in clamp diodes capable of 10mA per each channel, so a series resistor array would be enough for input protection).
Pros: Small package (TSSOP-20), fully integrated (built-in 2.5V reference), capable of differential inputs (configurable), has built-in temperature indicator, has substitutes (cheaper AD7327 with 500MBPS bandwidth, and non pin-compatible ADS8638).
Cons: only 8 channels, not 16. No built-in trigger/comparator like in ADS7953 - we'll need a full software processing for adaptive threshold logic of VR-sensors)...
@ would you be available to make a small module board?

My motivation for external ADC is simply the shortage of ADC channels in stm32. Well, at least current implementation is short of ADC channels if we decide to go crazy like two TPS with two channels for safety each, two wideband cj125 sensors... I guess technically we can start using ADC3 and get ourselves 16 more ADC channels inside stm32. Or we can wait for the Kinetis :)
Sure, I will make it!

Been waiting for this :-)

I already have ready schematic for ADS7953-Q1.

Why AD7328?
Does both of them has clamping diodes? which one will need least components?
Post Reply