NiMH Battery discharging

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't laugh too much. I am still a newbie in electronics and don't know much.

So, i want to build a really smart NiMH charger. The charging part is based on AVR450 but i need also to discharge the battery for many different purposes and work modes.

I have read the manufacturers handbooks on this type of batteries and IEC specs for testing and they all say that i need to discharge it with constant current.

If i just discharge it though a resistor firstly i will not get constant current (current will drop as voltage drops) and secondly i will not be able to control the current precisely enough.

So, i though, could i use the same charging back-converter with PWM control connected to the battery in inverse to discharge it? This was i could control current, reduce parts and control the voltage the same way i do when i charge.

Would be right to do so?
(i'd use several mosfets to route current one way or the other way)

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Da, but no need for mosfet routing. Just power the charger with the battery and use that to "charge" a resistor at constant current. For high currents an electric space heater makes a good load.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Didn't get you fully. What do you mean by "power the charger with the battery" ? The charger itself is powered from 9 to 12V because it is "smart" (has a microcontroller, lcd, maybe usb interface for statistics collecting).

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Original circuit source was probably some app. note, I didn't keep track of the source.

No OpAmp power supply needed, battery to be discharged supplies OpAmp power.

OpAmp should be rail-to-rail, single-supply type.

OpAmp Vccmax > Vbatterymax.

Vctl controls discharge current.

R1 approx. 120 Ohm, but should be calculated, depending on OpAmp.

Protection circuit should be added to protect against wrong battery polarity and to high battery voltage (wrong battery type) and ESD.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I see what you mean. Yes, using opamp for this is always an option. But! The charger uses buck converter for current supply for charging with pwm control, which is very precise and convenient. So, the question, can i use the same buck converter with pwm control with reversed polarity to discharge the battery at constant current (pwm controlled from Mcu).

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not just use a current limit circuit with a big transistor connected to a heatsink? You can also measure the current using an ADC channel.

This is simple enough and you can program it with a resistor.

The idea of using the buck for discharge is kinda confusing. How do you ensure a fixed discharge current?- you need to be measuring the battery discharge current and not the current on the output of the buck converter.

oddbudman

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not just use a current limit circuit with a big transistor connected to a heatsink? You can also measure the current using an ADC channel.

This is simple enough and you can program it with a resistor.

Quote:

But i need to program it with MCU. The discharge current is selectable via menu of the charger.

As i said, i am a newbie in electronics. What current limiting circuit do you mean exactly?

As for the buck. The idea was that the current THROUGH the battery is the same as the buck gives. So, i measure the buck current via a mall resistor using ADC on the MCU and assume that this is the battery discharge current. If current goes out of the needed rate MCU adjusts the PWM for the buck and return current to the right value.

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe this helps.
Attached one stage (out of four) of my constant current dumper.
Un_load is a digital signal from the AVR: when set high, the load is off. independant from Cur_set
Cur_fb is the actual current feedback: and analog signal that connects to an ADC-pin of the AVR
Cur_set: analog voltage, appr. 0 to 4V, generated with PWM. Results in a current dump of appr. 0 to 3A. The 4M7 makes sure that @ PWM=0, Cur_set is equal or less than 0

This schematic is a cut-out from an existing design .... therefor the signalrouting may look a bit weird.

What are the requirements for your design in terms of speed, accuracy and amount of current ?

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
What are the requirements for your design in terms of speed, accuracy and amount of current ?

Well, don't know about the speed. As for the MCU speed i will run it at max it can do. (16-20Mhz). It is outlet powered - not need top be conservative about this.

Current: from 100mA to 500mA for dischange per battery. Total 4 batteries, but they all are TOTALY independant. (4 chargers and 4 dischargers needed under control of 1 mcu).

Accuracy for current not less than 10-15 mA.

I need some time to understand the schematic, but the thereticall question is the same. If you have constant current source or constant surrect sink, can't you use it for charging and DIScharging at the same time? As i see it the process is the same in many ways. Isn't it?

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am working now on a "better to read" schematic, and gave it a better pulseresponse. Hold on ....

Speed: no, I mean: how fast must the response be when the setting is changed. But I think that is not an issue here.

What is the battery voltage ?

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here it is. Better to read and speedy. Comes with a price: the number of components ;)
Since you're looking for the combo, we need to think of something else.
Bring up some specs:
Available supply voltages ? How much current can they supply ?
Battery voltage .... capacity
Is dissipation an issue ?
... and everything else that may be of interest.

