From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help to build a battery test station

Solved!
Go to solution

Hi all,

 I am doing battery research, and I need to write a labview program to charge and discharge my battery ( the commercial test stations typically cost at least a few thousands). I have a couple of Keithley 2000 meters so that I can measure my current and voltage as a function of time. I also have a Keithley 6220 current source so that I can use it either as a current source (e.g., 1 mA for charging) and a current sink ( e.g, -1mA for discharging). I am able to control the current source meter using the downloaded driver, however I was unable to make the current change automatically for cycling tests. 

For examples, I wish to  discharge a battery for 1 h (set current level at -1 mA), then charge it for 1h (set current level at 1 mA), and repeat the procedure for 100 cycles.  I have put a timer to give time in second, by dividing with 3600s we can get hours as well. Can anyone help me finish the  program so that I can have the meter to switch between positive and negative currents automatically and put the current level to 0 after the very last cycle? 

 

 Thanks.

 

Andrew

Download All
0 Kudos
Message 1 of 17
(5,259 Views)
Solution
Accepted by topic author AndrewZhu

Hi Andrew,

 

The quick fix is to put your current value into a shift register. When your timer is up, multiply the value by -1.

 

The longer fix is to look into a state machine architecture. Googling "labview state machine" will give plenty of results. You could then have a charging state and a discharging state.

0 Kudos
Message 2 of 17
(5,244 Views)
Solution
Accepted by topic author AndrewZhu

Here's a link for the State Machine tutorial.


GCentral
Message 3 of 17
(5,219 Views)
Solution
Accepted by topic author AndrewZhu

Having designed and programmed a similar system (My battery test system has 6x DC power sources and DC loads, I use an Agilent 34972A for data acquisition and can discharge up to 125 Amps and charge up to 50 Amps single batteries or up to 75V battery strings and I can series/parallel for larger batteries)

 

Our batteries are not toys...

 

I don't know where you are getting your battery test algorithm, but charging for an hours and discharging for an hour is not going to tell you much. To measure battery capacity you need to top them off then discharge at a constant rate until LVD while keeping track of the Amp Hours discharged. Then you recharge while also keeping track of the Amp Hours restored,  (usually until Ah restored is > 110% Ah Discharged) and repeat at several different discharge rates.

 

Also you need to use a proper program architecture like a state machine, "One big loop" does not cut it.

 

Think about your process and break it down into steps, then translate those steps into program "states"

My battery test goes something like this:

  1. Initialize instruments 
  2. Test parameter input
  3. Top Off Charge
  4. Discharge
  5. Recharge

So I have these states:

  1. Init 
  2. Get parms
  3. Charge
  4. Discharge
  5. Measure (and record data)
  6. Timer

My program spends most of it's time in the "Timer" state waiting to take a measurement. Based on the measurement taken the next state is determined.

========================
=== Engineer Ambiguously ===
========================
Message 4 of 17
(5,182 Views)

Hi Gregoryj,

 Thanks. I am working on it. 

   

 

0 Kudos
Message 5 of 17
(5,167 Views)

Cbutcher,  Thanks for the advice.

 

0 Kudos
Message 6 of 17
(5,166 Views)

Hi Rtslvu,

   Thanks for you detailed explanation. I am testing a newly developed solid electrolyte for room temperature applications. The batteries were assembled as CR2032 coin cells so that we are talking about mA range. And the 1 h charge is just an example, and should be a control parameter. What I want to see is not the maximum capacity (already measured) but the cell voltage response after many low charge and discharge cycles under a given current. If you don't mind, can you share your program or send it to me as a  message? I can share or repost my program after I get the functions I need. 

 

 

0 Kudos
Message 7 of 17
(5,161 Views)
Solution
Accepted by topic author AndrewZhu

Here is an example that uses a single DC source and power supply that will be easier to follow.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 17
(5,158 Views)

Thanks. Need to upgrade my Labview version 🙂

0 Kudos
Message 9 of 17
(5,152 Views)

I can save it for an older version, what version do you need?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 10 of 17
(5,145 Views)