You are on page 1of 14

Atmel AVR363: AVR Battery Studio 2 User

Guide

8-bit Atmel
Features Microcontrollers
• Supports battery management development using Atmel® AVR® microcontrollers
• Supports multiple-devices connections
• Workspace based documents management system
- Support multiple projects opened in the same workspace Application Note
- Support multiple battery management windows opened in the same time
• Optional SQL server database for each battery pack
• Supplies SBS standard commands quick list – click to issue

1 Introduction
Atmel AVR Battery Studio 2 is the front-end to the Atmel battery management
development tools. Together, AVR Battery Studio and the tools support the
development, test and manufacturing process. AVR Battery Studio 2 has three
editions: enterprise, standard and professional. This document will help you to
quickly establish a working environment with Atmel Battery Management.

Figure 1-1. An overview of a typical battery management workspace.

Rev. 8335A-AVR-11/11
2 Getting started

2.1 Workspace
Atmel AVR Battery Studio 2 is a workspace based IDE. It is recommended to use
different workspace layouts for different steps of the process. Recommended
workspace layouts are available with the installation of AVR Battery Studio. These
can be used as is or modified for individual requirements.
When you open a workspace, all projects in this workspace will be opened
automatically and all components will try to resume working state. The idea of
projects and components are just concepts for making customers’ daily work clean
and efficient. So there is no need for opening/closing a project individually.
When you close a workspace or the studio, whole workspace will be saved.

2.2 How to load a workspace


For Enterprise edition, every time you start the studio, system will load a workspace
from the file “<application setup folder>\solution\DEMO.xml” automatically. For other
editions, you could open a workspace from menu workspace->Open.

2 Atmel AVR363
8335A-AVR-11/11
Atmel AVR363

3 How to connect to Atmel BM300


If you have successfully loaded a workspace into the studio, you should see one or
more components on a project work field from the left to the right. Other opened
projects are listed on the lower right corner of the window. Clicking these labels will
switch to that project.
If a component looks like any pattern shown in Figure 3-1, it’s a battery management
module. After connecting with BM300, you could use this component to access the
Battery Management pack which is connected to the BM300 through SMBus or
single-wire UART.

Figure 3-1. The visual patterns of the battery management module.

X 47% 47% 47%


?
Battery #1 Battery #1 Battery #1 Battery #1 Battery #1

Disconnect Normal Discharging Charging Unknown


(Idle)

3.1 Reading battery status from the visual pattern


The battery management module can show five different states of a battery
management pack. These are disconnect-, unknown-, normal (idle)-, charging-, and
discharging state (see Figure 3-2).

3
8335A-AVR-11/11
Figure 3-2. The states transparent of the battery management module.

X ?
Battery #1 Battery #1

Disconnect Unknown

47% 47%
Battery #1 Battery #1 Battery #1

Charging Normal Discharging


(Idle)

3.1.1 Disconnect state


If the Atmel BM300 is not plugged in, not recognized as a HID-compliant device by
windows or target BM300 already opened by other component, disconnect state is
entered. At any time, if a connected component lost the connection with the target
battery, disconnect state will be entered.

3.1.2 Unknown state


After BM300 is plugged in and properly connected, battery management module will
enter unknown state first and try to identify target battery pack. If the identification of a
battery management pack failed in this stage, system will prohibit all access to the
part except for sending user-defined SBS commands and SBS quick commands.
Refer to Section 4.4 for more detail. If the solution used in the battery management
module matches the firmware used in the battery management pack, the system will
leave unknown state. If you see a battery management module keeping this state for
quite a long time, there might be something wrong with the connection between
BM300 and the target battery pack.

3.1.3 Normal (idle) state


After the identification, the system will read all information and configurations of the
battery pack immediately. If the value of the battery current is zero, idle state is
entered. In this state, if system lost connection with the battery pack, disconnected
state is entered. If the BM300 is re-plugged in, system will re-enter normal state
directly.

4 Atmel AVR363
8335A-AVR-11/11
Atmel AVR363
3.1.4 Charging state
After the identification, if a charging current is detected, charging state is entered. In
this state, if system lost connection with the battery pack, disconnected state is
entered. If the Atmel BM300 is re-plugged in, system will re-enter charging state
directly.

3.1.5 Discharging state


After the identification, if a discharge current is detected, discharging state is entered.
In this state, if system lost connection with the battery pack, disconnected state is
entered. If the BM300 is re-plugged in, system will re-enter discharging state directly.

3.2 Connect battery pack through the BM300


