Difference between revisions of "Electronics project notes/Device voltage and impedance, audio and otherwise"

From Helpful
Jump to: navigation, search
m (Balanced audio / pro audio)
m (Plugs's relation to balanced/unbalanced, voltage levels, etc.)
(One intermediate revision by the same user not shown)
Line 493: Line 493:
  
  
 
 
Here's a fun one: ''' 'balanced' is sort of a bad name'''.
 
 
 
Ninety percent of the time, balanced means differential signalling, and specifically "circuits where the ''receiving end'' is designed to do differential interpretation, which avoids noise when the wire you used had strands of equal impedance".
 
 
And, in practice, those lines are also shielded because that further lowers noise - but also completely distinct from the balanced and differential concepts.
 
  
  
Line 506: Line 498:
  
 
Differential-and-balanced means:
 
Differential-and-balanced means:
* sending side sends a signal, and also creates its inverse
+
* sending side has a signal. It also creates its inverse
 
* sending side puts those two things on a pair of wires (a balanced pair, meaning equal impedance)
 
* sending side puts those two things on a pair of wires (a balanced pair, meaning equal impedance)
* receiving side subtracts one signal from the other
+
* receiving side subtracts one signal from the other.
 
+
  
  
Now, many articles will explain that the trick of balanced is the differential part:
+
Many articles will explain that the trick of balanced is the differential part:
noise that made its way onto the cables will make its way onto both wires equally,  
+
noise that made its way onto both wires will make its way onto both wires equally,  
so be mostly subtracted from itself at the other end.
+
so be subtracted from its copy at the receiving end.
  
 
The noise rejection happens not because the signal is carried so well,  
 
The noise rejection happens not because the signal is carried so well,  
Line 525: Line 516:
 
What many ''don't'' mention is that the sending side creating that inverted-copy is  
 
What many ''don't'' mention is that the sending side creating that inverted-copy is  
 
completely optional.  
 
completely optional.  
It's a good idea in the why-not sense, but it's the ''least important part''.
 
  
 +
It's a good idea in the why-not sense, but it's the ''least important part'',
 +
because it's the way you've connected things that does all the clever noise rejection.
  
For example many microphones aren't differential signals,
 
but for the noise rejection, you want to connect them to a differential receiver with proper balanced cables.
 
  
And basically no guitar pickups are differential either, so you want to convert to balanced with a DI whenever cables travel any distance (...also because of impedance reasons, but ignore that for now).
+
Sure, under the same voltage-on-the-line restrictions, having an inverted copy
 +
rather than silence on the second wire gives you twice the signal (so a few dB more)
 +
after the subtraction,
 +
and in theory that's good for noise floor reasons, but in a lot of practice it doesn't matter
 +
(for a handful of device-specific footnotes. I should write them out sometime).
  
A DI also does isolation, so avoids active instruments (say a powered keyboard) being able to accidentally introduce ground issues
 
  
  
 +
More to the point, it is perfectly valid to put a single-sided signal on a differential line
 +
{{comment|(as long as that ''doesn't'' mean you just directly tied in a shared ground)}}.
  
And it is perfectly valid to put a single-sided signal on a differential line,
+
In fact, this is pretty common in pro gear design, particularly the already-amplified part
as long as that ''doesn't'' mean you directly tie in an earthed/shared ground
+
(because in general it's only the first amplification in a chain that matters in terms of getting above the noise).
  
The only direct effect is a factor two (-6dB) difference in level, which you can lessen/avoid with a bit of amplification. (Stay in specs to avoid clipping, though)
 
  
 +
That doesn't mean you can put common-mode cabling in.
  
 +
and you want to avoid combining consumer audio.
 +
Signal-wise it's fine, but it's ''way'' too easy to introduce shield-or-ground-related mistakes.
  
That doesn't mean you can put common-mode cabling in,
 
and you want to avoid combining consumer audio all the same.
 
  
Signal-wise it's fine (signal-0DC = signal, though with that -6dB level difference),
+
...Unless a particular input is made to accept it, meaning it has isolation.
but it's ''way'' too easy to introduce shield-or-ground-related mistakes.
+
  
 
Mixers that say "bal/unbal" on their inputs
 
Mixers that say "bal/unbal" on their inputs
: tend to use an isolation transformer (think DI without the impedance change).
+
: tend to have put an isolation transformer on that input (think DI without the impedance change).
: usually only on 6.35 (1/4 jack).
+
 
 +
: usually only on 6.35mm (1/4 jack).
 +
 
 
: It would work just the same on XLR as well, but that invites the [[pin 1 problem]]{{verify}} (putting your shield into your signal) that took so long to eradicate.
 
: It would work just the same on XLR as well, but that invites the [[pin 1 problem]]{{verify}} (putting your shield into your signal) that took so long to eradicate.
 
:: actually, those XLR-to-3.5mmjack cables do exactly that, but ''when'' they are only used to plug a microphone into a PC that's fine.
 
:: actually, those XLR-to-3.5mmjack cables do exactly that, but ''when'' they are only used to plug a microphone into a PC that's fine.
Line 558: Line 554:
  
  
More practically:
 
  
  
 +
 +
More practically:
 
* Mixers often mark things (particularly inputs) 'balanced' or 'unbalanced'. '''''At''''' a mixer  
 
* Mixers often mark things (particularly inputs) 'balanced' or 'unbalanced'. '''''At''''' a mixer  
 
:: 'balanced input' basically means 'differential interpretation'
 
:: 'balanced input' basically means 'differential interpretation'
Line 677: Line 674:
 
* '''XLR3''' is '''pro mic level''', always balanced/differential, always mono.
 
* '''XLR3''' is '''pro mic level''', always balanced/differential, always mono.
 
: mono, because one signal requires a differential ''pair''.
 
: mono, because one signal requires a differential ''pair''.
: if you want to carry stereo over XLR, use two cables (in practice, stereo is often about inter-device, and may well be two balanced 6.3mm TRS instead).  
+
: if you want to carry stereo over XLR, use two cables (in practice, stereo is often about inter-device, and may well be two balanced 6.35mm TRS instead).  
  
* '''6.3 mm''' is (typically) '''pro line level'''  {{comment|(6.35mm but people are lazy typers)}}
+
* '''6.35 mm''' is (typically) '''pro line level'''  {{comment|(6.35mm but people are lazy typers)}}
: '''6.3mm TRS''' is balanced mono, see notes on that above.
+
: '''6.35mm TRS''' is balanced mono, see notes on that above.
 
:: or, sometimes, unbalanced stereo. This is an exception and ''will'' be noted.
 
:: or, sometimes, unbalanced stereo. This is an exception and ''will'' be noted.
: '''6.3mm TR''' is unbalanced mono, often instruments, which is also often lower voltage levels (but close enough{{verify}})
+
: '''6.35mm TR''' is unbalanced mono, often instruments, which is also often lower voltage levels (but close enough{{verify}})
: when a device instead uses 6.3mm these for mic in, aux, or controllers like pedals, or stereo, they will be marked as such (or switchable)
+
: when a device instead uses 6.35mm these for mic in, aux, or controllers like pedals, or stereo, they will be marked as such (or switchable)
  
* mixer outputs are often two 6.3mm jacks (balanced, TRS)
+
* mixer outputs are often two 6.35mm jacks (balanced, TRS)
  
 
* RCA on a mixer are typically only used for phono in, or consumer in (aux)
 
* RCA on a mixer are typically only used for phono in, or consumer in (aux)
Line 692: Line 689:
  
  
On 6.3 TS versus TRS
+
On 6.35 TS versus TRS:
* 6.3mm (1/4") TRS is most typically mono and balanced/differential. A mixer input will often mark this as "balanced"
+
* 6.35mm (1/4") TRS is most typically balanced/differential mono. A mixer input will often mark this as "balanced"
 
: Tip and Ring is the pair, Sleeve is shield.
 
: Tip and Ring is the pair, Sleeve is shield.
: No, it's not stereo. And using a 3.5mm-to-6.3mm converter to plug in consumer line level will do Weird Things.
+
: No, it's not stereo. And using a 3.5mm-to-6.35mm converter to plug in consumer line level will easily do weird things (depending on the case).
  
* 6.3mm (1/4") TS - instrument cable
+
* 6.35mm (1/4") TS - instrument cable
: is mono, and ''not'' differential  
+
: is mono, and ''not'' differential
 +
: from actual instruments it won't
 
: Tip is signal, Sleeve is shield,
 
: Tip is signal, Sleeve is shield,
: mixers tend to accept both TRS balanced and TS unbalanced. If on the same socket they usually mark it (e.g. "bal/unbal")
+
 
 +
* mixers tend to accept both TRS balanced and TS unbalanced. If on the same socket they usually mark it (e.g. "bal/unbal")
 
:: Note that unbalanced inputs are not always isolated, so connecting unbalanced things (other than floating instuments) ''could'' create common mode issues.
 
:: Note that unbalanced inputs are not always isolated, so connecting unbalanced things (other than floating instuments) ''could'' create common mode issues.
 
: contrast with...
 
: contrast with...
Line 710: Line 709:
  
  
'''Things to avoid'''
+
'''Things that won't work / things to avoid'''
 
<!--
 
<!--
 
* TS and TS: confusing speaker cable and instrument cable
 
* TS and TS: confusing speaker cable and instrument cable
Line 716: Line 715:
 
: using instrument cable to connect speakers will probably burn that cable
 
: using instrument cable to connect speakers will probably burn that cable
 
: plugging speaker out to mixer in will fry that mixer
 
: plugging speaker out to mixer in will fry that mixer
 +
 +
 +
* consumer 3.5mm mic to 6.35mm input (via adapter)
 +
: it doesn't provide plug-in power, so won't work {{comment|(with a few sort-of exceptions, like battery'd lavs)}}
  
  
 
* TS and TRS: Plugging a TS output (often an instrument) into balanced (TRS) input  
 
* TS and TRS: Plugging a TS output (often an instrument) into balanced (TRS) input  
 
: the plug will short between sleeve and ring, i.e. tie one of the signal lines to shield.
 
: the plug will short between sleeve and ring, i.e. tie one of the signal lines to shield.
:: which on the 'cheaty' single-ended balanced driver design could be fine
+
:: which on the 'cheaty' single-ended balanced driver design could be fine,
:: on a halfway proper one can cause damage  
+
:: on a halfway proper one can cause damage
:: a fancier proper one is probably protected against this case (but don't assume it)
+
:: while particularly fancy ones may be protected against this case (but don't assume it)
: may introduce common mode from the mixer itself. {{verify}}
+
: might introduce common mode from the mixer itself. {{verify}}
  
 
* TS and TRS: Plugging a TRS output (balanced) into a unbalanced-only TS input
 
* TS and TRS: Plugging a TRS output (balanced) into a unbalanced-only TS input
Line 729: Line 732:
  
  
* TRS and XLR: 6.3mm TRS to XLR male
+
* TRS and XLR: 6.35mm TRS to XLR male
 
: if used to plug balanced gear into a mic in, this works (attenuates the signal though, because of)
 
: if used to plug balanced gear into a mic in, this works (attenuates the signal though, because of)
 
: trying to use it for instrument will probably work too.
 
: trying to use it for instrument will probably work too.
Line 735: Line 738:
  
  
* Adapters: XLR female (output) to 6.3mm input adapters
+
* Adapters: XLR female (output) to 6.35mm input adapters
 
: to unbalanced (TS): does not convert
 
: to unbalanced (TS): does not convert
 
: to balanced (TRS):
 
: to balanced (TRS):

Revision as of 22:04, 31 July 2019

This is for beginners and very much by a beginner. It's meant to try to cover hobbyist needs, and as a starting point to find out which may be the relevant details for you, not for definitive information.

Some basics and reference: Volts, amps, energy, power · Ground · batteries · resistors · changing voltage · transistors · fuses · diodes · varistors · capacitors · inductors · transformers · baluns · amplifier notes · frequency generation · skin effect


And some more applied stuff:

IO: wired local IO wired local-ish IO · · · · Shorter-range wireless (IR, ISM RF, RFID) · bluetooth · 802.15 (including zigbee) · 802.11 (WiFi) · cell phone


Sensors: General sensor notes, voltage and current sensing · Knobs and dials · Pressure sensing · Temperature sensing · humidity sensing · Light sensing · Movement sensing · Capacitive sensing · Touch screen notes

Actuators: General actuator notes, circuit protection · Motors and servos · Solenoids

Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · JY-MCU · DMX · Thermal printer

Audio notes: basic audio hacks · microphones · amps and speakers · device voltage and impedance, audio and otherwise ·

Less sorted: Common terms, useful basics, soldering · Microcontroller and computer platforms · Arduino and AVR notes · ESP series notes · Electronics notes/Phase Locked Loop notes · mounts, chip carriers, packages, connectors · signal reflection · pulse modulation · electricity and humans · Unsorted stuff


See also Category:Electronics.


Theory: Impedance when connecting two things

Output impedance is larger than the load's input impedance

Impedance matching

Impedance bridging

Impedance mismatches

Audio

Analog audio voltage levels

...and impedances.

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)



Most audio levels are not so well standardized, and some have changed over time, somewhat quietly. So assume each can be a factor of two off and can require a little knob twiddling at least.


  • phono input
on the order of a milliVolt, and seems to often be the not-yet-amplified output of phono cartridges
There are two common types:
Moving Magnet (MM) pickups give ~2.5mV,
Moving Coil (MC) give ~0.2mV
MC versus MM is one of those debates. Higher-end is usually MC, but quality also significantly depends on other factors.
phono pre-amps will amplify this to (typically) consumer line level (and impedance)
phono directly on line-level (or mic level) input as-is will be very too quiet (or if you manage to amplify it, very noisy)
avoid connecting non-phono and in particular line-level outputs to phono inputs, it may be possible to blow the preamp
impedance
cartridge output: varies, order of 500 Ohm or lower (verify)
phono amp imput: 47k Ohm


  • consumer microphone level
on the order of ~10mV (verify)
because that's the order of what ~1cm electret (FET output(verify))s give, which is what most of these are
computer sound cards have
a voltage bias for electret mics - as electrets are the typical mic you plug in
internal amplication to get it to the same level as line level. (Relevant mainly in that plugging line level into mic in will distort)
impedance
mic output - high-impedance microphones are typically cheaper, e.g. the common electret mic is often 1-2kOhm but some 10kOhm+ (verify)
PC mic in impedance: 1..10kohm (varied over time and with cards)


  • consumer line level
on the order of ~300mV (~310mV RMS, ~440mV peak, 0.9V peak-to-peak)
also sometimes known as -10dBu (mostly in situations that also do +4dBV pro levels)
but has varied somewhat over time.
I've seen amplifiers with a sensitivity of 250mV, older ones with 150mV
Some recent devices are moving to higher voltages - amps may choose to deal with up to 1V, or 2V in the case of DVD, Bluray(verify) (perhaps in imitation of pro line level?)
when the the other end is not aware, you may need to attenuate the output, and/or keep the amplification low, to avoid distortion.
impedance
line in impedance is often ~100 Ohm. Possibly higher, up to 1 kOhm
line out impedance is often ~10 kOhm. Possibly higher, up to 1 MOhm


  • professional microphone level
order of 10mV, but can vary:
Can be ~1mV, can be ~200mV (in theory more but this is atypical)
more varied designs, and possible amplification at the mic, means more variation with design and per use
(e.g. dynamic mics are somewhat intentionally low, to be able to deal with the louder things)
...so you will need that gain knob
impedance:
mic output: most are (higher) in the 50..200 Ohm range, with deviations (see more notes around here)
mic preamp/mixer input: order of 1..2kOhm


  • professional sound line level
the standard also known as +4dBV means 1.2V RMS (1.7V peak, 3.4V peak-to-peak) (verify)
with some variants a little higher and lower, so think 1V order of magnitude


  • instrument level has no standard, though is generally quite predictable:
voltage is often somewhere between mic and line level
output impedance
pickup impedance is often quite high (see also notes below on pickup impedance)
input to a mixer will typically need a direct box (a.k.a. DI) to convert most things to typical XLR
output to guitar amps is unchanged - they expect high impedance from a directly connected pickup (DI boxes tend to have a thru on the input side so that you could do both)


Less standard / more varied:

  • headphone level
roughly commercial line level, but less of a standard - can be higher.
headphone amps tend to aim to power a ~30-60Ohm headphone (with a few milliamps(verify)
there are ~4Ohm headphones, but you really woudn't plug those into everything (likely to distort)
there are 250Ohm-600Ohm headphones, but these need their own preamp (the idea is that you can design for slightly better THD with less load on the amp)
  • Car audio tends to be on the order of 2V, sometimes 4V (verify)
so a headphone amp can be a good cheat to connect consumer-level things to this
  • consumer speaker wires
The voltages are proportional to the amplifier's/speaker/s ability (and relate to be).
For ~100W speakers you'll see up to a few dozen volts
a tiny desktop speaker may be <1W (verify)
impedance
speaker load is often 8 or 4 Ohm (sometimes 2, sometimes 16)
amplifier output impedance is typically very low, say 0.1 Ohm (this is also why the whole 'match your speaker impedance exactly to your amp impedance' thing is nonsense in a literal sense -- but with lower-impedance speakers you should limit how much you turn up the volume, because the maximum sensible power output happens earlier - and above that you get both distortion (THD increases with load) and risk of damage)
  • pro speaker wires
not really a thing. Most speakers are connected by one of:
XLR: carrying typical XLR line signals to active speakers
Speakon-connected: already-amplified signal to a passive speaker
6.3mm TS: already-amplified signal to a passive speaker (Sometimes avoided to avoid smoky mixups)
Note these cables are different from TS instrument cables, basically in that instrument cables use a thinner core-and-shield and these are beefer and not shielded (just 2-lead stranded(verify))


See also:

dBV and dBu

Audio device differences

Balanced audio / pro audio

Balanced in electrical terms
Some other terms you see

Plugs's relation to balanced/unbalanced, voltage levels, etc.

Connectorwise:

  • XLR3 is pro mic level, always balanced/differential, always mono.
mono, because one signal requires a differential pair.
if you want to carry stereo over XLR, use two cables (in practice, stereo is often about inter-device, and may well be two balanced 6.35mm TRS instead).
  • 6.35 mm is (typically) pro line level (6.35mm but people are lazy typers)
6.35mm TRS is balanced mono, see notes on that above.
or, sometimes, unbalanced stereo. This is an exception and will be noted.
6.35mm TR is unbalanced mono, often instruments, which is also often lower voltage levels (but close enough(verify))
when a device instead uses 6.35mm these for mic in, aux, or controllers like pedals, or stereo, they will be marked as such (or switchable)
  • mixer outputs are often two 6.35mm jacks (balanced, TRS)
  • RCA on a mixer are typically only used for phono in, or consumer in (aux)
so common mode. Ideally it's isolated (to avoid conductive ground loops)


On 6.35 TS versus TRS:

  • 6.35mm (1/4") TRS is most typically balanced/differential mono. A mixer input will often mark this as "balanced"
Tip and Ring is the pair, Sleeve is shield.
No, it's not stereo. And using a 3.5mm-to-6.35mm converter to plug in consumer line level will easily do weird things (depending on the case).
  • 6.35mm (1/4") TS - instrument cable
is mono, and not differential
from actual instruments it won't
Tip is signal, Sleeve is shield,
  • mixers tend to accept both TRS balanced and TS unbalanced. If on the same socket they usually mark it (e.g. "bal/unbal")
Note that unbalanced inputs are not always isolated, so connecting unbalanced things (other than floating instuments) could create common mode issues.
contrast with...
  • 6.35mm (1/4") TS - speaker cable - that is, amplifier-to-passive-speaker
basically a pair of thicker wires than instrument cable would use, and no shielding (it doesn't have to care at all because it's higher voltage, low-impedance load so coupling falls into nothing)



Things that won't work / things to avoid

On pickup impedance

Things that are't pure bridging

Other notes

On microphone impedance
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)
On 600 Ohms, and impedance matching

DI

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

Direct box, DI box, DI unit, DI. (people argue over whether it stands for direct input, direct injection, direct induction, or direct interface).


Functionally

Takes a high-impedance, possibly-unbalanced signal (often roughly pro line level), e.g. from a passive instrument - probably most frequently electric guitars and electric basses.

Outputs a low-impedance pro-mic-level balanced signal, usually on an XLR plug.


In other words, usually plugs a high-impedance instrument into a (line that ends up at the) mixer.


Impedance-matching adapter / impedance-matching transformer / line matching transformer

Digital logic voltage levels

In the context of logic levels: (sorted from higher to lower voltage spans)

  • (VCC)
  • VOH - maximum output high
  • VIH - minimum input high
  • VT - theshold level, used in a few definitions, and applies to devices that transition at a given level(verify)
  • VIL - maximum input low
  • VOL - minimum output low
  • (Gnd)

See also a few notes on margins below the summary


Some voltage level systems

An image search like this may be the simplest answer.

  • TTL: O to 5V. Boolean levels: 0V~0.8V should be low, and 2V to Vcc should be high (where Vcc is ideally between 4.75V and 5.25V). More specifically:
    • VOL: 0.4V
    • VIL: 0.8V
    • VIH: 2V
    • VOH: 2.4V
    • VCC: 5V
  • LVTTL: 0 to 3.3V. Threshold levels identical to 5V TTL. (so only the VOH - VCC interval is smaller which generally affects nothing)
    • VOL: 0.4V
    • VIL: 0.8V
    • VIH: 2V
    • VOH: 2.4V
    • VCC: 3.3V
  • CMOS defines levels as a percentag of VCC (which can itself be 5, 2.5, 1.8, 1.5, 1.2V).
    • VOL: 10% ()
    • VIL: 30%
    • VIH: 50%
    • VOH: 70%


  • ETL
  • BTL
  • LVDS
  • PECL
  • RS232
  • RS485, RS422


Notes:

A given IC may deviate a little, so when in doubt check the datasheet.


Usually/ideally, boolean levels should be in VCC-VOH for high, and VOL-Gnd for low.


The VIH-to-VOH difference is the high noise margin (sometimes NMH), the VIL-to-VOL difference is the low noise margin (sometimes NML). These two mean that noise (or voltage drop) of about this magnitude won't disturb the boolean interpretation.


The VIL-VIH interval is usually not defined as either logic level (devices could choose one or the other).


When, power-supply-wise, a distinctin is made between e.g. Vcc and Vdd, it's BJT and FET:

  • VCC - positive supply, BJT
  • VEE - negative supply, BJT
  • VSS - negative supply, FET
  • VDD - positive supply, FET

Which note, is referring to collector, emitter, source, and gate

V+ and V- is not specific.

https://en.wikipedia.org/wiki/IC_power-supply_pin



See also: