Skip to content

Update 8 voltage divider packages for new ResistorVoltageDivider API#447

Merged
napowderly merged 18 commits into
mainfrom
feature/upgrade-vdiv-packages
Apr 8, 2026
Merged

Update 8 voltage divider packages for new ResistorVoltageDivider API#447
napowderly merged 18 commits into
mainfrom
feature/upgrade-vdiv-packages

Conversation

@napowderly

Copy link
Copy Markdown
Contributor

Summary

Migrate all packages with voltage dividers to the new ResistorVoltageDivider API (atopile 0.14.x discrete sampling solver). All 8 packages build successfully with both default and usage targets.

API Migration

Old New
.r_top .chain.resistors[0]
.r_bottom .chain.resistors[1]
.power .ref_in
.output / .output.line .ref_out / .ref_out.hv
.max_current .current

Package Version Bumps

Package Old Version New Version Old requires-atopile New
ti-tps82130 0.1.1 0.2.0 ^0.10.12 ^0.14.0
ti-tpsm863257 0.1.1 0.2.0 ^0.10.13 ^0.14.0
ti-lv2842x 0.2.3 0.3.0 ^0.12.4 ^0.14.0
ti-tps563201 0.1.9 0.2.0 ^0.12.4 ^0.14.0
ti-tps54560x 0.1.7 0.2.0 ^0.12.4 ^0.14.0
st-ldk220 0.2.3 0.3.0 ^0.12.4 ^0.14.0
ti-tlv75901 0.4.0 0.5.0 ^0.14.0 ^0.14.0
ti-tps63020 0.3.0 0.4.0 ^0.14.0 ^0.14.0

Verified Picked Values (Usage Builds)

Package Use Case r_top r_bottom v_fb ref
ti-tps82130 12V→3.3V 3.57kΩ 1.15kΩ 0.804V 0.8V
ti-tpsm863257 12V→3.3V 11.5kΩ 2.55kΩ 0.599V 0.6V
ti-lv2842x 36V→15V 301kΩ 16.2kΩ 0.766V 0.765V
ti-tps563201 5V→3.3V 102kΩ 30.9kΩ 0.767V 0.768V
ti-tps54560x 24V→5V 215kΩ 40.2kΩ 0.788V 0.8V
st-ldk220 5V→3.3V 63.4kΩ ≈1.185V 1.185V
ti-tlv75901 5V→3.3V 9.09kΩ 1.82kΩ 0.550V 0.55V
ti-tps63020 bat→3.3V 169kΩ 30.9kΩ ≈0.51V 0.5V

Additional Fixes

  • from "regulators.ato" import Ximport AdjustableRegulator (file-path imports no longer resolve; AdjustableLDO/Buck not in stdlib allowlist)
  • Deprecated .vcc/.gnd.hv/.lv
  • assert x is <literal>assert x within <literal>
  • cap.power ~ power_out → bridge connections (avoids solver alias cycles)
  • Old pin names p1/p2unnamed[0]/unnamed[1] or bridge connections
  • Cross-parameter inequalities replaced with explicit bounds (simple solver compatibility)
  • Duplicate trait has_part_removed removed (st-ldk220 usage)

Test plan

  • All 8 packages build with ato build (both default and usage targets)
  • Picked resistor values verified against datasheet reference voltages
  • Publish packages to registry

🤖 Generated with Claude Code

Migrate all packages using voltage dividers to the new API introduced
in atopile 0.14.x with the discrete sampling solver. Bump versions
(minor) and set requires-atopile to ^0.14.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@napowderly
napowderly force-pushed the feature/upgrade-vdiv-packages branch from d1cb3a8 to 15398ba Compare April 3, 2026 00:09
napowderly and others added 17 commits April 2, 2026 17:15
Generated by `ato build` after updating voltage divider API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy the (at X Y angle) coordinates from the old r_top/r_bottom
footprints to the new chain.resistors[0]/chain.resistors[1] footprints
so board layouts are preserved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The chain.resistors[0/1] footprints were at origin (0,0). Placed
them adjacent to the converter package at (157, 103-104).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…istors

- st-ldk220, ti-tlv75901, ti-tps82130: "0402" -> "R0402" for divider resistors
- ti-tps82130: rebuild picked parts with R0402 footprint
- ti-tps63020/default: place divider resistors near IC

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These features (TRAITS, FOR_LOOP, BRIDGE_CONNECT, MODULE_TEMPLATING)
are now first-class ato v1 language features and no longer require
pragma gates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Changes docker-tag from "main" to "latest" so builds use the latest
stable release (currently 0.15.0) rather than unreleased main branch code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove obsolete 0201, 0603, and miscellaneous parts (connectors, switches,
antennas) that are no longer needed. Update footprint and ato files for
retained parts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete auto-picked resistors/capacitors across all 8 packages
- Regenerate IC, inductor, and diode parts with fresh checksums
  (fixes is_auto_generated checksum mismatch from pragma removal)
- Replace deprecated has_single_electric_reference_shared with
  has_single_electric_reference
- Rename gnd_only parameter to ground_only
- Fix _package suffix mismatches in ti-tps54560x imports
- Replace bridge connect operators with explicit pin connections
  for raw component parts in ti-tps54560x

Packages: ti-tps82130, ti-tpsm863257, ti-lv2842x, ti-tps563201,
ti-tps54560x, st-ldk220, ti-tlv75901, ti-tps63020

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove unused imports, sync README.md with usage.ato content,
fix deprecated `assert is` syntax, and clean up commented-out
auto-generated trait with dangling import.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sync README code blocks with actual usage.ato: remove stale pragma
lines, fix import order, update assertion syntax, and match voltage
values for ti-lv2842x, ti-tps54560x, ti-tps63020, ti-tps82130,
and ti-tpsm863257.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace EasyEDA's non-PDF URL (ti.com/cn/lit/gpn/tlv759p) with
the direct PDF download (ti.com/lit/ds/symlink/tlv759p.pdf).
Update auto-generated checksum accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ti-tps82130:
- Remove saleae-header dependency (only used by disabled dev board target)
- Remove unused layout directories (development_board, dual_banana_connectors,
  ti_tps82130_with_test_points)
- Remove unused imports (Diode, ElectricPower, Inductor, ResistorVoltageDivider)
- Add missing has_datasheet trait to HRE capacitor parts to prevent
  build warnings about library part updates

ti-tlv75901:
- Vendor TI datasheet PDF (downloaded from corrected URL)
- Updated KiCad PCB datasheet property from build

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Override feedback divider current to 10-100uA in usage.ato instances
to avoid very high resistance values where LCSC/EasyEDA has sparse
footprint coverage. The base module keeps 1-100uA for maximum
flexibility when no output voltage is set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rebuild usage layout to fix frozen PCB diff (datasheet URL changes).
New resistor parts vendored from solver picks with tighter feedback
divider current (10-100uA in usage instances). Remove unused
ResistorVoltageDivider import.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Reduce usage.ato to one 24V→3.3V regulator (avoids solver picking
  obscure resistor values with sparse EasyEDA coverage)
- Rebuild layouts for ti-lv2842x, ti-tps54560x, ti-tps563201, ti-tps63020
- Fix ti-tps82130 comment formatting (linter)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@napowderly
napowderly merged commit c66b92a into main Apr 8, 2026
12 of 21 checks passed
@napowderly
napowderly deleted the feature/upgrade-vdiv-packages branch April 8, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant