analog inputs: op-amp + divider - Russian - now MCP6004

Hardware inside and outside of the ECU
User avatar
russian
Site Admin
Posts: 9770
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: analog inputs: op-amp + divider - Russian - now MCP6004

Post by russian » Thu Nov 27, 2014 9:46 pm

puff wrote:have you tried measuring output without divider? or changing divider for, say, 10K?
This from a person who has his own board to try? :)
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

puff
contributor
contributor
Posts: 2738
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by puff » Thu Nov 27, 2014 9:55 pm

unfortunately, i left it at home at my home town till spring - didn't think I would need it earlier…

Gone_AWOL
Posts: 7
Joined: Mon Mar 23, 2015 12:15 pm

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by Gone_AWOL » Mon Mar 23, 2015 7:57 pm

Is this not a little OTT? I've joined up a little late to make comments I know... but a PD combined with an emitted follower if you really want a buffer is simple too and pretty cheap. You may well want the high impedance input that an opamp allows, but remember common mode noise loves having on input with high impedance too :)

Also your filters can be much more aggressive, Coolant and mat sensors change incredibly slowly which means you can be really nasty with your filters for these at least.

aneox
Posts: 3
Joined: Wed Mar 25, 2015 6:48 am

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by aneox » Sun Apr 05, 2015 6:21 am

russian wrote: Also checked with +12 power supply and Frankenso own 5v. This time I have perfect 5v power and same -0.6v offset on op-amp output.

Did you find an answer? Issue resolved?

User avatar
russian
Site Admin
Posts: 9770
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by russian » Sun Apr 05, 2015 3:45 pm

aneox wrote:Did you find an answer? Issue resolved?
Do not remember :( Probably not.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Wed Apr 08, 2015 12:12 am

Here are some measurements. I'm not sure why the op-amp is having trouble pushing to the rails, but this clearly shows it can't push to the rails. Now we need to figure out why it's failing.
op-amp_rails_problem.png
op-amp_rails_problem.png (13.31 KiB) Viewed 5310 times
Welcome to the friendlier side of internet crazy :)

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Wed Apr 08, 2015 1:21 am

I have added a 220pF between pin 14 and GND for cap Cl. I have also removed R214 to remove any potential loading issues. Still pin 13 measures 4.39V when it should read 5.00 V. The input amps are in the nA range and the op-amp can drive mA, so it's not getting loaded down.

Hmmm, it would appear that this type of rail to rail op-amp can't go to the rails. I see Vicr should limit the top end to between 4 and 4.2. So we are really lucky that it's going to 3.39v. From this datasheet http://www.ti.com/lit/ds/symlink/lmv324.pdf page 6
LMV324_Vicr.JPG
LMV324_Vicr.JPG (14.43 KiB) Viewed 5307 times
The solution for this has to be to get a rail to rail that will actually go to the rails, or live with the 4V max.
Welcome to the friendlier side of internet crazy :)

puff
contributor
contributor
Posts: 2738
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by puff » Wed Apr 08, 2015 4:42 am

are they linear? does this mean, to stay with lmv324idt we would need to recalculate the voltage dividers?

aneox
Posts: 3
Joined: Wed Mar 25, 2015 6:48 am

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by aneox » Wed Apr 08, 2015 5:48 am


User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Wed Apr 08, 2015 9:13 am

The input can go for that range, the issue is the output. That ST chip is much better about actually being a rail to rail chip. Is .2V either rail close enough? See page 6 for VCC = 5V found in aneox's link. Snippet below.
ST_LMV324_rail.PNG
ST_LMV324_rail.PNG (23.2 KiB) Viewed 5297 times
Welcome to the friendlier side of internet crazy :)

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Wed Apr 08, 2015 10:07 am

I have checked the op-amps in the below noted specification. So far it looks like that ST chip is the best option. If we change the resistor divider to a 10kOhm instead of 3kOhm. The tolerance is .2V to 4.8V, but the typical is .04V to 4.95V. The footprint / module is a bit narrower than what we have. It could kind of be put on the existing pads, but would need to be change to be correct.

https://docs.google.com/a/jaredharvey.c ... fM44Z2OVnU