Atmel AVR Battery Studio 2 can remember the connection state between BM300 and
a battery management module. When you get a new BM300, you should establish a
connection between the battery management module and the BM300 manually. After
that, system will connect the BM300 for you every time you open the workspace or
plug the BM300 in.

Figure 3-3. Connect BM300.

3.2.1 Connect BM300 with battery management module


As shown in Figure 3-3, you should double-click the target component; select the
table page “properties”. In device page, find an item which name is “AT
SB200/BM300”, double click it and then you should see all available tools list in the
right table. Select the wanted device and do a double click to open it. If succeed, you
should see the device status changed from “closed” to “opened”. Otherwise, you
should check whether this device is connected by other component.

5
8335A-AVR-11/11
4 Working with a battery pack
After the connection with a battery pack through Atmel BM300 is created properly and
the identification stage is passed the system is ready to be used. In use, detailed
information of the target pack can be read, the battery status over a specified time
span can be scanned and saved to a dedicated database and the Battery
parameters/settings can be configured.
If a battery module in a project work field is double clicked, or select in the right click
pop-up menu, a battery window will be shown (see Figure 4-1). There are five
different table pages in this window: General, Information, Settings, SMBus and
Properties.

4.1 Static information


In the general page, description about the battery management solution will be
displayed on the left. The name, static information such as Device Chemistry,
Manufacture Name, Serial Number etc will be shown on the right side of the page.
You can click the static information name to refresh an item, although this kind of
information might not be changed frequently.

Figure 4-1. Read the general information of a battery management pack.

4.2 Detailed SBS information


In the information page, detailed information of the target battery pack will be
displayed in two different styles: normal information items and flags (see Figure 4-2).
There are two kinds of items, read-only items (information) and writable items
(parameter).
Left click an information label will refresh this item. The behavior of clicking a
parameter is selectable by the customer. By open a dropdown menu in the left corner

6 Atmel AVR363
8335A-AVR-11/11
Atmel AVR363
of the item, a value can be written into the target device or a value can be read from
the device when you click the parameter item name. To prevent unintended writing to
the battery pack every time a new battery management window is opened, all
parameter items will be set to read information mode as default when you click the
label.

Figure 4-2. Read the detailed information of a battery pack.

For parameter items, all values are displayed in blue. For information items
unchanged value will be shown in brown and changed value will be in blue. Left
clicking an information value will switch the item behavior state between auto refresh
and manual refresh. All auto-refreshed items will be highlighted (shown as Figure
4-2).
You can manually refresh all information items by clicking the refresh button in the
right top corner. If the system failed in data exchange with a pack, the color of the
item will become gray.

4.2.1 Information auto scanning and database


The battery management module supplies an auto-refresh feature which is helpful for
users to refresh specified information items with a fixed time span. As shown in
Figure 4-3, if the dropdown button is set to Enable Log state, a dialog titled as
Sampling Plans (see Figure 4-4) will pop up. Through this dialog, a new database
sampling plan can be created with a user specified name. The system will now record
all auto-refreshed information items into the database. The content of a sampling plan
is reviewed from the history page (see Figure 4-5).

7
8335A-AVR-11/11
Figure 4-3. Start an auto-refresh service.

NOTE The SQL server 2005 installation is required to support advanced data formats.
Without this installation, the auto-refresh service will work properly and all sampled
record could be save to a log file when you check the “Output to Text (*.log)
documents at background” selection.

Figure 4-4. Create a new sampling plan in the database.

With a database, you can export any sampling plan into log file or excel documents
by click the Export button of the toolbar in the top of the history page. During export,
you can still auto-scan the target and add new records to the same sampling plan. If
the record number is large, it is strongly recommended to export a sampling plan into
a log file first, and then open this log file in excel.

8 Atmel AVR363
8335A-AVR-11/11
Atmel AVR363
Figure 4-5. History window for reviewing data records in database.

4.2.2 Location of output documents


Each battery module maintains its own database and the log files are automatically
organized. By clicking the dropdown button next to Sample Plan, the “Documents
Folder” will be opened (see Figure 4-6). A typical document folder is shown in Figure
4-7.

Figure 4-6. Open documents folder.

Figure 4-7. A typical documents folder.

9
8335A-AVR-11/11
4.3 Configure a battery pack
All of the configurations of a battery pack are done on the Settings page. An example
of the setting page is shown in Figure 4-8. Parameter items and information items are
organized by category and functionality. The values of all parameter items from the
battery pack can be read by clicking the “Read All” button in the toolbar.

Figure 4-8. A typical configuration window.

To change the value of a parameter item, double click the original value (keep your
mouse point in the editor range) write a new value and press enter to apply. For more
details about the battery parameter configuration, please refer to dedicated
application notes.

