strawlab / Miriam

Miriam is an open-source isothermal reaction instrument featuring realtime fluorescence readout in a 96-well plate format
Other
8 stars 3 forks source link

redesign photodiode circuit for high sensitivity and low noise #6

Open astraw opened 3 years ago

astraw commented 3 years ago

Miriam was designed to be simple and inexpensive. As far as this affects the photodiode circuit, we could investigate several things to achieve higher sensitivity and lower noise:

All of these would presumably increase complexity and cost, but may make the device useful for experiments with no amplification step such as fluorescence hybridization.

astraw commented 3 years ago

This is distinct from #1 which discusses software changes to the existing Miriam design to achieve better signal to noise. Here we discuss a new hardware circuit design.

astraw commented 3 years ago

As a followup, upon testing with other biochemistry, this seems to be a high priority issue.

The first thing to investigate is if a reverse bias transimpedance amplifier design would solve things. This should increase low-luminance abilities. This shouldn't add too much to the cost and is quite standard for photodiode amplifiers.

ryanfobel commented 3 years ago

Have you looked at the TI OPT101? It's a monolithic photodiode/transimpedance amplifier for ~$20. Do you have any details on the performance of your current detector and/or what requirements you need?

scientistnobee commented 3 years ago

I would suggest TSL257 which is a high-sensitivity low-noise light-to-voltage optical converter that combines a photodiode and a transimpedance amplifier on a single monolithic CMOS integrated circuit. This is cheaper than than OPT101. Challenge is getting them in good quantity. RS stocks them regularly. I have a contact in AMS and will ask them if they have a replacement for this part.

https://ie.rs-online.com/web/p/photodetector-amplifiers/6424430/

scientistnobee commented 3 years ago

If we have to go with i2c, I think Si114x range of sensors are cheap and widely used in the wearable devices. We tested this sensor extensively for measuring bacterial growth monitoring, you can see here: https://pubs.acs.org/doi/10.1021/acs.analchem.9b02628

But the issue is that how to talk to 96 of these i2c sensors. We need to use i2c multiplexers. If there are electronic engineers here who can do that, I would go with Si114x sensors.

astraw commented 3 years ago

To avoid a substantial redesign, any revisions should not modify the spacing between the PCBs or the positioning (and angle) of the photodiodes. Your suggestions look very interesting but I think they would require a new design. Given all the thermal work we've done, I'd hate to start over and, practically speaking, would be infeasible for us.

After some thought just now, perhaps a bigger win than updating the circuit layout itself is to upgrade the opamp. Currently the design uses the ST LMV324LIDT opamps. According to the datasheet, these have a typical 27 nA and maximum 60 nA input bias current. (For comparison, our photodiode - the Vishay TEMD6200FX01 - has a range of roughly 4-3000 nA as listed its datasheet.) Given that the opamp input bias current is in the range of the photodiode current, I think the dynamic range of Miriam could be limited by this.

After doing a bit of research into other potential opamps just now, I see other inexpensive opamps have much lower input bias. The TI LMV324AQDRQ1 has a 10 pA input bias current, so 3 orders of magnitude less. It actually seems to cost even a bit less than the opamp we are currently using and it has the same footprint. I think we'll have to order some of these and see how this changes the performance.

ryanfobel commented 3 years ago

That makes sense. Thanks for providing these additional details. The reason I recommended trying a monolithic/integrated sensor is that from my understanding, a major factor that often limits the sensitivity/performance of these types of detectors is PCB layout. Of course choosing a more performant op-amp might help, but if your PCB layout non-optimal, it might not buy you much. I have a friend who has done lots of work with these types of circuits before. I'll reach out to see if he might be willing to review.

astraw commented 3 years ago

Getting someone with experience at transimpedance amplifier design to have a look would be wonderful. If he has any questions or would like to chat to get quickly up to speed, I'm happy to assist.

scientistnobee commented 3 years ago

Hi @astraw, I think the better approach is to use some design which is already validated. Designing a circuit for photodiodes is not trivial and there are many factors other than the Op-AMP. For example, the Pulsesensor team has done a wonderful job of documenting their journey on how to chose the better om-amp and other circuit around it. May be it is easy to take their sensor and test it with your circuit. It will be a faster than doing entire circuit board.

