Tag Archive for measurement

Milliohmeter basic construction finished, and testing success.

With only some minor comedic incidents

Last post on this topic, I explained the why I needed one and how I was going to build it. Go there for schematics and function details. Finally having gone electronics shopping last week, I was able to get the one critical part I needed for this project: a 100Ω trimpot. One measly part which took me a month to get off my ass and get. Such is life :) . I also managed to grab some beefier crocodile clips to make my test leads that much more durable and awesome looking, not least because I could actually fit the rubber boot over the two wires to each clip!

Soldering was trivial and I managed not to burn myself or set anything on fire, or wreck the board. I did cut myself though when I jabbed my hand with a pair of needle nose pliers though the damage to my hand is so slight I’m only mentioning it as I take that as a sign I’m actually doing something useful if I am bleeding.

mohmeter_total

With the board now fully assembled I thought “what they heck” and decided to power it on to see if it blows up or something. To my delight, it did not blow up and worked as expected! Hooray! That never happens.

Calibration goof up

This is just funny. Remember in the last post how I thought I was being smart by setting the output current to 1A instead of 100mA so that mV = mΩ? Well that part works a treat. My multimeter does read directly in milliohms no problem. The difficulty is in calibrating the damn thing. Like most DMMs, mine comes with 2mA, 20mA, 200mA, and 10A current ranges. In order to calibrate this thing so it’s actually useful, I need to have the LM317 outputting a constant current of as close to 1A spot-on as possible to get an accurate reading. Since the output needs to be 1A, I have no choice but to use the 10A range which will only give me a reading of 1.00A, which it did. This is great at first glance, spot on 1A right? Well no. What about the third digit? Assuming it rounds it, that means that it could potentially be ±5mA and I wouldn’t even know it! Had I stuck to one original design, I could have had it set to 100mA which i could dial in to within a bee’s dick of 100.0mA (±50µA making it all the more accurate. For lack of one extra digit on my multimeter, I cannot calibrate it any better than I have it now. Unless I devise some clever plan to give it a known resistance… chicken and egg scenario, that’s what I built the damn thing for! Oh electronics will get you :) . Anyone have a multimeter than can measure 1.000mA that I could borrow for 2 minutes?

mohmeter_test

These sorts of issues will plague me until I get a better multimeter, no doubt about it. When I build the power supply those extra digits will come in handy for calibration.

I measured a bunch of low-ohm resistors I had laying about and got reasonable results according to their stated values which is nice. I know it’s still a bit off, has to be, but it will do for now. A 1Ω 1% resistor I measured read 1.025Ω making it 2% off it’s stated value, so unless this resistor is out of spec, the thing needs some tweaking. I won’t know until I calibrate it properly.

Next steps

The next part is almost trivial, almost. I just need to safely whack it in a case and call it a day. I did notice the thing heats up quite a bit and I measured 83°C on the case of the LM317 (well within it’s limit) so that’s not a big deal. I may drive it harder, by using a 10Ω load and have it up the voltage to push an amp through it and see what the temperature shoots to. The thing isn’t really required to be on for hours or anything, just enough time to test a resistance quick, so I may just try to get away with some vent holes or (depending on the temperature at 10Ω) I may add a little fan to cool the bugger.

Then it’s case drilling and mounting everything, whack in a power LED. Oh and add an appropriate power supply for it, which I still do not have. Still, hard part over.

Milliohm Meter and why we all need one

As I am fond of mentioning, projects beget other projects. It’s just the way of things. The power supply needs a dummy load, the dummy load needs to be low-resistance, my multimeter can’t measure low resistances worth a toss, so I need a way to measure this accurately.

The why

Owners of old analog multimeters have sometimes had a low-ohm function, so they have the ability to measure low resistances. Why do we lack this with our modern DMMs that are supposed to be better in every way?

Before I realized that my DMM was unreliable below 10Ω, I had been shopping for 1Ω resistors for current measurement and was so annoyed when they measured way off, sometimes 20-50% off. It perplexed me. Why even bother making resisters that are so out of spec? The easy (yet non-intuitive answer) is that the resistors are not at fault, but my DMM is. Specifically the leads.

Try this out: take your DMM and turn it to the lowest resistance setting. Then touch the leads together. It’s not zero is it? That’s no mistake, the leads themselves have a small, yet non-zero resistance. In addition, all multimeters measure resistance by pumping a small, known amount of current into the subject in question and measure the resulting voltage drop – basic Ohm’s law. The difficulty comes in that most multimeters don’t put out enough current consistently to “amplify” the reading enough to shoot above the accuracy floor of the multimeter itself when attempting to measure low resistances. The errors of measuring very small voltage drops combined with the small resistance of the leads themselves add up to an inaccurate measurement that is utterly useless.

The solution

What is needed is to pump a stable, known current across our subject. It has to be high enough to “amplify” the reading to read well on a display or volts setting on a DMM. We also have to eliminate those pesky leads.

With that in mind we need a constant current source. What quickly jumped out at me from a bit of online research (like this and this) is that it’s quite easy to achieve this with the humble (and ubiquitous) LM317 voltage regulator. The datasheet shows in the application hints (see figure 43) of how it can be easily wired to act as a constant current source as opposed to it’s more usual use as a constant voltage source. Simply whack on a low, known resistance on the output of the LM317 and have the ADJ pin on the other end of it. It will then regulate the voltage across this resistor to maintain a constant current. Easy.

