1

I have basic electronics knowledge. I have a chemical sensor that reads 0.0mV when our sample is not present in the sample cell and about 10-20 mV when it is present. We are trying to optimize reaction time for the measurement of glucose and require a timer. Once the sample is detected in the cell, a timer will start and after a set time, the instrument that actually measures glucose will begin the measurement process. I am using a timed relay module that works well for my application; however, it cannot respond to the 0.0 - 20 mV change. Using a separate power supply, I found that the timer/relay responds when it senses a voltage starting in the hundreds of mVs. Below is a flow diagram of the process; the missing piece is the box in red.

enter image description here

Below is an attempt at what I have tried, but now I can see after comments that my understanding of electronics is worse than I thought.

I am trying to build a very basic op-amp circuit that will output 0.0 mV for a 0.0 mV input and a reading in the higher 100's of mV to low V when approximately 10 mV is applied.

In the 100-gain ballpark, a specific number is not required for my application.

I have a JRC 4558 that I have been trying to get to work using one of the op-amps of this dual op-amp chip.

enter image description here

I am trying to create this basic non-inverting circuit (numbers in red are the IC pin numbers):

schematic

simulate this circuit – Schematic created using CircuitLab

The circuit power is 5.81 V at pins 4(-Vs) and 8(+Vs)

I tried two set-ups, both having R2 = 7 kohms. And the results I got are here, trying two different R1 resistances:

enter image description here

I tried both op-amps and I am getting the same type data. Not sure why a voltage is measured at Vout even thought no Vin applied.

enter image description here

https://www.rcscomponents.kiev.ua/datasheets/jrc45584i743ncft874nfdt34ufguygf43.pdf

enter image description here

enter image description here

cucumber
  • 79
  • 3
  • The power supply is 5.81 vDC. The neg is connected to pin 4 and positive to pin 8. – cucumber Aug 31 '23 at 19:57
  • 6
    The 4558 is an ancient design and little better than a 741. It's certainly not capable of rail to rail operation like you're trying to do. And the minimum recommended supply voltage is +/- 5V. – Finbarr Aug 31 '23 at 20:06
  • Please link the data sheet for the device and state the power supply rails you want to use. – Andy aka Aug 31 '23 at 20:07
  • Is the red wire supplying the power actually the negative? And the black the positive? There are other problems, of course. – Spehro Pefhany Aug 31 '23 at 20:21
  • I am open to any direction you feel fit to guide me. I don't have any limitations on anything in this circuit except: Voutput 0.0 mV @ 0.0 mV Vinput, and Vout in the higher 100s mV to low V when Vinput is approximately 10 mV. My power supply goes from 3 V to 12 V. Thanks! I have the datasheet now linked at the end of the posting. – cucumber Aug 31 '23 at 20:26
  • that is correct the red wire supplying the negative and the black the positive. – cucumber Aug 31 '23 at 20:27
  • Does this answer your question? Non-inverting op-amp output problem – Finbarr Aug 31 '23 at 20:33
  • 4
    @cucumber You should get in the habit of always having red for the positive supply and black for ground. There is nothing to be gained from doing things different from the rest of the world if you intend to keep talking with the rest of the world. That being said, the 4558 will only work with signal and output voltages a few volts away from its positive and negative power supply. If you want to work without a negative power supply, you need an opamp that is rail-to-rail at least for the lower power rail. The 4558 isn't. – user107063 Aug 31 '23 at 20:49
  • 3
    Note that "+/- 5V" does not mean "approximately 5V". It means "+5V and -5V" - in other words, 10V from end-to-end, with a 0V ground reference in the middle. – brhans Aug 31 '23 at 22:05
  • Can you recommend a more suitable op-amp for this application and how would I connect a simple wall power adapter to supply this circuit or is that not possible? – cucumber Aug 31 '23 at 22:39
  • 2
    The unfiltered output of a wall-socketed mains PSU will have far too high noise on its DC output for what you're talking about, detecting signals down to 0..10 mV. I'm afraid such a basic oversight suggests you're new to all this, so it'd be best to go back to the start and make sure of what you're doing and why. Avoids finding later it was an X-Y problem. Please edit your question (don't post new info in comments) and add a well-detailed explanation of what you're actually trying to make and why. Thanks. – TonyM Sep 01 '23 at 09:42
  • 1
    Please include a datasheet for the sensor. Some sensors (eg. pH) have very high output impedance that may impose requirements on the amplifier design. – Spehro Pefhany Sep 01 '23 at 13:52
  • The sensor characteristics are not readily available. This sensor is pulled from a glucometer. It consists of 4 electrodes; two are used to detect the presence of the sample, and that small mV occurs when a buffer solution is present. Glucose is in the buffer, The other electrodes are for measuring the amount of glucose. – cucumber Sep 01 '23 at 14:04
  • You can look here for possible ways to make a dual supply to properly power the op-amps. You will also want to learn more about the part you pulled from the glucometer. Is it just the cell? Is there a current source and potentiostat? – eigenzero Sep 01 '23 at 20:35
  • 1
    What is the source impedance of that 20mV signal? Is that a direct electrochemical cell output? If so, you'll have to buffer it with an electrometer amplifier, just like you would for a pH sensor. An electrometer amplifier has negligible input current, and won't load the cell - it shouldn't. Most electrochemical sensor cells do not like it when any current flows through them - often their life-time charge is limited, so once the integrated current amounts to that amount of charge, the sensor is not accurate enough anymore. – Kuba hasn't forgotten Monica Sep 01 '23 at 21:22
  • On the other hand, the sensors are single-use, so there isn't much life we expect of them anyway. They are not like long-lived pH probes and such. – Kuba hasn't forgotten Monica Sep 01 '23 at 22:05
  • I don't know if this answers these questions, but the sample sensing portion uses a reference electrode (that is used for both the sample sensing and glucose electrochemical measurement) and an independent other electrode. From what I have gathered the electrode material is carbon-based. The measurement is a direct voltage measurement. Running pure water through there is no registered voltage (as we would expect), and when we run our sample that contains the sample buffer we get the ~20mV reading. – cucumber Sep 01 '23 at 22:20

