Page 2 of 5

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

Posted: Thu Jan 23, 2014 7:16 pm
by hasse.69
Ok , i thought that Jared was up to some new construction.
I have the resistors but where do i get hold of the op-amps.
Like this?
http://www.aliexpress.com/item/Free-shipping-VNS14NV04-40V-12A-8-SOIC-VNS14NV0-14NV-VNS14N-14NV0-VNS14-14NV04/1570042497.html
I think i will have to do a step by step for us electronically challenged :roll:
//Hasse.

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

Posted: Thu Jan 23, 2014 7:26 pm
by AndreyB
For 0.2 - this one - you would need three quad rail-to-rail op-amps in 14-SOIC package (quad means four channels per chip, not dual as in v 0.1)
The official one would be LMV324ID (LMV324IDR is the same thing)

"Electronically challenged of the world, unite!"

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

Posted: Thu Jan 23, 2014 7:55 pm
by hasse.69
C230 and D230 what is that.
Yes i know they are capacitor and some sort of diod.
But links pliiiiiiiiiiis.
As you can se down here :lol:
I
I
I
I
\/

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

Posted: Thu Jan 23, 2014 8:02 pm
by AndreyB
hasse.69 wrote:C230 and D230 what is that.http://i.imgur.com/v7T4Ps0.png
Image
This picture answers the C230 question and we would need a smarter person to elaborate on D230.
Good thing is that D230 (and other diodes) it is optional, it is just for protection. As long as you promise me not to put +12 on the input pins you should be fine.

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

Posted: Fri Jan 24, 2014 4:02 am
by abecedarian
russian wrote:For 0.2 - this one - you would need three quad rail-to-rail op-amps in 14-SOIC package (quad means four channels per chip, not dual as in v 0.1)
The official one would be LMV324ID (LMV324IDR is the same thing)

"Electronically challenged of the world, unite!"
Any particular advantage to that op-amp as opposed to AD8659?
I mean other than the latter is around $4 in small quantity (AD does offer samples though so one could probably get enough for the board for free), and it can be powered by up to 18v which would alleviate some of Jared's concerns about getting too close to the upper rail and dumping power back to the MCU supply rail.

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

Posted: Sun Jan 26, 2014 2:52 am
by kb1gtt
The LMV324ID was chosen because it's on Seeedstudio's OPL list, as well it's available in many common sources like digikey and is often found in local electronics shops. It's widely available with good enough specs and low cost. That's why it was chosen. I'm sure other op-amps can be used but the pin outs will need to be verified before it can work.

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

Posted: Sun Jan 26, 2014 6:08 am
by abecedarian
My question was more about functional differences than if the fab could install them, since you have mentioned concerns here and elsewhere about using 5v VCC rail-rail ops.
I did check the pin-outs and they were the same; both are 14 lead SOIC.

But I forgot you were using Seeed and their assembly services. Did you ever check in to Elecrow? They can do parts sourcing if needed.

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

Posted: Mon Jan 27, 2014 1:18 am
by kb1gtt
I forget exactly why, but I got shaky in the knee's with http://www.elecrow.com/ I seem to recall they had some complaints on the internet about quality, and I seem to recall they were un-clear about what exactly there part sourcing entailed. For example, it doesn't appear they will put those parts on a PCB, but perhaps it does. I can't tell from here.

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

Posted: Mon Jan 27, 2014 3:52 am
by abecedarian
They had decent reviews by people over on 43oh.com as an alternative to Osh, Seeed and others.

Anyhow, it was just a thought that if they can source any part and assemble boards it might open up some design options. ;)

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

Posted: Wed Jan 29, 2014 3:47 pm
by AndreyB
Digikey BOM added to the top post

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

Posted: Sun Mar 16, 2014 11:06 pm
by kb1gtt
Digikey BOM updated to correct buggered diodes. Digikey BOM found here https://www.digikey.com/classic/RegisteredUser/BOMBillOfMaterials.aspx?path=1&exist=1&id=1504225 replacement diode is BAS70-04FILM

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

Posted: Wed Apr 02, 2014 3:03 pm
by AndreyB
Q: What is the purpose of the OP AMPs on this board?

A: two reasons:
1) op-amp isolates the voltage divider from the input circuitry - this way we are not affecting whatever is going on in the input wire, this means we can attach this input board in a slave mode with the original ECU still on while we want to just sniff what's going on. This case we are not using the pull-up or pull-down resistors, we are just following and divinding the input voltage.
2) extra protection for the MCU ADC

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

Posted: Wed Apr 02, 2014 4:30 pm
by AndreyB
Ops:
We have an issue with the schematics: op-amp channel #3 pinout is wrong:
Image
but we have
Image
and this is wrong:
Image

This affects the 'Adc Amp 12ch rev 0.2' module, but this DOES NOT affect Frankenstein because on Frankenstein apparently the board does not follow the schematics:
Image

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

Posted: Fri Apr 04, 2014 2:22 pm
by mobyfab
Why did you put the divider after the opamp ?

The higher output resistance might affect the ADC. (but no much)

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

Posted: Fri Apr 04, 2014 2:23 pm
by AndreyB
mobyfab wrote:Why did you put the divider after the op-amp?
So that I can use this schematic to sniff wires while the stock ECU is running the engine.

These resistor values should be fine four stm32 ADC.

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

Posted: Fri Apr 04, 2014 2:47 pm
by mobyfab
I see :)

Yeah the ADC has 1kohm/8pF input so it should not affect it too much.

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

Posted: Wed May 14, 2014 12:56 am
by UnaClocker
Why use op amps at all? Just adds more cost to the BOM and more complexity to the build of the board. More components to fail (as you've already experienced). You can simply use voltage dividers. ECM's all over the world have had 5v CPU's for decades, and 12v electrical systems, they simply use a voltage divider to get the 12v down to 5v. You can do the same thing to get down inside the 3.3v range. Even with 0-5v signals coming in like the TPS (if you can't just run the TPS off 3.3v) or a wideband O2 sensor (you can recalibrate some of them to give a 0-3.3v signal).
That's about the only signals that you're going to get that are over 3.3v, everything else is based off the reference voltage you feed to it (coolant/air temp sensors, crank sensors (which would come in as digital anyways), etc)..
edit: also, as for protecting the MCU, just put a 10k inline between the voltage divider and the MCU, it'll prevent enough current from flowing to damage the chip.

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

Posted: Wed May 14, 2014 1:07 am
by AndreyB

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

Posted: Wed May 14, 2014 1:15 am
by UnaClocker
Yeah, I only read page 1, didn't notice the extra pages before replying. Fair enough.

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

Posted: Thu Nov 27, 2014 2:43 am
by AndreyB
Question about the rail-to-railness of out op-amps.

Supply voltage is 4.5v (board powered via USB), input is a 10K pull-up - to the same 4.5v
What is the expected op-amp output? Because I am getting 3.9v, is that expected, or is it supposed to be higher? Wonder if the cheap op-amps do not perform well or if that's in my head.

The datasheet is @ http://www.ti.com/lit/ds/symlink/lmv324.pdf but after 120 seconds of reading I cannot produce the answer.

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

Posted: Thu Nov 27, 2014 1:03 pm
by kb1gtt
Is that op-amp input, or harness input that you are measuring the input voltage? Also per figure 23, the positive rail should be off by only 10mV so you are far worse than the expected.

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

Posted: Thu Nov 27, 2014 1:58 pm
by AndreyB
I've just tried the same with original Texas Instrument chip and I get more or less the same results: 4.5v input gives 4.0 output. Why?

I am testing this on pull-up channels, so I have a disconnected board permanently powered up from USB @ 4.5v and I check voltages right on op-amp pads: pads #5 & #10 are where I measure input voltage and pads #6 and #9 are where I measure output voltage.

Jared, you have a Frankenstein board. Can you check the same on one of the channels with a pull-up resistor?

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