Picking the right current is the easy bit. Obviously we want something in powers of 10 to avoid any extra calculations (we do want a direct readout) and we want to choose something that lines up with the range setting on our multimeter so it’s set to the millivolts range but reading milliohms directly. One example I saw used a 100mA current which would give a display in 10s of milliohms. This works, but i found it confusing, having to do a mental calculation (even moving a decimal point) which is just plain annoying and opens up the possibility of errors and misreads if I forget.

So I chose a current of 1A, a nice round number and it magnifies the result by a factor of 10 so my millivolts display reads milliohms.

miliohm-meter-adaptor

Through a lot of bashing about in Circuit Lab, I determined that the sense resistor (sitting between the output of the LM317 and it’s ADJ pin) would need to be 1.155Ω (more accurate than the 1.2Ω quoted in the datasheet) to make the LM317 spit out precisely 1A into my subject. Again, we have the problem of low resistance and also 1.155Ω is not exactly a common value, in fact I don’t think it’s manufactured at all (why would it be?). A simple way around this is to use resistors in parallel to achieve our target value. Better yet to make one of those resistors a trimpot so we can really dial it in there accurately. See the schematic on the right.

Using the parallel resistance formula, we know that 10x 10Ω resistors = 1Ω so a bit of fiddling with other values in there would net us our target value. Also, the power rating is additive in parallel which is also handy. 10x 1/4W resistors make a 2.5W resistor! I chose the values based on what I had in my parts bin, but annoyingly I am missing a 100Ω trimpot. I had a 100Ω regular potentiometer which would have been fine had I not fried it by trying to solder it (doh!). I will need to make it downtown and grab a trimpot to finish this project. As always.

So that’s the solution for the constant current. Naturally, it will need a power supply which I calculate to have to be on the order of 14V and capable of 1.5A (just for a bit of headroom). More on that later.

Kelvin measurement

With the constant current problem taken care of, we are still left with leads that have a non-trivial resistance which when measuring such low resistances could really skew our measurement. Small problems become big ones when you need more accuracy to measure very small things.

Fortunately, there is a tried, tested and true way to do this: Kelvin measurement. The concept is simple: eliminate the leads. We still need leads to run from our constant current source and to our DMM but we can effectively eliminate them by separating the current supply from the measurement. Since we no longer are attempting to measure resistance and supply current with the same leads, the resistance of the leads is nullified. The one catch is that they do all have to meet but as close as possible to the subject under test. The solution to this is to have the multimeter lead and the current supply lead meet right at the test points for the resistor.

If we calibrate our trimpot such that 1A is being delivered right at the positive connection to the resistor, we eliminate the tiny voltage drop of the lead from the current source. Since the multimeter is just measuring voltage the length of its leads essentially also becomes trivial again. With our result nice and amplified from the 1A current, all other factors kind of fall down to the noise floor and can be safely ignored.

This is known as 4-wire or Kelvin measurement. It is commonly employed but of specific use in current sensing applications. There are even 4-wire resistors or “shunts” that are specifically designed for this, making the test points a close as possible for the most accurate measurement.

Safety Margin

One thing to watch out for of course was watching the max 15W power dissipation of the LM317. The other circuit I took the idea from had the current output at 0.1A so that was never a possibility, at 1A one has to be careful. In bashing around the calculations I made triply sure that everything was well within safety margins. Always, always, always check the power your are dissipating though your transistors, regulators, shunts and power resistors. Watch for little traps. For example, the LM317 dissipation is given by the voltage differential (in vs. out) multiplied by the current you are running through it. The datasheet says it’s capable of 40V or something differential and 1.5A but if you try that you will have a molten LM317 (60W is way way more than 15W). Watch your max power dissipation and try to never go above 80% of that, same goes for the max junction temperature (meaning use heatsinks and even fans if you need to). Really over-design your safety margins.

Even if you are below 80% of the rated maximums, check your datasheets and in particular look at the graphs. The LM317 for example loses ability to regulate voltage (and thus current) when you approach it’s maximums so make sure you are well within an acceptable range for desired operation of your product.

We’ll see if I have done my due diligence when it comes time for power up, calibration and testing.

The build

Undaunted by missing critical parts, I went ahead and soldered what I had together with the result shown here.

Just an LM317 constant current source

Just an LM317 constant current source

I’m missing the 100Ω trimpot but also suitable power supply for the thing. I have a milk crate full of salvaged wall worts and none fit the spec. I know from experience that 12V ones will have a couple of extra volts so that’s no problem, i have tons of 12V and 14V ones kicking about. None, however, can deliver more than an amp it seems. So i will have to buy a surplus one. Failing that i’ll just build a 14V power supply but i’d rather not waste parts when a simple wall wort will do.

Test leads. The left bottom is the PCB connector to the above board, the left top plugs into the DMM, the right will have alligator leads for the test subject

Test leads. The left bottom is the PCB connector to the above board, the left top plugs into the DMM, the right will have alligator leads for the test subject

I’m also short on suitable alligator clips for my test lead shown here. I have saved my clips from broken/melted alligator test leads but the small rubber boot on them won’t fit over the heavy gauge wire I am using for test leads. Seems kind of necessary to me for safety. I’ll add to the list some heavier duty alligator clips. Might as well do it right and I need to head to the shops anyway.

Also, I have a case I could use, but it’s rather large, wouldn’t hurt to have a smaller case to avoid wasting the larger one. It will be a simple adaptor box with wires coming out of it, no readouts or anything so I don’t need the extra surface area, just enough room for the board and the LM317 and it’s heatsink. The only holes in the thing will be the current wires, a 5mm LED, and the DC input jack. Easy drilling.

Expect a follow-up once I get my butt to the shops.