What are you building btw ? A universal charger/discharger, with capacity measurement ?

Nard

edited

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Available supply voltages? preferrably - 9V
How much current can they supply? - up to 5A

This is the PS (AC-DC) i already have and want to use it.

Battery voltage .... capacity: Only NiMH, 1.2V from very low 800mAh to huge 2700 mAh or more.

Quote:
Is dissipation an issue?

Not, as far as i see. It is not a compact device. If it will need a heat sink then it will get a heat sink.

... and everything else that may be of interest.

- don't know yet :) I don't see anything special.

Quote:
What are you building btw ? A universal charger/discharger, with capacity measurement ?

Yes, exactly the one. But not really UNIVERSAL, as i said, only NiMH, 1.2V AAA and AA.

I attached the schematic from AVR450 i took. It had SMBus lines too but i omitted them. No need.

https://www.avrfreaks.net/modules...

So, the question is how to integrate an MCU controlled discharger into it.

Attachment(s): 

Artem Kuchin.
Electronics hobbyist. Born in 1976.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

May be connect PWM1 with RC filter to pin5 U1B to controll Vbat up to 0V (or 1V).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That buckcharger circuit looks fine !

Based on that, I added a discharge circuit.
PWM1 is a high frequency PWM which is converted to an analog voltage. This voltage is summed with the current feedback over R1. This summingpoint remains at AGND-level as long as the LM358 stays in its working range. So set the desired discharge level with PWM1, and activate or disactivate it with /Do_discharge. The pullup R4 ensures that the discharge is disabled when the AVR is reset.
I used the very same symbolnames for GND, AGND, AVCC and VCC as in the posted schematic.

Note the remarks in my schematic !

I didn't test it, so dear fellow freaks: please have a look and comment.

Nard

Oh, and Artemru: for testing purposes use a smaller supply than the PC-PS, and add a resistor of 1 Ohm in series with the battery when you start testing.

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, eventually i figured out this:

PWM, ADC1 and ADC2 go to the MCU pins.
PWM is generated from timer and is used to control current though the transistor.
ADC1 measures the remaining voltage on the battery. If it goes below the threshold the discharging process stops.
ADC2 measures the voltage drop on the R (R is very small and high precision) and then MCU calculates the current from that voltage drop for known R. Then MCU adjusts PWM so current stays constant.

The idea is simple.

There are questions though:

1) I guess i need a transistor with very small resistance, so i can get big current (up to 1A) to discharge the battery faster. The best solution, i guess, is a MOSFET with Rds(on) from 0.02 to 0.2 Ohms. Right? Do I need a P channel enhanced mode MOSFET with max current at least 1A?

2) PWM by itself is not very good, because the voltage on R will jump up and down and it will be impossible to reliably measure it width ADC. So, i must average the voltage, that is convert PWM to DC voltage. I have done it already for the gate voltage (from PWM pin) with low pass filter (R=3K, C=10uF) and got a very steady voltage controlled in small steps (255 levels). However, is it better to do this DC converting for the gate voltage right after PWM pin or for the battery current (after the drain before thr R) ?

3) Here
http://www.artem.ru/elektro/char...
The MOSFET is not controlled directly from MCU PWM pin but with help of a bipolar transistor? Why? Is it only because MCU might not give enough voltage to surely exceed threshold voltage for the fet? Why are they using inductor for current averaging? Why not simple RC low pass filter?

Artem Kuchin.
Electronics hobbyist. Born in 1976.