Devesh36/clear-mouse
A transparent, right-handed wireless mouse assembly with a 44×58 mm control PCB, LiPo battery, optical sensor, click buttons, scroll encoder, DPI/middle buttons, USB‑C charging, and 3D‑printed housing/mechanical hardware.
- Version
- 0.1.5
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone Devesh36/clear-mouse # download the package files into ./clear-mouse
tsci add Devesh36/clear-mouse # add it to your project as @tsci/Devesh36.clear-mouseIn a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
controls.circuit.tsx
PCB
Schematic
import { Fragment } from "react";
import { Click, Encoder, Button, S } from "./parts";
import { ControlConnector, controlConnections } from "./control-connector";
export default function Controls() {
return (
<board
name="VERTICAL_CONTROLS"
width={44}
height={58}
borderRadius={6}
thickness={1.6}
layers={2}
solderMaskColor="black"
autorouter="auto_local"
minTraceWidth={0.2}
minTraceToPadEdgeClearance={0.15}
minBoardEdgeClearance={0.3}
schTraceAutoLabelEnabled
>
<schematicsheet
name="INPUTS"
displayName="Vertical buttons and scroll wheel"
>
<schematicsection name="INPUTS" />
</schematicsheet>
<net name="GND" isGroundNet />
{[
[-19, 25],
[19, 25],
[-19, -25],
[19, -25],
].map(([x, y], i) => (
<Fragment key={i}>
<hole name={`HC${i}`} pcbX={x} pcbY={y} diameter={2.4} />
</Fragment>
))}
<hole name="H_WHEEL_BEARING" pcbX={8.5} pcbY={5} diameter={2.2} />
<cutout
name="WHEEL_CLEARANCE"
shape="rect"
pcbX={0}
pcbY={5}
width={8}
height={22}
/>
<keepout
shape="rect"
pcbX={0}
pcbY={5}
width={8.6}
height={22.6}
layers={["top", "bottom"]}
/>
<Click
name="SW_LEFT"
pcbX={-17}
pcbY={9.0}
pcbRotation={270}
{...S("INPUTS", -12, 9)}
noConnect={["pin3"]}
connections={{ pin1: "net.GND", pin2: "net.LEFT" }}
/>
<Click
name="SW_RIGHT"
pcbX={17}
pcbY={9.0}
pcbRotation={270}
{...S("INPUTS", -12, 3)}
noConnect={["pin3"]}
connections={{ pin1: "net.GND", pin2: "net.RIGHT" }}
/>
<Encoder
name="ENC1"
pcbX={-7}
pcbY={5.0}
pcbRotation={90}
{...S("INPUTS", 0, 9)}
connections={{
A: "net.ENC_A",
B: "net.ENC_B",
C: "net.GND",
pin4: "net.GND",
pin5: "net.GND",
}}
/>
<Button
name="SW_MIDDLE"
schRotation={-90}
pcbX={0}
pcbY={-8.5}
{...S("INPUTS", 0, 1)}
connections={{ pin1: "net.MIDDLE", pin2: "net.GND" }}
/>
<Button
name="SW_DPI"
schRotation={-90}
pcbX={0}
pcbY={-13.0}
{...S("INPUTS", 0, -5)}
connections={{ pin1: "net.DPI", pin2: "net.GND" }}
/>
<ControlConnector
name="J_BASE"
pcbX={0}
pcbY={-22}
pcbRotation={180}
{...S("INPUTS", 12, 0)}
noConnect={["pin8", "pin9"]}
connections={controlConnections}
/>
<silkscreentext
text="CLEAR MOUSE / CONTROLS"
pcbX={0}
pcbY={22}
fontSize={0.7}
/>
<silkscreentext text="1 GND / 7 DPI" pcbX={0} pcbY={-16} fontSize={0.6} />
</board>
);
}