Compare commits

..

31 Commits

Author SHA1 Message Date
2c6927cb79 Fix MCP tool count: 35 → 36 (source-verified) 2026-02-17 23:30:17 -07:00
d413dd464b Bump to 2026.02.18 — re-publish with PyPI README rendering 2026-02-17 20:57:20 -07:00
bf72e784d3 Add PyPI README files and MCP resource/prompt tests
- README.md for all three packages (core, TUI, MCP)
- pyproject.toml readme field for PyPI rendering
- 8 new tests for MCP resources (5) and prompts (3)
- Total MCP test coverage: 57 tests, 37 tools + 5 resources + 3 prompts
2026-02-17 19:15:23 -07:00
3ccec3be10 Publish birdcage-tui to PyPI, document TUI extras
Bumped version to 2026.02.17, added classifiers/keywords/URLs.
Documented camera extra (Pillow + astropy) in CLAUDE.md.
Added TUI section with uvx usage and extras table.
2026-02-17 18:42:28 -07:00
5a26dce075 Rename packages for PyPI: winegard-birdcage + mcbirdcage
Core library published as winegard-birdcage (import stays `birdcage`).
MCP server renamed birdcage-mcp → mcbirdcage, matching mcserial pattern.
Both packages live on PyPI — `uvx mcbirdcage` works out of the box.
2026-02-17 18:18:31 -07:00
b98a5482fa Document screenshot capture workflow and MCP server 2026-02-17 17:54:35 -07:00
b0aee4e5a6 Add automated TUI screenshot capture script
Textual Pilot-based script that launches demo mode, navigates
all screens, and exports SVG + PNG via rsvg-convert.
2026-02-17 17:49:01 -07:00
f8bfd69ceb Add LNB polarity toggle (V-pol 13V / H-pol 18V)
Bridge: set_lnb_voltage(mode) wraps firmware lnbdc command, enable_lna()
now delegates to it. MCP: new set_lnb_voltage tool + 3 tests. TUI: Signal
screen button toggles between V-pol and H-pol instead of one-way LNA enable.
2026-02-17 17:24:05 -07:00
8a6b99bd8c Add birdcage-mcp FastMCP server for satellite dish control
34 tools (connection, movement, signal, system, satellite, console),
5 resources, 3 prompts. Backed by DemoDevice for offline testing.
46 tests passing against the demo backend via run_server_async.
2026-02-17 16:01:51 -07:00
16ca4892b3 Promote bridge, demo, craft_client to core birdcage package
Move bridge.py, demo.py, craft_client.py from tui/src/birdcage_tui/ to
src/birdcage/ so both TUI and MCP server can share the device layer
without a circular dependency on textual.
2026-02-17 16:01:38 -07:00
3013eeee4c Add DemoCraftClient for complete offline demo mode
- DemoCraftClient in demo.py: duck-typed CraftClient replacement with
  8 canned satellites, synthetic pass predictions, and time-varying LEO
  arcs that drive real AOS/TCA/LOS pass events to the camera overlay
- Fix sky map EL signal fidelity: snap _el to _target_el at sweep start
  so 2D scans compute correct per-row RSSI (was using stale elevation)
- Branch on demo_mode in app.py _setup_craft_client() to inject
  DemoCraftClient instead of the HTTP CraftClient
- Add test_demo_craft.py: 5 tests exercising search, passes, tracking,
  and WAITING state through the full TUI without mocks
- Update take_screenshots.py to cover all 8 screens (dashboard, control,
  craft search, craft tracking, signal, system, console, camera)
2026-02-16 11:49:39 -07:00
7035d814a1 Add Camera Capture overlay (F6) with multi-trigger capture pipeline
Camera backend abstraction wrapping fswebcam/ffmpeg/libcamera-still via
subprocess, with DemoCamera fallback generating valid JPEG from raw bytes.

Capture pipeline writes JPEG + JSON sidecar always, optional FITS (astropy)
and EXIF (Pillow) when available. Thread-safe orchestrator with session
tracking, sequence numbering, and date-based output directories.

Trigger system: manual capture, configurable interval timer, and pass event
detection (AOS/TCA/LOS) with 0.5-degree TCA hysteresis. PassEventDetector
runs in the Craft tracking loop, fires callbacks to the camera overlay.

