Go Down

Topic: Adjustable current load with µC (Read 1 time) previous topic - next topic

terraduino

I was testing a rechargeable battery with 11 resistors in parallel that draw approx. 200 mA @ 4V.
While the battery depleted and voltage dropped, the load decreased due to ohms law. I already searched for "constant current load" but I do not have the parts that are usually needed.

I came up with the idea to use an ATTiny13ATmega328--but anymost µC would do--to drive NPN transistors, i.e. 2N2222, to add load dynamically. I know this is not very precise but that does not matter. Keep the current variation constant by, for example, 20mA would be good enough. Let's say I use 250 Ohm resistors.

Does the attached schematic work in general?
The max voltage of the battery to test will be in the range of 1.4-5.6V.
The ATmega328 will have its own power supply and I will measure the remaining voltage add load.
If useful, I have NE555, PNP transistors and some p-Mosfet at hand. Maybe there is another way to add load dynamically with one or more ATmega328?

If there are other and/or easier solution, feel free to tell me.

Thanks & best
--
Just a curious hobbyist. Only basic knowledge about electronics, microchips and the like.
Non-native speaker, please bear with me.

allanhurst

#1
May 17, 2017, 11:41 pm Last Edit: May 17, 2017, 11:46 pm by allanhurst
Hmmm.. not how I'd do it.

Something like the enclosed would do the job.

If you want to drive it with PWM from an arduino. tgo set the current  drive the chain at  the top of R3 with a well - filtered arduino output and remove the 1.2v reference..

Allan

terraduino

Thanks for your feedback.
Unfortunately, I don't have an LM358 or any other op-amp. :(
--
Just a curious hobbyist. Only basic knowledge about electronics, microchips and the like.
Non-native speaker, please bear with me.

allanhurst


terraduino

You're right, unfortunately, that does not change the fact that I don't own one ;). In addition, in my small town there is not a single shop for electronics. :( Order online needs time to deliver ...
--
Just a curious hobbyist. Only basic knowledge about electronics, microchips and the like.
Non-native speaker, please bear with me.

Wawa

A basic 20mA current sink can be made with a (2N2222) transistor, two (1N4148) diodes, and two resistors.

33ohm resistor (sets the current) from emitter to ground.
Two diodes in series from base to ground.
10k resistor from base to 5volt. Or to an Arduino output pin, to switch the circuit on/off.

Connect the battery to drain to the collector.
Google "current sink" (images) for more circuit diagrams.
Leo..


edgemoron

#6
May 18, 2017, 02:41 am Last Edit: May 18, 2017, 02:56 am by edgemoron
Try this:

allanhurst

The op wants a 200mA drain... not 20.   Hence max dissipation is 5.6 x 0.2 = 1.12 W .

A 2N2222 won't handle that.

What devices do you have? any bigger NPN's? Or mosfets?

Allan

edgemoron

#8
May 18, 2017, 03:44 am Last Edit: May 18, 2017, 03:59 am by edgemoron
Circuit has been running for 2 + hrs drawing 200mA from a 5V phone charger, 2N2222 is dropping 0.99V = 200mW, it's pretty warm, but I can hold my finger on it for more than 10 seconds, might be 55C.
EDIT: mA meter is dropping 2.7V.

promacjoe

For those who have an adjustable Lab type power supply, You can stack them in series for higher voltage, or parallel them for higher current. You can also use It as an electronic load. First set the controls to 0V, 0A. Connect your battery positive to negative, and negative to positive. Adjust your current load accordingly. For low current applications It works well. Just make sure you do not exceed the current, voltage, wattage rating of the power supply.

terraduino

Thank you all for your input.
My constant resistor load was build of 220R resistors. Heat is negligible. I tried 22R but these were to hot for me. I've got plenty of 220R so it doesn't matter to use a dozen or more. That said, I could combine these behind a single NPN, see attached, to increase the dynamically added load.

@allanhurst I have: Schottky SMD diodes, 2N3906, 2N2222, 1N4007, NTR2101P (p-Mosfet), LDR, LED.
No other NPN, mosfet or the like.

@Wawa
I found a schematic that looks related to what you described. I simulated this circuit but the current drops with decreasing voltage. Where is the "adjustable" part in this circuit?

Thanks & Best
--
Just a curious hobbyist. Only basic knowledge about electronics, microchips and the like.
Non-native speaker, please bear with me.

Wawa

@Wawa
I found a schematic that looks related to what you described. I simulated this circuit but the current drops with decreasing voltage. Where is the "adjustable" part in this circuit?
This is a double transistor circuit (better). I described a single transistor circuit.
The top transistor of the current sink circuit conducts the load current, and can be bigger (or a mosfet).
The bottom transistor cuts base current (or gate voltage) when voltage across the current sense resistor reaches/stabilises at ~0.65volt. So a fixed current sink. R=0.65/I or 0.65/0.2A = ~3.3ohm for 200mA
The circuit can be switched on/off if base resistor(R) power comes from an Arduino pin.
Several if these circuits could be used in parallel to select different load currents.
Leo..

Smajdalf

Filtered PWM from Arduino pin can be used as "constant voltage" that can be adjusted according to current required.

If you don't need constant current you may unfiltered PWM. On this (from Wiki)


Connect R1 to PWM pin instead of Vs and battery (connected to GND) instead of load.
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0

terraduino

#13
May 18, 2017, 09:05 pm Last Edit: May 18, 2017, 09:06 pm by terraduino
@Wawa Thanks for the explanation.
I found my mistake when simulating the circuit. I chose the wrong value for the base resistor.
Here my simulation.

The current sink is 204.5mA @ 4.2V and 178.9mA @ 2V. Nice and simple solution. :)
Btw I saw no relevant difference using one, two or no diode. Any reason to add one?


@Smajdalf Thanks for your idea. ATM i prefer a solution without µC.

Best
--
Just a curious hobbyist. Only basic knowledge about electronics, microchips and the like.
Non-native speaker, please bear with me.

Wawa

Btw I saw no relevant difference using one, two or no diode. Any reason to add one?
The whole idea is to create a constant voltage across the current sense resistor.
Constant voltage across a resistor is a constant current through it.

That double transistor circuit uses the BE diode drop of the lower transistor.

The single transistor circuit "lifts" the base with two diode drops.
Needed, because the BE diode of the transistor lowers it with one diode drop.
One diode drop across the resistor again.
Leo..

Go Up