https://pulsesensor.com/pages/open-hardware?_pos=3&_sid=daeb4edd5&_ss=r https://pulsesensor.com/blogs/news/6326816-anatomy-of-the-diy-heart-rate-monitor

Also, I highly recommend the following video which explains the anatomy of designing tranimpedance amplifier. https://www.youtube.com/watch?v=FtdJ4e973bk

I am not an expert in these by any means, but I am happy to help where I can.

astraw commented 3 years ago

The Avago APDS-9008 sensor used by Pulsesensor as described in your link is interesting because it integrates an amplifier and detector in a package about the size of our detector alone. However, using it would require revising the sensor PCB. This would be worth evaluating but realistically it will be faster for us to order a few opamps and test them rather than start with a new board revision.

mkdryden commented 3 years ago

@ryanfobel pointed me to this project and this issue specifically. I am the designer of the DStat potentiostat and also have a fair bit of experience in making transimpedance circuits for photodiodes as well. I have only taken a glance at the project, so I'm not super familiar with exactly how everything works but I am happy to help if I can.

Just to give some thoughts on some of the points raised above:

astraw commented 3 years ago

Thank you so much for this input @mkdryden! This is extremely helpful with several highly relevant ideas. The biggest problem we have now is the limited dynamic range and we care primarily about DC and low frequencies. So your note about the input common mode voltage range and output swing points us in a seemingly relevant direction. Now, in addition to our plan of investigating reduced opamp bias current, we will also look into opamp common mode and output voltage and especially to consider adding bias to the non-inverting input. Although it would change the circuit, it is possible that adding a bias to the non-inverting inputs could be squeezed into the existing layout with only minor changes.

For my own future reference, I found a relevant training document from TI about op amp input and output limitations which goes into some detail.

Indeed we are using the onboard ADC of the Arduino but ADC resolution or noise is not limiting at this point - perhaps once we improve the analog side upgrading the ADC will then be an easy win.

We do have quite some variation across the 96 sensors in the board and indeed can compensate this to a large degree digitally -- as long as we do not exceed the dynamic range of the individual sensors. (Which is another reason why the dynamic range is so important.) Can you suggest any thing we may consider to increase homogeneity across the board? Or do you think a calibration procedure for each device is likely going to be something we have to live with?

Finally, especially given the capability to do melting curves in which fluorescence intensity is measured as temperature is swept up to 90 degrees C, do you have any practical tips for keeping measurements linear and homogeneous in the face of varying temperature?

Many thanks once again.

beorostica commented 3 years ago

Just to share my experience designing a transimpedance amplifier for the project: https://github.com/beorostica/portable_dna_amplifier_detector

This is the schematic (where I also show the components that I used):

Capture

