# Electronics project notes/Unsorted

 ⚠ This is for beginners and very much by a beginner / hobbyist It's intended to get an intuitive overview for hobbyist needs. It may get you started, but to be able to do anything remotely clever, follow a proper course or read a good book. Some basics and reference: Volts, amps, energy, power · batteries · resistors · transistors · fuses · diodes · capacitors · inductors and transformers · ground Slightly less basic: amplifier notes · varistors · changing voltage · baluns · frequency generation · Transmission lines · skin effect And some more applied stuff: Audio and video notes: See avnotes Platform specific Arduino and AVR notes · (Ethernet) Microcontroller and computer platforms ··· ESP series notes · STM32 series notes Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · JY-MCU · DMX · Thermal printer · See also Category:Electronics.

# Semi-sorted

## H bridge

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

A H bridge is a construction that allows current to flow through an element (often a motor) in both directions.

They are essentially four switches, allowing sixteen states, of which only four are usually listed in examples as the others do nothing or are short-circuit situations.

Notes:

• A H-bridge is symmetrical, in that you need half of it to drive something one way.
Since a half-H can be useful in itself, H-bridge ICs are usually a collection of half H-bridges (often two or four).
For example, the L293 (L293B, L293D, L293E, L293DD) and L298 (L298N) series contain four such half H-bridges.
You can combine two half H bridges (also called push-pull driver) for a full H-bridge
• Some designs won't let you mix voltages. In particular, with some you cannot use a higher driving voltage than logic voltage.
• Motors and solenoids and such can have considerable flyback, more than other things you may use a H-bridge for. When dealing with magnetic fields, always consider using adding flyback protection diodes (you need four).
Note that this protection doesn't work if the diodes are slower than the IC, and some ICs are pretty fast. So Schottky may be preferable
Some ICs have smallish basic protection diodes, which is nice, may not be enough depending on what you drive.
• You can buid your own, though many of the simpler designs you'll find are likelier to smoke if you do something wrong
• Sometimes a few logic gates can avoid smoke conditions
• timing can matter. For example, some mild delays (e.g. from gates/buffers) may leave the bridge shorted for a few milliseconds
• Note that IO ports on microcontrollers may, during startup, do things you are not aware of and create a bad condition for a short time.
There are other cases where you can't guarantee to avoid that certain control combinations will never haopen

Also:

• Optoisolators on the control signals may be good for your peace of mind if you have pricy hardware elsewhere
• Capacitors on the load supply to ground may help decrease noise (from inductive loads)
• In battery-based applications, you may want a capacitor on your main power so that sudden current draw won't drop the voltage as much (due to the battery's internal resistance)

### Built from..., and some comparison

H-bridges can be made from various components:

• four SPST switches/relays (impractical solution)
• two SPDT switches/relays (a little better, still not too handy)
• DPDT switch/relay (simple solution, not as much control as you may wish)
• BJTs (Usually 2*PNP, 2*NPN, other solutions like 4*NPN or some added switching transistors also possible)
• (Power) FETs
• Single-IC soltuons

Switch solutions

• Don't really allow speed control (unlike transistor/IC solutions, where you can usually PWM the low side)

Transistor solutions, of which there are many, including:

• 4*NPN
• more powerful per price (NPN can do more current)
• more power-efficient (you don't need to keep things high)
• Base voltage needs to be (~0.6V) higher than Emitter voltage, so if your driving voltage is higher than your logic voltage, they won't switch.
• 2*PNP (high side), 2*NPN (low side)
• is a little less power-efficient
• works with mixed voltages(verify)
• 2*PNP (high side), 2*NPN (low side), 2*PNP (can be low-power)
• ...with the two extra PNPs controlling the logic on the two transistors needed to drive one way, so means you can use two instead of four control lines (still allows short circuit)

FET solutions (similar to transistor/IC solutions):

• e.g. TC4424 dual MOSFET transistor driver chip (The MAX4427 and TC4427A

IC solutions:

• Usually don't have problems with mixed voltages
• conserve board space
• Regularly come in multiple (e.g. four) half H-bridges, which you can use as half H-bridges, full H-bridges, and/or parallelize them for more driving current
• Some driver ICs may be more specifically geared to be motor drivers, for example:
• have protection diodes built in (for small motors - you often want to add your own externally)
• do PWM, or at least make that easy
• it may be a little harder (or expensiveish) to get one with the current capability you want.

### H-bridge IC notes

L293 and L298 series:

• Four half-H each, and you can parallelize them for double the current capability
• Noticable drop between driving voltage and output voltage (~1.5V on L293, a little more on the L298(verify))
• Effectively has two half-H (sharing their enable) on each side of the chip
• When enable is low, the outputs are high-impedance, when enable is high the outputs follow the respective inputs.
• Setting both inputs high is not a smoke condition (it puts the same voltage on both sides of the load)

L293 series:

• L293 - ?
• L293B - older, no protection diodes
• L293D - no protection diodes, ~0.6A continuous
• L293D - has protection diodes, ~0.6A continuous
• L293DD - same as L293D, different package

L298 series

• ~2A continuous

SN754410

• Same pinout as L293, double the current capacity

interfacing/l293d-interfacing-with-microcontroller.php

## Dealing with voltage differences

### Dealing with voltage differences - for communication/logic lines

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

## Transients

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

...in the broadest sense, of 'voltage levels and signals you don't want'.

## Multiplexing

The general sense is "reusing one thing for multiple purposes" (and is not isolated to electronics -- e.g. terminal multiplexing, such as screen or tmux, uses one terminal to look at / switch between multiple shells)

• Bus multiplexing - in digital electronics, and in particularly in computers, where it refers to cases where the data + address + control lines are put on fewer physical lines
for example memory access where the address is sent over a set of lines, and the data is returned on the same lines.

• in electronics can mean electronic routing over the same lines
• e.g. an Arduino's AVR has one ADC that can switch its sensing to multiple pins
• driving a grid of LEDs with matrix-style wiring, see e.g. [1]
which can only light one at the same time -- yet switching fast enough allows it to look persistent, due to our persistence of vision
• Charlieplexing - takes the "drive LED with few pins" further than the basic grid style
...though it has some extra requirements so is not the most flexible, or scalable.
https://en.wikipedia.org/wiki/Charlieplexing

# Glossary

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.
• high impedance (hi-Z) often means 'no connection', or so little influence (in terms of sourcing or sinking current) that it's close enough.
• negative feedback, in general, means that the output opposes fluctuations of the input, often resulting in attenuation of fluctuations. [2] (see also positive feedback)
• flyback - voltage spike (often reverse biased) that comes from (sudden) control or release of an inductive load. For example seen in motors, solenoids. Since various electronics do not like reverse biasing, this effect is often suppressed with a diode (see flyback diode).

• gain margin (a measure of (relative) negative feedback stability) [3]
• open-circuit voltage is the voltage between two terminals in absence of a load (open circuit)
• open-loop gain of an opamp is the gain when there is no feedback. Open-loop gain is usually high, perhaps 109 (an ideal opamp has infinite open-loop gain), though it falls rapidly with frequency. Along with slew rate, this is one of the reasons why operational amplifiers have limited bandwidth.
• open collector refers to an IC having an internal output fed to the base of an internal transistor whose collector is exposed, and whose emitter is the IC's Gnd. This means logic that output acts either as an open circuit and a short circuit to Gnd. Often combines with a pull-up resistor. Can be used to interface different voltage families, share a bus, [4]
• open drain - like open collector, but for MOSFETs
• phase margin, in amplifiers: the difference between the output signal and -180°. The related gain phase (a measure of (relative) negative feedback stability) [5]
• positive feedback, in general means the output follows . [6] (see also negative feedback)
• RF- generally refers to the 3 kHz - 300 GHz range (microwaves to a smaller range within that: 300 MHz - 3 GHz)

# Unsorted

Wire testing hooks

## AC and DC coupling

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

tl;dr:

• AC coupling removes DC component
• DC coupling means not doing that

Coupling just means 'joining two circuits' in a broad sense, and implies the question how.

AC coupling means removing DC from a signal. It's also called capacitive coupling because you usually do this by putting a capacitor in the path.

Relevant to

Audio:

Audio is easier when it's bipolar, i.e. average 0V, swing both ways. This also means you can remove any DC offset with the capacitor-in-series.

Some audio circuits don't want to spend the extra components for bipolar, and will intentionally offset their signal so that it all falls in positive voltage.

Oscilloscopes:

If is the DC bias is meaningful to your measurement, and e.g. in some comparisons, leave it on DC.

If you only care about ripple or shape of a wave, the DC bias is only distraction (and may mess with your ability to zoom in on it), and you want AC coupling.

Multimeter:

This one is mostly about function, because AC setting is often AC-coupled.

Measuing DC using the AC setting will show near-0V, because it's AC-coupled.

Measuring AC with the DC setting will show near-0V beause the average is 0V (it'll deflect when you touch it)

## Impedance

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Refers to the resistance of a system to an energy source, which sounds like resistance, and is.

Basic resistance deals mainly with the proportional amplitudes of voltage and current. Whenever a circuit's voltage, current, and resistance descriptions are can be described by such a simple relation, the word resistance is usually used.

There are various circuits that show a more complex relation. Concepts like change over time, varying with frequency, and depending on relative phase become necessary. The concept and word impedance is used when this matters, or could.

We mention impedance in AC circuits, and often mention resistance in DC-only circuits that do not show any impedance-like effects.

Impedance can exist by design or as a side effect. As a side effect, it can occasionally be ignored. It becomes important on circuits that deal with fast switching, RF data signalling, or potentially any AC signal/power transfer.

Like resistance, impedance has Ohm for a unit, but impedance has a complex-numbered value. Its real component is the resistance, its imaginary component the reactance.

Note that in digital circuits, 'low impedance' and 'high impedance' refers mainly to whether somethings is driven to one of the logic levels (low impedance) or not (high impedance).

## Atypical conductors

Transparent:

• ITO (Indium Tin Oxide)
seen on plastic, glass
https://www.sossolutions.nl/1309-ito-indium-tin-oxide-coated-pet-plastic-100mm-x-200mm
• Silver-aluminium, a possible replacement for Indium-based
• Graphene in foil
can be flexible
https://www.nanowerk.com/nanotechnology_articles/newsid=47570.php
• Some of the Conducting Polymers

Partially transparent:

• flexible flat cable (FFC), specifically the orange transparent one
copper in plastic, often flat leads
• metal mesh

Opaque:

• Z-Axis tape - a bond between two surfaces that allows some current (not a lot), and only through the tape, not sideways
• Velostat / Linqstat
• conductive velcro

• Stainless steel
• conductive variants exist of cotton, spandex, and more
• Copper-and-Nickel-plated nylon

## Flex cable

Flat flexible cable (FFC) and flexible printed circuitry (FPC) refers to (flexible) leads on flexible plastic. Socket may be ZIF (zero insertion force) type or not. Often has a 0.3mm, 0.4mm, 0.5mm or 1.0mm pitch, and a thickness of 0.2mm, 0.3mm, or 0.17mm.

## Headers, connectors, pins and such

Pitch is often one of

• 0.0197" (0.5mm)
• 0.031" (0.80mm)
• 0.040" (1.00mm)
• 0.050" (1.27mm)
• 0.0787" (2.00mm)
• 0.100" (2.54mm)
• 3.5mm
• 0.15" (3.81mm)
• 5.00mm
• 0.200" (5.08mm)
• .300" (7.62mm)
• 10mm

Up to 1mm often means specialized data connectors, used when there is a need for many-pin communication and little space to connect in.

Above 3mm tends to mean sturdier interconnection plugs.

1.27mm-2.54mm and tends to be more general-purpose connectors.

Names can refer to one or more of:

• pin/row spacing standards (e.g. DIP)
• the way a plug/socket accepts wires or is mounted on a PCB (e.g. IDC, crimp pin)
• The way connections are fastened (e.g. friction lock, FFC and FPC, blade & receptacle)
• function (e.g. terminal block, some pluggable)

A DIP plug (and socket) is named for its spacing of multiple rows.

IDC

The connection between circuit boards is often made using friction-lock headers, which means that pins

Barrier Terminal