Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bb894ee
Initial commit for SparkFun Tristimulus Color Sensor - OPT4048DTSR bo…
ArnavK-09 Jul 2, 2025
f50940d
format
ArnavK-09 Jul 2, 2025
4d1e8f3
c
ArnavK-09 Jul 2, 2025
c49f98d
d
ArnavK-09 Jul 2, 2025
390143b
f
ArnavK-09 Jul 2, 2025
9168c7b
Discard changes to boards/SparkFun HMC6343 Breakout/SparkFun-HMC6343-…
ArnavK-09 Jul 2, 2025
ab93b91
Discard changes to boards/SparkFun I2C DAC Breakout - MCP4725/SparkFu…
ArnavK-09 Jul 2, 2025
58fb443
revert
ArnavK-09 Jul 2, 2025
aa47b6a
delete snapsjots
ArnavK-09 Jul 2, 2025
1e45877
use latest cli to avoid snapshot er
ArnavK-09 Jul 2, 2025
a601f15
remove napshots
ArnavK-09 Jul 2, 2025
87011cc
deps update
ArnavK-09 Jul 2, 2025
39ec416
ds
ArnavK-09 Jul 2, 2025
9535570
Discard changes to package.json
ArnavK-09 Jul 2, 2025
478941e
Discard changes to bun.lock
ArnavK-09 Jul 2, 2025
530b805
sd
ArnavK-09 Jul 2, 2025
22831fd
update tscircuit to test for build
ArnavK-09 Jul 2, 2025
c737663
test
ArnavK-09 Jul 2, 2025
dba105d
fix
ArnavK-09 Jul 2, 2025
51fb0f8
Discard changes to package.json
ArnavK-09 Jul 3, 2025
3d79b33
Discard changes to bun.lock
ArnavK-09 Jul 3, 2025
48e063b
Merge branch 'main' into A1
ArnavK-09 Jul 3, 2025
c77163a
done
ArnavK-09 Jul 3, 2025
40b4988
Merge branch 'main' into A1
ArnavK-09 Jul 23, 2025
95a5804
feat(board): add mounting holes and update component layouts
ArnavK-09 Jul 28, 2025
c2ab7b3
chore: remove LICENSE file from OPT4048DTSR board
ArnavK-09 Jul 28, 2025
330c65a
refactor(OPT4048DTSR): improve type imports and simplify connectors
ArnavK-09 Jul 28, 2025
938ddff
chore: update circuit schematic diff image for OPT4048DTSR sensor
ArnavK-09 Jul 28, 2025
a28aa4a
Merge branch 'main' into A1
ArnavK-09 Jul 28, 2025
0206d80
Merge branch 'main' into A1
ArnavK-09 Sep 5, 2025
6fb267f
Merge branch 'main' into A1
ArnavK-09 Sep 15, 2025
e575958
Merge branch 'main' into A1
ArnavK-09 Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SparkFun Tristimulus Color Sensor - OPT4048DTSR

For more information about this board, visit the official SparkFun product page:

[https://www.sparkfun.com/sparkfun-tristimulus-color-sensor-opt4048dtsr-qwiic.html](https://www.sparkfun.com/sparkfun-tristimulus-color-sensor-opt4048dtsr-qwiic.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import manualEdits from "./manual-edits.json"
import Jumpers from "./jumpers"
import Sensor from "./color-sensor"
import Address from "./address"
import Connectors from "./connectors"

export default () => (
<board width="25.4mm" height="25.4mm" manualEdits={manualEdits}>
<Sensor x={2} y={2} />
<Jumpers x={8} y={5} />
<Address x={8} y={0} />
<Connectors x={2} y={-2} />
</board>
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
interface DisplacementProps {
x?: number
y?: number
}

export default ({ x = 0, y = 0 }: DisplacementProps) => (
<group name="addresses" schY={y} schX={x}>
<resistor
footprint={"0402"}
name="R5"
resistance={"10k"}
schRotation={90}
connections={{
pin2: "net.V3_3",
}}
schY={1}
/>
<trace from=".R5 > .pin1" to=".OX45 > .pin1" />
<solderjumper
name="OX45"
pinLabels={{
pin1: "ADDR_1",
pin2: "VCC",
}}
pinCount={2}
footprint="solderjumper3_p0.8_pw0.635_ph1.270"
schRotation={180}
schX={-0.6}
schY={0.11}
/>
<solderjumper
name="OX46"
pinLabels={{
pin1: "ADDR_2",
pin2: "SDA",
}}
pinCount={2}
footprint="solderjumper3_p0.8_pw0.635_ph1.270"
schRotation={180}
schX={-0.6}
schY={-0.6}
/>
<trace from=".OX46 > .pin1" to="net.SDA" />
<solderjumper
name="OX44"
pinLabels={{
pin1: "GND",
pin2: "ADDR_0",
}}
pinCount={2}
footprint="solderjumper3_p0.8_pw0.635_ph1.270"
schRotation={180}
schX={-0.6}
schY={-1.3}
/>
<netlabel
net="GND"
schX={0.6}
schY={-1.3}
connection="OX44.pin1"
anchorSide="top"
/>
<trace from=".OX44 > .pin2" to="net.ADDR" />
<trace from=".OX45 > .pin2" to="net.ADDR" />
<trace from=".OX46 > .pin2" to="net.ADDR" />
</group>
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import type { ChipProps } from "@tscircuit/props"
import { sel } from "@tscircuit/core"

interface DisplacementProps {
x?: number
y?: number
}

const pinLabels: Record<`pin${number}`, string> = {
pin1: "VDD",
pin2: "ADDR",
pin3: "NC",
pin4: "GND",
pin5: "SCL",
pin6: "NC",
pin7: "INT",
pin8: "SDA",
}

const OPT4048DTSR = (props: ChipProps<typeof pinLabels>) => (
<chip
{...props}
pinLabels={pinLabels}
footprint={"soic8"}
manufacturerPartNumber="OPT4048"
/>
)
export default ({ x = 0, y = 0 }: DisplacementProps) => (
<group name="sensor" schX={x} schY={y}>
<schematictext
fontSize={0.3}
text="VDD Range: 1.71V - 3.6V"
schX={-3}
schY={4}
anchor="center_left"
/>
<OPT4048DTSR
name="U1"
schPinArrangement={{
leftSide: { direction: "top-to-bottom", pins: ["VDD", "GND"] },
rightSide: {
direction: "bottom-to-top",
pins: ["SCL", "SDA", "ADDR", "INT"],
},
}}
schPinStyle={{
VDD: { marginBottom: 1 },
GND: { marginBottom: 0 },
ADDR: { marginBottom: 0.65 },
}}
connections={{
SCL: sel.net.SCL,
SDA: sel.net.SDA,
ADDR: "net.ADDR",
INT: "net.INT",
}}
/>
<netlabel
net="GND"
schX={-1.5}
schY={-0.6}
connection=".U1 > .GND"
anchorSide="top"
/>
<netlabel
net="V3_3"
schX={-1.5}
schY={0.6}
connection=".U1 > .VDD"
anchorSide="bottom"
/>
<resistor
name="R3"
footprint="0402"
resistance={"10K"}
connections={{
pin1: sel.net.V3_3,
pin2: "net.INT",
}}
schRotation="270deg"
schX={1}
schY={1.8}
/>
<capacitor
footprint="0402"
connections={{
pin1: sel.net.GND,
pin2: sel.net.V3_3,
}}
schX={-2.5}
name="C1"
schRotation="90deg"
capacitance={"0.0000001F"}
/>
</group>
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { sel } from "@tscircuit/core"

interface DisplacementProps {
x?: number
y?: number
}

const pinLabelsJ2: Record<`pin${number}`, string> = {
pin4: "SCL",
pin3: "SDA",
pin2: "VCC",
pin1: "GND",
}
const pinLabelsJ3: Record<`pin${number}`, string> = {
pin4: "SCL",
pin3: "SDA",
pin2: "VCC",
pin1: "GND",
}

export default ({ x = 0, y = 0 }: DisplacementProps) => (
<group schX={x} schY={y}>
<jumper
name="J3"
schX={-3}
pcbRotation={-90}
footprint="pinrow5_pinlabeltextalignright_pinlabelorthogonal_pinlabelverticallyinverted_doublesidedpinlabel"
/>
<trace from=".J3 > .pin5" to="net.INT" />
<trace from=".J3 > .pin4" to="net.SCL" />
<trace from=".J3 > .pin3" to="net.SDA" />
<netlabel
net="V3_3"
schX={-2}
schY={1}
connection=".J3 > .pin2"
anchorSide="bottom"
/>
<netlabel
net="GND"
schX={-2}
schY={-1}
connection=".J3 > .pin1"
anchorSide="top"
/>

<jumper
manufacturerPartNumber="QWIIC_RIGHT_ANGLE"
name="J2"
pinLabels={pinLabelsJ2}
schY={1}
footprint="pinrow4_pinlabeltextalignright_pinlabelorthogonal_pinlabelverticallyinverted_doublesidedpinlabel"
/>
<trace from=".J2 > .pin4" to="net.SCL" />
<trace from=".J2 > .pin3" to="net.SDA" />

<jumper
manufacturerPartNumber="QWIIC_RIGHT_ANGLE"
name="J1"
schY={-1}
pinLabels={pinLabelsJ2}
footprint="pinrow4_pinlabeltextalignright_pinlabelorthogonal_pinlabelverticallyinverted_doublesidedpinlabel"
/>
<trace from=".J1 > .pin4" to="net.SCL" />
<trace from=".J1 > .pin3" to="net.SDA" />
<netlabel
net="GND"
schX={1.5}
schY={-1.5}
connectsTo={[".J1 > .pin1", ".J2 > .pin1"]}
anchorSide="top"
/>
<netlabel
net="V3_3"
schX={1.5}
schY={2}
connectsTo={[".J1 > .pin2", ".J2 > .pin2"]}
anchorSide="bottom"
/>
</group>
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import manualEdits from "./manual-edits.json"
import Jumpers from "./jumpers"
import Sensor from "./color-sensor"
import Address from "./address"
import Connectors from "./connectors"

export default () => (
<board width="25.4mm" height="25.4mm" manualEdits={manualEdits}>
<Sensor x={2} y={2} />
<Jumpers x={8} y={5} />
<Address x={8} y={0} />
<Connectors x={2} y={-2} />
</board>
)

export { Jumpers, Sensor, Address, Connectors }
100 changes: 100 additions & 0 deletions boards/SparkFun Tristimulus Color Sensor - OPT4048DTSR/jumpers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
interface DisplacementProps {
x?: number
y?: number
}

export default ({ x = 0, y = 0 }: DisplacementProps) => (
<group schX={x} schY={y}>
<solderjumper
name="I2C_PU"
pinLabels={{
pin1: "SDA_PU",
pin2: "VCC",
pin3: "SCL_PU",
}}
pinCount={3}
footprint="solderjumper3_p0.8_pw0.635_ph1.270"
schRotation={180}
/>
<trace from=".I2C_PU > .pin2" to="net.V3_3" />

<resistor
name="R1"
footprint={"0402"}
schRotation={"90deg"}
schY={-0.8}
schX={-0.439}
resistance={"2.2K"}
/>
<resistor
name="R2"
footprint={"0402"}
schRotation={"90deg"}
schY={-0.8}
schX={0.439}
resistance={"2.2K"}
/>

<trace from=".I2C_PU > .pin3" to=".R1 > .pin2" />
<trace from=".I2C_PU > .pin1" to=".R2 > .pin2" />

<netlabel
net="SDA"
schX={1}
schY={-1.35}
connection=".R2 > .pin1"
anchorSide="left"
/>
<netlabel
net="SCL"
schX={1}
schY={-2}
connection=".R1 > .pin1"
anchorSide="left"
/>

<schematictext
fontSize={0.1}
schX={-1.4}
schY={0}
text="Cut traces to remove I2C pull-up resistors."
/>

<resistor
schX={2.5}
name="R4"
footprint={"0402"}
resistance={"4.7K"}
schRotation={"90deg"}
/>
<trace from=".R4 > .pin2" to="net.V3_3" />
<led
schX={2.5}
name="D1"
schY={-1.2}
footprint="solderjumper3_p0.8_pw0.635_ph1.270"
schRotation={"270deg"}
schDisplayValue="RED"
/>
<trace from=".D1 > .pin1 " to=".R4 > .pin1" />
<solderjumper
name="LED"
pinLabels={{
pin1: "LED_GND",
pin2: "NC",
}}
pinCount={2}
footprint="solderjumper3_p0.8_pw0.635_ph1.270"
schRotation={90}
schX={2.5}
schY={-2.2}
/>
<schematictext
fontSize={0.1}
schX={3.1}
schY={-2.2}
text="Cut trace to disconnect Power LED."
/>
<trace from=".LED > .pin1" to="net.GND" />
</group>
)
Loading
Loading