This is the most basic transimpedance amplifier with a very high gain 10M resistor (a 15pF feedback capacitor which according to Bob Pease https://www.electronicdesign.com/technologies/analog/article/21801223/whats-all-this-transimpedance-amplifier-stuff-anyhow-part-1, the larger the less unstable but slower transient response), a very low frequency 1rst order RC low-pass-filter (which I had to add because a I had 50Hz grid noise at the opam output, the time response was not a problem since I am sampling every 5 seconds) and a ADS1015 12 bit module for converting from analog to I2C (possible useful for future project with a raspberry-pi).

And the circuit layout is quite awful because during the pandemic a didn't have access to the university facilities, however all the connections were as short as possible, the decoupling capacitor very close to the opam and long traces (wires in my case) just for power supply:

Layout

The circuit works OK for our needs, sensitivity was not a problem nor the noise (however we have to always deal with DC offset 'perturbance'). Here are some results:

ADC

I think it's important to point out that the BPW21R photodiodes are quite expensive (~10USD) and wide (9.2mm). This could not be allowed for your project.

From the schematic of your project: image I don't see any feedback capacitor (@mkdryden mention some insights about it), maybe this solve noise issues. Also I would make sure that in the PCB the photodiodes are placed as close as possible to the opam (I did some experiments in protoboard and the distance makes a huge difference). I think that a good start point for more theory and practice about this transimpedance amplifier circuit is the Bob Pease article I already mention and the insights of @mkdryden (thanks @mkdryden !).

mkdryden commented 3 years ago

@astraw As far as consistency between channels goes, beyond mechanical/optical things (e.g., the photodiodes not all being mounted the same with respect to the samples), there are a few things that might help. Picking good tolerance parts for the components that are in the signal chain is important (e.g., the feedback resistors should be 0.5 or 1%). Unfortunately, the photodiode doesn't specify a distribution of sensitivity with the min-max on the datasheet, so it's hard to say how much variation there is between the photodiodes themselves, though the figure on the datasheet suggests that some parts are more than twice as sensitive as the typical: image

I had a bit of a look through different small surface mount photodiodes and none of them are available in binned versions or have much information about sensitivity distribution, so if inter-diode variation is a problem, digital calibration may be unavoidable, though since they're not too expensive in large quantities, building some kind of fixture to test them and eliminate diodes that are too far out of range might be possible (though their small size might make it a bit annoying). Alternatively, you can just test the whole board after assembly and replace them by hand after the fact.

As far as temperature goes, it will do a few things: increase the dark current of the photodiodes (though operating at zero bias will reduce the impact) ~double for every 10 C, image

increase the noise from several components (the feedback resistor, opamp, etc.), and change the value of the feedback resistor (though even a relatively poor temperature coefficient of 400 ppm/C will only cause a 2% change in gain over 50 C) and the photodiode sensitivity. If necessary, the gain change can be calibrated out with the reading from a temperature sensor. If the temperature is consistent between the components, I suspect the effects on the signals will be similar between channels.

As for @beorostica 's comments: The stability of the amplifier circuit will depend on the exact opamp, but I suspect the stray capacitance from the feedback resistor is sufficient to maintain stability with a resistance of 3.9 MOhm, but it is a good idea to limit the bandwidth as much as is practical for the application, as you suggest.

It may or may not be suitable in this case, but the solution for dealing with 50/60 Hz line noise and maintain a large dynamic range I use in the DStat is to use a 24-bit delta sigma ADC. When a measurement frequency that is a divisor of the line frequency is selected, there is a null in the frequency response at multiples of that frequency, eliminating the line noise, and changing the measurement frequency can be used to trade off time response and noise level. The high resolution allows measuring small signals that would otherwise be restricted by a low-resolution ADC, without using an excessively large gain resistor, preserving the ability to measure large signals as well (though how well this works depends on how low the noise level can be brought down, but in the DStat, it extends the dynamic range by over 3 orders of magnitude versus a 10-bit ADC).

And yes, it is essential to keep the connection between the photodiode and the amplifier input as short as possible to reduce noise coupling from external sources and in very sensitive systems, it is a good idea to employ guard traces to prevent leakage into the high impedance parts of the signal pathway (basically everything connected to the inverting input).

astraw commented 3 years ago

As an update (we're not done testing yet), the TI LMV324AQDRQ1 gives lower voltage in the dark and higher gain than the original opamp we have been using. These are good signs and we now plan to do more extensive testing with this opamp. It seems quite possible that this relatively simple change - not requiring actually any PCB changes but only changing a couple components (also potentially the feedback resistor) with the same footprints - will enable a dynamic range that I am happy with.

astraw commented 3 years ago

The TI LMV324AQDRQ1 is performing much, much, better. It is unequivocal. We can read much lower levels now, even with lower valued feedback resistors and therefore lower gain.

We are now fine tuning the feedback resistor selection (30 MOhm seems roughly correct and we are fine-tuning from there) and will move towards a hardware release we are happy with. Unfortunately high precision resistors for our parameter range seem quite expensive or unavailable, but perhaps 5% variation in feedback gain is something we can live with or, if not, calibrate out digitally at a later step.

Since the new op-amp requires a much lower input bias current, orders of magnitude lower than the old op-amp, I think this is reason for the improved low-light performance. (See https://github.com/strawlab/Miriam/issues/6#issuecomment-863532108 for the numbers.) My theory is that our photodiode produces only a few nA at low light levels and, with the old op-amp, this light-sensitive current is dwarfed by the feedback current and thus the light-dependent part is lost.

The other issues and possibilities in this thread don't make sense to me as possible explanations.

I think the next step we could take would be to bias the non-inverting input slightly above ground with a voltage divider as suggested by @mkdryden. However, this would require a (small) PCB redesign. For now we are going to leave this but could revisit in the future.

We will focus now on tuning and scaling up testing with the new opamp.