-
Notifications
You must be signed in to change notification settings - Fork 38
feat(boards): add SparkFun Qwiic SHIM for Raspberry Pi board definition #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rushabhcodes
merged 7 commits into
tscircuit:main
from
rushabhcodes:add-SparkFun-Qwiic-Shim-for-Raspberry-Pi
Jun 23, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fe071d9
feat(boards): add SparkFun Qwiic SHIM for Raspberry Pi board definition
rushabhcodes eeb27d8
refactor(board): normalize Qwiic Pi shim layout coordinates and enabl…
rushabhcodes fbca54a
fix(qwiic-shim): connect unused qwiic pin to NC net
rushabhcodes 87411f9
up
rushabhcodes c4f762b
fix(qwiic-shim): add V3_3 net label to Raspberry Pi header
rushabhcodes 26d61d5
up
rushabhcodes f1c1fff
up
rushabhcodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # SparkFun Qwiic SHIM for Raspberry Pi | ||
|
|
||
| For more information about this board, visit the official SparkFun product page: | ||
|
|
||
| [https://www.sparkfun.com/sparkfun-qwiic-shim-for-raspberry-pi.html](https://www.sparkfun.com/sparkfun-qwiic-shim-for-raspberry-pi.html) |
162 changes: 162 additions & 0 deletions
162
boards/SparkFun-Qwiic-Shim-for-Raspberry-Pi/SparkFun-Qwiic-Shim-for-Raspberry-Pi.circuit.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,162 @@ | ||
| import { sel } from "tscircuit" | ||
| import { OutlineBuilder } from "../../util/OutlineBuilder" | ||
| import { SM04B_SRSS_TB_LF__SN_ } from "./imports/SM04B_SRSS_TB_LF__SN_" | ||
| import { PiShimHeader } from "./imports/PiShimHeader" | ||
|
|
||
| const outline = new OutlineBuilder(3.81, -6.985) | ||
| .lineTo(-3.81, -6.985) | ||
| .arcTo(-5.08, -5.715, { radius: 1.27, sweep: false }) | ||
| .lineTo(-5.08, 5.715) | ||
| .arcTo(-3.81, 6.985, { | ||
| radius: 1.27, | ||
| sweep: false, | ||
| }) | ||
| .lineTo(1.27, 6.985) | ||
| .arcTo(2.54, 5.715, { | ||
| radius: 1.27, | ||
| sweep: false, | ||
| }) | ||
| .lineTo(2.54, 2.2098) | ||
| .lineTo(4.445, 2.2098) | ||
| .arcTo(5.08, 1.6002, { | ||
| radius: 0.635, | ||
| sweep: true, | ||
| }) | ||
| .lineTo(5.08, -5.715) | ||
| .arcTo(3.81, -6.985, { radius: 1.27, sweep: false }) | ||
| .toArray() | ||
|
|
||
| const ap2112PinLabels = { | ||
| pin1: ["IN", "VIN"], | ||
| pin2: ["GND"], | ||
| pin3: ["EN"], | ||
| pin4: ["NC"], | ||
| pin5: ["OUT", "VOUT"], | ||
| } as const | ||
|
|
||
| export default () => ( | ||
| <board outline={outline}> | ||
| <schematicsection name="raspberry_pi" displayName="Raspberry Pi" /> | ||
| <schematicsection name="power" displayName="Power" /> | ||
| <schematicsection name="i2c" displayName="I2C Connections" /> | ||
|
|
||
| <PiShimHeader | ||
| name="J9" | ||
| pcbX={-1.27} | ||
| pcbY={4.445} | ||
| schSectionName="raspberry_pi" | ||
| schX={-8} | ||
| schY={0} | ||
| connections={{ | ||
| "5V_A": sel.net.V5, | ||
| "5V_B": sel.net.V5, | ||
| SDA: sel.net.SDA, | ||
| SCL: sel.net.SCL, | ||
| GND: sel.net.GND, | ||
| NC: sel.net().NC, | ||
| }} | ||
| /> | ||
| <SM04B_SRSS_TB_LF__SN_ | ||
| name="J1" | ||
| pcbX={-2.1116} | ||
| pcbY={-1.397} | ||
| pcbRotation={270} | ||
| schSectionName="i2c" | ||
| schX={8} | ||
| schY={0} | ||
| schPinArrangement={{ | ||
| rightSide: { | ||
| direction: "top-to-bottom", | ||
| pins: ["GND", "VCC", "SDA", "SCL"], | ||
| }, | ||
| }} | ||
| connections={{ | ||
| GND: sel.net.GND, | ||
| VCC: sel.net.V3_3, | ||
| SDA: sel.net.SDA, | ||
| SCL: sel.net.SCL, | ||
| }} | ||
| /> | ||
| <netlabel | ||
| net="V3_3" | ||
| schX={10} | ||
| schY={0.5} | ||
| connectsTo={sel.J1.pin2} | ||
| anchorSide="bottom" | ||
| /> | ||
| <chip | ||
| name="U2" | ||
| pinLabels={ap2112PinLabels} | ||
| manufacturerPartNumber="AP2112K-3.3TRG1" | ||
| footprint="SOT23-5" | ||
| pcbX={2.8956} | ||
| pcbY={-1.9304} | ||
| pcbRotation={90} | ||
| schSectionName="power" | ||
| schX={0} | ||
| schY={0} | ||
| schWidth={1.4} | ||
| schHeight={0.6} | ||
| schPinArrangement={{ | ||
| leftSide: { | ||
| direction: "top-to-bottom", | ||
| pins: ["IN", "EN", "GND"], | ||
| }, | ||
| rightSide: { | ||
| direction: "top-to-bottom", | ||
| pins: ["OUT", "NC"], | ||
| }, | ||
| }} | ||
| connections={{ | ||
| VIN: sel.net.V5, | ||
| EN: sel.net.V5, | ||
| GND: sel.net.GND, | ||
| VOUT: sel.net.V3_3, | ||
| }} | ||
| /> | ||
| <capacitor | ||
| name="C1" | ||
| capacitance="1.0uF" | ||
| footprint="0603" | ||
| pcbX={2.413} | ||
| pcbY={-4.7136} | ||
| schSectionName="power" | ||
| schX={-2.3} | ||
| schY={0} | ||
| schRotation={270} | ||
| connections={{ | ||
| pin1: sel.net.V5, | ||
| pin2: sel.net.GND, | ||
| }} | ||
| /> | ||
| <capacitor | ||
| name="C3" | ||
| capacitance="1.0uF" | ||
| footprint="0603" | ||
| pcbX={2.8702} | ||
| pcbY={0.889} | ||
| schSectionName="power" | ||
| schX={2.6} | ||
| schY={0} | ||
| schRotation={270} | ||
| connections={{ | ||
| pin1: sel.net.V3_3, | ||
| pin2: sel.net.GND, | ||
| }} | ||
| /> | ||
|
|
||
| <fiducial name="FD1" pcbX={0} pcbY={6.3754} padDiameter="0.635mm" /> | ||
| <fiducial name="FD2" pcbX={-4.4704} pcbY={-5.3086} padDiameter="0.635mm" /> | ||
|
|
||
| <schematictext text="3.3V/600mA" schX={0} schY={-1.2} fontSize={0.24} /> | ||
|
|
||
| <silkscreentext text="qwiic" fontSize={0.9} pcbX={-1.7} pcbY={-5.7} /> | ||
| <silkscreentext | ||
| text="Pi SHIM" | ||
| fontSize={0.8} | ||
| pcbX={-1.1} | ||
| pcbY={5.6} | ||
| layer="bottom" | ||
| /> | ||
| </board> | ||
| ) | ||
Binary file added
BIN
+31.3 KB
...berry-Pi/__snapshots__/SparkFun-Qwiic-Shim-for-Raspberry-Pi.circuit-3d.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...erry-Pi/__snapshots__/SparkFun-Qwiic-Shim-for-Raspberry-Pi.circuit-pcb.snap.svg
|
rushabhcodes marked this conversation as resolved.
rushabhcodes marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions
67
...i/__snapshots__/SparkFun-Qwiic-Shim-for-Raspberry-Pi.circuit-schematic.snap.svg
|
rushabhcodes marked this conversation as resolved.
rushabhcodes marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions
92
boards/SparkFun-Qwiic-Shim-for-Raspberry-Pi/imports/PiShimHeader.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| import type { ChipProps } from "@tscircuit/props" | ||
|
|
||
| const pinLabels = { | ||
| pin1: ["NC"], | ||
| pin2: ["5V_A"], | ||
| pin3: ["SDA"], | ||
| pin4: ["5V_B"], | ||
| pin5: ["SCL"], | ||
| pin6: ["GND"], | ||
| } as const | ||
|
|
||
| export const PiShimHeader = (props: ChipProps<typeof pinLabels>) => ( | ||
| <chip | ||
| pinLabels={pinLabels} | ||
| schWidth={1.1} | ||
| schPinArrangement={{ | ||
| leftSide: { | ||
| direction: "top-to-bottom", | ||
| pins: ["NC", "SDA", "SCL"], | ||
| }, | ||
| rightSide: { | ||
| direction: "top-to-bottom", | ||
| pins: ["5V_A", "5V_B", "GND"], | ||
| }, | ||
| }} | ||
| footprint={ | ||
| <footprint> | ||
| <platedhole | ||
| portHints={["pin1"]} | ||
| pcbX="-2.54mm" | ||
| pcbY="-1.0922mm" | ||
| outerDiameter="1.524mm" | ||
| holeDiameter="1.016mm" | ||
| shape="circle" | ||
| /> | ||
| <platedhole | ||
| portHints={["pin2"]} | ||
| pcbX="-2.5273mm" | ||
| pcbY="1.0846mm" | ||
| outerWidth="2.286mm" | ||
| outerHeight="1.27mm" | ||
| holeWidth="2.032mm" | ||
| holeHeight="1.016mm" | ||
| shape="pill" | ||
| /> | ||
| <platedhole | ||
| portHints={["pin3"]} | ||
| pcbX="0mm" | ||
| pcbY="-1.0922mm" | ||
| outerDiameter="1.651mm" | ||
| holeDiameter="1.016mm" | ||
| shape="circle" | ||
| /> | ||
| <platedhole | ||
| portHints={["pin4"]} | ||
| pcbX="0.0127mm" | ||
| pcbY="1.0846mm" | ||
| outerWidth="2.286mm" | ||
| outerHeight="1.27mm" | ||
| holeWidth="2.032mm" | ||
| holeHeight="1.016mm" | ||
| shape="pill" | ||
| /> | ||
| <platedhole | ||
| portHints={["pin5"]} | ||
| pcbX="2.54mm" | ||
| pcbY="-1.0922mm" | ||
| outerDiameter="1.651mm" | ||
| holeDiameter="1.016mm" | ||
| shape="circle" | ||
| /> | ||
| <platedhole | ||
| portHints={["pin6"]} | ||
| pcbX="2.5527mm" | ||
| pcbY="1.0846mm" | ||
| outerWidth="2.286mm" | ||
| outerHeight="1.27mm" | ||
| holeWidth="2.032mm" | ||
| holeHeight="1.016mm" | ||
| shape="pill" | ||
| /> | ||
| <silkscreenpath | ||
| route={[ | ||
| { x: -3.175, y: -2.875 }, | ||
| { x: -1.905, y: -2.875 }, | ||
| ]} | ||
| /> | ||
| </footprint> | ||
| } | ||
| {...props} | ||
| /> | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.