Should we scale the input, such that we leave the door open for a variety of op-amps, or should we change to this ST op-amp? Are there other op-amps I should consider? Ultimately I get to decide, but are there any suggestions on what way I should go with it? I'm tempted to say we should scale the input, then scale the output, but I'm a bit less than happy with that as it would add to the tolerance stack up. In reality though, you are supposed to adjust your TPS min and TPS max and such, so I'm not sure the stack up is an issue.
Welcome to the friendlier side of internet crazy :)

DaWaN
Posts: 51
Joined: Sat Sep 20, 2014 6:54 pm
Location: Benschop, Netherlands

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by DaWaN » Wed Apr 08, 2015 11:30 am

kb1gtt wrote: Hmmm, it would appear that this type of rail to rail op-amp can't go to the rails. I see Vicr should limit the top end to between 4 and 4.2. So we are really lucky that it's going to 3.39v. From this datasheet http://www.ti.com/lit/ds/symlink/lmv324.pdf page 6
LMV324_Vicr.JPG
The solution for this has to be to get a rail to rail that will actually go to the rails, or live with the 4V max.
You learn every day.. Explains why they explicitly call it a "rail-to-rail output" op amp.

As it seems there are very few 'true' rail-to-rail input opamps, most of them seem to stay away 200mV from the rails..
My ubiquitous choice is usually the Microchip MCP6004 when it comes to rail-to-rail CMOS op amps.

The TI LMV934-N seems to have a true rail-to-rail input, but is a tad expensive.

User avatar
russian
Site Admin
Posts: 9770
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by russian » Wed Apr 08, 2015 11:49 am

kb1gtt wrote:I'm tempted to say we should scale the input
Why scale the input? Is not 4.8/4.95 good enough?
DaWaN wrote:The TI LMV934-N
what is the full part number for our application?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Wed Apr 08, 2015 5:09 pm

I think that's this guy https://octopart.com/lmv934ma.-texas+in ... ts-8313406 which then links to this datasheet http://www.ti.com/lit/ds/symlink/lmv934-n.pdf I see it notes the below.
op-amp.PNG
op-amp.PNG (20.81 KiB) Viewed 4953 times
I wonder why it specifies the input to be +/- .1V. Does that mean you need to drive to -100mV to get the output to the specified voltage? That spec seems a bit odd to me.

I need to look closer at this datasheet, but I think we might have a winner with this Microchip one DaWaN suggested https://octopart.com/mcp6004-e%2Fsl-microchip-419107 I need to look at the footprint to see how it might change the layout. I also need to review the other specs, but the rails claim to be only a 25mV offset, and the price is comparable to what we have. I wonder why the MCP notes .5V Overdrive.
op-amp_MCP6001.PNG
op-amp_MCP6001.PNG (8.87 KiB) Viewed 4953 times
I see the MCP datasheet notes several simulation software's. Perhaps we can simulate to see if the specs are tolerable.
Welcome to the friendlier side of internet crazy :)

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Thu Apr 09, 2015 9:44 am

Microchip offers this on-line simulation tool known as MINDI which is found here http://webdc.transim.com/DesignCenter/s ... ardServlet

I did a simulation of the MCP6001, which produced a low voltage of 0.18E-3 and a high voltage of 4.934. I think this is going to be much more tollerable than what we have in there now. I also see that MINDI notes several other op-amp options. I'll go add those to the rail to rail list for analysis. Here's the PDF results of the simulation.
Transim WebScope ®.pdf
(101.83 KiB) Downloaded 120 times
Microchip - Design Center.pdf
(193.64 KiB) Downloaded 74 times
Welcome to the friendlier side of internet crazy :)

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Thu Apr 09, 2015 10:40 am

I see the MCP6244-E/SL at $0.70 with a out min of 0.00303 and a out max of 4.916 However I see a significant delay in the simulation.
I see the MCP6274-E/SL at $1.50 with a out min of 0.00488 and a out max of 4.967
I see the MCP6004-E/SL at $0.50 with a out min of 0.00180 and a out max of 4.934

There are 3 of these chips on Frankenso, so that's a $1.50, $2.10 and $4.50 for total prices. I tend to think we need more precision at the high side than at the low side, think WOT. Is it worth the extra $3 to get that extra .033V at the top end? Also remember after the Vdivider, that's .016V at the ADC. I'm not seeing that slight difference to be very important.

