0.0.5 • Published 7 months ago

@typecad/rd-bq24210 v0.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

rd-bq24210 typeCAD Package

bq24210 Datasheet

bq24210 800-mA, Single-Input, Single-Cell Li-Ion Battery Solar Charger

This is the Reference Design of the bq24210 in Section 9.2 Typical Application of the datasheet.

Features

  • 20-V Input Rating, With Overvoltage Protection
  • 1% Battery Voltage Regulation Accuracy
  • Current Charge up to 800 mA
  • NTC Input Monitoring
  • Status Indication – Charging/Power Present

Installation

npm i @typecad/rd-bq24210

Inputs

  • vin:Power: a voltage source for charging, 0 - 20 volts. This package will not build if a power source with a maximum voltage higher than 20 volts is provided.
  • batter:Power: A single-cell Li-Ion battery

Outputs

  • C2.pin(1): Battery connection/system power
  • CHG: HIGH while charging, LOW when not charging
  • PG: HIGH when charging voltage source present, LOW when not present

Use

  1. Import the packages
import { Schematic } from '@typecad/typecad';
import { Power } from '@typecad/passives/power';
import { rd_bq24210 } from '@typecad/rd-bq24210';
  1. Declare a charging source Power object
let vin_pv = new Power({
  power_name: 'solar_panel',
  maximum: 6,
  minimum: 0,
  schematic: typecad,
});
  1. Declare a battery Power object
let battery = new Power({
  power_name: 'battery',
  schematic: typecad,
  ground_flag: false,
});
  1. Make the bq24210 design with the reference designator U1.
let bq = new rd_bq24210(typecad, 'U1', vin_pv, battery);
  1. ::create() it
bq.create();          // bq.create(true) to run ERC
typecad.create();
typecad.netlist();

Default Layout

This package contains a default layout for all the components. It can be used to place all the components in the manufacturer-recommended layout. The PCB class can be shared between multiple packages.

let board = new PCB('[your_board_name]');

bq.pcb = board;
bq.create();

After building, there will be a .kicad_pcb file in the build directory. Keep in mind that each time bq.pcb = board is set, the layout will be updated with the default component locations, discarding any changes you may have made. Setting it once, building, then removing it is the recommended workflow.

Accessing outputs

Exporting the CHG output for use elsewhere:

bq.sheet.out({ net: 'CHARGE_IND', pins: [bq.U1.CHG.pin] });

Exporting the PG output for use elsewhere:

bq.sheet.out({ net: 'POWER_GOOD_IND', pins: [bq.U1.PG.pin] });

Subsequent Use

typecad.net({ net: 'POWER_GOOD_IND', pins: [your.pin] });

Passives

The default size for the passive components is 0603, but it can be changed by passing a different set of passives.

import * as $0805 from '@typecad/passives/0805';
let bq = new rd_bq24210(typecad, 'U1', vin_pv, battery, $0805);

Designators

Only the main IC, the bq24210, is given an explicit designator. The rest of the passive components are auto-numbered. This behavior can be changed.

let bq = new rd_bq24210(typecad, 'U1', vin_pv, battery, 500, $0805);
bq.R1.Reference = 'R1';
bq.R2.Reference = 'R2';
bq.create();

Design Considerations

NTC

The bq24210 can use a 10K NTC to monitor the battery temperature. This design uses a 10K resistor (R5) making it appear the battery is always 25 C. To use a battery-attached NTC, it should connect R5.pin(1) to the NTC while ensuring the other side is connected to ground.

Charge Current

The charging current can be specified in the constructor:

let bq = new rd_bq24210(typecad, 'U1', vin_pv, battery, 800);

Sets the charging current to 800 mA, the maximum supported by the IC. This has the effect of changing the value of R4. Currently, typeCAD doesn't normalize computed resistor/capacitor values to standard EIA values.

0.0.5

7 months ago

0.0.4

9 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago