Ciro Santilli OurBigBook.com $£ Sponsor €¥ 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱 # Electronics ## Alternating and direct current words: 11 ### Alternating current (AC) words: 5 #### Alternating current source (AC source) words: 5 ##### Hippolyte Pixii words: 5 ###### Hippolyte Pixiis alternator (1832) words: 5 Operated by a hand crank. ##### Inverter (DC to AC) ### Direct current (DC) words: 6 #### Direct current source (DC source) words: 6 ##### 5v vs 3.3V ##### AC adapter (AC to DC) words: 6 ###### Coaxial power connector ###### Polarity symbols words: 6 ###### Rectifier ###### Diode bridge ## Biasing ## Circuit diagram words: 529 ### ASCII art circuit diagram words: 529 #### Ciro's ASCII art circuit diagram notation words: 529 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 + is given. E.g. the following two wires are not joined:  | --|-- | but the following are:  | --+-- | Simple symmetric components: • -, + and |: wire • A: AC source. Parameters: • Hz: frequency • V: peak voltage e.g.: A_1Hz_2V If only one side is given, the other is assumed to be at a ground G. • C: capacitor • G: ground. Often used together with D, e.g.: D_10---R_10---G means applying a voltage of 10 V across a 10 Ohm resistor, which would lead to a current of 1 A • L: inductor • MICROPHONE. As a multi-letter symmetric component, you can connect the two wires anywhere, e.g. ---MICROPHONE--- or: | MICROPHONE | • SPEAKER • R: resistor • X: 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: • aDc: diode • a: anode (where electrons can come in from) • c: cathode Sample usage in a circuit: --aDc-- Can also be used vertically: | a D c | We can also change the port order, the device is still the same due to capital D: --cDa-- | Dac-- | Dca-- | --caD • pDn: DC source. Ports: • p: positive • n: negative E.g. a 10 V source with a 10 Ohm resistor would be: +---pD_10_m---+ | | +----R_10-----+ If only one side is given, the other is assumed to be at a the ground G. We can also omit p and m in that case and assume that p is the one used, e.g. the above would be equivalent to: D_10---R_10---G • sgTd: transistor • s: source • g: gate • d: gate Sample usage in a circuit: ---+ | --sgTd-- All the following are also equivalent:  | g --sTd--  | --Tsgd-- | • dIs: electric current source. Electrons leave from s and go into d • pVn: Voltmeter. Ports: • p: positive • n: negative If we don't need to specify explicit positive and negative sides, we can just use: ---V--- without any ports. This is notably often the case for AC circuits. 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.: +-----+ | | C_1p R_2k | | +-----+ means: • a capacitor with 1 pico Faraday • a resistor with 2 k Ohms Micro is denoted as u. Wires can just freely come in and out of specs of a component, they are then just connected to the component, e.g.: D_10---R_10---G means applying a voltage of 10 V across a 10 Ohm resistor, which would lead to a current of 1 A If a component has more than two parameters, units are used to distinguish them when possible, e.g.: A_1kV_2MHz means an AC source with: ## Electronic component words: 705 ### Current source ### Current-voltage characteristic (I-V curve) ### Amplifier words: 52 Main implementations: the same as electronic switches: vacuum tubes in the past, and transistors in the second half of the 20th century. ### Capacitor words: 154 The fundamental intuition about capacitors is that they never let electrons through. They can only absorb electrons up to a certain point, but then the pushback becomes too strong, and current stops. Therefore, they cannot conduct direct current long term. For alternating current however, things are different, because in alternating current, electrons are just jiggling back and forward a little bit around a center point. So you can send alternating current power across a capacitor. The key equation that relates Voltage to electric current in the capacitor is: So if a voltage Heavyside step function is applied what happens is: • the capacitor fills up instantly with an infinite current • the current then stops instantly More realistically, one may consider the behaviour or the series RC circuit to see what happens without infinities when a capacitor is involved as in the step response of the series RC circuit. #### RC circuit words: 15 ##### Series RC circuit words: 15 ###### Step response of the series RC circuit words: 15 This is what happens when you apply a step voltage to a series RC circuit: TODO graph. #### Capacitance ### Diode words: 114 Ideally can be thought of as a one-way ticket gate that only lets electrons go in one direction with zero resistance! Real devices do have imperfections however, so there is some resistance. First they were made out of vacuum tubes, but later semiconductor diodes were invented and became much more widespread. #### Semiconductor diode words: 66 ### Electrical connector words: 165 #### Breakout board #### General-purpose input/output (GPIO) words: 58 ##### Pulse width modulation words: 58 GPIO generally only supports discrete outputs. But for some types of hardware, like LEDs and some motors, the system has some inertia, and if you switch on and off fast enough, you get a result similar to having an intermediate voltage. So with pulse width modulation we can fake analog output from digital output in a good enough manner. #### Jump wire words: 30 Notably used to connect: You can buy large sets of them in combitation of male/male, male/female, female/female. Male/male is perhaps the most important #### Pin header words: 77 These often come pre-soldered on devboards, e.g. and allow for easy access to GPIO pins. E.g. they're present on the Raspberry Pi 2. Why would someone ever sell a devboard without them pre-soldered! ##### Jumper (computing) words: 17 Allows you to connect two adjacent pins of a pin header. Sometimes used as a hardware configuration interface! ### Electronic oscillator words: 111 Something where DC voltage comes in, and a periodic voltage comes out. #### Relaxation oscillator words: 9 ##### RC oscillator words: 2 ###### 555 timer IC ##### LC oscillator words: 7 Oscillator made of an LC circuit. #### Crystal oscillator words: 2 ### Light-emitting diode (LED) ### Inductor words: 10 #### Electromagnetic coil ### Multiplexer ### Resistor #### Potentiometer #### Electrical resistance ##### Ohm ### Transformer ### Electronic switch words: 93 #### Vacuum tube #### Transistor words: 93 Although transistors were revolutionary, it is fun to note that they were just "way cheaper and more reliable and smaller" versions of exactly the main functions that a vacuum tube could achieve ##### Point-contact transistor (BJT, 1947) words: 41 The first working one in 1947 by John Bardeen and walter Brattain in Bell Labs Murray Hill. People had already patented a lot of stuff before without being able to make them work. Nonsense. As the name suggests, this is not very sturdy, and was quickly replaced by bipolar junction transistor. ##### Bipolar junction transistor (BJT, 1948) words: 19 As of 2020, not used anymore in logic gates, but still used in amplifiers. ##### Field-effect transistor (FET) ###### MOSFET (1959) ###### CMOS ### Voltage transformer ## Electronic lab equipment words: 94 ### Arbitrary waveform generator ### Electron multiplier ### Power supply ### Electronic test equipment words: 88 #### Oscilloscope words: 88 ##### Digital storage oscilloscope ##### PC-based oscilloscope ##### Cheap oscilloscope words: 21 ##### Open source oscilloscope words: 51 ###### Haascope (2017) words: 15 By Andy Haas, an experimental particle physics professor: as.nyu.edu/content/nyu-as/as/faculty/andy-haas.html What an awesome dude! ###### ScopeFun (2020) words: 30 899 USD as of 2022, takes a year to ship as they gather up a lot of orders before producing. Sounds so cool, especially the multi functionality. Shame so expensive. ###### ThunderScope (2021) words: 6 ## Electronics vendor words: 131 ### Hewlett-Packard (1939-2015, HP) words: 99 They do seem to have been very innovative, and have had a very good work culture. They also had a huge impact on the Silicon Valley startup scene. Some products they are known for: #### HP spinoff words: 34 ##### Agilent Technologies (1999) words: 34 In a way, Agilent represents the most grassroots electronics parts of HP from before they became overly invested in laptops and fell. They spun out the electronics part as Keysight in 2014, becoming life science only. ###### Keysight (2014) ###### Agilent Technologies oscilloscope ##### Hewlett Packard Enterprise (HPE, 2017) ### Philips ### Rohde & Schwarz ### STAR Cryoelectronics words: 32 #### Mr. SQUID words: 32 This is the cutest product name ever. Since 1992, Mr. SQUID has been the standard educational demonstration system for undergraduate physics lab courses. YBCO device, runs on liquid nitrogen. ## Electronic circuit words: 2k ### Circuit board words: 1k #### Breadboard words: 67 This is how electronic circuits are normally prototyped! Once you validate them like this, the next step is usually to move on to printed circuit boards for more reliable production setups. Breadboards are a thing of beauty and wonder. #### Printed circuit board (PCB) words: 1k ##### Microprocessor development board (Devboard) words: 1k ###### Arduino ###### Micro Bit (2016, BBC Micro Bit) words: 906 Bluetooth support: not enough RAM for it, though in principle its chip/transceiver could support it! microbit-micropython.readthedocs.io/en/v1.0.1/ble.html Supported editors: microbit.org/code/ MicroPython web editor and compiler: python.microbit.org/v/2 Everything in this section is tested on the Micro Bit v1 from Micro Bit v1 unless otherwise noted. Bibliography: ###### Micro Bit simulator words: 100 ###### Micro Bit Python editor ###### MakeCode Miro Bit words: 100 Microbit simulator using some Microsoft framework. TODO the Python code from there does not seem to run on the microbit via uflash, because it is not MicroPython. forum.makecode.com/t/help-understanding-local-build-options/6130 asks how to compile locally and suggests it is possible. Seems to require Yotta, so presumably compiles? Presumably this is because Microsoft ported their MakeCode thing to the MicroBit, and the Micro Bit foundation accepted them. E.g. there toggling a LED: led.toggle(0, 0) but the code that works locally is a completely differently named API set_pixel: microbit.display.set_pixel(0, 0, ) Microsoft going all in on adopt extend extinguish from an early age! ###### Micro Bit getting started words: 113 When plugged into Ubuntu 22.04 via the USB Micro-B the Micro Bit mounts as: /media/$USER/MICROBIT/
e.g.:
/media/ciro/MICROBIT/
for username ciro.
Loading the program is done by simply copying a .hex binary into the image e.g. with:
cp ~/Downloads/microbit_program.hex /media/$USER/MICROBIT/ The file name does not matter, only the .hex extension. The back power light flashes while upload is happening. Flashing takes about 10-15 seconds for the 1.8 MB scroll display hello world from microbit-micropython.readthedocs.io/en/v1.0.1/tutorials/hello.html: from microbit import * display.scroll("Hello, World!") and the program starts executing immediately after flash ends. You can restart the program by clicking the reset button near the USB. When you push down the program dies, and it restarts as soon as you release the button. ###### Compile MicroPython code for Micro Bit locally words: 405 To use a prebuilt firmware, you can just use uflash, tested on Ubuntu 22.04: git clone https://github.com/bbcmicrobit/micropython cd micropython git checkout 7fc33d13b31a915cbe90dc5d515c6337b5fa1660 uflash examples/led_dance.py What that does is: • convert the MicroPython code to bytecode • join it up with a prebuilt firmware that ships with uflash which contains the MicroPython interpreter • flashes that To build your own firmware see: ###### Compile MicroPython code for Micro Bit locally on Ubuntu 22.04 with your own firmware words: 345 TODO didn't manage from source Ubuntu 22.04, their setup bitrotted way too fast... it's shameful even. Until I gave up and went for the magic Docker of + github.com/bbcmicrobit/micropython, and it bloody worked: git clone https://github.com/bbcmicrobit/micropython cd micropython git checkout 7fc33d13b31a915cbe90dc5d515c6337b5fa1660 docker pull ghcr.io/carlosperate/microbit-toolchain:latest docker run -v$(pwd):/home --rm ghcr.io/carlosperate/microbit-toolchain:latest yt target bbc-microbit-classic-gcc-nosd@https://github.com/lancaster-university/yotta-target-bbc-microbit-classic-gcc-nosd
docker run -v $(pwd):/home --rm ghcr.io/carlosperate/microbit-toolchain:latest make all # Build one. tools/makecombinedhex.py build/firmware.hex examples/counter.py -o build/counter.hex cp build/counter.hex "/media/$USER/MICROBIT/"

# Build all.

#### Marco Reps

words: 7
This mostly faceless German dude is awesome!