Resistor size to measure current

17 posts / 0 new
Author
Message

Hello, I am afraid the fuse in my DMM for
measuring current is blown :(

I want to determine the amount of current a project (ATtiny85) is consuming.

The power source is a 12V 1.4 AH gel battery.

The project board uses the typical 7805 regulator and also uses the 12 VDC to supply
power using a ULN2003 to drive the external
load. The external load is a 12 VDC LED module typically used on large truck trailers and is often referred to as 'side marker lights'. This module (from Walmart)
has built in resistors as the module is designed to work off the 12 VDC in a constant on mode , and there is no way to determine the connection/size of the resisters.

The LED module is ideal for my application a strobing/flashing light for the back of my mountain bike. With the 12 VDC operation
and the timing setup, it is exactly how I want it to work. Also, like to use this module based on cost and availability and the rugged design.

So, in lieu of a working Amp meter function on my DMM, I want to just place a series resistor in series with the complete load. I would just place a resistor in series with either the battery plus or negative terminals and then just calculate the current (ohms law).

My question: What would be the best value for the resistor? I am assuming the lowest value to not interfere with power to the circuit.

Thanks in advance for any suggestions.

Got to replace that darn fuse
:)

I'll believe corporations
are people when Texas executes one.

I'm not an expert, but I'd try a 10ohm or something like that. If it fries, try a slightly bigger one. Then measure the voltage drop over it.
Connect it to + side of battery.

"Maybe happiness is just fragments of existence with better packaging."

10 ohms sounds good. I think that might require > 1/4 watt ?
I agree, the only problem would be to fry the resistor.

I am not sure what size of the resistor
would have on how accurate the measurement might be.

I'll believe corporations
are people when Texas executes one.

I believe:
(12V-5V)/10ohm = 700mA
((12V-5V)^2)/10ohm = 4.9W
So there might be a bit of heat production. But a resistor costs virtually nothing.
But that 7805 is kinda weird. It needs 7V or so to give 5V out. I'm not sure how that would affect the measurement.

"Maybe happiness is just fragments of existence with better packaging."

A ten ohm is required when you need to measure milliamps; it will drop ten millivolts per milliamp. However, if you're pulling significant current it will be too big: it will drop ten volts at an amp which can be somewhat limiting on a five volt rail... for larger currents use an ohm (1mV/mA) or one tenth of an ohm.

You ideally want to keep the voltage across the resistor small enough not to bother the supply rails but large enough to measure accurately. Since most DVMs have a 200mV range, I usually try to get into that range.

(Forgot: power = amps x volts = volts^2/resistance - calculating the power rating is simple. Better to reduce the voltage than the resistance...)

I pulled out a 7805 and put a 10ohm in series with the Vin. 220mV drop with small load on Vout. 16mW heat loss, if I'm not mistaken. So just use the formulae P = R*I^2 or P = (V^2)/R and you should be alright.

"Maybe happiness is just fragments of existence with better packaging."

If you don't care about the accuracy too much, why not use the 10A un-fused mode. After you get a rough estimate you could use a wire to jumper the burned out fuse on the mA range and do a quick measurement.

Quote:
you could use a wire to jumper the burned out fuse on the mA range and do a quick measurement.

I think that might be risky.

It depends upon the size of Cin for the 7805 power supply. A large Cin will have a large "in-rush" current when the circuit is first turned on, and the cap appears as a short circuit, and draws a lot of current as it initially charges up.

As you are in the USA you could go to Lowes or Home Depot, perhaps even Walmart where you purchased the LED array from, and buy an inexpensive DMM for < \$20 USD.

Then measure the current on the 10 A range, and then on the lower range(s).

Your real goal should be to measure the current of the LED array. The 7805 and a driving micro will draw very little current compared to the LED array.

Ideally one would use a very small series resistor, which unfortunately only provides a very small voltage drop, and then amplify the voltage drop with an op-amp to have a larger signal to measure. This may be more effort that you wish to expend on this measurement.

The smaller the series resistor the less impact it will have on the circuit, and the more accurate will be the measurement.

Note, also, that the ULN2003 can only sink 500 mA per channel. If your LED array draws more than this you will need to consider using several channels in parallel, or eliminating the chip and using a power NFet to switch the LED array on and off.

There is currently another thread which discusses some commonly used NFets.

I've never paralleled the output from the ULN2003, but the data sheet says that one can do so.

As it uses an NPN darlington transistor pair I would be reluctant to parallel two channels without putting a small resistor in series with each channel. This is a "current balancing" resistor. This is because although the output transistors will be very similar in their characteristics, they won't be identical. One has to watch the power rating of such resistors. If you calcualted that it needed to dissapate 1/2 W, one might want to use a 2 W resistor, for example.

BTW, don't feel badly about blowing the fuse in your ammeter. It has happened to many of use, myself included. When I last did this, a few years ago, I noticed that the fuse actually in the meter did not match what was printed on a sticker inside the case, and neither of those matched what the user's manual stated the fuse was suppose to be. So, three different values, and not sure which one was the correct one.

Additionally, the PCB had a through hole cap as an add on, (added by hand after the board was manufactured), and one end had lifted from the pad, so that it wasn't even connected any more. I tacked it down, but did not notice any change in the meter's operation.

You may have already considered this, but I'll mention it anyway: You probably ought to have a fuse in your V+ power lead. You can purchase water-proof in-line fuse holders for both blade, mini-blade, and the older cyclindrical type fuses at Wallmart, an auto parts store, or a marina, as well as through the usual electronics parts outlets.

JC

