tscircuit 0.0.3003-libonly → 0.0.3004-libonly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -43
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# tscircuit - React for Circuits
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Design circuit boards with TypeScript and React.**
|
|
4
4
|
|
|
5
|
-
tscircuit
|
|
6
|
-
create electronics in realtime. When you're done, [export your project and manufacture](https://docs.tscircuit.com/guides/understanding-fabrication-files)!
|
|
5
|
+
tscircuit is an open-source electronics design tool. Describe components and connections in code, preview your schematic and PCB in 2D and 3D, and export manufacturing files to order real boards.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
Use your favorite editor and AI coding tools, or [try it in your browser](https://tscircuit.com/playground).
|
|
8
|
+
|
|
9
|
+
Get started with `npm install -g tscircuit`. [CLI quickstart →](https://docs.tscircuit.com/intro/quickstart-cli)
|
|
9
10
|
|
|
10
11
|
<div>
|
|
11
12
|
<a href="https://tscircuit.com/join" target="_blank">Discord</a>
|
|
@@ -43,22 +44,67 @@ Get started by running `npm install -g tscircuit`! [(CLI quickstart doc)](https:
|
|
|
43
44
|
<a target="_blank" href="https://github.com/tscircuit/tscircuit/stargazers"><img src="https://img.shields.io/github/stars/tscircuit/tscircuit" alt="GitHub Stars"></a>
|
|
44
45
|
</div>
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
https://github.com/user-attachments/assets/91218278-2f00-48bf-97a2-53c7652c25e5
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
https://github.com/user-attachments/assets/e0fc9f05-691f-422e-816a-1854c4ffc02d
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
## Example Circuits
|
|
60
48
|
|
|
61
|
-
|
|
49
|
+
From code to hardware: explore the source, schematic, PCB layout, and 3D view of these community projects.
|
|
50
|
+
|
|
51
|
+
<table>
|
|
52
|
+
<tr>
|
|
53
|
+
<td align="center" width="33%">
|
|
54
|
+
<a href="https://tscircuit.com/imrishabh18/rp2040-motor-controller#files">
|
|
55
|
+
<img src="./docs/showcase/rp2040-motor-controller.jpg" width="280" alt="Manufactured RP2040 USB-C motor controller mounted on a stepper motor" />
|
|
56
|
+
</a>
|
|
57
|
+
<br />
|
|
58
|
+
<strong><a href="https://tscircuit.com/imrishabh18/rp2040-motor-controller#files">RP2040 motor controller</a></strong>
|
|
59
|
+
<br />
|
|
60
|
+
USB-C motor control · Manufactured board
|
|
61
|
+
<br />
|
|
62
|
+
by <a href="https://tscircuit.com/imrishabh18">imrishabh18</a>
|
|
63
|
+
</td>
|
|
64
|
+
<td align="center" width="33%">
|
|
65
|
+
<a href="https://tscircuit.com/imrishabh18/nema-23-stepper-controller#3d">
|
|
66
|
+
<img src="./docs/showcase/nema-23-stepper-controller.jpg" width="280" alt="Supersampled 3D render of the NEMA 23 stepper controller PCB and complete motor assembly" />
|
|
67
|
+
</a>
|
|
68
|
+
<br />
|
|
69
|
+
<strong><a href="https://tscircuit.com/imrishabh18/nema-23-stepper-controller#files">NEMA 23 stepper controller</a></strong>
|
|
70
|
+
<br />
|
|
71
|
+
Motor-mounted controller · 3D render
|
|
72
|
+
<br />
|
|
73
|
+
by <a href="https://tscircuit.com/imrishabh18">imrishabh18</a>
|
|
74
|
+
</td>
|
|
75
|
+
<td align="center" width="33%">
|
|
76
|
+
<a href="https://tscircuit.com/MustafaMulla29/rp2040-bldc-motor-controller-new#3d">
|
|
77
|
+
<img src="./docs/showcase/rp2040-bldc-motor-controller.jpg" width="280" alt="Supersampled 3D render of the RP2040 brushless motor controller PCB" />
|
|
78
|
+
</a>
|
|
79
|
+
<br />
|
|
80
|
+
<strong><a href="https://tscircuit.com/MustafaMulla29/rp2040-bldc-motor-controller-new#files">RP2040 BLDC controller</a></strong>
|
|
81
|
+
<br />
|
|
82
|
+
Brushless motor control · 3D render
|
|
83
|
+
<br />
|
|
84
|
+
by <a href="https://tscircuit.com/MustafaMulla29">MustafaMulla29</a>
|
|
85
|
+
</td>
|
|
86
|
+
</tr>
|
|
87
|
+
</table>
|
|
88
|
+
|
|
89
|
+
More examples: [ESP32 Wi-Fi breakout](https://tscircuit.com/seveibar/wifi-test-board-1) · [Browse community circuits](https://tscircuit.com)
|
|
90
|
+
|
|
91
|
+
### Schematic and PCB layout
|
|
92
|
+
|
|
93
|
+
The [RP2040 motor controller](https://tscircuit.com/imrishabh18/rp2040-motor-controller#files) also shows how a real design looks in 2D.
|
|
94
|
+
|
|
95
|
+
**Schematic:** USB programming, QSPI flash, and 3.3 V power. Click the image to zoom into the vector drawing.
|
|
96
|
+
|
|
97
|
+
[](./docs/showcase/rp2040-motor-controller-schematic.svg)
|
|
98
|
+
|
|
99
|
+
**PCB layout:** top copper layer, with silkscreen hidden to make the routing easier to see.
|
|
100
|
+
|
|
101
|
+
<p align="center">
|
|
102
|
+
<a href="https://tscircuit.com/imrishabh18/rp2040-motor-controller#pcb">
|
|
103
|
+
<img src="./docs/showcase/rp2040-motor-controller-pcb.png" width="600" alt="RP2040 motor controller top copper layout, showing routed traces, copper pours, pads, vias, and mounting holes" />
|
|
104
|
+
</a>
|
|
105
|
+
</p>
|
|
106
|
+
|
|
107
|
+
1. [What is tscircuit?](#what-is-tscircuit)
|
|
62
108
|
2. [Examples](#example-circuits)
|
|
63
109
|
3. [Getting Started](#getting-started)
|
|
64
110
|
4. [Features](#more-features)
|
|
@@ -70,38 +116,35 @@ https://github.com/user-attachments/assets/e0fc9f05-691f-422e-816a-1854c4ffc02d
|
|
|
70
116
|
|
|
71
117
|
## What is tscircuit?
|
|
72
118
|
|
|
73
|
-
|
|
74
|
-
[React Fiber](https://docs.pmnd.rs/react-three-fiber/getting-started/introduction) to render circuits into web pages.
|
|
75
|
-
|
|
76
|
-
Think of tscircuit as "React for Electronics" It allows you to design real-world electronic circuits using Typescript and React. This is what tscircuit code looks like, instead of creating web element like “div”, you create circuit elements like “chip”, “resistor” or “capacitor”, then instead of rendering a website, we render a 3d circuit (that you can actually order!)
|
|
119
|
+
tscircuit turns TypeScript and React components into schematics, PCB layouts, 3D models, and manufacturing files. Instead of HTML elements like `<div>`, you write circuit elements like `<chip>`, `<resistor>`, and `<trace>`.
|
|
77
120
|
|
|
78
|
-
|
|
121
|
+
Build reusable circuit components, share them on the [registry](https://tscircuit.com), and use the [`tsci` CLI](https://github.com/tscircuit/cli) to preview and [export your designs for manufacturing](https://docs.tscircuit.com/guides/understanding-fabrication-files).
|
|
79
122
|
|
|
80
|
-
|
|
123
|
+
### Circuit code
|
|
81
124
|
|
|
82
|
-
|
|
125
|
+
A simple voltage divider looks like this:
|
|
83
126
|
|
|
84
127
|
```tsx
|
|
85
|
-
|
|
86
|
-
<board width="
|
|
87
|
-
<
|
|
88
|
-
<resistor
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
footprint="0805"
|
|
94
|
-
pcb_x="4mm"
|
|
95
|
-
pcb_y="-1mm"
|
|
96
|
-
/>
|
|
97
|
-
<ground x={3} y={1} name="GND" />
|
|
98
|
-
<trace path={[".U1 > .D0", ".R1 > .left"]} />
|
|
99
|
-
<trace path={[".R1 > .right", ".GND > .gnd"]} />
|
|
128
|
+
export default () => (
|
|
129
|
+
<board width="20mm" height="15mm">
|
|
130
|
+
<resistor name="R1" resistance="10k" footprint="0805" pcbX={-3} />
|
|
131
|
+
<resistor name="R2" resistance="10k" footprint="0805" pcbX={3} />
|
|
132
|
+
<trace from="net.VCC" to="R1.pin1" />
|
|
133
|
+
<trace from="R1.pin2" to="R2.pin1" />
|
|
134
|
+
<trace from="R2.pin1" to="net.OUT" />
|
|
135
|
+
<trace from="R2.pin2" to="net.GND" />
|
|
100
136
|
</board>
|
|
101
137
|
)
|
|
102
138
|
```
|
|
103
139
|
|
|
104
|
-
|
|
140
|
+
<details>
|
|
141
|
+
<summary>Watch tscircuit in action</summary>
|
|
142
|
+
|
|
143
|
+
https://github.com/user-attachments/assets/91218278-2f00-48bf-97a2-53c7652c25e5
|
|
144
|
+
|
|
145
|
+
https://github.com/user-attachments/assets/e0fc9f05-691f-422e-816a-1854c4ffc02d
|
|
146
|
+
|
|
147
|
+
</details>
|
|
105
148
|
|
|
106
149
|
## Getting Started
|
|
107
150
|
|
|
@@ -115,7 +158,7 @@ tsci dev
|
|
|
115
158
|
|
|
116
159
|
> Open your browser to http://localhost:3020!
|
|
117
160
|
|
|
118
|
-
|
|
161
|
+
Edit your circuit code and preview the schematic, PCB layout, and 3D model as you work.
|
|
119
162
|
|
|
120
163
|
## More Features!
|
|
121
164
|
|