Posted: Thu Nov 27, 2014 5:13 pm
by DaWaN
kb1gtt wrote:Is that op-amp input, or harness input that you are measuring the input voltage? Also per figure 23, the positive rail should be off by only 10mV so you are far worse than the expected.
Not entirely true: because these inputs have to source about 1.5mA due to the resistor divider you can see a drop of up to 50mV, but 500mV seems a bit extreme.. Not sure what is going on.
Russian: can you measure the total resistance to ground of an unpowered board at pads #6 and #9 ? It should be around 3kOhms, but if it is less it explains at least the behavior of the op-amp.
Where did you source the opamp ? any chance of getting a fake or something like a LM324 ?

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

Posted: Thu Nov 27, 2014 5:31 pm
by AndreyB
DaWaN wrote: Russian: can you measure the total resistance to ground of an unpowered board at pads #6 and #9 ? It should be around 3kOhms, but if it is less it explains at least the behavior of the op-amp.
Where did you source the opamp ? any chance of getting a fake or something like a LM324 ?
Just measured and confirm #6<>GND and #9<>GND are both 3KOhm, these are outputs going into the x2 1.5K voltage divider so that's as expected I guess.

I have chips from two different sources: from a reputable digikey and from a pretty random eBay seller (at least the seller is from US)

Both chips show LMV324I label. It's a bit interesting that the TI logo is slightly different between the chips - on one the whole Texas outline is filled zone, on another one part of Texas is left unfilled. Weird that the logo does not match between different sources... But neither show 4.5 output and both show comparable 0.5v / 0.6v offset.

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

Posted: Thu Nov 27, 2014 5:47 pm
by puff
etch it with acid, then use a microscope to check if its counterfeit… :D
but at least it's good to know that inputs and outputs of the opamp should have similar values.

may be your voltmeter is too cheapo and has low impedance? :?:

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

Posted: Thu Nov 27, 2014 8:22 pm
by DaWaN
Do you have an oscilloscope ?
Although unlikely it might be a problem with the opamp oscillating, some opamps are not "unity-gain stable".
I expect the LMV324 to be unity-gain stable: the old National semiconductor datasheet says this:
The LMV321/358/324 can directly drive 200pF in unity-gain without oscillation.
If you have an oscilloscope it might not hurt to check.

Another check: do you have the unused inputs of the opamp connected to a fixed voltage ? Keeping unused inputs floating can also cause erratic behavior of the opamp. No other outputs connected to a lower impedance to ground than 3Kohms ?

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

Posted: Thu Nov 27, 2014 8:37 pm
by AndreyB
DaWaN wrote:If you have an oscilloscope it might not hurt to check.

Another check: do you have the unused inputs of the opamp connected to a fixed voltage ? Keeping unused inputs floating can also cause erratic behavior of the opamp. No other outputs connected to a lower impedance to ground than 3Kohms ?
oscilloscope shows a boring straight line

all outputs are 3Kohm dividers. Two inputs are 500K pull-downs (these outputs show 0v), two outputs are 2.7K pull-ups - these two both show the same ~4.0v outout (0.5 below power supply which is 4.5v in case of my desktop USB for whatever reason)

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.

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

Posted: Thu Nov 27, 2014 9:14 pm
by puff
didn't get that thing about dividers on all and pull-ups on the two. any chance to see that piece of scheme? what else you expect to see with those pull-ups?

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

Posted: Thu Nov 27, 2014 9:19 pm
by AndreyB
puff wrote:didn't get that thing about dividers on all and pull-ups on the two. any chance to see that piece of scheme? what else you expect to see with those pull-ups?
LMV324IDT has four channels. The question was if any of the channels were not soldered/floating. dividers are on the output and pull-ups/pull-downs are on the inputs.

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

Posted: Thu Nov 27, 2014 9:40 pm
by puff
got it. you measured that 0.6v offset with dividers in place? could it be so that the divider is 'stronger' than the maximum output current of LMV324? have you tried measuring output without divider? or changing divider for, say, 10K?