This photo shows both a Blade type in-line fuse and the older cyclindrical type fuse holders in use, on a car battery, but the concept is the same. There are actually two blade type fuse holders, with orange wires, side-by-side, but one is hidden. The red wire goes t the cyclindrical fuse holder, (which IS NOT water proof! ).

JC

Attachment(s):

tubecut wrote:
Hello, I am afraid the fuse in my DMM for
measuring current is blown :( Thanks in advance for any suggestions.

tubecut wrote:
Got to replace that darn fuse
:)

Yep. :)

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

DocJC: Thanks for your comments. Yes, I thought of using 30 AWG as a temporary fuse.
I did not consider the inrush current when applying power. I also like the idea of a 'cheap' DMM, I will perhaps take that tack.

The ULN2003 is a temporary approach. I used a prototype board that has a lot of not required parts, DB9 (not much use with the Tiny85) and of course the 10 pin connector
for programming. I was planning on using a Buz71 N channel to drive the LED module. Somewhere I have a couple of those around somewhere. Yes, I know that is an older device.:wink:

As the micro will not be much of a concern for battery life, it is the LED module that is the dominant issue.

After a 4.5 hour run on the battery the battery voltage dropped 100 milli volt. So, I can live with that. But, I think I can do better than that. I did change a heartbeat LED to use a 10 ms pulse about every 2 seconds.

I will also investigate implementing a sleep mode, but that looks a little difficult as the current program toggles the LED at 50 ms, 50% duty cycle.
The code now blinks at the 50 ms rate for about 10 times and the goes off for about 2 second. I think I need to find the best approach to place the device in the idle mode but not wake up until the 2 second period is done. That should probably be another thread in the proper section of freaks.net

I don't think that PWM is going to a big help, the LED module has a resistor net work built in. I am thinking that using quick pulsing the module may not allow the brilliance that I have now. It is important that it can be observed in bright day light. I probably won't be doing much night riding :lol: .

I ran the setup for about 10 hours the other night on a fresh battery charge that included the heartbeat LED (not really needed)and an test LED running directly from the Tiny pin on the 5 volt signal. The same output (portb.0) that is now driving the ULN2003 input.

I don't think the current draw of the LED 12 Volt LED module is that large. The 7805,
Tiny85 and the ULN2003 never feel warm much less hot.

larryvc : Yep, we both agree, replace that darn fuse :!:

So, thanks for all who offered advice/suggestions. It brought out of the woodwork the electronic geeks :wink:

I'll believe corporations
are people when Texas executes one.

Putting your AVR to sleep can have a huge impact. See e.g. this video from Atmel: http://youtu.be/N6aYs80_boM
Remember your AVR doesn't have to have the clock running for you to get light out of that LED. It's easy to set up a timer to do all that stuff you have talked about. Peruse through the registers of one T/C, and you'll see what you need to do.

"Maybe happiness is just fragments of existence with better packaging."

Quote:
Putting your AVR to sleep can have a huge impact.

Some years ago I did a small project that used the sleep ability and I observed the reduction in current usage, as you mentioned, BIG.

What I have to think about is waking on interrupt using the T85 idle mode. THe timer is running for about 10ms (Timer0)
and that , I think, would be the wake up trigger. But, I only want the wake up after the program has 'strobed' the LED for the
number of times required. Then There is the approximately 1-2 second dead time and it is that time I think it should be in the sleep mode.
So, if it would take an interrupt to wake it up, not sure how to do that.

I did another voltage check this morning after running the program 12 hours and I notice that the average voltage drop is about 0.02 volts/hour.

I'll believe corporations
are people when Texas executes one.

If I understand you correctly, do this:
Sleep CPU -> T/C int wakeup (2s) -> Start PWM -> Sleep CPU -> T/C int wakeup (20ms) -> Stop PWM -> Do stuff -> Repeat from beginning.
The numbers in parantheses is time elapsed since last operation.

"Maybe happiness is just fragments of existence with better packaging."

tubecut,

When using a series resistor to measure current drop, keep in mind the "1 Ohm Rule".

A 1 Ohm resistor will drop 1 volt for each 1 amp increment of current flowing thru it and dissipate 1 Watt of power for each Amp. Therefore, a DVM (in voltage mode) attached across the resistor will numerically indicate the current flow in Amps. Sweet & simple.

If you use a 1 Ohm resistor as your current sensing resistor (and I think this is appropriate in your LED circuit), you get the benefit of this poetic & simple math offered by the 1 Ohm Rule.

Don't have a 1 Ohm resistor? Make one by paralleling larger values. E.g. Ten 10 Ohm 1/4 watt resistors. Just make sure the total wattage is larger than the expected power dissipation (which will be 1 watt per amp). If your resistor has too low of a wattage rating, make the meaurement quickly, before the resistor has a chance of to get hot enough to destroy itself. The wattage rating only affects the ability of the series resistor to indicate current, if that wattage rating in someway contributes to the resistor heating up AND thereby changing the actual resistance value away from 1 Ohm. You can also dunk the resistor in a glass of clean drinking water to keep it cool if it tends to get too hot.

tubecut,

A clarification of the 1 Ohm Rule.

The 1 Ohm's resistor's dissipation IS 1 watt when the current is 1 Amp.

BUT, the dissipated watts increase as the square of the current. So at 2 Amps the resistor dissipation is 4 watts, at 3 Amps it is 9 watts, etc.

I'd guess your lamp current is in the 1/2 to 1 & 1/2 amp range. So max dissipation would be 2.25 watts at 1.5 amps level. If you make your 1 Ohm resistor from ten 1 Ohm 1.4 resistors, you will be OK because 10 x 1/4 watt per resistor, makes the ten resistors capable of dissipating a total of 2.5 watts - OK for a test.