1 Answers1

1

Below is a flow diagram of the process; the missing piece is the box in red

... that's otherwise known as an X-Y problem. As you'll soon see, that's only a missing piece if you have a very particular solution in mind. Other solutions exist and may be easier to implement (!).


If that cell can accommodate the input current of an LM397 - about 1nA - then all you need is that one comparator really, and a voltage reference. The whole circuit can be adapted to run from any supply between 6V and 24V, but as shown below it'll work from 12V to 24V, with an adjustment to R3 as further described.

It operates from a single supply, and the supply doesn't need to be terribly well regulated.

Whoever provides the cell should specify what is the maximum output current that it can provide without degradation/shortening life span below the datasheet spec. So you should know whether 1nA is OK or not. If a lower input current is desired, there are more modern R-R (rail-to-rail) input CMOS comparators that have input current orders of magnitude lower.

Something like the following would work, and costs <$10 excluding the PCB/breadboard.

schematic

simulate this circuit – Schematic created using CircuitLab

The "TL431 MODEL" and "LM397...MODEL" are simulation equivalents of TL431 and LM397/393 chips, respectively. CircuitLab doesn't have TL431 nor LM397 device built-in, so I had to make them from existing devices in the simulator. In a physical circuit use the actual TL431 and LM397 chips in place of the models.

The circuit works as follows:

R3-C1 is the low-pass power supply filter. C2 filters the incoming supply voltage.

R1-R2 provide feedback to the TL431 shunt voltage regulator. It generates a clean 8.0V supply and reference for the rest of the circuit.

R4-R6 are a threshold voltage divider, and provide between 10-30mV reference to the comparator - depending on the setting of R6. The comparator compares the threshold to the cell voltage, and generates an output voltage that swings between the 12V supply and ground.

The comparators shown are sensitive enough that there's no need to amplify the signal prior to comparing it to a threshold voltage. The comparators won't be particularly fast, and will react in say less than 1ms - that should be plenty fast for the application you have. Amplification would be needed if you wanted the comparators to react much faster than that, say in 10μs - but I doubt there's any need for that in your application.

The supply voltage can be between 12V and 24V. R3 should be 1kΩ for 12V supply, 2.2kΩ at 24V supply, and some value between for supplies between these two limits. Its value doesn't need to be precise - 20% accuracy will do. For supplies above 12V, R3 should be a 0.5W part, or two 1/2 value resistors in series. E.g. for 24V, R3 could be 1kΩ + 1kΩ in series. R3 is expected to be warm/hot to touch.

LM397 is just one device from a large family of comparators that come in single, double and quadruple packages. Any one of the following can be used. In case of multi-device packages, connect unused comparator inputs to GND. The following chips carry the basic "LM397" comparator inside, in various quantities:

  • LM397 - x1
  • LM393, LM2903 - x2
  • LM339, LM2901 - x4

Any of the chips above will work - it really is the same comparator circuit in single, dual and quad packages. Choose whatever is the cheapest. If you're going for elegance, then LM397 is what you actually need as it doesn't have any extra comparators that would sit unused. But nobody really cares much - those are so-called jellybean parts, widely available, and all equivalent.


Add a 555-based timer to this circuit, and you got yourself a complete, dirt-cheap solution, without need for external timers. Even adding a 555 the whole thing would still be well under $20 for parts, quantity 1.

  • WOW! This is spectacular. Thank you very much for your time and effort! I will order the parts now! – cucumber Sep 02 '23 at 02:57
  • I Assembled the circuit. I am getting 180 mV output with no input and no change when I apply the 20 mV. Could only find the surface-mounted LM397 from Digikey. I realize this is not an ideal solder but the connections are solid to the terminals, and no shorts between terminals. I did recheck all my connections. I will be ordering a surface mount-to-pin board. I am using a 24 Vdc supply and I can confirm the voltage divider is providing +12V. Once I connect this to the rail, the voltage across the rail is +2.49 V. I added images to this post. May I have assistance troubleshooting? – cucumber Sep 12 '23 at 00:41