Unless someone points me to a better option(s), I'm going to start using the 6004.

Online simulation PDFs attached.
Attachments
Microchip - Design CenterMCP627x.pdf
(193.51 KiB) Downloaded 72 times
Transim WebScope ®MCP627x.pdf
(101.37 KiB) Downloaded 104 times
Microchip - Design CenterMCP624x.pdf
(193.61 KiB) Downloaded 64 times
Transim WebScope ®MCP624x.pdf
(102.54 KiB) Downloaded 92 times
Welcome to the friendlier side of internet crazy :)

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Fri Apr 10, 2015 2:25 am

The sine wave simulation seems to show some interesting results. Seems there is a clamping issue with these op-amps. Seems the MCP627x recovers from clamping better. See attached simulation PDF's.
Attachments
Transim WebScope ®MCP600x_Sine.pdf
(110.25 KiB) Downloaded 115 times
Transim WebScope ®MCP627x_Sine.pdf
(109.76 KiB) Downloaded 106 times
Transim WebScope ®MCP624x_Sine.pdf
(109.99 KiB) Downloaded 96 times
Welcome to the friendlier side of internet crazy :)

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Thu Apr 16, 2015 12:38 am

With 1 each of MCP6244-E/SL, MCP6274-E/SL and MCP6004-E/SL, I get this frequency response.
AN_input_freq_response.png
AN_input_freq_response.png (2.86 KiB) Viewed 4890 times
Then set to clip at 200Hz, we get this from all three op-amps
AN_input_clipping.png
AN_input_clipping.png (9.86 KiB) Viewed 4890 times
Finally I measure with 5V on the input with a DMM on the op-amp output, and I measure
MCP6244-E/SL = 4.92V
MCP6274-E/SL = 4.96V
MCP6004-E/SL = 4.92V
Low side on all of these measured around 20mV from the GND rail.

So I proclaim, that we should use the MCP6004 that DaWaN suggested.
Welcome to the friendlier side of internet crazy :)

User avatar
russian
Site Admin
Posts: 9770
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by russian » Thu Apr 16, 2015 12:14 pm

kb1gtt wrote:So I proclaim, that we should use the MCP6004 that DaWaN suggested.
i"ve just placed an order for a bunch of MCP6004-E/SL from Avnet Express (see https://octopart.com/search?q=MCP6004-E%2FSL), once I get those would offer them as an upgrade for existing boards.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Simon
Posts: 3
Joined: Thu Mar 26, 2015 5:14 pm

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by Simon » Thu Apr 16, 2015 4:59 pm

You could also use an opamp connected to a higher voltage.
This would also help with accepting analog signals up to 12V without being clamped in the op amp inputs...

I don't recall having seen 12v analog signal, but i did not get in the details of a lot of sensor ( wideband O2 for example).
I know on my car the cruise control uses a tension divider witch multiple resistor value for each button and i think it is hooked on the 12V.
Edit: Cruise controls signals are analog 0-12v by the manual...

User avatar
russian
Site Admin
Posts: 9770
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by russian » Thu May 14, 2015 5:32 pm

I wonder how much smaller would this module be if we use TSSOP package op-amp and 0603 resistors?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - LMV324IDT

Post by kb1gtt » Fri May 15, 2015 2:29 am

Not much smaller, as the analog stuff is minimal and on the back side of the PCB. The digital stuff which is on the front side it what's taking up the space. To help keep a good noise floor on the analog stuff, I'm using the internal GND plane to help shield and protect against digital coupling.
Welcome to the friendlier side of internet crazy :)

User avatar
RasPL
Posts: 24
Joined: Thu Oct 15, 2015 6:44 pm
Location: Poland

Re: analog inputs: op-amp + divider - Russian - now MCP6004

Post by RasPL » Sat Oct 31, 2015 5:56 pm

Not about op amp or voltage divider but maybe is time to replace all double schotky diodes to some clamping unit like TL7726 (HEX CLAMPING CIRCUIT, SOIC-8) or similar ?

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - now MCP6004

Post by kb1gtt » Sat Oct 31, 2015 9:11 pm