F6 overlay follows the F5 ConsoleOverlay pattern — ModalScreen with
install_screen persistence. Status panel, scrollable capture log, interval
controls, and AOS/TCA/LOS toggle buttons.

Tagline: "a generic AZ/EL positioner that doesn't care about wavelength"
added to TUI header subtitle.

51 new tests (77 total passing).
2026-02-16 05:08:18 -07:00
6c1e9da773 Add Craft mode — direct satellite tracking via space.warehack.ing API
New F2 Control sub-mode that searches the Craft orbital catalog (22k+
objects), displays pass predictions, and drives the dish in real-time
using server-computed AZ/EL positions from /api/sky/up.

Tracking loop polls at ~1Hz, filters for the tracked target by
target_type + target_id (str, not int — handles satellites, planets,
stars, comets), and issues motor commands through the existing serial
bridge. Verified end-to-end with Carryout G2 hardware tracking NOAA 17.

New files:
- craft_client.py — stdlib HTTP client (urllib only, no deps)
- widgets/craft_panel.py — search table, pass info, tracking status
- tests/test_craft_mode.py — 5 unit tests with mocked API
- tests/test_craft_integration.py — 3 hardware integration tests
2026-02-16 02:07:42 -07:00
a249c98208 Implement Track mode (Phase 6) with rotctld server
TUI-compatible Hamlib rotctld TCP server that works with the
existing SerialBridge/DemoDevice interface. F2 Control's Track
tab now starts/stops a real TCP server on the configured port.
Status callbacks report connection state, move count, and command
rate back to the TrackingPanel via thread-safe call_from_thread.

Includes 7 pilot tests exercising the full protocol path through
asyncio TCP clients against the DemoDevice.
2026-02-15 15:52:49 -07:00
ce24f7c478 Add configurable step size selector and motor velocity controls
F2 Control screen Manual mode now has a row of step-size buttons
(0.1°, 0.5°, 1°, 5°, 10°) that scale arrow key nudges, plus
AZ/EL velocity inputs with Apply button for runtime motor speed
tuning via firmware mv/ma commands.

Bridge: set_max_velocity(), set_max_acceleration() write methods.
Demo: mutable dynamics + console mv/ma write handling.
Tests: 8 Textual pilot tests covering button toggle, nudge math,
velocity population, and apply round-trip.
2026-02-14 20:05:12 -07:00
5252d1d73c Add hardware reference docs (A3981, K60, RYS352A)
Allegro A3981 stepper motor driver: datasheet, KiCad symbols/footprint,
3D model (TSSOP-28). Two per G2 board, SPI-controlled, AUTO microstep.

NXP MK60DN512VLQ10 (Kinetis K60): datasheet and 1300-page reference
manual. Cortex-M4 96MHz MCU running the G2 firmware.

Reyax RYS352A GPS module: datasheet and PAIR command guide.
GPS receiver on the G2 board (used for auto-location/satellite lookup).

All extracted as markdown + page images + vector SVGs for LLM context.
Binary assets (PDFs, PNGs, SVGs, STEP, WRL) stored via git-lfs.
2026-02-14 18:36:42 -07:00
bbdd406bca Configure git-lfs for binary assets
Track PDFs, images (PNG/JPG), SVGs, and 3D models (STEP/WRL) via
git-lfs to keep repo clone size manageable as datasheets and
extracted page images accumulate.
2026-02-14 18:36:23 -07:00
1c27a8d15d Add console-probe package for firmware console discovery
Automated deep probe of Winegard firmware console interfaces.
Discovers available commands via help parsing, submenu probing,
and wordlist brute-force. Handles prompt-terminated serial I/O
with the > character termination strategy.

Modules: serial_io (prompt-aware I/O), discovery (auto-discovery),
profile (DeviceProfile dataclass), report (JSON output), cli (argparse).
2026-02-14 18:05:15 -07:00
13a9d804c6 Add G2 bootloader and EEPROM exploration scripts
boot_baud_probe.py: Probe all standard baud rates during G2 power-on
to detect bootloader UART configuration differences.

boot_capture.py: Capture and analyze G2 boot sequence output, with
optional interrupt sequence injection to explore bootloader entry.

