
Headphone amp v2
r4ptor/headphone-DAC-with-amp
A portable (headphone) USB DAC with a separate conversion stage.

An automatic AFM (and a high-speed one as the second goal): software in cancho, controller in cancho-hdl, interface in cancho-ui, hardware open only. Design stage.
Amp is an open-source printed circuit board by alpibrusl, from the alpibrusl/cancho-afm repository on GitHub. It is a 2-layer board of 141.3 × 120.7 mm with 69 parts on 35 nets, routed with 1,253 tracks and 45 vias.
It is built around the OPA2134PA and BAT54S. Its parts include 24 capacitors, 23 resistors, 11 connectors, 5 ICs and 3 diodes. It belongs with the audio and music boards and the FPGA and CPLD boards of this library.
amp.kicad_sch is the schematic of the X, Y and Z piezo drivers, the 1.43 V reference, the supply and the fork's front end (drive divider, C0 trimmer, transimpedance stage, gain about 1.65 V, ADC clamp) of docs/amplifier.md, generated by gen_sch.cho
(cancho run hw/kicad/gen_sch.cho --std > hw/kicad/amp.kicad_sch). It is written like a netlist: every pin ends in a net label, so the nets are the names in the generator and nothing depends on
placement. The symbols are the generator's own (library cancho, embedded in the file); the footprints are the parts to buy, not checked against their pad numbering.
sh hw/kicad/check.sh (with CANCHO and, for the KiCad part, KICAD_CLI) checks: the file equals the generator's output; KiCad's ERC (10.0.7) has no finding except the library
configuration of the machine; and check_nets.py reads the exported netlist and confirms, for X, Y and Z, that Rf is taken from the load side, Cf from the op-amp output, Riso in series, the
op-amp pins, the values equal those of hw/amp/xy_amp_b.cir and z_amp.cir, the reference divider can hold 1.43 V, and the decoupling is there.
The 48 checks include the fork front end's values against hw/amp/fork_fe.cir, and each of three deliberate breaks (a wrong value, swapped op-amp inputs, a clamp to the wrong rail) is caught. Not done: no board layout; the front end is on the same ±12 V rails as the drivers (the ADC clamp, not the rail, protects the converter); no layout guard around the 1 Mohm node; part values are those
of the simulation (the piezo's capacitance and the op-amp's output resistance are still assumptions). The first check found a real error: z_amp.cir carried Cf = 330 pF while the design and
the document's table use 680 pF; the file is corrected.
amp.kicad_pcb): placed and routed, in canchosh hw/kicad/make_pcb.sh > hw/kicad/amp.kicad_pcb (with CANCHO and KICAD_CLI) makes the board end to end:
gen_pcb.py (Python, standard library only) reads the netlist exported from the schematic, copies each footprint it names from KiCad's own libraries, puts the 69 parts in rows by function, draws a 141 x 121 mm outline and a ground
pour (solid connections) on both layers, and writes the pads to /tmp/amprouter/pads.txt;route.cho routes it, in cancho; no Java, no Freerouting. A 127 um grid on two layers; each net grows as a tree, one pad at a time, by a shortest-path search (Dijkstra with a penalty for going against a layer's preferred
direction and for a via) to the nearest pad it has not joined; routed copper and pads become keep-out disks for the other nets (track 0.25 mm, clearance 0.2 mm, via 0.8 mm / 0.4 mm drill, plus a cell for the snapping of
centres to the grid). Ground is routed like the others (a pour alone left islands that KiCad reports as unconnected), and the pour is added on top. No rip-up: a blocked net is reported (F n) and left, so the answer is a partial routing, never a short. It runs in about 3 seconds;gen_pcb.py adds the tracks and vias to the board.Result (KiCad 10.0.7 DRC, with refilled zones): every net routed, ground included as well as poured (45 vias, from 55 in the first version; power tracks 0.5 mm; the 1 Mohm node's copper is routed early and its pads and tracks carry a 0.9 mm keep-out for other copper), 0 unconnected, 0 clearance, 0 shorting findings, 0 schematic-parity errors; the only findings are 69 about the machine's library
configuration, ignored by check.sh. A deliberate short added to a copy is reported (5 shorting items), and a wrong pad net raises the parity errors, so the check can fail. Two first runs showed what the router's model got wrong,
and the fixes are in the source: pad keep-outs ignored the snapping of centres to the grid (clearance 0.17 mm against 0.2 mm), and a square pad reaches its corner, not its half-width.
The 1 Mohm node (TIN), measured on the routed board, not gated: the smallest gap between its copper and any other net's copper is 0.43 mm, not the 0.9 mm asked for. The keep-out works one way (other nets keep 0.9 mm from TIN's tracks and pads), but TIN's own tracks were only kept the ordinary 0.2 mm from other nets' pads, and those pads set the 0.43 mm. It is a keep-out plus the ground pour around it, not a driven guard ring. Do not read it as leakage-safe: that needs a guard at the input potential (here a virtual ground, so ground itself) and a clean board.
Not done, and not claimed: the placement is a first arrangement, not an optimised one (45 vias is still a lot; the op-amps' decoupling loops are not short by design; the piezo outputs are not kept away from the fork input); the tracks are 90 degrees (no 45-degree corners), power tracks 0.5 mm and the rest 0.25 mm; no mounting holes or silkscreen text; no fabrication check (a fab's own rules, the stack-up, annular ring, drill sizes); and the board has never been built or measured.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | 100n | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C4, C6, C8, C10, C17, C19, C21, C23 |
| 8 | 10u | Capacitor_THT:C_Disc_D6.0mm_W4.4mm_P5.00mm | C5, C7, C9, C11, C18, C20, C22, C24 |
| 6 | 10k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1, R4, R7, R19, R22, R23 |
| 4 | 100k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R15, R16, R18, R20 |
| 4 | OPA2134PA | Package_DIP:DIP-8_W7.62mm | U1, U2, U4, U5 |
| 3 | 47 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R3, R6, R9 |
| 2 | 100n | Capacitor_THT:C_Rect_L7.2mm_W3.0mm_P5.00mm_FKS2_FKP2_MKS2_MKP2 | C12, C15 |
| 2 | 1N5819 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1, D2 |
| 2 | 1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R14, R21 |
| 2 | 330p | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C1, C2 |
| 2 | 500mA | Fuse:Fuse_1206_3216Metric | F1, F2 |
| 2 | 69.8k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R2, R5 |
| 1 | 1.5-5p trim | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C13 |
| 1 | 10p | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C16 |
| 1 | 1M | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R17 |
| 1 | 1k | Potentiometer_THT:Potentiometer_Bourns_3296W_Vertical | RV1 |
| 1 | 1p | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C14 |
| 1 | 2.2k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R11 |
| 1 | 2.7k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R12 |
| 1 | 3.3 V (from the FPGA board) | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J11 |
| 1 | 30.1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R8 |
| 1 | 49.9k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R13 |
| 1 | 680p | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C3 |
| 1 | 9.53k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R10 |
| 1 | ADC A0 (Pmod AD1) | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J9 |
| 1 | BAT54S | Package_TO_SOT_SMD:SOT-23 | D3 |
| 1 | DAC X (Pmod DA3) | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1 |
| 1 | DAC Y (Pmod DA3) | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J2 |
| 1 | DAC Z (Pmod DA3) | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J3 |
| 1 | LM4040-2.5 | Package_TO_SOT_SMD:SOT-23 | U3 |
| 1 | X piezo | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J4 |
| 1 | Y piezo | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J5 |
| 1 | Z piezo | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J6 |
| 1 | fork drive (Pmod DA3) | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J10 |
| 1 | supply | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J7 |
| 1 | tuning fork (E, sense) | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J8 |

r4ptor/headphone-DAC-with-amp
A portable (headphone) USB DAC with a separate conversion stage.

chris-albert/ghost-fader
MIDI-controlled volume and pan for balanced stereo synths (Teensy 4.0 + PGA2310)

hernansilva02/fotodiodo-project
Proyecto académico/open-hardware para el diseño, simulación y fabricación de un detector basado en fotodiodo PIN con amplificador transimpedancia (TIA).




ataradov/usb-sniffer
Low-cost LS/FS/HS USB sniffer with Wireshark interface

Twisted-Fields/rp2040-motor-controller
A dual channel brushless motor controller based on the RP2040 microcontroller, designed in Kicad.
It measures 141.3 × 120.7 mm and has 2 copper layers, 1.6 mm thick.
69 parts, built around the OPA2134PA and BAT54S. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the alpibrusl/cancho-afm repository on GitHub, at the commit this page was made from: the board is hw/kicad/amp.kicad_pcb and its schematic hw/kicad/amp.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask alpibrusl before reusing the design.