Puzzle solved! "rail - rail" op amp buffer; chinese IC's were all junk.

I did the legwork for you guys.

Arduino Uno, test sketch:

void setup() {
  Serial.begin(115200);
  pinMode(6,OUTPUT);
}

void loop() {
  if (Serial.available()) {
    byte newValue=Serial.parseInt();
    analogWrite(6,newValue);
    Serial.print(newValue);
    Serial.print(" -> ");
    Serial.println(OCR0A);
  }
}

Result:

0 -> 0
1 -> 1
2 -> 2
0 -> 2
255 -> 2
254 -> 254
1 -> 1
2 -> 2
1 -> 1
2 -> 2

For analogWrite(1) a pulse with 8 us width is generated, analogWrite(2) generates 12 us pulses. My guess was right :wink:

Update: analogWrite(254) generates 4 us negative pulse. The PWM frequency is 975 Hz - one cycle takes 4*256 us.

Why it works this way is a homework for you, the datasheet will help you. (HINT: OCR0A=0 does not generate a glitch but "normal" pulse with length of 1 timer tick.)

EDIT: this is true only for pins 5 and 6 (see post 140).

johnerrington:
I'll look again at that link @southpark1, thanks

Most welcome John! Nice weblink you had set up too ------ which I forgot to mention earlier. Genuinely appreciating the time and help of those that create and share nice information like that.

I did the legwork for you guys.

Thanks very much for your time and help in testing that out smaj!

My 2462 IC's arrived today from Chips Gate ......... and I decided to do preliminary testing using op-amp #1, with both inputs to op-amp #2 grounded.

I just used the typical non-inverting buffer configuration, with 4.7k feedback resistor. No RC filter. No PWM applied to begin with. Just DC input voltage ...... and using both the oscilloscope and the multimeter to measure the DC input voltage and the DC output voltage. A supply voltage of 5 volt was used to power the IC.

The nice thing is that DC power supply testing (with the input voltage set to values of 0V, 0.5V, 1V, 2V and 5V) was just fine. The output voltage followed the input voltage for all these cases. No problem with linearity here. I took phonepics of the oscilloscope for those tests, as well as a pic of the IC on the breadboard - wired up.

Next, I used a function generator to generate a unipolar PWM waveform, with 1 volt peak amplitude (ie. levels 0 volt and 1 volt) ..... 250 microsecond period, with 50% duty cycle ...... ie. squarewave (125 microsecond pulse duration). I disconnected the adjustable DC supply from the op-amp input, and then connected the PWM source to the op-amp input. No problem with the input and output waveforms on the oscilloscope. I took a phonepic of that as well.

I'll show the pics once I get them off my phone. This IC from Chips Gate is behaving properly. The other package hasn't arrived yet ..... the other set of ICs. I was surprised that these 2462's arrived relatively quickly!

I'll take a close-up pic of the IC too later.

Thats good news Southpark; some good news at this end too, I've been able to order MCP6002, 6022 and 6242 from our local RS components- and even a TLV2462. Arriving about 29 Dec.

Thanks for the update John!

Just uploading some pics now. First are the IC --- the 2642. The extra unused op-amp in the IC have both their inputs grounded. Supply voltage used ------ 5 volt DC.

0 volt input, with 0 volt output. Yellow is input. Blue is output. Voltage scales for both channels are 2 volt per division.

0.5 volt input, with 0.5 volt output. Yellow is input. Blue is output. Voltage scales for both channels are 2 volt per division.

1 volt input, with 1 volt output. Yellow is input. Blue is output. Input yellow channel is 2 volt per division. Output blue channel is 1 volt per division.

5 volt input, with 5 volt output. Yellow is input. Blue is output. Both channels have voltage scale 2 volt per division.

1 volt peak unipolar 4 kHz PWM input, at 50% duty cycle. Input is yellow, output is blue. Input yellow channel is 2 volt per division. Output blue channel is 1 volt per division.

you got a good one! Just out of interest why not try it with the PWM and filter?

I've learned somthing about "rail-rail" op amps - many can not accept an input down to 0V or above Vcc/2.

But the TLV2462 should, according to the data sheet.

