This notation is designed to be relatively easy to write. This is achieved by not drawing ultra complex ASCII art boxes of every component. It would be slightly more readable if we did that, but prioritizing the writer here.
Two wires are only joined if but the following are:
+
is given. E.g. the following two wires are not joined: |
--|--
|
|
--+--
|
Simple symmetric components:
-
,+
and|
: wireAC
: AC source. Parameters:e.g.:Hz
: frequencyV
: peak voltage
If only one side is given, the other is assumed to be at a groundAC_1Hz_2V
G
.C
: capacitorG
: ground. Often used together withDC
, e.g.:means applying a voltage of 10 V across a 10 Ohm resistor, which would lead to a current of 1 ADC_10---R_10---G
L
: inductorMICROPHONE
. As a multi-letter symmetric component, you can connect the two wires anywhere, e.g.or:---MICROPHONE---
| MICROPHONE |
SPEAKER
R
: resistorSQUID
: SQUID deviceX
: Josephson junction
Asymmetric components have multiple letters indicating different ports. The capital letter indicates the device, and lower case letters the ports. The wires then go into the ports:
D
: diodeSample usage in a circuit:a
: anode (where electrons can come in from)c
: cathode
Can also be used vertically like aany other circuit:--aDc--
We can also change the port order, the device is still the same due to capital| a D c |
D
:--cDa-- | Dac-- | Dca-- | --caD
DC
DC source. Ports:E.g. a 10 V source with a 10 Ohm resistor would be:p
: positiven
: negative
If only one side is given, the other is assumed to be at a the ground+---pDC_10_n---+ | | +----R_10------+
G
. We can also omitp
andm
in that case and assume thatp
is the one used, e.g. the above would be equivalent to:If the voltage is not given, it is assumed to be a potentiometer.DC_10---R_10---G
T
: transistor. The ports aresgTd
:Sample usage in a circuit:s
: sourceg
: gated
: gate
All the following are also equivalent:---+ | --sgTd--
| g --sTd-- | --Tsgd-- |
I
: electric current source. Ports:s
: electron sourced
: electron destination
V
: Voltmeter. Ports:If we don't need to specify explicit positive and negative sides, we can just use:p
: positiven
: negative
without any ports. This is notably often the case for AC circuits.---V---
Optionaly, we can also add the sides as in:
Numbers characterizing components are put just next to each component with an underscore. When there is only one parameter, standard units are assumed, e.g.:means:Micro is denoted as
+-----+
| |
C_1p R_2k
| |
+-----+
- a capacitor with 1 pico Faraday
- a resistor with 2 k Ohms
u
.Wires can just freely come in and out of specs of a component, they are then just connected to the component, e.g.:means applying a voltage of 10 V across a 10 Ohm resistor, which would lead to a current of 1 A
DC_10---R_10---G
An upstream repo at: github.com/raspberrypi/pico-micropython-examples
Our examples at: rpi-pico-w/upython.
The examples can be run as described at Program Raspberry Pi Pico W with MicroPython.
- rpi-pico-w/upython/blink.py: blink on-board LED. Note that they broke the LED hello world compatibility from non-W to W for God's sake!!!
- rpi-pico-w/upython/led_on.py: turn on-board LED on and leave it on forever
- rpi-pico-w/upython/uart.py: has automatic UART via USB. Any
print()
command ends up on the Raspberry Pi Pico W UART! Is is just like with Micro Bit, must be a standard Micro Python thing. The onboard LED is blinked as a heartbeat. - rpi-pico-w/upython/blink_gpio.py: toggle GPIO pin 0 on and off twice a second. Also toggle the on-board LED and print to UART for correlation. You can see this in action e.g. by linking an LED between pin 0 and one of the GND pins of the Pi, and the LED will blink.
- rpi-pico-w/upython/pwm.py: pulse width modulation. Using the same circuit as the rpi-pico-w/upython/blink_gpio.py example, you will now see the external LED go from dark to bright continuously and then back
- rpi-pico-w/upython/adc.py: analog-to-digital converter. The program prints to the UART the value of the ADC on GPIO 26 once every 0.2 seconds. The onboard LED is blinked as a heartbeat. The hello world is with a potentiometer: extremes on GND and VCC pins of the Pi, and middle output on pin 26, then as you turn the knob, the uart value goes from about 0 to about 64k.