npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@typecad/rd-bq24210

v0.0.4

Published

typeCAD package reference design for the bq24210, a solar Li-Ion charger

Downloads

23

Readme

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 @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 power
  • CHG: HIGH while charging, LOW when not charging
  • PG: 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

  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: 'pv',
  maximum: 6,
  minimum: 0,
  schematic: typecad,
});
  1. And 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.

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.