ee_dump.py: Dump EEPROM indices from EE> submenu, identifying
initialized vs. uninitialized (0x10101 sentinel) entries.
2026-02-14 18:05:03 -07:00
145763fcfb Rebuild TUI as 4-tab layout with 10 new widgets
Replace sidebar + 5-screen layout with horizontal tab bar (F1-F4)
and persistent StatusStrip. Consolidate Position + Scan screens into
Signal (F3) with Monitor/Sweep/Sky Map sub-modes via ModeBar.

Screens:
  - F1 Dashboard: system health, tracking panel, quick actions, presets
  - F2 Control: motor tuning, compass rose, preset management
  - F3 Signal: RSSI monitor, 1D sweep (SweepPlot), 2D sky map (heatmap)
  - F4 System: NVS editor with regex filter, EEPROM, firmware info
  - F5 Console: push/pop overlay (no longer a tab)

New widgets: StatusStrip, ModeBar, SweepPlot, QuickActions, PresetList,
ReceiverInfo, MotorTuning, NvsFilter, SystemHealth, TrackingPanel.

Removed: PositionScreen, ScanScreen, DeviceStatusBar (functionality
absorbed into new screens and StatusStrip).

App-level position poll feeds StatusStrip and active screen at ~2 Hz.
Fix shared threading.Event across instances (class-level mutable default).
2026-02-14 18:04:50 -07:00
e7e71c47d7 Wire Stop button to cancel blocked firmware sweeps
Stop handler now calls cancel_operation() on the device bridge,
which sets a threading.Event that interrupts the 2s-timeout serial
read loop in send_with_timeout(). InterruptedError is caught
separately to prevent falling back to software sweep on cancel.

disconnect() uses acquire(timeout=5) with force-close fallback
instead of blocking lock acquisition — prevents deadlock when a
stuck worker holds the serial lock during shutdown.

Add 3 Textual async tests (pytest-asyncio) to verify Stop behavior:
firmware sweep stop, software sweep stop, and sweep restart.
2026-02-14 17:12:11 -07:00
972c26b22f Guard finally blocks against app teardown during Ctrl+C
The sweep/scan finally blocks call self.app.call_from_thread() to
reset button state, but self.app raises NoActiveAppError if the
Textual context is already torn down during Ctrl+C shutdown.
Wrap with contextlib.suppress so the flag reset still happens.
2026-02-14 16:58:21 -07:00
c6ac958ee8 Make firmware sweep cancellable to prevent shutdown deadlock
send_with_timeout now uses a 2s per-byte timeout with a deadline
loop instead of one long blocking read, checking a cancel event
between reads. SerialBridge.disconnect() sets the cancel event
before acquiring the lock, so a blocked firmware sweep aborts
within ~2s and releases the lock for clean port shutdown.
2026-02-14 16:56:14 -07:00
2ee2f47275 Fix sweep/scan Stop button and state cleanup
_sweeping/_scanning flags were never reset when workers finished,
leaving the UI stuck in "Stopping..." forever. Both _do_sweep and
_do_scan now use try/finally to always clear state and reset button
styles. Firmware sweep checks the flag after the blocking serial
call returns and discards results if Stop was pressed mid-execution.
2026-02-14 16:50:08 -07:00
3cd6424168 Wire firmware-accelerated AZ sweep via azscanwxp
Adds send_with_timeout() to CarryoutG2Protocol for long-running
commands, and az_sweep_firmware() to both SerialBridge and DemoDevice.
Sweep and Sky Map modes now try the firmware path first (single
azscanwxp command, streaming results) and fall back to software
step-dwell-measure on error or when "Software mode" checkbox is
checked. Software sweep fixed to set EL once and move AZ only.
2026-02-14 16:40:53 -07:00
ba8859cc31 Fix 300s executor shutdown with threading.Event
Replace time.sleep() with threading.Event.wait() in all poll
loops so worker threads exit immediately on shutdown instead of
blocking for up to 500ms per iteration. Fixes the on_unmount
crash (NoMatches from querying removed DOM nodes) by signaling
the event directly rather than iterating child widgets.

