Nice little Milliohm Meter over at Circuit Cellar - Page 1
Forum section: electronics / general

author: MisterDiodes
author_rank: Frequent Contributor
timestamp: September 06, 2016, 10:36:58 pm
content: For those of you who you haven't seen it yet, there is a nice DIY milliohm meter article in the Sept 2016 issue Circuit Cellar. Worst case error budget is around ~0.5%, which really isn't too bad for an inexpensive milliohm meter. Accuracy drops off at the low end of range, as is usual - but at a few mOhm's it becomes difficult to attach leads to just about anything for a repeatable measure.My suggestion when using this circuit on lowest end of range is to add a known accurate 50 or 100 mOhm into your circuit and then take your measure from that known offset.Handy for tracing out shorts and bad bypass caps too.Code:http://circuitcellar.com/cc-blog/build-an-accurate-milliohm-meter/

author: Vgkid
author_rank: Super Contributor
timestamp: September 06, 2016, 10:54:45 pm
content: Thanks for that link, I will look into it tonight.

author: EmmanuelFaure
author_rank: Regular Contributor
timestamp: September 08, 2016, 09:30:43 pm
content: Very nice. The idea of driving the "force" leads by sharing current between several IOs is clever.It might be built with a greater accuracy ADC (MCP3553, LTC2440...), requiring only some minor adjustments in software, to achieve even lower noise.

author: casinada
author_rank: Frequent Contributor
timestamp: September 30, 2016, 05:35:18 am
content: http://www.barbouri.com/2016/05/27/milliohm-meter/

author: VintageNut
author_rank: Frequent Contributor
timestamp: September 30, 2016, 12:47:34 pm
content: Offset compensation? If not, source(s) of error are large when measuring low ohms.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 30, 2016, 01:42:08 pm
content: They are using 4 wire measurement and test current of both polarity: so there should be not much problem with offsets. The circuit has other problems:1) it may burn small resistors, as it might provide up to about 80 mA to a 30 Ohms resistor, thus close to 200 mW worst case. Good software or 2 additional diodes could ease on this.2) The ADC and µC have little ESD protection

author: RoGeorge
author_rank: Super Contributor
timestamp: September 30, 2016, 02:18:44 pm
content: It reminds me of a µOhm-meter Application Note from Analog Devices:http://www.analog.com/media/en/technical-documentation/application-notes/AN-306.pdf

author: Kleinstein
author_rank: Super Contributor
timestamp: September 30, 2016, 03:18:18 pm
content: There is some similarity in using both polarities, but the µC version uses a bipolar ADC and does demodulation in software, that is just measure the difference for both polarities. The main trick of the circuit is to have the essentials (switchable amplification and differential input) inside the ADC chip.Details depend a little on the software, in how to compensate for slightly different currents in both polarities and how to wait for settling of the RC filters and maybe thermal drift of the driver side. The short description notes using each polarity only once. For better drift compensation it should be better to do at least 3 parts, like positive, negative and than positive again. Using only a few of the drivers might also save low power resistors in the 30 Ohms range from to much current.

author: mycroft
author_rank: Regular Contributor
timestamp: October 01, 2016, 02:59:00 pm
content: There is also a milliohmmeter by the late Jim Williams athttp://cds.linear.com/docs/en/application-note/an98f.pdfpages 10 and 11.

author: mycroft
author_rank: Regular Contributor
timestamp: October 03, 2016, 04:17:27 pm
content: I found an older thread on this interesting subject: A mcu-based milliohm meterhttps://www.eevblog.com/forum/projects/a-mcu-based-milliohm-meter/using simple resistors and a MCU.

author: Dr.Krieger
author_rank: Contributor
timestamp: June 16, 2022, 08:13:43 am
content: Quote from: MisterDiodes on September 06, 2016, 10:36:58 pmDoes anyone have the code from the original article?There is slightly modified version of itherebut i can't find the original Circuit Cellar code anywhere...

author: kripton2035
author_rank: Super Contributor
timestamp: June 16, 2022, 09:47:59 am
content: Quote>Does anyone have the code from the original article?this should be the one attached.

