@typecad/rd-bq24210
v0.0.4
Published
typeCAD package reference design for the bq24210, a solar Li-Ion charger
Downloads
23
Maintainers
Readme
rd-bq24210 typeCAD Package
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 @typecad/passives @typecad/typecad
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 powerCHG
: HIGH while charging, LOW when not chargingPG
: HIGH when charging voltage source present, LOW when not present
Class diagram
| rd-bq24210 | Class |
| ------------- | ------------------------------------------------------------------------------------------- |
| C1 | Capacitor
|
| C2 | Capacitor
|
| D1 | LED
|
| D2 | LED
|
| R1 | Resistor
|
| R2 | Resistor
|
| R3 | Resistor
|
| R4 | Resistor
|
| R5 | Resistor
|
| SJ1 | Component
|
| SJ2 | Component
|
| U1 | BQ24210
|
| sheet | Sheet
|
| pcb | PCB
|
|||
| constructor()
| typecad: Schematic, prefix: string, vin_pv: Power, battery: Power, charge_current: number = 500, passives?: typeof _0603 |
| create()
| |
Use
- Import the packages
import { Schematic } from '@typecad/typecad';
import { Power } from '@typecad/passives/power';
import { rd_bq24210 } from '@typecad/rd-bq24210';
- Declare a charging source
Power
object
let $vin_pv = new Power({
power_name: 'pv',
maximum: 6,
minimum: 0,
schematic: typecad,
});
- And a battery
Power
object
let $battery = new Power({
power_name: 'battery',
schematic: typecad,
ground_flag: false,
});
- Make the bq24210 design with the reference designator 'U1'.
let bq = new rd_bq24210(typecad, 'U1', $vin_pv, $battery);
::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.
let board = new PCB('rd_bq24210_impl');
bq.pcb = board;
bq.create();
After building, there will be a rd_bq24210_impl.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.