From Technologic Systems Manuals
Jump to: navigation, search
Product Page
Battery Datasheet


1 Overview

The TS-BAT10 is a PC/104 peripheral that contains two 4.2v 2200mA LiPo batteries wired in parallel to provide a high power battery back up system for Technologic Systems' Single Board computers as well as most other PC/104 SBC modules. The TS-BAT10 acts as both a regulator and a battery back up system, accepting from 5VDC to 30VDC and powering the entire PC/104 stack via the 5+VDC pins on the 64-pin PC/104 connector. The batteries are charged via two dedicated LiPo chargers that will charge the batteries until they reach 4.2 volts or for a maximum of a 6 hour charge time. Each battery has an indication of "charging", "charge complete", or "fault", these three states can be read from userspace by the SBC. Each battery can also have a slow 250mA charge current, or a fast charge 500mA current depending on the current source available.

2 Getting Started

Be sure to remove all power from the system and install a jumper on position 4 (battery backup disable) of the 2x4 pin header to disable battery power before connecting TS-BAT10 to a PC/104 stack. A jumper also needs be installed in one of the three address decode jumper positions. Exactly one address jumper must be installed, resulting in the TS-BAT10 using one of the following PC/104 address ranges:

  • 0x110-0x11F
  • 0x150-0x15F
  • 0x300-0x30F

On Technologic Systems ARM SBCs, that base address must be added to the 8 bit PC/104 base address for the particular system.

3 Operation

To use the TS-BAT10 for the first time, add it to a PC/104 stack, with jumpers installed as described above, and provide 5-28V DC on the power input connector. The TS-BAT10 will begin providing a regulated 5V to the SBC. The batteries will not be charging and will be disabled, and none of the status LEDs should be lit. JP4 can now be removed to allow battery backup. With JP4 installed, battery power will never be used.

Once battery backup is enabled, the TS-BAT10 will power the system any time external power is removed. The TS-BAT10 uses a boost regulator in order to boost the 4.2V DC provided by the two LiPo batteries to the necessary 5V DC for the PC/104 system. The input regulator for the external power supply requires at least 4.5V DC in order to provide power to the system. With an input voltage in the range of 4.5-5V DC the boost regulator will bring the voltage up to the proper levels.

3.1 Battery Charging Sequence

Once the TS-BAT10 is provided at least 4.5V DC, the host SBC can instruct the battery charging ICs to begin their charging cycle. Using the timers is highly recommended to provide safe charging. The timer on the charging devices is set for 6 hours; if this expires the batteries will immediately stop charging and show a fault.

In order to begin a slow charge with the timers enabled, write 0x78 to the TS-BAT10 address space. Both red "charging" (CHG) LEDs will turn on. This will draw an additional 500mA (250mA for each battery) for the duration of the charge cycle. For a fast charge with the timers enabled, write 0x18 to the TS-BAT10 address space. This will cause the TS-BAT10 to draw an additional 1A of current from the external power supply (500mA for each battery).

The standard 5V DC @ 1A power supply from Technologic Systems will not be able to provide enough current to do a fast charge as well as provide power to the SBC. If the regulated 5V DC line slumps below 4.5V DC it will be unable to charge the batteries properly and will suspend charging until the proper voltage is available. It is not recommended to charge each battery individually unless there is a guarantee that the system will not go in to battery backup mode until both batteries are charged to the same level. Unequal charge levels can result in imbalanced current draw which can result in damage to the battery packs.

The charge controllers are intelligent and have automatic cutoff when the batteries are at the correct voltage, the batteries overheat, or the max charge time is exceeded. To maximize the lifetime (number of recharge cycles) of a LiPo battery, it is best to wait until the batteries report they are below 3.3V and then begin a full charge cycle. This is recommended for use cases where the system will only use the TS-BAT10 for power for a brief time while it does an orderly shutdown. Note that the battery charge controllers will not automatically begin a charge cycle; they must be commanded to do so via software.

WARNING: Do not attempt to trickle charge the batteries! The TS-BAT10, the batteries, and the SBC can all be damaged by trickle charging and overcharging the batteries. Overcharging the LiPo batteries can result in a fire or explosion hazard. It is recommended to issue a charge command a maximum of once per boot cycle when power is applied.

3.2 Disabling Battery Backup Power

There are five conditions under which the batteries will be disabled from powering the system:

  • Valid external voltage is applied
  • The battery voltage is below 3.1V DC
  • A jumper in position 4 is installed
  • A large current draw has occurred and the regulated 5V DC drops below 4.45V DC
  • The battery backup is disabled by software

Battery backup functionality is enabled by default when the system is first powered up unless JP4 is installed.

LiPo batteries can be severely damaged if the cell voltage drops below 2.3V DC. In order to prevent permanent damage to the cells, the battery backup functionality is automatically disabled if the cell voltage drops below 3.1V DC. LiPo batteries hold their nominal voltage (in this case, 4.2V DC) through the length of their charge. The LiPo discharge curve will drop voltage sharply once the cells can no longer provide adequate current. There is a low battery register that indicates when the cells are below 3.3V DC. When the cells are less than 3.3V DC the LiPos will only be able to provide stable voltage for minutes at most. The recommended procedure is for the system to shut down when the batteries reach 3.3V DC and no external power is available.

The TS-BAT10 will ship with a jumper in position 4 to prevent the batteries from being drained during shipment. When this jumper is installed, the battery backup functionality will never be enabled; however, the batteries can still be charged using normal procedures.

The batteries and boost regulator can provide 4A of current. If that is exceeded under battery operation and the regulated 5V DC line drops below 4.45V DC, the batteries will immediately be disabled until the backup circuit is reset or external power is restored, see the Push Button section for more information.

If the battery backup is disabled via software, the power to the PC/104 system will be cut if the external input power is cut. The software disable will reset to its enabled state when external power is re-applied. Power can also be restored to the system via the battery backup by resetting the battery backup circuit, see the Push Button section for more information.

3.3 Push Button SW1/CN1

A momentary switch is installed on the side of the TS-BAT10. This switch can be read by software from the SBC to trigger a custom event, or to re-enable battery backup functionality while there is no external power and the battery backup has previously been disabled. Pressing and holding the switch for one second will cause the battery backup to become enabled and provide 5VDC through the PC/104 stack. See the Register Map for more information.

The two pins labeled CN1, located immediately next to the push button, can be used to connect an external button. If the two pins are shorted together it has the same effect on the system as if the push button were depressed. This can be used to bring out the push button to the outside of an enclosure.

The push button, combined with the low battery state, can be used in a power management application. A userspace process can poll the register; if a low battery condition occurs, or if the push button is depressed, the system can be commanded to safely shut down.

4 Jumper Configuration

Jumper Function
1 Use 0x110 as base
2 Use 0x150 as base
3 Use 0x300 as base
4 Disable battery backup
CN1 Switch contacts in parallel with SW1.

5 Register Map

5.1 Status Register (Read only)

This register is available at (SBC PC104 base) + (TS-BAT10 PC/104 address)

Read-only Status Register
Bit 0 0 = Battery 2 charge complete
1 = Battery 2 charge did not complete
Bit 1 0 = Battery 2 charging
1 = Battery 2 not charging
Bit 2 0 = Battery 1 charge complete
1 = Battery 1 charge did not complete
Bit 3 0 = Battery 1 charging
1 = Battery 1 not charging
Bit 4 0 = Battery backup disable jumper installed
1 = Battery backup disable jumper not installed
Bit 5 0 = input voltage not OK
1 = input voltage OK
Bit 6 0 = Battery under 3.3V
1 = Battery over 3.3V
Bit 7 0 = Push switch is closed
1 = Push switch is open
Note: bits 0-1 and 2-3 are also used to indicated a fault in charging. If they are both logic 1 (HiZ state) after initiating a charge cycle, either the timer has expired or the thermal cutoff of the batteries has engaged.

5.2 Configuration Register (Write only)

Write-only Configuration Register
Bit 0 0 = Enable battery backup
1 = Disable battery backup
Bit 1 0 = Enable battery 1 charge timer
1 = Disable battery 1 charge timer
Bit 2 0 = Enable battery 2 charge timer
1 = Disable battery 2 charge timer
Bit 3 0 = Disable battery 1 charge
1 = Enable battery 1 charge
Bit 4 0 = Disable battery 2 charge
1 = Enable battery 2 charge
Bit 5 0 = Charge battery 1 at 500mA
1 = Charge battery 1 at 250mA
Bit 6 0 = Charge battery 2 at 500mA
1 = Charge battery 2 at 250mA
Bit 7 Reserved

6 Safe Shutdown Example