The datasheet I found for the TL7726 seems to be minimal. I think it's a $3 that includes 12 rail clamping diodes. it appears it's providing the same clamping diodes we currently have. That's about $0.50 per channel, purchased in qty's of 6. The BAS70-04FILM we are currently using is less than $0.40 per channel, it's on a per channel basis and being in it's own package allow optimal placement. Catching surges wants to happen close to the harness connector. A single package would likely force you to move the protection farther away from the connector.

I kind of like this suggestion from SuperTek http://ww1.microchip.com/downloads/en/A ... AN-D11.pdf it costs a bit more but offers better protection. I like this approach, as pretty much any device has these rail clamping diodes for ESD purposes. We added larger external clamping diodes to help prevent damage to the smaller diodes that are internal to the op-amp. This suggested protection from Supertek limits the current that would pass through the rail diodes which would prevent them from getting damaged.
Welcome to the friendlier side of internet crazy :)

DaneMarriott
Posts: 1
Joined: Mon Dec 21, 2015 6:18 pm

Re: analog inputs: op-amp + divider - Russian - now MCP6004

Post by DaneMarriott » Mon Dec 21, 2015 6:33 pm

As per my experience you want to analog filter out high frequencies to prevent aliasing and such. If you expect the signals you are looking at to be with-in 0-5V the MCU ADC impedance is generally fine for this kind of circuit.
So the op-amp is not required for things like TPS or MAP, as the input will be high impedance for a 0-5V signal.
Once the clamping diodes activate, the input becomes low impedance and will manipulate the circuit instead of just sniffing the circuit. It appears the op-amp can allow a 30V input signal while using a 5V rail.

Horsty
Posts: 31
Joined: Fri Oct 07, 2016 10:38 am
Location: Cologne / Germany

Re: analog inputs: op-amp + divider - Russian - now MCP6004

Post by Horsty » Tue Feb 28, 2017 12:15 pm

Can I use two BAT41 instead of the double schottky?
Vbr and If seems about right.

http://www.vishay.com/docs/85659/bat41.pdf
Track: Audi Coupé Quattro R5 Bj. '89 | 2.3 Liter | 7A | 170 bhp | Perlwhite L0A9
Daily 2014- : Volkswagen Lupo Bj. '99 | 1,0 Liter | ALL | 50 bhp | Flashred LP3G --> conversion to AEX 1.4 8v 60 bhp --> conversion to AEE 1.6 8v 75 bhp

Rhinoman
contributor
contributor
Posts: 246
Joined: Thu Sep 24, 2015 2:14 pm
Location: Wiltshire, UK
Contact:

Re: stm32f4 MPU module LQFP 208

Post by Rhinoman » Fri Mar 24, 2017 11:43 am

kb1gtt wrote: I'm kind of dream of little boxes that you connect to the analog input sensor or digital outputs all connected with a digital bus, perhaps CAN or optical.
The SENT protocol is designed for interfacing sensors to ECUs.

User avatar
mobyfab
Posts: 138
Joined: Tue Oct 29, 2013 10:09 am
Location: Versailles, France
Soldering skill: yes
Coding skill?: yes

Re: stm32f4 MPU module LQFP 208

Post by mobyfab » Fri Mar 24, 2017 1:56 pm

It's probably simpler to use a LIN Bus :)

xtr0d3m0n
Posts: 10
Joined: Thu Mar 23, 2017 2:07 pm

Re: analog inputs: op-amp + divider - Russian - now MCP6004

Post by xtr0d3m0n » Fri Mar 24, 2017 2:56 pm

I see alot of Opamps for various sensors but is there a way to make them digital? since analog stuff is messy.

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: analog inputs: op-amp + divider - Russian - now MCP6004

Post by kb1gtt » Fri Mar 24, 2017 2:59 pm

About analog, I also agree getting into digital would be nice. However it's an analog world, and the sensors are analog. Some key sensors are the MAP (Mass Air Pressure) sensors, or alternatively the MAF (Mass Air Flow) sensors. These are typically analog sensors. There are some MAF's out there that convert the signal to a PWM, but I think that was only Ford and only for a very limited number engines. About 95% of these OEM sensors are analog.

I'm kind of dream of little boxes that you connect to the analog input sensor or digital outputs all connected with a digital bus, perhaps CAN or optical. However baby steps.
Welcome to the friendlier side of internet crazy :)

Post Reply