author: Dr.Krieger
author_rank: Contributor
timestamp: June 16, 2022, 11:35:40 am
content: Quote from: kripton2035 on June 16, 2022, 09:47:59 amThank you sir, although I'm not 100% sure this is the one, the battery voltage measurement seems to be for the original 9V but the Arduino pins used in the code are not the same with the ones shown on the original schematic:Code:// ---------------------------------------------------------------------------------------------// I/O port usage// ---------------------------------------------------------------------------------------------// serial port (debug and s/w download) 0, 1// I2C interface to ADC & display 2, 3// positive drive 4, 5, 6, 7// push to test input 8// unused 9, 10, 11, 12, 13// negative drive A0, A1, A2, A3// battery voltage monitor A4// debug output A5

author: kripton2035
author_rank: Super Contributor
timestamp: June 16, 2022, 06:04:29 pm
content: I downloaded the article AND the source code that was with it at that time (some years ago)so I'm pretty sure it is the one that was with itthen I took from it the omega symbol and made the shorty-with-display projecthttp://kripton2035.free.fr/Projects/shorty-display.html

author: Dr.Krieger
author_rank: Contributor
timestamp: June 16, 2022, 11:56:27 pm
content: Quote from: kripton2035 on June 16, 2022, 06:04:29 pmI think you are right and that is the original code, although the Arduino pins in the code are different from the ones used in the circuit pic.Schematic shows pins D2,3,4,5 for Positive Drive and D6,7,8,9 for Negative Drive, A3 to measure the battery etc, but original code uses D4,5,6,7 for Positive Drive, Analog pins A0,1,2,3 for Negative Drive and A4 for battery voltage.Code:// ---------------------------------------------------------------------------------------------// I/O port usage// ---------------------------------------------------------------------------------------------// serial port (debug and s/w download) 0, 1// I2C interface to ADC & display 2, 3// positive drive 4, 5, 6, 7// push to test input 8// unused 9, 10, 11, 12, 13// negative drive A0, A1, A2, A3// battery voltage monitor A4// debug output A5Code:// Drive functions// - ports 4-7 and A0-A3 are used to differentially drive resistor under test// - the ports are resistively summed to increase current capability// - DriveOff() disables the drive, setting the bits to input// - DriveOn() enables the drive, setting the bits to output// - DriveP() enables drive with positive current flow (from ports 4-7 to ports A0-A3)// - DriveN() enables drive with negative current flow// ---------------------------------------------------------------------------------------------void DriveP(){DriveOff();digitalWrite( 4, HIGH);digitalWrite( 5, HIGH);digitalWrite( 6, HIGH);digitalWrite( 7, HIGH);digitalWrite(A0, LOW);digitalWrite(A1, LOW);digitalWrite(A2, LOW);digitalWrite(A3, LOW);DriveOn();}Themodded codeseems to use the correct "schematic pins" in the actual code but the comments are presumably left unchanged and there the pins are the same "wrong pins" that the code you uploaded uses, so i guess there is some kind of error in the original article...Code:// Drive functions// - ports 4-7 and A0-A3 are used to differentially drive resistor under test// - the ports are resistively summed to increase current capability// - DriveOff() disables the drive, setting the bits to input// - DriveOn() enables the drive, setting the bits to output// - DriveP() enables drive with positive current flow (from ports 4-7 to ports A0-A3)// - DriveN() enables drive with negative current flow// ---------------------------------------------------------------------------------------------void DriveP(){DriveOff();digitalWrite( 2, HIGH);digitalWrite( 3, HIGH);digitalWrite( 4, HIGH);digitalWrite( 5, HIGH);digitalWrite( 6, LOW);digitalWrite( 7, LOW);digitalWrite( 8, LOW);digitalWrite( 9, LOW);DriveOn();}In any case between the two codes i am sure i can make this work, my main issue was that i prefer the 9V battery version and i didn't want to mess with the modded one only to find that there were more changes (he already mentions some changes about how "overload" is displayed) and i would have to troubleshoot the thing (the page uses the original schematic and not the one he actually made).I think that the original code with the modded pins to match the schematic will work perfectly!BTW isn't it a strange coincidence that the reason i am making a milliohm meter is that i saw YOUR "Shorty" buildI just ended up Googling for more "Arduino Milliohm meter" circuits after i saw yours and after a couple of candidates i decided on the Circuit Cellar one because i already have the ADS1115 module in my stash (i don't have to buy AD8628/MCP3421) and it seems like a easier build.I still plan to use your clever "poor man's Kelvin probes", already ordered cheapeBay probesthat i hope are the correct type (tip unscrews so i can solder headphones wire).Only thing that i would like in the Circuit Cellar circuit is a "zero" button you could press with the probes shorted to improve the measurement a bit more, but i can live without it (or even able to add it to the code?).Anyways, thanks again for the code

author: Dr.Krieger
author_rank: Contributor
timestamp: June 26, 2022, 07:57:54 pm
content: Well the original code with altered pins (like in the Li-Ion version code) works just fine like i suspected, but there is a big issue:The Meter ispainfully slow, it needs about 5-6sec to measure on the breadboard and I don't believe it will be any faster on a PCB...Ever with 1/10 of the samples of the original code and "continuous" operation without waiting for a button press, its still not fast and probably inaccurate too in this configuration..."faster" test:https://youtu.be/iX1K5Oj_yUkMaybe it can be improved by ditching the optimal gain finding routine and sacrifice the high-value resistor measuring for speed (switch from single shot to continuous mode), in my breadboard tests i used 8x100Ω resistors for ~67mA max (at short with only the 10.0Ω in the loop) @4.140V, that is enough to measure up to 20-30 or even 50Ω depending on the setup, you could even lose the 10Ω altogether and just use a Constant Current Source (like a two BJT Current Mirror or a simple TL431+BJT setup) so you only need to measure the DUT's Vdrop (still in both current directions) if that helps with speed, i don't know anything about ADCs...I now kinda regret not going forkripton2035's Shorty, which is the original device i saw and made me want to make a sub-Ohm meter and it seems to work fine in the videos (looks both fast and accurate in the "solder video") but I'm not 100% sure about the device since the circuit seems to not use a CCS and only measures the DUT's Vrop (no current measurement or a 2nd "reference" resistor measurement to compare) so by design it shouldn't be accurate...I did a few fast calculations and current changes ~0.4mA between a 0.1 and a 1Ω DUT, that is a lot for a 5mV measurement... :/Also it would only take one more PNP to convert the circuit to a Current Mirror so that schematic seems more like a temporary setup to sort things out and not a "final" project.Do note that i am only a novice so if i wrote anything wrong, please correct meIn conclusion i still don't know in which direction i should go to, trying to improve Circuit Cellar's design seems futile since i don't know much about Arduino code or ADC's, kripton2035's Shorty seems like an unfinished project with at least one major fault that totally undermines the accuracy and i don't want to wait two weeks for parts only to find that the thing "needs work" that i am not able to do, and other designs are either too simple (to be reasonably accurate for <1Ω values) or way too complicated for my taste (like Scullcom's)...Anyone has any thoughts about the issue?

author: kripton2035
author_rank: Super Contributor
timestamp: June 27, 2022, 10:02:51 am
content: I would try an esp8266 or esp32 in place or the arduino, they will be faster and may be enough for this circuit cellar meter.then, my shorty-with-display is certainly as you said not accurate as there is no precision resistor for calibration.but what's matters is relative continuity, so you zero the meter at each powerup and the relative measurment is quite enoughcertainly for short circuit finding it's more than enough you need "only" 0.1mΩ detection. 1mΩ is not enough.

author: Dr.Krieger
author_rank: Contributor
timestamp: June 27, 2022, 11:09:40 am
content: Thanks for your input, truth is that i don't need 1mΩ accuracy or resolution, but i would like to be able to use this as a low-value resistance meter, like being able to measure somewhat accurately the real value of a 0.1/0.22/0.33Ω 5W resistor like i had to for this project* or a 50mΩ Shunt, something that my cheap UNI-T 61E DMM can't do, so the ideal range would only have to be up to 10-100Ω as my DMM can take it from there.Like you said for a "shorty" device that finds shorts on a PCB you only need relative accuracy, you could argue that even just the buzzer would be good enough.Now that you mention it i vaguely remember about faster Arduino-compatible clones like Teensy and it sounds like a good idea, if the Arduino's speed is the issue and not the ADS1115 chip and it's being run at single-shot mode, i am not exactly sure what is the issue as i haven't really messed around with the thing besides that very quick "1 cycle @ 10 samples and no wait for button press" test, i have to try more things with it since i still got in on the breadboard i guess.I think that seeing how fast it runs on videos, your design would be a better place to start though, just replace the single PNP with a true Constant Current Source current mirror and maybe change the amount of current through the resistors since in your design the current constantly flows though the 82/2/1 resistors even if the Kelvin clips are not shorted and see how that works or strait-up call it "good enough" and be done with it.For now i think i will mess around with the Circuit Cellar circuit since i have it working on the breadboard, but i will order a couple of AD8628/ MCP3421 or even an Int Amp instead of the OpAmp that works with single supply (INA213for example has a fixed 50 gain) so i don't have to match two sets of precision resistors.*I had everything except the 10Ω precision resistor and didn't feel like paying 15€ postage for just that so i used a typical +-10% 10Ω/5W white cement resistor that i measured as accurately as i could using a 50-100mA CCS (measured both current and voltage drop on the 10Ω at ~55mA and then again at 100mA to verify) and replaced the "Rr = 10.0" in code with "Rr = 10.747" which was good enough for breadboard testing...