tester.png

Nice 'scope BTW. Merry Christmas, its snowing here - you going for a barbie and a stubby on the beach?

tester.png

solarChar.ino (6.78 KB)

Merry Christmas to you too John! It is warm here for sure ! And maybe some thunder storms on the way. All good here hahaha. We had the seafood dinner yesterday (moreton bay bugs, king prawns, freshly oven-cooked turkey, and ham-off-the-bone, plus some salad).

Back to the RC filter ------ I will later help with adding the RC filter. I'll use the same value R and C you used from the first post. Have a nice xmas celebration!

Well I ran tests on my devices from RS components this morning: here are the results.
10 * MCP6002 - £2.52
10 * MCP6242 - £2.75
4 * MCP6022 - £4.00
1* TLV2462 - £2.02

£13 all in for 25 chips. Not bad. All behaving rail-rail as you can see.

GRAPHS:
mVOut, Vfilter, VDUT (=Vout from buffer) in mV plotted against value sent to PWM (x axis).

Conclusion - all 35 of the devices I got from China (in 6 seperate batches, from different suppliers if you believe the info) were not compliant with the spec. (i.e. faulty) and are now consigned to the bin.

@John,
This thread is getting pretty long and by now I have forgotten the following:
Did ANY of the op amps perform correctly ?
Where is the plot for the ones that performed as you would have expected from a good chip ?
What is the part number of the 'good' chips ?
Where do you buy the 'good' chips ?
or
Where there NO good chips from ANY vendor ?
(sorry, my memory isn't good enough to keep track of everything in such a long post)

Hi Robert; no, not a single good one.
Should be a straight line from origin all three exactly overlapping as above.
Part numbers

also see post #1 for one good & some bad.

Supplier - RS components

(schematic - reminder of test setup)

tester.png

tester.png

Thanks for showing those results John.

The 2642 IC's I purchased are from china (from an ebay seller 'Chips Gate' that I probably never purchased from before) - which work nicely.

We have seen cases of those ds18b20 temperature sensors from ebay that turned out to be transistors ------ sold by some ebay sellers in the past. While other ebay sellers sell 'real' (working) ds18b20. So having a list of reliable ebay seller sources, or knowing which sellers are on the 'good' list is handy for sure.

johnerrington:
Conclusion - all 35 of the devices I got from China (in 6 seperate batches, from different suppliers if you believe the info) were not compliant with the spec. (i.e. faulty) and are now consigned to the bin.

Disturbing.

Examining the listings of various "vendors" on eBay & Aliexpress, I for one do not believe there are actually "different suppliers" to any substantial extent. :astonished: I tend to the impression that some nominal vendors are more reputable ("Alice", "czb", "gc_electronics") and almost certainly correspond to the one supplier who actually specialises in electronic parts and has some perception of the quality of their sources.

@John,
So the LMC6482 IS good ?
Which vendor did you get it from ?
But the three in post 129 look like the LMC6482 in post 1 , don't they ?
I'm confused.

Paul__B:
I tend to the impression that some nominal vendors are more reputable ("Alice", "czb", "gc_electronics") and almost certainly correspond to the one supplier who actually specialises in electronic parts and has some perception of the quality of their sources.

True Paul. I found that one seller 'shieldfans' aka 'shields-fans' has been good over the years. But probably doesn't sell op-amps ------ so thanks for mentioning those ones that you mentioned.

@raschemmel

The single LM6482 was one I had bought years back, cant remember from whence it came.

All the cr*p ones look a bit like a TL062 I tested - just for fun - which is very much NOT rail-rail.

@John,
The Digi-key LMC6482 is a TI prt so I assume if you
order it it comes from TI.
(not China)

Good that it works. Digikey is reliable, so is Mouser, TME in poland and others. I try to avoid buying critical components from China or from Ebay. But there are reliable sellers and makers in China, you just can't tell who.

LMI1:
But there are reliable sellers and makers in China, you just can't tell who.

True. That's why word of mouth ------ or typing of keyboard ------ can help, as if we pass around names of ebay sellers that sell the good items, then it at least provides some information for some buyers.