The typical operation of the TS-BAT10 is to enable charging on startup, and safely shut down the board when power is lost. When the TS-BAT10 receives 5V it will reapply power to the PC104 bus. This can be accomplished with the tsbatctl and a startup script at /etc/init.d/ups-monitor.

This script should be created at /etc/init.d/ups-monitor.

case "$1" in
                nohup /usr/bin/tsbatctl --jumper 1 -a 2 -b 2 --daemon &
                /usr/bin/tsbatctl --jumper 1 --disable-power
                echo "Usage: ups-monitor start|poweroff" >&2
                exit 3
exit 0

The script will be called by runlevel 0's halt script by default, so this only needs to be added to the startup script.

chmod a+x /etc/init.d/ups-monitor 
update-rc.d ups-monitor defaults

This is tsbatctl.c and should be installed to /usr/bin/tsbatctl.

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <getopt.h>
#include <string.h>
// The mpeek/mpoke functions are specific to the TS-47XX, TS-7250-V2
unsigned int opt_pc104 = 0x81008000;
volatile uint8_t *muxbus = 0;
uint8_t mpeek8(uint16_t addr) 
    if(muxbus == 0) {
        int mem = open("/dev/mem", O_RDWR|O_SYNC);
        muxbus = mmap(0,
    return muxbus[addr];
void mpoke8(uint16_t addr, uint8_t value)
    if(muxbus == 0) {
        int mem = open("/dev/mem", O_RDWR|O_SYNC);
        muxbus = mmap(0,
    muxbus[addr] = value;
typedef enum
	SW1 = 1 << 7,
	BELOW33V = 1 << 6,
	NOVDC5 = 1 << 5,
	BAT1CHARGING = 1 << 3,
	BAT1CHARGED = 1 << 2,
	BAT2CHARGING = 1 << 1,
	BAT2CHARGED = 1 << 0
} StatusFlags;
typedef enum
	RESERVED = 1 << 7,
	BAT2CHARGEEN = 1 << 4,
	BAT1CHARGEEN = 1 << 3,
} ConfigurationFlags;
void usage(char **argv) {
	  "Usage: %s -j [1-3] [OPTIONS] ...\n"
	  "TS-BAT10 userspace driver utility.\n"
	  "  -s, --status               Print the current status of the TS-BAT10\n"
	  "  -j, --jumper=              Specify jumper 1-3 for the I/O address (required)\n"
	  "  -e, --disable-power        Immediately cuts power to the system.  This should\n"
	  "                             normally be called after the system has finished syncing\n"
	  "                             the disk(s) during the shutdown process to prevent corruption\n"
	  "  -a, --charge-bat1=#        Specify 0-3 for battery 1 charge setting (default 0)\n"
	  "  -b, --charge-bat2=#        Specify 0-3 for battery 2 charge setting (default 0)\n"
	  "  -n, --disable-timer-bat1   Disable the charge timer for battery 1 (default on)\n"
	  "  -n, --disable-timer-bat2   Disable the charge timer for battery 2 (default on)\n"
	  "  -t, --daemon               Daemonize and run the shutdown command when batteries are low\n"
	  "  -k, --shutdown-app=APP     When daemonizing, specify another application other\n"
      "                             than the default \"/sbin/shutdown -h now\"\n"
	  "  -h, --help                 This help\n"
	  "  The 2 Batteries have 3 settings for charge options:\n"
	  "		0 - Disable charge (default)\n"
	  "		1 - Enable Slow charge (250mA)\n"
	  "		2 - Enable Fast charge (500mA)\n"
	  "  The TS-BAT10 uses a write only register so previous write values cannot be detected."
	  "  When using any settings previous values must be passed if they are to be retained."
	  "  For example, to charge both batteries:\n"
	  "  %s --jumper 1 --charge-bat1 2 --charge-bat2 2 "
	  argv[0], argv[0], argv[0]
int main(int argc, char **argv) {
	int opt_status = 0;
	int opt_jumper = 0;
	int opt_bat1charge = 0;
	int opt_bat2charge = 0;
	int opt_bat1timer = 0;
	int opt_bat2timer = 0;
	int opt_poweroff = 0;
	char *opt_shutdownapp = "/sbin/shutdown -h now";
	int opt_daemon = 0;
	int opt_write = 0;
	int c;
	int offset;
	uint8_t value = 0, status = 0;
	static struct option long_options[] = {
	  { "status", 0, 0, 's' },
	  { "jumper", 1, 0, 'j' },
	  { "charge-bat1", 1, 0, 'a' },
	  { "charge-bat2", 1, 0, 'b' },
	  { "disable-timer-bat1", 1, 0, 'n' },
	  { "disable-timer-bat2", 1, 0, 'o' },
	  { "pc104base", 1, 0, 'r' },
	  { "disable-power", 0, 0, 'e' },
	  { "daemon", 0, 0, 't' },
	  { "shutdown-app", 1, 0, 'k' },
	  { "help", 0, 0, 'h' },
	  { 0, 0, 0, 0 }
	while((c = getopt_long(argc, argv, "sj:a:b:n:o:r:tek:h", long_options, NULL)) != -1) {
		switch(c) {
			case 's':
				opt_status = 1;
			case 'j':
				opt_jumper = strtoul(optarg, NULL, 0);
			case 'a':
				opt_bat1charge = strtoul(optarg, NULL, 0);
				opt_write = 1;
			case 'b':
				opt_bat2charge = strtoul(optarg, NULL, 0);
				opt_write = 1;
			case 'n':
				opt_bat1timer = strtoul(optarg, NULL, 0);
				opt_write = 1;
			case 'o':
				opt_bat2timer = strtoul(optarg, NULL, 0);
				opt_write = 1;
			case 'e':
				opt_poweroff = 1;
				opt_write = 1;
			case 'r':
				opt_pc104 = strtoul(optarg, NULL, 0);
			case 'k':
				opt_shutdownapp = strdup(optarg);
			case 't':
				opt_daemon = 1;
			case 'h':
				return 0;
				fprintf(stderr, "Unknown option \"%c\"\n", c);
				return 1;
	if(opt_bat1timer < 0 || opt_bat1timer > 1 ||
	   opt_bat2timer < 0 || opt_bat2timer > 1) {
		fprintf(stderr, "Timer value must be 0 or 1\n");
		return 1;
	if(opt_bat1charge < 0 || opt_bat1charge > 2 ||
	   opt_bat2charge < 0 || opt_bat2charge > 2) {
		fprintf(stderr, "Charge value must be between 0-2\n");
		return 1;
	if(opt_jumper < 1 || opt_jumper > 3) {
		fprintf(stderr, "The jumper value must be specified between 1-3\n");
		return 1;
	if(opt_jumper == 1) offset=0x110;
	else if (opt_jumper == 2) offset=0x150;
	else if (opt_jumper == 3) offset=0x300;
 	status = mpeek8(offset);
	if(opt_status) {
			status & SW1 ? 0 : 1,
			status & BELOW33V ? 0 : 1,
			status & NOVDC5 ? 0 : 1,
			status & BACKUPDISABLED ? 0 : 1,
			status & BAT1CHARGING ? 0 : 1,
			status & BAT2CHARGING ? 0 : 1,
			status & BAT1CHARGED ? 0 : 1,
			status & BAT2CHARGED ? 0 : 1
	if((opt_bat1charge | opt_bat2charge) && (~status & BACKUPDISABLED)){
		fprintf(stderr, "Cannot enable charging with JP4 on.  Exiting.\n");
		return 1;
	if((status & BELOW33V) && opt_bat1charge) {
		fprintf(stderr, "bat1 charged.  Skipping charging.\n");
		value &= (~BAT1CHARGEEN);
	if((status & BELOW33V) && opt_bat2charge) {
		fprintf(stderr, "bat2 charged.  Skipping charging.\n");
		value &= ~(BAT2CHARGEEN);
		if(opt_poweroff) value |= SOFTDISABLE;
		if(opt_bat1charge == 1) value |= (BAT1CHARGEEN | BAT1NOFASTCHARGE);
		if(opt_bat1charge == 2) value |= (BAT1CHARGEEN);
		if(opt_bat2charge == 1) value |= (BAT2CHARGEEN | BAT2NOFASTCHARGE);
		if(opt_bat2charge == 2) value |= (BAT2CHARGEEN);
		if(opt_bat1timer) value |= BAT1TIMERDISABLE;
		if(opt_bat2timer) value |= BAT2TIMERDISABLE;
		mpoke8(offset, value);
	if(!opt_daemon) return 0;
	while(1) {
		status = mpeek8(offset);
		if(status & NOVDC5) {
			printf("shutting down: %s\n", opt_shutdownapp);
			return 0;

This can be compiled with:

gcc tsbatctl.c -o tsbatctl -mcpu=arm9
cp tsbatctl /usr/bin/tsbatctl

7 Reboot/Sleep support

7.1 Reboot/Sleep on REV A boards


On some boards the sleep mode or reboot mechanism will depend on the 5V going into the terminal block header on the board rather than going through the PC104 bus. Test your board first to find out if this modification is necessary. To redirect 5V to support both of these modes you can depopulate R18 and R19. This will prevent the 5V from going through the PC104 bus. The pad furthest away from the PC104 connector in the JP1 box provides the regulated 5V. Connect this to the + power connector on your macrocontroller baseboard or single board computer.

  • The TS-7800 requires this modification for sleep and rebooting.
  • The TS-8160 requires this for sleep mode.

7.2 Reboot/Sleep on REV B and later boards

The REV B BAT10 includes a "JP1" jumper that passes 5V through the PC104 bus. On boards such as TS-7800 or TS-8160 this would be needed for Reboot or sleep mode support. If this jumper is installed, which it is by default, it will pass 5V down the PC104 bus. To fix reboot/sleep mode on many hosts, the power will need to come from the 5V output. JP1 can be removed, and CN2 provides a regulated 5V which can be connected to the PC104 host.

8 Errata

8.1 Incorrect silkscreen on TS-BAT10 Rev A

Synopsis Incorrect silkscreen on TS-BAT10, shows incorrect address
Severity Minor
Affected TS-BAT10 Rev A


The TS-BAT10 Rev A has a typo on the silkscreen. It lists JP3 as being address 0x310. It should read 0x300, the documentation on this is correct and should be followed instead of the board markings. REV A units shipped after 2-28-13 include a sticker with the corrected address.


8.2 Incorrect resistor value for R75

Synopsis Incorrect value for R75
Severity Major
Affected TS-BAT10 Rev A (shipped before Jan 30th, 2013)


The TS-BAT10 units shipped before Jan 30th, 2013 had an improper value for R75 which would cause voltage up to 5.7V when power is connected to the TS-BAT10. Any units ordered before this date should be sent for repair through an RMA.

9 Product Notes

9.1 FCC Advisory

This equipment generates, uses, and can radiate radio frequency energy and if not installed and used properly (that is, in strict accordance with the manufacturer's instructions), may cause interference to radio and television reception. It has been type tested and found to comply with the limits for a Class A digital device in accordance with the specifications in Part 15 of FCC Rules, which are designed to provide reasonable protection against such interference when operated in a commercial environment. Operation of this equipment in a residential area is likely to cause interference, in which case the owner will be required to correct the interference at his own expense.

If this equipment does cause interference, which can be determined by turning the unit on and off, the user is encouraged to try the following measures to correct the interference:

Reorient the receiving antenna. Relocate the unit with respect to the receiver. Plug the unit into a different outlet so that the unit and receiver are on different branch circuits. Ensure that mounting screws and connector attachment screws are tightly secured. Ensure that good quality, shielded, and grounded cables are used for all data communications. If necessary, the user should consult the dealer or an experienced radio/television technician for additional suggestions. The following booklets prepared by the Federal Communications Commission (FCC) may also prove helpful:

How to Identify and Resolve Radio-TV Interference Problems (Stock No. 004-000-000345-4) Interface Handbook (Stock No. 004-000-004505-7) These booklets may be purchased from the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 20402.

9.2 Limited Warranty

Technologic Systems warrants this product to be free of defects in material and workmanship for a period of one year from date of purchase. During this warranty period Technologic Systems will repair or replace the defective unit in accordance with the following process:

A copy of the original invoice must be included when returning the defective unit to Technologic Systems, Inc. This limited warranty does not cover damages resulting from lightning or other power surges, misuse, abuse, abnormal conditions of operation, or attempts to alter or modify the function of the product.

This warranty is limited to the repair or replacement of the defective unit. In no event shall Technologic Systems be liable or responsible for any loss or damages, including but not limited to any lost profits, incidental or consequential damages, loss of business, or anticipatory profits arising from the use or inability to use this product.

Repairs made after the expiration of the warranty period are subject to a repair charge and the cost of return shipping. Please, contact Technologic Systems to arrange for any repair service and to obtain repair charge information.