author: Dr.Krieger
author_rank: Contributor
timestamp: June 28, 2022, 05:40:42 am
content: Update:Actually with 3 Cycles / 2 samples per half and no waiting for a button press its not that bad, i measured a few resistors like 5mΩ/3W +-1% (BIG measurement error here), 40mΩ/50W 0.1%, a few 0.1Ω/5W 5% from the same batch etc up to a few KΩ and at around one measurement per secon its not lighting fast but its something i can work with (as a "resistor meter" and not a "shorty").I tried to calibrate it as best as i can but i don't have a good desktop multi-digit meter to compare to so i am not sure how good of a job i can do. At the moment i am reading slightly higher in really low values and a tiiiny bit under on higher than a few Ohms values, but my setup on the breadboard with CAT5 wires is not ideal, will keep working on it... Not sure how linear the ADC measurements should be with the forward-reverse current flow and all, i could easily add a different final calibrate factor for every Gain but i don't know if i should do it, i really need a couple or resistor standards to compare to...Another thing i will try is a lower value fixed res like maybe 1Ω instead of 10, to see if that helps with low-end accuracy and if it also affects high-value measuring.Also a "zero-out" button you could press with the probes shorted to cancel the leads resistance would be a useful addition if you want to use this circuit as a meter.

author: iMo
author_rank: Super Contributor
timestamp: June 28, 2022, 06:04:55 am
content: Quote from: Dr.Krieger on June 27, 2022, 11:09:40 amA quick look into the source shows the arduino itself is not the limiting factor, imho.The show takes so long because of rather large number of ADS1115 conversions needed for a single resistance measurement - something like 2x(50+50)*XXms + overhead, where XX is the time for a single ADS conversion..You may speed up the show by changing the M and N values here:Code:// ---------------------------------------------------------------------------------------------// main measurement loop// ---------------------------------------------------------------------------------------------{const float Rr = 10.0; // reference resistor value, ohmsconst float Rcal = 1.002419; // calibration factorconst int N = 2; // number of cycles to averageconst int M = 50; // samples per half cycle

author: Avelino Sampaio
author_rank: Frequent Contributor
timestamp: June 28, 2022, 08:57:21 am
content: HiWould this project be limited to measuring only resistors? What can happen if I want to measure the windings of a transformer? Would you measure an RDson from a mosfet?

author: Dr.Krieger
author_rank: Contributor
timestamp: June 28, 2022, 10:30:29 am
content: Quote from: imo on June 28, 2022, 06:04:55 amAs i mentioned above, i used N=1 and M=10 in my first "fast" video and also removed the wait for button press and the "measuring" message to make it faster already:Original N=2 / M=50 (button shorted):N=1 M=10 w/o wait for button:In my latest test i use N=3 / M=2 (same speed as the "fast" video) and ofc different Rr and Rcal variables since my "10Ω" is actually ~10.747Ω and my test leads are two short CAT5 pieces.The ADC still measures in "single shot mode"(9ms conversion time?), didn't change that at all. I did try removing the "Calculate optimum PGA setting based on a sample voltage" and set the PGA to 4 (+-1.024V range) to see if that made any difference, it didn't.Quote from: Avelino Sampaio on June 28, 2022, 08:57:21 amMOSFETs would be a problem since it flips the polarity of the current (body diode), you can use a Constant Current Source between D-S and measure the voltage drop with a DMM (with power to the gate ofc), then simply calculate R= V / I.Inductors would also pose an issue since they won't behave like resistors in a short voltage pulse across them, you would need to seriously alter the code for "coil mode" or something or use something else like a cheap "LCR meter"

author: iMo
author_rank: Super Contributor
timestamp: June 28, 2022, 11:38:07 am
content: You may change the conversion rate (also valid for single shot, afaik).With your solderless breadboard construction the ADC noise (which increases with a shorter conversion) is not extremely relevant, therefore try to set the higher speed..PS: the default is 128 measurements per second, perhaps set in your source..Quote

author: iMo
author_rank: Super Contributor
timestamp: June 28, 2022, 11:49:50 am
content: Code:..hiByte = B10000001 | (channel<<4) | (gain<<1); // conversion start commandloByte = B10000011;..Your loByte has got 100 speed setting (the bits 7 6 5 of it), that is the 128 samples per second..Try with loByte = B11100011; that will set the highest 850 samples per second. You may then find the optimal setup, changing M, N, and the speed (not on the solderless breadboard, however)..PS: Do not expect to see some relevant results with your prototype construction. You are chasing XX uV measurements, that is not possible with the solderless breadboard. You can validate "how good the milliohm ohmmeter works" only with a pretty rugged construction, short thick wires well soldered, no mechanical contacts or sockets, good grounding (star like), no ground loops, good decoupling, etc.)..

author: Dr.Krieger
author_rank: Contributor
timestamp: June 28, 2022, 01:00:41 pm
content: Quote from: imo on June 28, 2022, 11:49:50 amYou are right about that and i'm taking it into account, i'm trying to make the thing work "perfectly" on the breadboard, just messing around with it to see if should go with this Milliohm Meter design or search for something else. The first test with the original code was a massive disappointment because of its speed, now i think i can make it work good enough (for my taste).Like i said i am only a novice and need time to figure out the code and stuff, but i will try changing the Samples Per Second like you said and see how that works, thank you for your input!The thing is that i want to use long, multimeter-like leads (using coaxial cable for power/signal that short right at the tip like in Kripton2035's Shorty) in the final design so the breadboard may actually be the "low noise" version and i will have to lower the speed and/or increase the samples in the final setup XDI should have gone for Kripton's design from the start but i had the ADS1115 module i didn't want to pay for new parts... :/That one seems to work sooooooooooo much better:

author: Dr.Krieger
author_rank: Contributor
timestamp: June 28, 2022, 02:37:32 pm
content: That's an amazing device sir, measuring uV with "long" leads is a difficult task, congratulations!Based on my limited Googling there is a big diminishing returns effect in the number of ADC bits vs noise, you can go from 16 to 18 to 24 but noise is still noise and there is only so much you can do when you are trying to measure uVolts with "long" test leads, from what i understand its difficult even on PCB (chips that use using "guard pins" etc)!A great way to increase accuracy would be to increase the current when measuring really low resistances, maybe with a adjustable Constant Current Source (but still use a "known" resistor to measure the current for good measure?) so you can measure a 1Ω res with lets say 100mA (10mW res dissipation and 100mV drop across it) and switch to 1A for under 100-200mΩ so you still get a good voltage drop (tens of mVolts) and don't chase micro-volts, assuming your shunt under test can handle 100mW of dissipation, which a sub-100mΩ should be able to do.

author: Dr.Krieger
author_rank: Contributor
timestamp: June 28, 2022, 03:51:15 pm
content: Related:Analog Front-End Design Considerations for RTD Ratiometric Temperature Measurements"...For example, some designers may only be able to get 12 to 13 noise-free bits from a 16-bit to 18-bit ADC. The front-end techniques introduced in this article will enable designers to achieve 16+ noise-free bits in their system designs...."

author: kripton2035
author_rank: Super Contributor
timestamp: June 28, 2022, 05:10:15 pm
content: @Dr KriegerI did try to implement some constant current source with a pnp transistor and a zener, see attached schematicbut I've got some spurious oscillations I can't remove, and it gives totally random results in very low ohms...if you have any idea(s) ?

author: Dr.Krieger
author_rank: Contributor
timestamp: June 28, 2022, 05:59:15 pm
content: Quote from: kripton2035 on June 28, 2022, 05:10:15 pmLike i said i'm not an expert or anything, but the things i was theory-crafting about Constant Current are these:Instead of your PNP + Base resistor, add just another PNP to make it a Current Mirror setup, in simulation it keeps the current pretty stable.For more accuracy i thought of a TL431 CCS but that needs to drop 2.5V across it so you only left with less than that for your DUT (for 5Vcc). Very stable current though and perhaps it will perform better due to less thermal drift (although the Current Mirror setup should be stable too with a 0.6-1W res)...Also when i was messing with the ADS1115 and though that perhaps the multiple gain routine was the thing that slowed the process down i thought of the same TL431 CCS but with a Arduino-controlled BJT that shorts one res so you at least have a two-range setup you can use with a fixed gain (+-2.048V range) to measure up to a KΩ or so, which is more than enough for me.Note that in both cases the current is "pretty stable" but not 100% the same for min/max DUT value... :/Also i didn't do any transient analysis, circuit stability is unknown.I can't think of anything else easy, for maximum current stability you can go hardcore and make a good OpAmp + TL431 CCS, much like a mini Dummy Load:Just an OpAmp that measures the Vdrop on a res compared to the 2.5V of a TL431 to keep a stable current. Below is an example of a setup like that for a complete Milliohm Meter using a DMM but a good OpAmp like your AD8628 and a TL431 would be pretty good.Depending on what you want that could be a good idea or complete overkill, still i think that measuring a 2nd "known" resistor is better but ofc i could be mistaken since i haven't compared the two choices (stable current or known res) in theory or in practice XD

author: SilverSolder
author_rank: Super Contributor
timestamp: June 28, 2022, 07:18:15 pm
content: Quote from: kripton2035 on June 28, 2022, 05:10:15 pmTry a 100nF capacitor across each of the two 33K resistors for stability.

author: Shock
author_rank: Super Contributor
timestamp: June 29, 2022, 02:46:07 am
content: You probably need to start by defining what resolution and accuracy you need.There are a couple of inexpensive designs shown on youtube. I'd also consider looking for a 4 wire kelvin (w/guard) capable LCR meter as they can go low DCR.Myself I along with a few members here have IET/Cambridge Technologies LOM510A these are really nice micro-ohmmeters for out of circuit work. Last video shows Robrenz's one in the first part of the video. Not only does it have guarded 4 wire but it takes one shot measurements. Temp, current, oxides and shielding affects the measurement at low ohms so you need to consider probes/fittings and technique.

author: Shock
author_rank: Super Contributor
timestamp: June 29, 2022, 06:00:12 pm
content: Just noticed another one as well. This has the PCB up on PCBway.I have additionally have a bunch of milliohm capable meters so no point in me personally building any of these projects for measurement. But Kripton2035's shorty is pretty cool tool. I'll eventually get around to making his or sooner if he decides to sell a board/kit.

author: Dr.Krieger
author_rank: Contributor
timestamp: June 30, 2022, 08:55:57 pm
content: I did a few more tests increasing the Samples Per Second like imo suggested and it works, i can take more measurements now although the "final" measuring speed doesn't double when doubling the SPS.There is still work to be done like figuring out how fast i can without having massive Ohm's measured differences, what N/M ratio is best (i think more samples and less cycles is better than the other way around for the same overall speed), etc buti don't think it makes sense to continue with this on the breadboard:Already i am getting around 1mV difference between readings on the 10Ω Vdrop, that is unacceptable for a 16bit ADC at the +-1.024V range. 10Ω's Vdrop is right in the middle of that range when close to max current (60+ mA), probably on purpose. OFC as the DUT value climbs the current drops (since its in series in the loop) and the current drops to less than 10mA on "high-value resistances", for example for a 330Ω DUT the Vdrop on the 10Ω is ~125mV, with a 470Ω it drops to about 90mV and its less than 50mV for a 1KΩ DUT (ofc the PGA has switched to the +-256mV range for all of those).I think i will also try a 1-2Ω res instead of the 10Ω once i make this on a veroboard (the next step), so the same PGA is used for both resistors in the important to me sub-1Ω range (the loss of accuracy in the >10-20Ω DUT range does not bother me at all).BTW at 330Ω you almost maxed-out on voltage (~4V on the DUT) but Arduino's pin output voltage does raise as current drops or better the voltage sags as load increases and that is how the original circuit can get away with only 30Ω pin resistors (that would burn-up the Arduino at ~200mA total or 50mA per pin at 5.00Vout). In my Arduino Nano with external 7805 supply i can get 5.00Vout from the digital pins without load but with my 8x100Ω setup i get ~4.140V pin-to-pin, thankfully both voltage and current stay exactly the same in both current directions (as far as my DMM can tell).For the videos i removed the Vbat voltage and icon in the debug menu and added the N and M values and the SPS rate used. Also i made a video with many different setting on screen at the same time so you can better see the speed difference.Quote from: Shock on June 29, 2022, 06:00:12 pmThat is a nice, analog circuit but the issue is that you rely on the Panel Meter's accuracy... I would prefer the ADC method, so you can for example use code to calibrate any loss non-linearity error, like if theADC (of the OpAmp/IntAmp front end) reads 1% lower at very low voltages, almost perfectly at the middle of the range and 1% higher at the highest voltages, you can easily add a "calibration" code that adds or subtracts a little from the measured value, depending on the voltage level.That being said, before i fround the "Milliohm Meter" circuits i was planning to make a simple 0-1A Constant Current Source using a 5V USB charger, just a TL431 and a AD8628 (a AD620/AD8221 would be better but require negative supply) with a Darlington BJT and a 0.1Ω/5W to be able to drop 1A to up to a couple of Ohms. I have a5mA 5-digit Panel Meterthat i will use to measure the current (with the help of a 200Ω trimpot parallel to the 0.1Ω) because i want to be able to see that the current stays stable under load and it don't change by the second like in my failed LM317 "1A CCS"...I made it on Proteus and it works nicely, i was about to start soldering but then got on the Milliohm stuff. I still want to make it because it can be used for other things like measuring diode's Vdrop vs Current (and/or temperature) and i also will add a VOM1271T to it so i can easily drive MOSFET Gates (i already use this in a temporary LM317 50mA CCS setup).

author: iMo
author_rank: Super Contributor
timestamp: July 01, 2022, 10:53:17 am
content: Nice!Btw., when you target 5 digits results you have to consider the temperature coefficients of the parts used, especially with such things like TL431, LM317, and your standard trimpots(!) and resistors.. Also the ADS1115 is not TC free..

author: Dr.Krieger
author_rank: Contributor
timestamp: July 01, 2022, 11:35:59 am
content: I'm not getting 5 stable/accurate digits, i know it and i'm fine with it, in the case of the Bay Panel Meter i assume i can get an accurate two decimals on the 1A range (so i know its at least that stable), the LM317 CCS even with 4V input drifted like crazy because of the heat when i dropped that 1A on a 0.1Ω (3-4W of dissipation of the LM). That is the downside of all TO-220 regulators, the pass element is in the same case with the control circuit so when the thing heats up it all goes to shit :/Like i said i have no prior experience with ADCs so i want to see how accurately the ADS1115 will measure the 10Ω on a soldered board, i hope for a much more stable operation with a 9V battery etc...And i know that a normal trimmer will mess up with the tempco of a nice precision XXppm resistor but i don't have a choice, i need ideally a 0.10009Ω shunt/100Ω trimmer in parallel to get the correct 0-1.000 on the Ammeter for 0-1A...BTW sometimes the videos in this page are all messed up, like wrong video in the wrong post, is it just my Firefox or does anyone else has the same issue? First time today i notice that....

author: Dr.Krieger
author_rank: Contributor
timestamp: July 01, 2022, 11:52:51 am
content: I haven't put anything on the breadboard in the "USB 1A CCS" case but i played around with it on the simulation and it seems to work good, as long as i can get the right shunt/trimpot for the meter ratio...I even got as far as to plan how to put on the breadboard. The Meter is the other way around (before the shunt/trimpot) in the PCB version so i has common ground with the USB and i can be powered by it.I guess you could instead use the 5mA Panel Meter as a voltage meter and convert the thing into a Milliohm Meter like in the analog circuit that Shock posted, use one OpAmp to make the CCS and then another to measurethe Vdrop on the DUT's and have the meter on its output.