4.4 Send individual SBS commands


After a proper connection with a battery is established, a direct SBS command
channel is created. Whenever the battery passes the identification stage, an SBS
command can be sent in the SMBus page (see Figure 4-9). The SMBus page is
divided into two parts, one for users to edit/issue SBS commands and another for the
SBS quick command list.
A typical SBS quick command list is shown in the right part of Figure 4-9. Detailed
information of a SBS command including a brief description is shown in the list.
Double clicking a list line issues the SBS command, and all configurations of this
command will automatically be copied to the left window.
According to the definition of SBS, commands have four types: Word Write, Word
Read, Block Write and Block Read. When a user SBS command is written, the first
step is to select a command type from the dropdown list (Figure 4-10).

10 Atmel AVR363
8335A-AVR-11/11
Atmel AVR363
Figure 4-9. SMBus window.

Figure 4-10. Select command type.

After setting all the necessary information, clicking the “Execute” button will issue the
command. Figure 4-11 shows the available target buses and Figure 4-13 shows the
response mode used by the reply monitor.

Figure 4-11. Select communication bus.

11
8335A-AVR-11/11
Figure 4-12. User-defined SBS command window.

Smart Battery Address


SBS Command Send to SMBus in SMBus Response Timeout (ms)

Word to be sent Word Read from device

Written format (Hexadecimal)


Content written to
device (smart battery)

Display format (Hexadecimal)


Content read from
device (smart battery)

SBS Command type BM300 communication protocol Click this button to


(Need not to care about it) send a SBS command

NOTE A wait-forever command will consume an un-recoverable system resource when the
target device is not responding. It is better to set a timeout value if it is possible.
A successful No Parameter command, Write Word commands and the Write Block
commands will show a pop-up dialog; a Read Word command will display the value
on the result textbox of the target device; a Read Block command will display the
received binary stream in a specified way (hexadecimal value or normal string).

Figure 4-13. Set response monitor mode.

12 Atmel AVR363
8335A-AVR-11/11
Atmel AVR363
5 Table of contents
Features ............................................................................................... 1
1 Introduction ...................................................................................... 1
2 Getting started ................................................................................. 2
2.1 Workspace........................................................................................................... 2
2.2 How to load a workspace .................................................................................... 2
3 How to connect to Atmel BM300 .................................................... 3
3.1 Reading battery status from the visual pattern.................................................... 3
3.1.1 Disconnect state........................................................................................................ 4
3.1.2 Unknown state........................................................................................................... 4
3.1.3 Normal (idle) state ..................................................................................................... 4
3.1.4 Charging state ........................................................................................................... 5
3.1.5 Discharging state....................................................................................................... 5

3.2 Connect battery pack through the BM300........................................................... 5


3.2.1 Connect BM300 with battery management module ................................................... 5

4 Working with a battery pack ........................................................... 6


4.1 Static information................................................................................................. 6
4.2 Detailed SBS information .................................................................................... 6
4.2.1 Information auto scanning and database................................................................... 7
4.2.2 Location of output documents ................................................................................... 9

4.3 Configure a battery pack ................................................................................... 10


4.4 Send individual SBS commands ....................................................................... 10
5 Table of contents ........................................................................... 13

13
8335A-AVR-11/11
Atmel Corporation Atmel Asia Limited Atmel Munich GmbH Atmel Japan
2325 Orchard Parkway Unit 01-5 & 16, 19F Business Campus 16F, Shin Osaki Kangyo Bldg.
San Jose, CA 95131 BEA Tower, Milennium City 5 Parkring 4 1-6-4 Osaki Shinagawa-ku
USA 418 Kwun Tong Road D-85748 Garching b. Munich Tokyo 104-0032
Tel: (+1)(408) 441-0311 Kwun Tong, Kowloon GERMANY JAPAN
Fax: (+1)(408) 487-2600 HONG KONG Tel: (+49) 89-31970-0 Tel: (+81) 3-6417-0300
www.atmel.com Tel: (+852) 2245-6100 Fax: (+49) 89-3194621 Fax: (+81) 3-6417-0370
Fax: (+852) 2722-1369

© 2011 Atmel Corporation. All rights reserved.


® ®
Atmel , Atmel logo and combinations thereof, AVR , and others are registered trademarks or trademarks of Atmel Corporation or its
subsidiaries. Other terms and product names may be trademarks of others.

Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to
any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL
TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS
ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE
LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION,
DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO
USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or
warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and
product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically
provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or
warranted for use as components in applications intended to support or sustain life.

8335A-AVR-11/11

You might also like