Three shutdown paths covered: q key (on_unmount), Ctrl+C
(try/finally in main), and Textual internal shutdown.
2026-02-14 10:21:42 -07:00
48746937a7 Fix executor shutdown warning on TUI exit
Poll threads (position at 2 Hz, signal when monitoring) run
while-loops with time.sleep() that never exit on app quit.
Add on_unmount() to PositionScreen, SignalScreen, and BirdcageApp
to clear polling flags and disconnect the device, so worker threads
exit within the sleep interval instead of hitting the 300s timeout.
2026-02-14 09:41:47 -07:00
83c1f79caf Document birdcage.warehack.ing deployment in CLAUDE.md
Repo, domain, server path, make targets, and deploy workflow for
the Astro/Starlight docs site hosted via caddy-docker-proxy.
2026-02-13 15:17:00 -07:00
7271b53c63 Add Birdcage TUI: 5-screen Textual interface for Carryout G2
F1 Position (compass rose, motor control, sparklines),
F2 Signal (RSSI gauge with sub-char precision, DVB/ADC sparklines, LNA toggle),
F3 Scan (AZ/EL grid sweep with heatmap and CSV export),
F4 System (NVS table, A3981 diagnostics, motor dynamics),
F5 Console (raw serial terminal with prompt detection and safety gates).

Includes SerialBridge (thread-safe protocol wrapper), DemoDevice
(synthetic simulation for --demo mode), dark RF theme with rounded
borders and teal accents, and send_raw() on CarryoutG2Protocol.
2026-02-13 08:53:03 -07:00
a70b9b0a29 Ignore site/ directory — now its own repo (warehack.ing/birdcage-docs) 2026-02-13 05:20:34 -07:00
7ba0a99279 Merge feature/skyscan-rssi: G2 sky-scan RSSI, console-probe, birdcage rename 2026-02-13 05:16:10 -07:00
3081 changed files with 109721 additions and 9 deletions

7
.gitattributes vendored Normal file
View File

@ -0,0 +1,7 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text
*.step filter=lfs diff=lfs merge=lfs -text
*.wrl filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text

3
.gitignore vendored
View File

@ -11,6 +11,9 @@ build/
*.so
.ruff_cache/
# Documentation site (separate repo: warehack.ing/birdcage-docs)
site/
# PlatformIO
.pio/
.pioenvs/

167
CLAUDE.md
View File

@ -688,3 +688,170 @@ Last resort only. 5/16" socket + 6" extension into auxiliary drive hole. Turn cl
## Testing
No hardware-in-the-loop tests yet. Protocol implementations can be mocked for unit testing — `FirmwareProtocol` is an ABC with clear method contracts.
## Documentation Site
| Property | Value |
|----------|-------|
| Repo | `git@git.supported.systems:warehack.ing/birdcage-docs.git` |
| Local path | `site/` (separate git repo, not a subtree) |
| Framework | Astro + Starlight |
| Domain | `birdcage.warehack.ing` |
| Server | `warehack-ing@warehack.ing:~/birdcage-docs/` |
| Container | `birdcage-docs` (caddy:2-alpine serving static files) |
### Workflow
```bash
cd site/
# Local development with HMR
make dev # Sets APP_ENV=dev, starts Astro dev server on :4321
# Production build + deploy
make prod # Sets APP_ENV=prod, builds static site, serves via Caddy on :80
# Other commands
make logs # Tail container logs
make rebuild # Down + up with fresh build
make clean # Remove containers + images
```
### Make Targets
| Target | Description |
|--------|-------------|
| `up` | Build and start container |
| `down` | Stop container |
| `logs` | Tail container logs |
| `rebuild` | Down + up with fresh build |
| `dev` | Switch to dev mode (Astro dev server + HMR) |
| `prod` | Switch to prod mode (static build + Caddy) |
| `clean` | Remove containers, images, and volumes |
### Deploying Updates
```bash
cd site/
git add . && git commit -m "description"
git push origin main
ssh -A warehack-ing@warehack.ing "cd birdcage-docs && git pull && make prod"
```
TLS is automatic via caddy-docker-proxy (ACME + Vultr DNS challenge). New subdomains take ~2 minutes for certificate issuance.
### Screenshots
TUI screenshots live in `site/public/screenshots/` (the site repo, not the main repo).
An automated capture script uses Textual's Pilot API to render each screen in demo mode.
**Regenerating all screenshots:**
```bash
cd tui && uv run python scripts/capture_screenshots.py
```
This captures 8 SVG + 8 PNG screenshots plus a 2×3 collage:
- `tui-dashboard` — F1 action cards
- `tui-control` — F2 Manual mode with compass rose
- `tui-craft-search` — F2 Craft mode with satellite search results
- `tui-craft-tracking` — F2 Craft mode tracking the Moon
- `tui-signal` — F3 Monitor mode with RSSI gauge and receiver info
- `tui-system` — F4 Hardware mode with firmware ID and A3981 diagnostics
- `tui-console` — F5 overlay with serial console
- `tui-camera` — F6 overlay with capture triggers
- `tui-collage` — 2×3 montage of 6 main screens (via ImageMagick `montage`)
**Dependencies:** `rsvg-convert` (SVG→PNG), `montage` (collage).
**When to regenerate:** After any UI change that affects widget layout, button labels,
or screen content. The script populates Craft search results and tracking state
directly via widget API for deterministic screenshots.
## TUI
| Property | Value |
|----------|-------|
| PyPI | [`birdcage-tui`](https://pypi.org/project/birdcage-tui/) |
| Source | `tui/src/birdcage_tui/` |
| Entry point | `birdcage_tui.app:main` |
| Framework | [Textual](https://textual.textualize.io/) |
| Screens | Dashboard (F1), Control (F2), Signal (F3), System (F4), Console (F5), Camera (F6) |
### Running
```bash
# Published package (from PyPI) — no clone needed
uvx birdcage-tui --demo # demo mode, base install
uvx birdcage-tui # hardware mode (needs serial port)
# With camera capture support (Pillow + astropy)
uvx --with 'birdcage-tui[camera]' birdcage-tui --demo
# Local development
uv run --directory tui birdcage-tui --demo
```
### Extras
| Extra | Install | Packages | Purpose |
|-------|---------|----------|---------|
| *(base)* | `uvx birdcage-tui` | `winegard-birdcage`, `textual` | Full TUI, all screens, demo mode |
| `camera` | `uvx --with 'birdcage-tui[camera]' birdcage-tui` | `Pillow>=10.0`, `astropy>=6.0` | F6 camera overlay: JPEG capture frames with annotated demo images (Pillow), FITS export for radio astronomy pipelines (astropy) |
**Graceful degradation:** The camera screen (F6) works without the `camera` extra — it
falls back to writing minimal JPEG headers directly. Pillow adds annotated demo frames
and proper image processing; astropy adds FITS file export for integration with DS9,
CASA, and other radio astronomy tools.
## MCP Server
| Property | Value |
|----------|-------|
| PyPI | [`mcbirdcage`](https://pypi.org/project/mcbirdcage/) |
| Source | `mcp/src/mcbirdcage/` |
| Entry point | `mcbirdcage.server:main` |
| Tools | 36 (connection, movement, signal, system, satellite, console) |
| Resources | 5 (`birdcage://config`, `position`, `firmware`, `motor-dynamics`, `el-limits`) |
| Prompts | 3 (`setup_wizard`, `satellite_tracking_guide`, `rf_sweep_guide`) |
| Tests | `mcp/tests/` — 49 tests against DemoDevice via `run_server_async` |
### Running
```bash
# Published package (from PyPI) — no clone needed
uvx mcbirdcage # demo mode auto-detected
BIRDCAGE_DEMO=1 uvx mcbirdcage # explicit demo mode
# Local development (from repo)
BIRDCAGE_DEMO=1 uv run --directory mcp mcbirdcage
# Hardware mode
BIRDCAGE_PORT=/dev/ttyUSB2 uv run --directory mcp mcbirdcage
```
### Adding to Claude Code
```bash
# Published package (recommended)
claude mcp add mcbirdcage -- uvx mcbirdcage
# Local development
claude mcp add mcbirdcage -- env BIRDCAGE_DEMO=1 uv run --directory mcp mcbirdcage
```
### Environment Variables
| Variable | Default | Purpose |
|----------|---------|---------|
| `BIRDCAGE_DEMO` | `false` | Enable demo mode (DemoDevice + DemoCraftClient) |
| `BIRDCAGE_PORT` | `/dev/ttyUSB0` | Serial port for hardware mode |
| `BIRDCAGE_FIRMWARE` | `g2` | Firmware variant (`g2`, `hal205`, etc.) |
| `BIRDCAGE_CRAFT_URL` | `https://space.warehack.ing` | Orbital prediction API |
### Testing
```bash
cd mcp && uv run pytest tests/ # 49 tests via FastMCP run_server_async
uv run ruff check mcp/src/ # Lint
```

72
README.md Normal file
View File

@ -0,0 +1,72 @@
# winegard-birdcage
Serial control library for Winegard motorized satellite dishes, repurposed for amateur radio satellite tracking.
Turns surplus RV/marine satellite TV antennas into steerable ground station dishes via RS-485 or RS-422.
## Install
```bash
pip install winegard-birdcage
```
## CLI Tools
Two entry points are included:
**birdcage** -- antenna control and rotctld server:
```bash
birdcage init --port /dev/ttyUSB0 --firmware hal205
birdcage pos
birdcage move --az 180.0 --el 45.0
birdcage serve --host 127.0.0.1 --port 4533 # rotctld for Gpredict
```
**console-probe** -- automated firmware exploration:
```bash
console-probe --port /dev/ttyUSB0 --baud 115200 --discover-only --json report.json
console-probe --port /dev/ttyUSB0 --baud 115200 --deep --wordlist wordlist.txt
```
## Supported Hardware
| Variant | Connection | Baud | Motor Command |
|---------|-----------|------|---------------|
| Trav'ler (HAL 0.0.00) | RS-485 / RJ-25 | 57600 | `a <id> <deg>` |
| Trav'ler (HAL 2.05) | RS-485 / RJ-25 | 57600 | `a <id> <deg>` |
| Trav'ler Pro | USB A-to-A | 57600 | `a <id> <deg>` |
| Carryout | RS-485 / RJ-25 | 57600 | `g <az> <el>` |
| Carryout G2 | RS-422 / RJ-12 | 115200 | `a <id> <deg>` |
## Architecture
```
protocol.py -- FirmwareProtocol ABC + per-variant subclasses (HAL205, HAL000, G2)
leapfrog.py -- Predictive overshoot compensation for mechanical motor lag
antenna.py -- BirdcageAntenna: high-level control wrapping protocol + leapfrog
rotctld.py -- Hamlib rotctld TCP server (p/P/S/_/q) for Gpredict integration
cli.py -- Click CLI: init / serve / pos / move
```
## Related Packages
| Package | Description |
|---------|-------------|
| [birdcage-tui](https://pypi.org/project/birdcage-tui/) | Six-screen terminal UI for dish control |
| [mcbirdcage](https://pypi.org/project/mcbirdcage/) | MCP server for AI-assisted dish operations |
## Documentation
Full hardware details, wiring guides, firmware command reference, and NVS tables:
**[birdcage.warehack.ing](https://birdcage.warehack.ing)**
## Credits
- **Gabe Emerson (KL1FI / [saveitforparts](https://github.com/saveitforparts))** -- original Trav'ler, Trav'ler Pro, and Carryout rotor scripts
- **Chris Davidson ([cdavidson0522](https://github.com/cdavidson0522))** -- Carryout G2 sky scan and rotator control
## License
MIT

6095
docs/A3981-datasheet.md Normal file

File diff suppressed because it is too large Load Diff

BIN
docs/A3981-datasheet.pdf (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

231
docs/A3981-ecad.kicad_sym Normal file
View File

@ -0,0 +1,231 @@
(kicad_symbol_lib
(version 20211014)
(generator https://github.com/uPesy/easyeda2kicad.py)
(symbol "A3981KLPTR-T"
(in_bom yes)
(on_board yes)
(property
"Reference"
"U"
(id 0)
(at 0 24.13 0)
(effects (font (size 1.27 1.27) ) )
)
(property
"Value"
"A3981KLPTR-T"
(id 1)
(at 0 -21.59 0)
(effects (font (size 1.27 1.27) ) )
)
(property
"Footprint"
"A3981-ecad:TSSOP-28_L9.7-W4.4-P0.65-LS6.4-BL-EP-1"
(id 2)
(at 0 -24.13 0)
(effects (font (size 1.27 1.27) ) hide)
)
(property
"Datasheet"
"https://lcsc.com/product-detail/Motor-Drivers_ALLEGRO_A3981KLPTR-T_A3981KLPTR-T_C163315.html"
(id 3)
(at 0 -26.67 0)
(effects (font (size 1.27 1.27) ) hide)
)
(property
"LCSC Part"
"C163315"
(id 5)
(at 0 -29.21 0)
(effects (font (size 1.27 1.27) ) hide)
)
(symbol "A3981KLPTR-T_0_1"
(rectangle
(start -12.70 21.59)
(end 12.70 -19.05)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type background))
)
(circle
(center -11.43 20.32)
(radius 0.38)
(stroke (width 0) (type default) (color 0 0 0 0))
(fill (type none))
)
(pin unspecified line
(at -15.24 16.51 0)
(length 2.54)
(name "SENSA" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 13.97 0)
(length 2.54)
(name "STRn" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 11.43 0)
(length 2.54)
(name "DIR" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 8.89 0)
(length 2.54)
(name "OAP" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 6.35 0)
(length 2.54)
(name "OSC" (effects (font (size 1.27 1.27))))
(number "5" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 3.81 0)
(length 2.54)
(name "SDI" (effects (font (size 1.27 1.27))))
(number "6" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 1.27 0)
(length 2.54)
(name "AGND" (effects (font (size 1.27 1.27))))
(number "7" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 -1.27 0)
(length 2.54)
(name "REF" (effects (font (size 1.27 1.27))))
(number "8" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 -3.81 0)
(length 2.54)
(name "SCK" (effects (font (size 1.27 1.27))))
(number "9" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 -6.35 0)
(length 2.54)
(name "VDD" (effects (font (size 1.27 1.27))))
(number "10" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 -8.89 0)
(length 2.54)
(name "OBP" (effects (font (size 1.27 1.27))))
(number "11" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 -11.43 0)
(length 2.54)
(name "MS1" (effects (font (size 1.27 1.27))))
(number "12" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 -13.97 0)
(length 2.54)
(name "MS0" (effects (font (size 1.27 1.27))))
(number "13" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at -15.24 -16.51 0)
(length 2.54)
(name "SENSB" (effects (font (size 1.27 1.27))))
(number "14" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 -16.51 180)
(length 2.54)
(name "VBBB" (effects (font (size 1.27 1.27))))
(number "15" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 -13.97 180)
(length 2.54)
(name "DIAG" (effects (font (size 1.27 1.27))))
(number "16" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 -11.43 180)
(length 2.54)
(name "SDO" (effects (font (size 1.27 1.27))))
(number "17" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 -8.89 180)
(length 2.54)
(name "OBM" (effects (font (size 1.27 1.27))))
(number "18" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 -6.35 180)
(length 2.54)
(name "STEP" (effects (font (size 1.27 1.27))))
(number "19" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 -3.81 180)
(length 2.54)
(name "VREG" (effects (font (size 1.27 1.27))))
(number "20" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 -1.27 180)
(length 2.54)
(name "PGND" (effects (font (size 1.27 1.27))))
(number "21" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 1.27 180)
(length 2.54)
(name "VCP" (effects (font (size 1.27 1.27))))
(number "22" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 3.81 180)
(length 2.54)
(name "CP1" (effects (font (size 1.27 1.27))))
(number "23" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 6.35 180)
(length 2.54)
(name "CP2" (effects (font (size 1.27 1.27))))
(number "24" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 8.89 180)
(length 2.54)
(name "OAM" (effects (font (size 1.27 1.27))))
(number "25" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 11.43 180)
(length 2.54)
(name "ENABLE" (effects (font (size 1.27 1.27))))
(number "26" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 13.97 180)
(length 2.54)
(name "RESETn" (effects (font (size 1.27 1.27))))
(number "27" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 16.51 180)
(length 2.54)
(name "VBBA" (effects (font (size 1.27 1.27))))
(number "28" (effects (font (size 1.27 1.27))))
)
(pin unspecified line
(at 15.24 19.05 180)
(length 2.54)
(name "EP" (effects (font (size 1.27 1.27))))
(number "29" (effects (font (size 1.27 1.27))))
)
)
)
)

View File

@ -0,0 +1,54 @@
(module easyeda2kicad:TSSOP-28_L9.7-W4.4-P0.65-LS6.4-BL-EP-1 (layer F.Cu) (tedit 5DC5F6A4)
(attr smd)
(fp_text reference REF** (at 0 -6.87) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value TSSOP-28_L9.7-W4.4-P0.65-LS6.4-BL-EP-1 (at 0 6.87) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text user %R (at 0 0) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -4.92 1.77) (end -4.92 -1.77) (layer F.SilkS) (width 0.15))
(fp_line (start -4.92 -1.77) (end 4.93 -1.77) (layer F.SilkS) (width 0.15))
(fp_line (start 4.93 -1.77) (end 4.93 1.77) (layer F.SilkS) (width 0.15))
(fp_line (start 4.93 1.77) (end -4.92 1.77) (layer F.SilkS) (width 0.15))
(pad 15 smd oval (at 4.23 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 16 smd oval (at 3.58 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 17 smd oval (at 2.93 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 18 smd oval (at 2.28 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 19 smd oval (at 1.63 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 20 smd oval (at 0.98 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 21 smd oval (at 0.33 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 22 smd oval (at -0.32 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 23 smd oval (at -0.98 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 24 smd oval (at -1.63 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 25 smd oval (at -2.28 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 26 smd oval (at -2.93 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 27 smd oval (at -3.58 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 28 smd oval (at -4.23 -2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 14 smd oval (at 4.23 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 13 smd oval (at 3.58 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 12 smd oval (at 2.93 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 11 smd oval (at 2.28 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 10 smd oval (at 1.63 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 9 smd oval (at 0.98 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 8 smd oval (at 0.33 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 7 smd oval (at -0.32 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 6 smd oval (at -0.98 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 5 smd oval (at -1.63 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 4 smd oval (at -2.28 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 3 smd oval (at -2.93 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 2 smd oval (at -3.58 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 1 smd oval (at -4.23 2.87 0.00) (size 0.34 1.75) (layers F.Cu F.Paste F.Mask))
(pad 29 smd rect (at 0.00 0.00 0.00) (size 5.50 3.00) (layers F.Cu F.Paste F.Mask))
(fp_circle (center -4.85 3.20) (end -4.82 3.20) (layer F.Fab) (width 0.06))
(fp_circle (center -4.23 3.60) (end -4.08 3.60) (layer Cmts.User) (width 0.30))
(fp_circle (center -4.85 2.87) (end -4.70 2.87) (layer F.SilkS) (width 0.30))
(fp_circle (center -4.23 1.02) (end -4.08 1.02) (layer F.SilkS) (width 0.30))
(model "/A3981-ecad.3dshapes/TSSOP-28_L9.7-W4.4-P0.65-LS6.4-BL-EP-1.wrl"
(offset (xyz 0.000 -0.000 -0.000))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)

BIN
docs/A3981-images/A3981-datasheet_page_10_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_11_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_12_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_13_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_14_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_14_img_2.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_15_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_15_img_2.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_16_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_16_img_2.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_17_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_18_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_19_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_1_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_1_img_2.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_20_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_21_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_22_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_23_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_24_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_25_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_26_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_27_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_28_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_29_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_2_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_30_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_30_img_2.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_30_img_3.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_31_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_31_img_2.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_32_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_33_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_34_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_35_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_36_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_37_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_38_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_39_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_3_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_40_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_41_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_42_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_42_img_2.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_43_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_44_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_45_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_4_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_5_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_6_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_7_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_8_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-images/A3981-datasheet_page_9_img_1.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_1.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_10.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_11.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_12.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_13.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_14.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_15.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_16.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_17.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_18.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_19.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_2.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_20.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_21.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_22.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_23.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_24.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_25.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_26.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_27.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_28.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_29.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_3.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_30.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_31.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_32.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_33.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_34.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_35.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_36.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_37.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_38.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_39.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_4.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_40.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_41.svg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/A3981-vectors/A3981-datasheet_page_42.svg (Stored with Git LFS) Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More