AN-004 Application Note

Circuit diagrams, timing charts and interactive maths

CircuiTikZ schematics, WaveDrom timing and register maps, live CircuitJS simulations, KiCad viewers, JSXGraph plots and Cytoscape networks — all from plain Markdown.

VERÖFFENTLICHT ~3 Min.VON Raghul

Noch nicht ins Deutsche übersetzt — hier das Original. (English)

Every diagram on this page is written as text inside a fenced code block, so it lives in Git next to the article and can be edited in Obsidian. All the tools are free and open source.

Which block to use for what
Need Block Tool Rendered
Schematic for an article ```circuitikz CircuiTikZ via TikZJax at build → SVG
Any TikZ / pgfplots figure ```tikz TikZJax at build → SVG
Timing diagram, register map ```wavedrom WaveDrom at build → SVG
Circuit readers can play with ```circuitjs Falstad CircuitJS live simulation
Your real KiCad project ```kicanvas KiCanvas interactive viewer
Draggable maths & geometry ```jsxgraph JSXGraph interactive
Networks & graph theory ```cytoscape Cytoscape.js interactive
Flowcharts, state machines ```mermaid Mermaid in browser

Schematics with CircuiTikZ

The industry-standard LaTeX package for circuit diagrams. Rendered once at build time, so readers download only a small SVG. Add title="…" for a caption and width=… to size it.

VinRCVout
First-order RC low-pass filter
¡+R1VinVoutRf
Inverting amplifier, gain = −Rf/R1
Writing CircuiTikZ

\usepackage{circuitikz} is added for you. Components go in to[...]: R, C, L, D, led, V, I, battery, switch, ground… (the op amp node needs fonts TikZJax lacks, so draw its triangle by hand as above) See the CircuiTikZ manual. pgfplots, chemfig and tikz-cd work the same way inside a ```tikz block.

Timing diagrams and register maps with WaveDrom

CS#SCLKMOSIb7b6…b0MISOb7b6…b0
SPI mode 0 — one byte, MSB first
0134567ENGAINMODErsvdPGA
CTRL register (0x04) of a sensor front-end

Live circuit simulation with CircuitJS

Build the circuit at falstad.com/circuit, then File → Export As Text and paste it into a ```circuitjs block. Readers can watch currents flow and change values. Add editable to let them modify the circuit.

RC charging from a 40 Hz square wave

Your KiCad schematics and PCBs with KiCanvas

Put KiCad 6+ files in public/kicad/ and list them in a block. Readers can zoom, pan, click parts and toggle PCB layers:

```kicanvas height=520 title="Vibration node — main board"
kicad/vibration-node.kicad_sch
kicad/vibration-node.kicad_pcb
```

Interactive maths and geometry with JSXGraph

The block is JavaScript with board and JXG available. Drag the slider or the points.

RC step response — drag τ
Circumcircle of a triangle — drag A, B, C

Networks and graph theory with Cytoscape.js

Write edges as A -> B : label (directed) or A -- B (undirected), nodes as A : Label or A [group]. JSON ({ "elements": [...], "style": [...] }) works too. Layouts: cose, circle, grid, breadthfirst, concentric.

Sensor network topology

Flowcharts and state machines with Mermaid

stateDiagram-v2
  [*] --> Boot
  Boot --> VerifyB: TRIAL flag set
  VerifyB --> RunB: signature OK
  VerifyB --> RunA: bad signature
  RunB --> Confirmed: self-test passed
  RunB --> RunA: watchdog / 3 attempts
  Boot --> RunA: no update pending
Bootloader state machine
Artikel bewerten

Fehler gefunden? Schreib mir.

⌁ Kommentare & Reaktionen

Kommentare sind noch nicht eingerichtet.