Skip to content
Notifications
Clear all

[Sticky] USB-C Microphone (official topic)

1,263 Posts
198 Users
323 Reactions
252.3 K Views
(@fokusnik)
Posts: 7
Active Member
 

@marcdraco

Huge thanks for your reply! You’ve helped me a lot!

The thing is, I’m from Ukraine, and I don’t consider ordering from eBay—I order everything from AliExpress. My financial situation isn’t the best, but sometimes you need to treat yourself. I made a small microphone using electret capsules.

When I saw this project, I really wanted to replicate it. I didn’t notice that there was also a USB adapter—I thought it was just for power. I ordered all the components and then decided to rewatch the video. After watching more carefully, I realized that I hadn’t ordered it. I found one from a Chinese seller for $12—it’s a bit pricey. So I wanted to check if I could do without it.

After your answer, I understand that it’s not possible. Once again, thank you for your response, and for the very quick reply as well!


 
Posted : 07/02/2025 4:34 am
marcdraco reacted
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Ukraine? Oh wow - that's a tough place to be right now. Matt and I are in the UK so we're watching from the sidelines. But you're welcome.What sort of PC do you have? There are ways to connect the mic  on some devices (mostly desktops) that can save you needing a digitizer.



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 07/02/2025 10:24 am
(@akais)
Posts: 8
Active Member
 

I've got the new THAT chip and plugged it in the correct way. There is still no output at all. I checked the voltages with and without the chip in the circuit:

Without the chip: -14V on pin 4, +14V on pin 7 and zeros on the others

With: -13V on pin 4, +13V on 7, 0V on pin 5 (as it's directly connected to gnd), but all the other pins had -0.7 to -0.2V, which seems weird.

Also, how bad it would be to rotate the chip 180 degrees? This worked (temporarily) last time, but might as well have caused the damage, so I'm afraid of trying that again. Another thing I noticed: last time THAT (installed correctly) was quite hot when I plugged the preamp into the computer, but now it doesn't heat up. Maybe the first one was a chinese knock off?


 
Posted : 07/02/2025 4:47 pm
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Very quickly - DO NOT reverse any IC, it's almost a certainty to blow (or at best degrade performance).

Heating is usually caused when the chip is running "hard" which  can be caused by noise and that's usually noise we can't hear. We can see it on a scope but that's no use if you don't have a scope.

The measured voltages you have with the chip plugged in look pretty good. To get the "correct" (no signal) voltages you'd have to ground the inputs (2 and 3). The THAT's output will hover at a few tenths of a volt, this is quite normal even with the inputs grounded.

I'm finalising a new V2 design that does away with the THAT - probably the most troublesome part in this design; but it's going to be a few weeks before I've got it back from China. The Lunar holiday slowed things down (and caught me off guard).

You could try injecting a signal - the easiest way to do this is to inject some 50/60 Hz hum into one of the mic input ports with the capsule and JFET disconnected. Alternatively you could do the same thing at the JFET's gate. All of this assumes you don't have something like a scope and/or a signal generator.

The problem is that if you push the THAT to 40-60dB it will swing around 13.5V peak and blow the digitiser which is why I published that hack with two diodes to restrict it to about 1V swing. That's well inside what the digitiser can cope with

Sorry I can't be more help as I don't know what sort of test gear you have. (The new ones, should - arhum - work right out of the box,  but I've thought that before and got bitten so I'll reserve judgement until I've had time to test them thoroughly.)



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 07/02/2025 5:00 pm
(@akais)
Posts: 8
Active Member
 

How do I get the humm signal? All the test instruments I have is a cheap multimeter


 
Posted : 07/02/2025 5:23 pm
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Our homes, offices, workshops - anywhere there is a mains supply has a LOT of mains hum just floating around in the air (so to speak). That's why the capsule has to be so well screened with brass, mesh and via a balanced line.

If you run the capsule without the screens it will hum like a beast and you'll have to shout to even make yourself heard because the gate (part of the JFET) has a very high impedance, in order of a terra-ohm or more so any little bit of noise impresses a signal on the input pin which appears at the source and drain terminals.

JFETs are the most practical way to deal with very high impedance signals - those are the ones with very low current in the order of pico-amperes. But the down side of that is they pick up pretty much anything that happens be passing by.

The input for the digitiser is probably a MOSFET which is similar (better in that regard) so you can test if your digitiser is working the same way.

Your body has a tiny amount of current flowing through it from these signals so if you touch a high-impedance input like a JFET or MOSFET gate, it will respond. It should go without saying (but I will remind everyone) don't try this with a mains voltage!



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 07/02/2025 5:30 pm
(@akais)
Posts: 8
Active Member
 

Ok, I just discovered a very peculiar thing... When I touch the lead connected to audio out with metal tweezers the signal appears. And not just the humm, but somehow also the sound from the mic. So everything seems to work, but only when I touch the audio output xD I have no idea why


 
Posted : 07/02/2025 5:51 pm
(@fokusnik)
Posts: 7
Active Member
 

@marcdraco 
Yes, I have a desktop computer with a basic Asus Z590-P motherboard. There are no additional sound cards.

A huge thank you for supporting Ukraine, both to Britain and its people! You were among the first to help us. Of course, we Ukrainians are grateful to everyone who does not stand aside and helps us preserve our country. I hope this ends as soon as possible because it is truly very difficult.


 
Posted : 07/02/2025 5:58 pm
marcdraco reacted
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

@akais Yup. That's weird. I'm stumped at the moment. Maybe I'll have a better idea when my brain calms down a bit. Sounds like a loading issue.

 



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 07/02/2025 6:06 pm
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

@fokusnik We're all in this together so far as I (and any other right-thinking person is concerned). I grew up during the cold war so this is bringing the wrong sort of memories flooding back every single day.

OK, the Asus has at least one "line" input which is a digitiser in its own right. Line inputs expect 1V peak so the THAT will drive that without an issue - it should anyway! You can find out by using a busted lead, plugging it into one of the input jack and putting a pinkie end (see above) on the centre conductor(s). This injects mains hum into the input and you should be able to either hear it or see it in Audacity,



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 07/02/2025 6:10 pm
Fokusnik reacted
 SamH
(@samh)
Posts: 6
Active Member
 

Hello everyone - this is my first post here on the forum!

Wow this took me a few days to read the whole thread - I didn't understand everything (or even most of it), but I think I got at least the basics.

Firstly, thank you Marc for your awesome contribution to this project - quite delightful what you have done with the original design.

After watching the video, I immedeatly wanted to start building the mic - I already ordered the capsule (or a similar one, the TSB-2555) and it is on its way.

After reading the thread, I am now a bit unsure on how to approach - its a bit overwhelming with all the different designs. I am basicly just looking for a mic that I can plug into the line-input of my pc, although using a USB digitizer would be much more convinient. Would be a first time ordering a PCB, but since I hate working on veroboards, thats probably a plus in the end.

But maybe I should just wait for Matt's next video - is there any idea how when it's going to go live?


 
Posted : 07/02/2025 10:48 pm
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Sorry, part way through replying and the cat decided to do what cats do... and here we are again.

New boards off to China tomorrow or Sunday. About 2 weeks to get them back and tested. One of the new ones should suit and it's designed to run from a 5V supply and no other expensive malarkey.



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 07/02/2025 11:20 pm
SamH reacted
 SamH
(@samh)
Posts: 6
Active Member
 

@marcdraco

Can't be mad about a cat doing its thing 🙂

Good to hear! Then I guess I'll wait a bit, till the new prototypes arrive. Might be for the best, since I got a Bachelor's thesis to publish and watching the original video got my procrastination muscle pumping hehe


 
Posted : 08/02/2025 7:34 am
marcdraco reacted
(@akais)
Posts: 8
Active Member
 

I tried separating the audio ground from the other one (where the shielding is connected to. I just cut the short wire at the top), and now I at least can hear something. But the sound is quiet and noisy, here's an example

 In the first part I talk into the mic, the second part with periodic noise bursts is just the mic lying on the table. I hope this is useful, because I'm feeling that I'm one step away from getting it to work, but also that I'm blindfolded and don't know what the step is


 
Posted : 10/02/2025 6:08 pm
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Yeah, that's bad. It sounds (and this is a wild guess) as if that's just stray signals being picked up a bit like a radio signal and the THAT1512, presumably at full-tilt (>x1000 differential gain) is amplifying that. I had to boost it by another 30dB (about 30x) just to see/hear that.

The ground screen on this design carries the return signals from both of the differential lines AND the power/return to actually power the FET.

It sound like a grounding issue but exactly what that is, isn't clear. Give the Veroboard design (which is why we've switched to PCBs for the V2) has a lot of potential issues. The worst one, and I've seen this when I was a kid working with it, is when you think you've cut a track but there's a hair of copper still connecting the two - producing a small resistor of a few ohms.

So, given this, I'd suggest you use your continuity buzzer on your meter to check that each cut track is actually cut and not shorted, Same thing between the tracks. It's less common. A solder jumper (bad soldering) is unlikely but a small cut track can cause shorts between the tracks.

Less likely is a dud solder joint. I was taught to grab each end of the components and give them a tug to make sure they have being soldered correctly.

When I was an expert (I've lost my skills now through lack of practise) taught to military standards I made an oscilloscope. On first test the horizontal position didn't work. Turned out that a one end of one resistor had a dry joint and when I gave it a yank, sure enough it popped right out. This was more common with the way cut the wires before they were soldered This is convention to prevent someone from snagging clothing or cutting themselves on a trimmed wire. Cutting post soldering leaves a sharp edge which can be rather nasty on a very dense board, be that vero or a PCB. Home builders don't need to go to this level - not that it's difficult (it is and requires practise) but because we're making projects that we're putting in a box and using them. No one is having to repair them down the line.

Surface mounting has almost removed this problem altogether fortunately. Although it's also made it exceptionally difficult for the hobbyists unless we invest heavily in specialist equipment (or pay to have the boards made up and assembled in China).



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 10/02/2025 6:50 pm
(@akais)
Posts: 8
Active Member
 

I've checked the board multiple times and it doesn't have any unwanted connections. The grounding does seem to be the problem, since when I touch the cage the 50hz humm appears, so I guess it picks up the signals from shielding or something


 
Posted : 10/02/2025 8:14 pm
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

I'm honestly baffled. I've only seen this sort of effect when I've done things like forgotten to bias the JFET  but Matt's design *should* auto-bias.

It could be that you've missed something and you're in a position of not being able to see the wood for the trees. And trust me, I've been doing this most of my life - certainly knocking on for 50 years of it now - and I've lost count of the number of times I've screwed up and missed something that someone else spots instantly. Hence that profile pic - it's not other people, it's me! I'm the idiot at work.

The Michelle pre-amp (which is now completed, has amazing performance and going to production prototype this week) is dedicated to my oldest friend who sadly passed about two years ago was a master at that. I had the ideas but it was Phil who spotted the errors when I made them. Something worked beautifully in theory until I made it up and pow--- dead as a Monty Python Norwegian Blue.

I've sometimes seen my tear my hair out (there's none left to pull out now) for hours. Phil would pop round, take one look at the board and spot the mistake right away. Could be a diode the wrong way around, a jumper fitted in reverse, even the wrong resistor. I've done it all and more than most. I have a computer to double-check me now so I can be more sure that things will work when the board comes back.

Can I assume that you're alone in this task and don't have a mate nearby who can double-check your work?

There's no question the circuit works (even it's a little sub-optimal) and it's taken me a long time to better it while keeping costs low and performance high. The only reason I haven't released these in public yet is that I haven't personally verified that they work as intended. Its split into three parts now with the ultta-low-noise (first prototype) power supply due back any day. One of the problems of being old is I'm quite slow now. :/



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 10/02/2025 9:00 pm
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

For anyone following along, here's the production version of "Happy" which is a (pretty much) universal FET carrier for your microphone projects. It's designed to fit the JLI2555 (and clones) and takes SOT-23, SC-70, TO-92 and TO-72 [including the 2N4416] JFETs. SMD JFETs (this one pictured J201) are mounted on the reverse to increase EMI rejection. The outer ring can be clipped off for use with the smaller capsules if you want follow Matt's original design but it also allows you to make up a simple 2K2 drain load resistor and configure the mic for testing or use with a traditional, ultra-simple, mic circuit al-la the mic capsules like the Panasonic WM-51.*

IMG 5485

Behind the scenes final work is closing on some extremely high performance microphones based on Matt's original model but at lower cost and more modular. Happy (above) costs under $2.00 per board from JLC and comes in about two weeks unless you use expedited shipping. The design files you need for your own board house (gerbers.zip) can be found at my GitHub here: https://github.com/marcdraco/happy

(N.B other designs there are mostly deprecated or experimental (Misty, for example, a through-hole PCB design works as I intended but is getting a few improvements to make it better still. Use these at your own risk.)

If you want to make any changes to the board, the KiCAD 8 files are also there.

The advantage of a simple carrier like this is you don't have to solder directly to the FET's pins and there's less chance of an accidental short.

The rest of this post will give you some clues why the V2 has been a very long time coming.

Matt's original, as anyone who got it working, knows it's pretty darn good. Beating those specs - while keeping things at a reasonable price - has been quite more of a challenge than early testing suggested. This has caused the delays as the prototypes have developed over a couple of years. The rest of this discussion is technical (but isn't mathematical because I hate maths with a passion**) and may help anyone wondering why it's taken so long. The main issue was distortion - something that's often overlooked. The second one is the price and availability of the excellent THAT1512. The device is quite superb but that comes at a cost that's impossible to match without throwing everything away and starting from the ground up. Being the lazy soul that I am, that's something I wanted to avoid but promises were made... and it's fun. 🙂 More of a marathon than a sprint but that's often the case in this business.

Happy described here isn't part of the V2 but was developed from the need to test a variety of different devices from multiple source and breadboards simply aren't up to the job.

Basic FET testing/simple matching.

Happy can also be used as a FET matcher/tester if you solder some (ideally "turned") header pins sockets into the TO-72 socket. (This has limited used with bipolar transistors but they much cheaper than matched FETs - which are usually "HOW MUCH!?" due to their limited use in discrete circuits. Monolithic matched JFETS are usually only found in very, very high-end test gear. To get an idea of the cost difference, a jellybean 2N3819 cost under a quid even at Mouser prices. The much better, low-noise LSK170 one of my personal "do-it-all" FETs costs a fiver but the DUAL version (LSK389) is twice that). Now this doesn't sound terrible but those super-duper extra-low-noise designs, are not only an order of magnitude more complex but often use five or more of these devices (paralleled up for even lower noise) meaning there's that times all the supporting circuitry. So we're getting into silly money. Sample circuits are available at Interfet in their application notes for the 389, 489 and 689 devices.

FETs have a very wide manufacturing spread, unlike BJTs which makes them a PITA to design with (just ask anyone who's done anything more extensive than a simple common source circuit). All JFETs are depletion mode devices which means you pull the gate more negative to reduce gain, compared to (most) MOSFETs which are enhancement mode so you increase the gate voltage to get more gain. Since MOSFETs aren't suitable for mic amps due being noisy little blighters, I'll describe JFETs here since these are the ones you'll be using. (Happy can be used with MOSFETs too but not for a mic capsule.)

Unlike bipolar transistors, JFETs are breeze to test like this:

  1. Once the FET is in position, simply short the gate to the source terminal (or the drain*).
  2. Now apply positive to the drain terminal - almost any voltage will work from about 1.5V all the way to the device's maximum will work, making this a breeze.
  3. Set your meter to the mA position and measure the current from the shorted gate/source terminal to the negative supply.

The current shown (for the J201s https://www.futurlec.com/Datasheet/Transistor/J201.pdf I've tested on Happy I measured 0.5mA). You will see on the linked datasheet IDss ranges from 0.2 to 1.0mA putting these samples roughly in the middle of that but ANY current in that range is acceptable. This is a crude test but it allows you to get a feel for how closely matched some batch of random FETs are.

For comparison, the high-gain, H/F 2N4416 Matt used in the original design has an IDss anywhere from 5mA to 15mA under the same test conditions.

This doesn't account for gate voltage, the pinch-off for this particular device ranges from -0.3V to -1.5V which requires slightly more work to test but the IDss current is a very good way to check the device is operating and how it will work in the circuit you're working on.

The Magic of Modern Operational Amplifiers.

Of interest the curious, JFETs are used as a reference current inside many operational amplifiers, including the wonderful NE5532. Without going into the details a single current is used to keep the entire circuit working over a wide range of supply voltages and helps to stop weird supply fluctuations from affecting the output. As one wag described, "like magic, it's all done with mirrors". Which derives from the remark about magic being "smoke and mirrors". Of course, we want the mirrors but the magic smoke is bad.

If you look at the design of many simple amplifiers, the ubiquitous "common emitter amp" - which is a Class A "low (cough) distortion, high-gain stage". You'll usually encounter pages of complex calculations to derive the base (bias) voltage, emitter current and collector load resistor. But those numbers fall apart if you try to run the same circuit more than a few volts north or south of the supply. This is naturally a huge mess and it causes (among other things) simple circuits to misbehave as the battery voltage falls.

Compare this with even a simple classic like the 741 which has a total supply voltage ranging from 20V to 44V and it will operate from a couple of 9V batteries - designs like this were (and still are) used in guitar effects pedals dating back to the 1970s.This is simply impossible without current mirrors.

So what's the catch? In the case of an the 5532 which uses a JFET current source, its quiescent supply current (when it's just sat doing nothing) ranges from 8mA to 16mA - which you can't predict when designing with them so you have to assume the worst case and hope for the best. Compare that to the old classic 741, perhaps the most popular op amp IC of all time, with its quiescent supply range from 1.7mA to 2.8mA - a range of 1.1mA compared to 8mA for the 5532. And the 741 is nowhere near as tightly designed s the 5532.

Amazing stuff that I'll be honest, most of us take for granted.


* JFETs are unipolar, the channel is bidirectional and the drain is the terminal that's more positive than the source and the gate. A diode junction is formed between the channel and the gate in production and the the most positive end of the channel causes the diode junction to reverse bias. This feature allows most JFETs to be wired with the source and drain reversed without causing malfunction or damage to the device. This a world away bipolar transistors which will usually self-immolate (wee, magic smoke) if wired the with the collector and emitter reversed.

** It's true. I really don't enjoy maths because I don't have much of a background and my eyes tend to glaze over when I see pages of complex squiggles, esp. on Wikipedia where an otherwise relatively simple, digestible explanation is often expanded into reams of detailed mathematical proofs. (Says the guy who often writes huge posts...) But take noise in a circuit - the Wikipedian maths experts will spend pages explaining how white noise has a guassian distribution (that's the statistical model) and how you calculate total noise using the some the square root of the bandwidth (blah, blah). For audio applications, what matters is that root Hz (as close as matter for consumer applications) 141. That's it as close as knowing that PI = 3.14 although. Cribs like this make life so much easier. Ultra-high performance might use figures of 224 or more (to account for noise interfering with harmonics well outside above the range of human hearing causing weird distortion artefacts, but it's simpler this way and saves a lot of work. Being lazy has its benefits. 😉


This post was modified 1 year ago by marcdraco


Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 18/02/2025 8:05 pm
PolarYetti and SamH reacted
(@micky)
Posts: 5
Active Member
 

Hi, thanks for this great project !

However I wonder : does the diameter of thin copper cable extracted from motor windings matter ?

What's the diameter of the one you used ?

Thank you


 
Posted : 01/03/2025 8:49 am
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Posted by: @micky

Hi, thanks for this great project !

However I wonder : does the diameter of thin copper cable extracted from motor windings matter ?

What's the diameter of the one you used ?

Thank you

I think you You're referring to what's called ECW in the trade - entrammelled copper wire.The actual diameter doesn't matter much as the line only carries a few milliamps of current over a short run. If it's too thin you lose physical strength (prone to snapping or even stress fractures). Thick stuff will either not fit in the braid or will  make the screened cable set rather stiff. Anything around 0.3 to 0.5mm should be fine.

 



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 01/03/2025 9:22 am
(@micky)
Posts: 5
Active Member
 

@marcdraco thanks, I have a better understanting now !
By the way, as I'm trying to get all the material. Maybe you (or someone else) will be able to tell me :

  • What is the most suitable brass wire mesh ? I think it's something between 30 and 80 but I just can't figure out what number it is
  • What's the thickness of the brass strip ? I think it's 1 millimeter
  • What the length of the 7mm tubes ? I think 300 millimeters is enough. I suppose their thickness must be 0.5mm in order to let the 6mm brass rod fit inside
  • As the 6mm brass rod seems to be only used to make end caps, would a 200mm one be more than enough ?
  • How the short lengths of the 6mm rod can be soldered inside the 7mm tube ?
  • How can the bottom part be made ? There is a brass piece for the pedestal, but can the U-shaped brass pieces be found or do they have to be made by hand ?

Thanks alot and I apologize for those many questions 😜 


This post was modified 1 year ago by Micky
 
Posted : 01/03/2025 9:51 am
(@oz)
Posts: 8
Active Member
 

"entrammelled copper wire"? 

Spell check got you?  🙂

"enameled copper wire" 

 


This post was modified 1 year ago 2 times by marcdraco
 
Posted : 01/03/2025 4:51 pm
marcdraco reacted
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Enamelled actually. 😉 Spell-check failed us both.

I blame the blasted cat walking across the keyboard. That's my excuse Oz, and I'm sticking to it. Also the dog ate my homework and a big lad made me look after his cigarettes and magazine collection. I'm also old and probably a little senile. LOL

Sorry, hit the wrong button and edited your reply there - see, senility creeping in...



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 01/03/2025 4:55 pm
(@oz)
Posts: 8
Active Member
 

In US, majority use one L.

And I have 2 furry friends, love them!

 

PXL 20220831 060311196.MOTION 01.COVER2
PXL 20230107 182637788 01

 
Posted : 01/03/2025 5:11 pm
marcdraco reacted
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Oh, I'm in love! 🙂 I'm trying to reply to people and I'm being bossed around because his laser toys are all on the chargers! 🙂

On the US spelling, here's an amusing anecdote. When I was co-writing my last book with a couple of American authors, we got into bit of a tizzy over "spelt."

In the US you'd say "spelled" in the UK we use spelled or spelt (usually spelt) but spelt in the US is a type of grain. I can cope with the usual S/Z malarkey and the dropping of the French-"ou" in words like colour/color but when we get into the minor details, they wheels come off really quickly.

My latest screenplay confused the judges because a key turning point in the story relied on the weird way that Brits have letter "boxes" (slots in the door) which can, in some cases collect so much junk mail, flyers and free newspapers that the door becomes immovable.

Difference in culture are remarkable and I love it, such rich pasture to feed my creative side.


This post was modified 1 year ago by marcdraco


Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 01/03/2025 7:16 pm
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

@Micky, nice to meet you (virtually).

I'm not an expert on the brass parts to be honest.

The strip is available in all sorts of thicknesses – I got some 1mm sheet and it’s murder to work with unless you warm it up a bit. Some of the the thinner stuff is quite soft, but it doesn’t hold its shape. I think I used 0.5 or 0.3 mm in the experimental versions but I’ve been working on a newer form factor so all bets are off (except for the simple FET carrier).

I believe the the rods are the 300mm – that seems like a standard (cut) length for them. Same for the end caps.

If you can get a slightly loose fit between a couple of brass tubes, solder will flow easily following the flux by capillary action. Careful application of heat from a small butane torch and a high-lead content solder are key here. Lead is highly toxic so you really have to do this with a fume extractor or better still, do it outside.

Those lovely rounded corners depend on how strong you are. The 0.3mm stuff bends quite easily (mine arrived coiled up!) but it also tends to snap out of shape, so it can be frustrating. But that’s all part of the fun, right!?

The grille, now that is something that causes a lot of confusion and the next 3000-odd words (without any mathematical proofs) will attempt to explain the issue and how the various discoveries dating back to 19th Europe (Mostly Germany and England. JC Maxwell was Scottish but worked in England I believe).

This is, in effect, a Faraday shield (strictly a Faraday “cage” because it has holes) which is transparent to sound. The brass rings are the true RF shields, but anyway. The idea of a Faraday cage is to steer interference signals (mostly the mains hum which is prevalent everywhere where mains current is found. (So not in a desert or some woods, etc.) away from our hyper-sensitive, ultra-high-impedance amplifier

You can skip over some or all of this (TL;DR skips all this) if you feel your eyes glazing over, although I can only promise I won’t hit you with a bunch of complex calculus. (I don’t get it so I won’t try to explain it, I’ll leave that to applied mathematicians and the annoying people on Wikipedia who believe everyone should talk advanced maths.)

I've discussed some of this in PMs with other members but what I've learned about PCB design from people like Rick Hartley, ( https://resources.altium.com/p/pcb-designer-rick-hartley-signal-integrity-high-speed-guru) and going back to basics of electric fields is key. This is going to sound complex at first but I promise it's worth it and I'll keep most of it abstract.

Rick has a couple of "laws" as I call them (and I hope these catch on because they are so darn simple):

Hartley's First Law: "The energy is in the fields."

Hartley's Second Law: "Never use a wider trace than you need for the current capacity of the line."

The first law is important to pretty much everything in electronics - from the wires to the function of capacitors, inductors and even semiconductors. We rarely get into the weeds with this stuff (even in college) but once you grasp the idea that electromagnetic (EM) radiation (that's everything from sunlight and heat to X-rays, ultra-violet and so on).

We know that radiation, let's use radio as an example, travels through a the vacuum of space and is only slightly impeded by insulators like non-ferrous construction materials. Hence you can use a transistor radio in your home without a wire sticking out of the roof. Aerials for radio transmission are open ended bits of wire of a length determined by the transmission frequency - even the one inside your phone. That one is really short!

Inductors are a little more obvious because you can measure the field with fairly simple equipment and non-torroids radiate spit energy all over the place because an EM field surrounds every inch of the wiring. Torroids tend to contain the field in a circle but they are more difficult to make..

Wait - did I just say capacitors use fields? Yup.

We can't measure the field in a capacitor directly because it's cause by two oppositely charged, charge carriers one each plate and they are pulled together just like a couple of magnets are attracted. The energy is stored until the there is a circuit to allow current to flow and bring everything back into balance.

And for the really weird bit of capacitors, although we say, in general terms, that capacitors block DC and allow AC to pass, what really happens is that the charge on each plate ebbs and flows as the current changes polarity, swapping charge carriers from one side to the other.

This is brain twisting stuff at first because the simple explanation "AC passes through a capacitor" implies there's some magic going on - current doesn't flow through a capacitor so much as flowing around it. (Almost all capacitors, notably older ones, pass a little bit of DC - called leakage but it's so small even with the old waxed paper types that it can usually be ignored.

A curious thing about those very expensive capacitor microphone capsules that run from a 50 -100V supply (usually the are designed for around 48V for historical reasons). If you run on of these at a low bias voltage they tend to "boom" (have a low-frequency peak); too much and they start to sound tinny.

This is a direct effect of those charge carriers pulling the diaphragm, which is very slightly elastic, toward the fixed plate. The diaphragm is just one side of a very small capacitor of around 30-50pF. You can like this to stretching the skin of a drum. If it's too loose, the vibrations are damped and lost. Too tight and it becomes more like a tambourine. You can try this at home by stretching a balloon over a large tumbler and tapping it.

OK, so the amount of charge that a capacitor can hold is directly related to two things: the surface area of the plates and the distance between them. The EM force only has a very short range for practical purposes, a tenth of a mm or less. (Strictly speaking it's infinite but falls off a rate described in Coloumb's law.) This means the closer the plates are in physical space, the stronger the attraction and the more charge carriers that can be held in place.

Understanding this stuff helps explain some of the weirder things we encounter like high-rrent cables which are made of dozens of thinner wires all bundled together. This isn't a design choice, it's because the fields that move the electrons around (that's what we measure as current) can't penetrate deep into the conductors - something called the "skin effect":

This gives us cables like Litz wire which carries the huge currents required for induction hobs incidentally.

But I digress. You don’t really need to know any of this, it just helps to understand where inductively coupled noise comes from. Noise can also get into places we don’t want it via the tiny capacitors that form during the design and production of electronics. When we say RF (radio frequency) we usually think of radio waves like those from TV and radio stations or even GPS from satellites.

But the mains flowing through your home or place of work is producing an electric field around the wire (actually this is simultaneous for all practical purposes) and although the fields travel at light speed, the effect they have on the electrons in a conductor is a little slower so the field moves alone a conductor at about 2/3 light speed.

In simpler terms, the wires peppering the place are huge aerials emitting a constant and powerful 50 (or 60) Hz radio signal!

I find it rather sad that people believe that WiFi routers cause all manner of maladies when the signal strength is feeble in comparison to the field generated by just the mains.

If you happen to have a “mains finder” handy or an NCV setting on your meter (many modern ones have this) you can see this effect in action as the sensor moves closer to the live wire, the machine will sense the field and start to emit a beep or light up to warn you. The wire doesn’t have to be carrying current for this to work, it just has to be “live”. These things are an essential for anyone doing DIY as it’s all too easy to drill into a wire buried in the plasterboard and find yourself in the dark with no way to cook your tea. 😉 Or worse… And yes, I’ve done that too but in my defence the wire hadn’t been routed according to the codes of the day. This was in the 1980s and the wire had probably been laid 20 years or more before that.

The Faraday Cage

The Faraday Cage is named for Charles Faraday who invented the technique way back in 1836 long before radio had even been demonstrated (that was H. Hertz, born over two decades later) and long before the first wireless transmissions! The idea was put forward by James Clark Maxwell’s famous equations in an finalised in an 1856 paper with Maxwell still a tender 34 years old… (I had to look that up but it’s some useful trivia to amuse your friends with.)

Perhaps the most important part of the cage/shield is that it can be effective with only a wire mesh with the holes measuring about 1/10th of a wavelength of the blocked frequency. For a practical cage we also need to block radio interference too so a hole size of around 1mm is fine. You can use a much tighter mesh if that appeals, it only has to pass sound waves which are variations in air pressure and can move through a very fine mesh indeed – think of talking to someone through a net curtain. If you look on the rear of your JLI2555 capsule you’ll see a ring of tiny holes which allow air pressure to equalise and cancel sound waves coming from behind. This gives rise to the classic “cardioid” plot which maps the response of a microphone from above (in the Z plane, with the microphone facing -X to +X and the sounds being measured as the source circles around Z moving in XY space). Writing it like that makes it sound complicated (no pun intended) but when you see someone do it with a real device it’s a lot clearer.

So the simple answer is pick any small mesh that appeals to you. The actual grid density isn’t that important.

OK, so now another quick segue into why this is an issue. Ohm’s law defines voltage in terms of current and impedance (impedance is the “complex” form of resistance, but resistance will work here).

Voltage is an odd one because it’s not really a “thing” as such – whereas current (the movement of electrons) and resistance (the way we limit current) both are. That’s another one that’s really hard to wrap your head around but I assure you that it’s true. When we measure voltage, what we’re doing is measuring the current (unknown) through a known value of resistance and the result is the voltage. Voltage is measurement or value of the amount of energy between two points – the terminals of a battery for example. Physicists refer to this as a potential – i.e. the amount of work (energy) that a voltage source is capable of.

In the real world, every voltage source is modelled as a perfect voltage source (one that can provide unlimited current) in series with a resistor. Battery techs call this an internal impedance because as chemical batteries (from zinc-carbon to lithium ion and beyond) all have a limit to the amount of power they can produce which is limited by that “virtual” internal resistance. Small batteries have an internal impedance of a few ohms down to a few milliohms.

As a battery runs out of power the model dictates that the internal resistance is increasing.

So what has this weirdness all got to do with Faraday shields?

OK, so EM fields can travel infinite distances (which is weird even to me) and they do it at the speed of light which is really, really fast and even though they rapidly weaken as a function of the inverse square of the distance distance from the source, they’re still there. And that means they’re moving through us all the time but when they hit a conductive material like copper, brass, iron etc. they disturb the electrons and cause them to move. This has the effect of trapping the field by creating a tiny current in the wires of the Faraday cage. And we’re talking feeble amounts here in the order of billionths of amp. The emissions from your router, mobile phone etc. are weaker still.

So how on earth do they get into the microphone if the shield isn’t there?

Recall that a capacitor is just two conductive plates separated by an insulator. These plates (even the body of the mic) act like little aerials.

Hard to imagine that what is clearly a miniscule amount of unwanted noise gets into our pre-amp and ends up at the headset (or your scope, etc.).

This is where resistance and Ohm’s law comes into play.

The usual job of a resistor is to restrict current but it can also be used to “steer” current too. Without going into too far into the nettles, this is how a radio tuner works. An LC tank (parallel inductor and capacitor) defines a very high impedance at a specific frequency (and much lower impedance either side), preventing the “tuned” signal from passing through to ground. In a radio we take a tap from that circuit and allow some of that current that can’t pass through the tuned circuit and amplify it: because that’s the frequency of interest. Rather than stopping the current, we’re separating off the tuned frequency to the rest of the receiver. Actual radios area bit tricker but the simplest ones – a crystal set work without any batteries, just the LC tank a rectifier diode and a very sensitive earpiece. The entire thing is powered by the energy of the radio waves! This was, I believe, the idea that Nichola Tesla had to provide electricity wirelessly… but anyway.

But here’s the gotcha.

Small capacitors only store a piffling amount of charge so can only pass a tiny amount of charge (compared to large, high-voltage capacitors which, if mishandled can give you a very nasty jolt or even kill the unwary). ElectroBOOM (Mehdi Sadaghdar) has probably done one of his “shocking” videos on this but he’s worth a browse anyway. Very clever guy and one who’s not beyond getting a shock to show you how much it hurts!

So if you have a fiddling amount of current you’re going to need a lot of amplification to do anything useful with that.

In traditional capacitor microphones (not FETless electrets like the JLI) we use a charge (48ish volts is typical) to charge the capacitor and a resistor measuring at least 1 gigaohm (1000 mega) to steer that bit of current into the amp.

This next bit will really blow your mind and probably a lot of other readers to so buckle up!

Transistors (in a physics sense) are voltage operated. A voltage means an EM field is present and since JFET means “junction field-effect transistor” there’s a strong hint that fields are in play. Now I expect someone to jump in and say “Ah, but Marc, bipolar transistors are current driven!” Only that’s wrong too, yeah – most of the textbooks and huge copypasta screeds all over the Internet have that wrong. All transistors draw a little bit of current MOSFETs and JFET leakage currents are so small they are usually ignored, but bipolar devices won’t work without a small amount of current, in the order of micro to a few millamperes in small circuits. Allow too much current to flow into the base and there’s a good chance the transistor will fail as the base-emitter junction (a forward biased diode) is over-driven. This has ramifications when designing with Op Amps as it’s easy to put too much voltage (exceeding one of the supply lines) on an input and doing exactly that. Oops.

The usual simplified model of a bipolar tranny says that the current from collector to emitter (conventional current flow) in an NPN device is the equal to the base-emitter current times the beta (gain) of the device. This is true to a point but beta varies and it’s not reliable. What we see on the datasheets is just a typical beta (100 for many small signal devices) but the same device might range from 20 to 300 under slightly different operating conditions and still be perfectly valid. Using beta in designs is a recipe for failure when a prototype works but some percentage of production samples don’t.

So FETs are purely voltage operated which also means their input impedance is staggeringly high with a typical device having an input impedance at DC in the order of billions of ohms. MOSFETs are even bigger reaching into peta-ohms!

Now if the device has such a high impedance, how does any current get through?

You may need to sit down and pour yourself a stiff drink.

It doesn’t. You can think of JFET as having a little capacitor (it varies but it’s often around a few pF) which charges and discharges as AC is applied to the gate. AC is current which swaps its polarity so the current doesn’t flow through the capacitor, it flows around it; exactly as it does with every discrete capacitor.

This capacitive field causes current to flow in the channel (from drain to source). The more negative charge the gate-channel capacitor holds (with respect to the source), the less current flows in a depletion mode device like JFETs. Nearly all MOSFETs are enhancement mode which means you charge the capacitor/gate to be more positive than the source to turn them on.

Or more simply, the JFET is affected by tiny fields producing currents in the pico-ampere range. This “capacitor” is larger in a MOS device which can be brilliantly demonstrated with a power MOSFET. A load (like a motor or a lamp) is connected to the drain and some power source. The device is “turned on” by applying a voltage to the gate but because it’s capacitor the MOSFET remains on even when the voltage is removed. It looks like magic but it’s really quite simple when you look at it like this.

Of note, because bipolar transistors draw a small amount of current in the base-emitter junction they are only medium-impedance devices at best. A bipolar device would sink (draw) more current than the microphone can produce and make it unusable. There are tricks to get around this but they invariably increase noise or complexity and JFETs are almost purpose made. MOSFETs seem on paper to better still but their gate capacitance is quite a bit larger. Power MOS devices (and IGBJTs) have gate capacitances in the nano-farads – 100s or even a 1000x larger. Yikes.

The (effective) capacitor forms because the gate is insulated from the drain-source channel by a very thin layer of silicon-dioxide – a few molecules thick in fact. Recall that one of the properties of a capacitor is the distance between the two conductive “plates”. That means they’re really, really close so even with the tiny gate connection a fairly healthy sized capacitor forms.

The capacitor in a JFET is a little different, using the capacitive effect of a reverse-biased diode but it’s still a capacitor so far as the fields are concerned. Of interest, the gate is usually in the middle of the channel so most (almost all) JFET devices can be used with the drain and source reversed. There are a few exceptions so if you’re unsure, it’s best to keep them with the drain more positive than the source. A FET will still work with the main terminals reversed.

If you really want to get into the weeds there are a lot of very mathematical models (Ebers-Moll, Parker-Skellern, Shichman-Hodges and others) which use known parameters of the device’s construction and operating temperature to predict this stuff. And if you felt your hair blow-back as all that went flying past, you’re in good company; all of mine emigrated for greener pastures when I started doing calculus!

The interference produces tiny currents, think in terms of pico-amperes. Since those two metalised plates are effectively little aerials, the EM from the mains inducing currents in there – which are amplified and can even swamp the tiny currents produced as the microphone operates which are even lower still.

A Faraday cage doesn’t even have to be grounded to work – it’s entirely passive. The induced fields run around the wires and the energy is dissipated as heat. Nowhere near enough to sense but that’s where it goes. Screens are often grounded which can help, but that’s generally (in screened wire) because they are also carrying the return currents.

TL;DR

Bet you wished you hadn’t asked now. LOL.



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 01/03/2025 8:53 pm
(@micky)
Posts: 5
Active Member
 

Wow, thanks for this amazing explanation @marcdraco !

About the skin effect : great video, I've heard a bit about it during my studies

About ElectroBoom : we both agree on the fact that this guy is amazing, fun and very clever ! I'm fond of his channel !

About the Faraday cage : this is the reason why I wondered what the mesh size should be. I noticed that in some microphones there usually was a superposition of meshes of different sizes. If we discard the 50/60Hz waves generated by our homes (the mesh to block them would be ...thousands of kilometers 😀 ) we usually want to block (IMO) frequencies running from 100MHz to 5Ghz (FM waves, RF transceivers waves, GSM/WiFi/Bluetooth waves). However, the former would lead to a 0.1*300000000/100000000=30cm shielding, while the latter would lead to a 0.1*300000000/5000000000=0.6cm shielding. Here, I used the 1/10th thumb-of-rule stuff. But the grid used in this project is far smaller, why ?

About the JFET : so, because of the fact it's acting as a small capacitor, it won't work (or it only will in a kind of transient state) if the gate receives DC current ? While using AC, how can we ensure that the JFET is neither blocked nor saturated ? I mean, we want it to operate in a linear way, don't we ? Is that the reason why we use a gate bias resistor ?


This post was modified 1 year ago 2 times by Micky
 
Posted : 02/03/2025 6:34 am
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

The mesh size is related to wavelength and you're right that that for 50Hz radio the wavelength is measured in kilometres (rather than a few mm) making radio transmission is beyond impractical. Military submarines use frequencies in the low KHz range, below "long wave" to transmit (I assume telemetry) underwater over great distances. I believe they tow a very long antenna in the water but that's only something I've picked up from sources that might be considered questionable.

While I can't give you a definitive answer, I suspect that at lower frequencies, the cage works by acting like a "guard trace" which is why it's typically grounded. A guard trace sets up an inductive loop (a field) which is at the same voltage as the high-impedance signal but at much, much lower impedance, so interfering signals are swamped. Some instruments are so sensitive (high gain, ultra-high impedance) that the guard signal connects to the screen! This requires a special cable designed for the task but it's not something I've worked with so my knowledge is limited. My weird brain just chimed in with the following thought. "I suspect this would be possible, if impractical and certainly not necessary for a microphone, using the ground as one half of a balanced input and feeding the guard signal back up the outer shield. That's purely guesswork on my part because I've never tried it.

You can see this on my later capsule adapters for example. In a source follower (which is the usual way for better-quality JFET amps to be employed) the source terminal is at the same potential (voltage) as the gate, but the impedance at the source, as "seen" but all signals is in the order of a few K compared to the impedance of the gate which is in giga-ohms. Guard traces are used on PCBs where very high-impedance signals are being produced - the current mirror load of a differential pair (particularly in a discrete design) is a good example, but they're also used with Op Amp inputs too, particularly FET types (OPA2134, TL074, etc.) where you'll see the output pin looped around the high-impedance junction and connected parts.

Here's an example of a guard trace from one of the more recent designs for the promised V2. I've highlighted the highlighted net to make it more obvious. This one has to snake around the high-impedance points at the gate resistor, the FET's gate terminal and the microphone's input. The loop is driven by the source terminal (impedance of a few K) and seems pointless - unless and until you imagine a field there.

With such a tight layout as is required for a complicated board like this, where every square mm counts (some is lost due to the required breather hole(s)). Much larger currents 1000s of times greater are running around the board within millimetres of the feeble couple of microamps at the gate. That means that fields around the tracks are causing "aggressor" fields that can and do get impressed (by induction) upon the high-impedance "victim" traces.

The field around the guard trace acts as an electronic shield around the victim (gate) preventing the vast majority of local interference. It can't stop external fields of course, that's what the shield is for. The guard doesn't necessarily have to be a loop (if the aggressors are only close to the victim on one side), but it usually will be.

image

Recall that in induction, a changing magnetic field causes current to flow in a wire. This is how most of our electricity is generated. The amount of current is directly proportional to the strength of the field. Using ohm's law the potential difference (voltage) along the length of wire is the induced current multiplied by the resistance of the wire. Radio signals are very weak by the time they reach us but mains current produces fields 1000s of times stronger because they're much closer.

You can see this if you have a scope by placing your finger on the probe and note that a very large mains frequency signal shows up - and although radio signals are there, they're outgunned by the local mains radiation. Modern DVMs also have extremely high impedance voltage inputs (FETs to the rescue again) so you can see a voltage on your body the same way or, if the meter has a Hz range, you'll see the mains frequency displayed as if by magic.

The local circuit ground is a very low impedance path for all signals and current takes the path of lowest impedance (which is why grounding is so important to get right in all audio and radio). This is more easily seen in LC tanks where the (virtually infinite impedance) at the tuned frequency prevents the signal of interest flowing back to ground, the Earth in that case. Unpowered "crystal" sets have to be grounded via a large metal plate or rod driven into the soil outside your home. It's possible to use a tap or connection to a copper central heating pipe since those are supposed to be connected to mains Earth. That can be dangerous if the household Earth isn't properly connected (which is rare, but I've seen it and got a shock to prove it for good measure). Of the village where this happened, the locals had a saying that it was "built with all the charm and forethought of sneeze". Genius.

In either case, the lower impedance path to ground causes frequencies outside the tuned resonance to short to ground and complete the circuit all the way back to the radio transmitter. This is something Tesla wanted to develop for wireless power distribution but he fell into obscurity before he could demonstrate a working device (assuming such a thing in is possible).

The ground in our circuits isn't dead - current still flows there - Kirschoff's first law says that all currents flowing into circuit must be exactly equal to all the currents flowing from it. I've always thought this rather obvious, like the line about gravity "what goes up must come down", a lesson Elon Musk has demonstrated recently with billions of $s of US taxpayer's money.

So if the local ground is at some (albeit low) potential above the Earth ground with current supply and signal currents all flowing through it. This suggests that the cage provides a low-impedance field at circuit ground which will be much stronger than the interfering fields. But honestly this is just an educated guess. Entire books have been written about grounding problems because they can be incredibly hard to see - particularly on a schematic where we are lulled into the idea that our connections are all zero impedance and all other components are "perfect" without tolerances.

While we can see a tolerance on a spec sheet. Modern resistors might vary in value by 1% (or less), in my day 5% was pretty good, and SMD means there's less parasitic inductance too. Electrolytic capacitors often have very sloppy tolerance as much as 20% more or less than the marked value. This can cause distortion in audio as the reactance changes causes the making the impedance change with frequency. In balanced lines, common mode signals see differing impedances (looking back into the source) which throws the balance off, thus leaving them to leak through to the output. A differential amp is most effective at blocking DC but as the frequency rises, the reactance causes an imbalance.

Where local circuit ground is concerned, we encounter things like ground "loops" which cause massive amounts of hum. The "quick and dirty fix", disconnecting the mains Earth, has electrocuted several performers over the years.

What really matters is the impedance that radiating magnetic fields "see" and in high-speed digital switching the enormous transient currents (sometimes in the order of tens of amperes, for a couple of nano-seconds) cause a voltage drop on the local ground of a few millivolts which, because everything is referenced to ground, affects every other part of the circuit.

It seems a little strange to think of a tiny transistor not exploding when faced with 100s of times its rated current but the answer is that it's not current that destroys the device, it's heat (most CPUs require fairly powerful coolers to avoid this).

An easier way to see this is to charge a large capacitor and watch the current flow over time. If we assume a perfect voltage source (infinite current) zero impedance interconnects and zero ESR, the moment that the circuit switches on, an infinite amount of current flows for an infinitely small amount of time. Even though a capacitor is blocking DC, it still has to swap charge carriers until it reaches equilibrium (100% charge). You'll see from timing graphs of simple RC circuits that rather than being a straight line, the charge/time is a curve that rises rapidly for a while and then bends over. Some nice graphs here: https://www.electronics-tutorials.ws/rc/rc_1.html

Calculus comes in handy here because we can predict the voltage/time very easily and in fact, LC circuits for low-pass and high-pass filters are (in the time domain vs. the frequency domain) differentiators and integrators. Electrically they are identical and it's why multi-section filters are named after the people (Bessel, Butterworth, etc.) who figured out the mathematical functions that describe the poles/zeros in the passband causing "ripple", overshoot, ringing and the slope of the filter where the final pole kicks in. Lazy old, mathematically challenged plebs like me just use pre-calculated tables using the function appropriate to the type of (frequency) filter we need. (No point trying to re-invent a perfectly good wheel and that's my excuse.)

When you turn on a circuit (any circuit) there's an instantaneous inrush current, limited slightly by the resistance of the supply cables, but large capacitors, which look like shorts at first, can easily blow fuses (slow-blow fuses and latterly electronic fuses get around this by not going "open" in the few microseconds it takes everything to equalise within design tolerance. The same applies with transformers which store their energy in a magnetic field using the same maths. The windings "look" like a short until the field builds up, pushing back against the incoming current until it reaches balance. After that (in AC) the undulations cause the field to slowly rise and collapse without drawing excess current because it remains in balance.

For a closer look at this effect you will see that when transistors are used to switch large solenoids (inductors) like the ones in relays, we use a reversed diode to prevent the "inductive kick" flowing through the transistor - in the wrong direction - as the field collapses.

Even little diodes can take a fairly large amount of forward current but the same isn't true in reverse.  The base-emitted  junction in a bipolar device forward-biased diode (at least, it acts like one in isolation). If the diode "snubber" diode isn't present, as the field collapses reverse current gets yanked - the wrong way and exposes the junction to currents its simply not designed for. The really irritating bit that catches the unwary is that you can "get away" without the diode and so long as the relay isn't switching very rapidly the circuit might appear to work just fine. But over time the transistor will eventually fail, it's only a matter of when.

Another snubber we don't see much these days is a small capacitor (typically a few hundred nF) wired where a circuit switches rapidly through a set of contacts. As the circuit makes and breaks the sudden switching current causes arcing across the contacts. This seems a bit odd at first but when you close a physical switch as the two conductors carry a very large instantaneous current which causes localised heating leading to arcing. The arc also spits out a lot of RF too (as first demonstrated by Hertz in the 19th century).

But put a capacitor across them (near to the offending circuit) and that absorbs the energy jolt by providing an even lower impedance (instantaneously) as the contacts first engage. This was an essential part of petrol engines until the advent of electronic ignition. (They were called "points", relays in fact but driven by an eccentric (lobed) rotator which opened and closed the points "n" cylinders per engine revolution, causing the ignition coil to produce a spark just before the fuel-air mixture reached the point of full compression.

Accurate timing is essential to good fuel efficiency and these little fella were adjusted by turning the entire distributor a few degrees around the lobe, and holding it in place with a clamp. Over time the distributor could (and usually did) slip due to vibrations causing the timing to alter and causing the engine to lose performance. Some petrol-heads would deliberately alter the timing to increase power under load (driving conditions).

"Me? A petrol head? With my reputation..."

Even with the snubber, a small amount of arcing was possible - and you could often hear it breaking through on AM car radios, especially if the snubber cap had failed. In that case everyone with an AM radio would hear the tell-tale rapid clicking as you drove past!

The timing of an modern electronic ignition never needs to be altered manually because everything is monitored by a computer which monitors engine load and throttle position (to name two variables of many), mapping the correct timing for the conditions. (Hence the modern practice of "re-mapping" for more power or better fuel efficiency.) But that's only scratching the surface of a very deep problem (and is also how VW, Ford and others were caught fiddling the strict EU emission standards.)

FETs at DC.

Let's assume a depletion mode FET (usually a JFET). When the gate capacitor hold no charge - that is, the gate is at 0V, the channel is in full conduction (in reality there's just under a diode drop above that where even more current flows) as the gate-channel diode from channel (anode end) gets nearer to the gate (cathode end). Beyond that, the diode is forward biased and the FET stops working for that part of the swing (clipping) or even destroying the device. In a DC coupled JFET amp we'd usually protect the gate with a larger diode, like a Schottky which isn't just fast, but conducts at a much lower voltage.

But the normal operating range of a N-type JFET is from 0V (full conduction) down to some negative voltage (with respect to the source end of the channel) where it's leakage current is in the nano-amps. There's a huge gotcha with JFETs in that the gate's Vgs OFF can vary by huge amounts compared to a bipolar device. The J202 for example has a range from -0.8 V to -4.0 V! Now compare that to a typical bipolar device which might vary by a few hundred millivolts from off to on from a selection of the same parts (base current is also a factor here which is why so many pages are spent talking about BJTs as current amplifiers).

There are a few ways to bias a FET, but the gate resistor (for a microphone amp) is just there to steer the current into the gate capacitor (the connection is pure AC in professional mics with 48V bias and it that DC must be blocked with a very high quality capacitor as any DC leakage is going to push the JFET's gate toward the positive rail over time). Electrets have a fixed field (electret material is specially made for the purpose) which isn't lost for over a century, or so we're told.

In operation the charge moves to and fro "through" the gate capacitor (charging and discharging it, causing a larger, current to flow in the channel. In this way the FET lowers the impedance by increasing the amount of current to power the rest of the circuit.

FETs can amplify DC current (or drop the signal's impedance if you prefer) because although DC doesn't switch polarity, it can vary in voltage. If the voltage rises, the capacitor charges as it falls, so the charge drains away.

FETs at AC

The most common method to self-bias a FET is fiendishly clever and relies on the fact at switch on (with the gate at zero volts, hence no charge) current immediately flows in the channel into the source.

When a current flows through a resistor it causes a voltage drop (Ohm's law) and that voltage pushes the source terminal to voltage more positive than ground.

Using the numbers, let's take a small signal FET with a (known) 1mA drain-source current with the gate held at 0V. The supply voltage can be anything above about a volt, usually a couple of volts in a cascode but it can be much higher. Let's assume a 10V supply and 1K source resistor.

When the voltage is applied, 1mA instantly flows through the channel which would (assuming the FET wasn't there) drop a voltage of 10V across the resistor.

Now comes the magic. The FET is an active device who's drain-source current is determined by the voltage at the with respect to the source (Vgs).

As the voltage on the 1K resistor starts tor rise, that drives the source more positive than the gate which is held at 0V by the gate resistor to ground. Recall that very little current (picoamps) is flowing out of the gate to ground, so even a 10G resistor isn't going to drop a significant amount of voltage.

It might take some amount of hand-waving to get this at first, but when your brain allows you think in terms of fields moving at almost light speed, you'll see that as the source gets more positive the channel (referred to as the width) narrows and less current flows. Less current through the source resistor means a lower voltage at the source.

In an instant the JFET settles to an equilibrium with the gate biased nicely into the linear region - the value of the source resistor isn't critical, but it has to be calculated from the FET's Idss (max operating current of the channel). If the resistor is too small or too large, the FET won't be able to pass enough current drop enough voltage across the source resistor to push the gate close to pinch off (VGs off).

As you can see this is a bit of a exercise in juggling but the data sheet is your friend. Even so simple circuits like this cannot keep the current stable through the swing, and the larger the swing is, the worse that gets. This results in distortion because, and you'll see this from the datasheet, a FET's linear region is quite small.

For ultimate performance, there are some very clever circuits which use various forms of feedback to force the IDss to remain the same over a wide range of input voltages. The simplest of these is the constant current sink which "tries" to draw the same amount of current through the device at all times - something that's not possible with a resistor due to Ohm's law.

A current sink varies the instantaneous source voltage versus the source controlling the voltage at the source resistor (Rs). Remember that the source current determines the voltage at the Rs resistor and the voltage across that resistor is dependent on the current flowing through it.

It's akin to the Ouroborus (the snake eating its own tale) or more accurately the apparently unresolvable problem "which came first, chicken or the egg" problem.

In each case it's neither, because we're asking the wrong question. Evolutionary biologists describe how creatures that lay eggs developed that ability over millions of years - in other words, one does not precede the other, they happen at the same time. A segue into avian and reptilian biology is useful for comparison. We know that modern reptiles lay eggs with a tough, leathery shell (unlike birds - where the shell is hard and calcified). What a most people don't realise is that a bird's egg is soft as it's formed and passes a ripe ova* the "yolk" and is layered from the inside to the outside - the whole process takes about 25 hours for a chicken and we've bred domestic birds to lay constantly. Inside the animal, the shell is soft like that of a reptile, but once the egg is passed a chemical reaction causes it to harden up almost instantly.

In electronics the fields develop from each end of the circuit at the same time so everything appears to happen at once. Some high-end gear can measure these effects relying on the fact that the current (created by the field) travels through copper wire much slower than the field can travel in air or a vacuum. The field and the electrons (creating the current) exist in the same place in space and time so they travel at the same velocity.

The same applies, less so, to bipolar devices and the same tricks work with those too.

Op Amps do this using negative feedback, a technique I've cribbed for my most recent designs - and although the performance is stellar on paper, it remains to be seen if that passes the "smell" test. Can you hear the difference or just measure it?


* On totally unrelated note but useful bit of trivia, unlike mammals who have two ovaries, birds only have one. The foetus develops two but as the animal develops from a chick, one of them shrivels up. The early birds (and most modern ones) need this to keep their weight down - flying is hard enough without a redundant organ weighing you down. Also, unlike mammals, birds carry the gene for sexual dimorphism on the egg (in mammals this comes from the male). This gave rise to a joke which is a bit risqué for a public forum and is squarely aimed at making fun of rampant, flag-waving homophobes. PM me if you want to hear it but be wary, you'll never be able to see a runny boiled egg in the same way again.


This post was modified 1 year ago by marcdraco


Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 02/03/2025 1:30 pm
(@micky)
Posts: 5
Active Member
 

@marcdraco thanks - again - for this amazing answer ! 😊 😊 😊 


 
Posted : 03/03/2025 5:10 pm
marcdraco reacted
marcdraco
(@marcdraco)
Posts: 1048
Moderator at Large and Cat's Butler
 

Always happy to help @Micky, you ask smart questions (like the bits I've missed or overlooked). While there's no such thing as a "dumb question" there are plenty on the "Interwebs" who irritate me like an itch that I can't scratch. Many of the electronics articles on "that" free encyclopedia that are like walking through warm treacle because they are written by people with broad or exceptional abilities in theory and mathematics. Rather than being accessible to hobbyists, they speak in terms more apropos to experienced engineers. A little bit of math is unavoidable, but Ohm's law is enough to get you a very long way indeed. Complex impedance (reactance) the resistance that AC signals "feel" isn't that difficult - in terms of volts, amps and ohms even if the mathematical proof lies in the calculus of complex numbers. In case you're unaware (or for those who are) these are the ones with real part and an imaginary part, the root of -1.

But you don't *need* the proof to calculate the effective resistance (in ohms) of an inductor or capacitor. You only need the simple equations:

Capacitive reactance (impedance) R = 1/(2 * Pi * C * F)

Inductive reactance R = 1/(2 * Pi * L * F)

Where L is in Henries; C is in Farads; F is the 3dB frequency in Hertz and R is in Ohms.

This won't tell you where every Pole and Zero is (and most of us don't need to know that either) but it'll get you a very long way into designing simple filters, including ripple filtering of a power supply. Poles and Zeroes requires dipping your toes into the treacle but why make it hard when a simulator will do the hard work for you and show you them visibly?

Rick Hartley's lectures on fields was blinding - like coming in from years blundering around in the dark. Suddenly, a lot of the often obtuse explanations we were exposed to in college about charge carries, holes, and electrons moving around (to name but a few) make little sense without the underpinning of quantum mechanics. One of the new designs is code-named Heisenberg after the German physicist and virtual cat assassin in deference to that problem.

I came back to electronics after a 40 year hiatus, much of which was spent (a lot still is) trying to take complicated and often obfuscated topics across science, computing and other tech literacy and applying Einstein's view, "as simple as it needs to be but no simpler".

And like my hero growing up, Dr. Carl Sagan, a man who for all his genius was never afraid to admit he'd made a mistake. Go back up this thread far enough and you'll see some utter howlers, but nothing that I've asked anyone else to pay for. (Perhaps most infamously, I ran a couple of pre-production prototypes using a single supply rail [+15V] on a circuit that was specifically intended for split [+/- 15V)].

This is power amplifiers 101 (we need a split supply for every class B or AB amplifier). The reason is, although Class A - where the output transistors conduct through 360 degrees of signal swing. That's the entire sinusoidal wave and anything that's made from them such as audio or even RF. Class A has excellent distortion characteristics but it's massive power hog and they get hot! Classes B and AB conduct through 180 (B) or a little more than 180 (AB) making them more efficient, with the AB variant trading a little bit of efficiency for far better musical performance.

Class D is the new kid on the block, using only a very high-speed, PWM scheme with a chunky filter to get rid of the harmonics at the output. What even the most basic Class D amps lack in distortion, they more than make up for in terms of power efficiency and cost (at least for driving speakers).

Since we're on the subject, here's a deliciously fast way to design a Class A, common emitter amplifier that will get you a working, reliable circuit with nothing more complex than some basic transistor specs and a simple calculator. (Before reading this you might want to look up how the usual suspects approach this, including the really, really bad one...

image

This seems to be the sort of "introduction to the CE amp" - common emitter just means that the lowest resistance path is to the to the emitter. It can also be called a grounded emitter amplifier.

And it won't work for A/C although it would drive a lamp or an LED... but it's far from optimal.

In fact, I've just thrown some values in because -- why not (it's a terrible design anyway). The "right" to do this requires a little more thought but not much.

As I've said earlier, transistor beta (gain) is a poorly defined property and varies quite dramatically as the collector/emitter current (amplified) current changes.

Better references will show you a circuit like this:

image

Which has an emitted resistor and a less random "DC block" capacitor to prevent the required bias voltage (slovenly set to 50% of Vcc here) from interfering with the previous case (and this is still wrong!)

So armed with this knowledge, you might look up of the hundreds of resources explaining the CE amp and immediately get bogged down.

So here's the right way (and the ultra-quick way) to develop this circuit. Although you won't normally work in isolation like this, it's useful for demonstration.

I'll use conventional current flow - which is the way transistors and diodes are drawn. The electrons go in opposite direction but that's a distinction that shouldn't make a difference.

There are a couple of things we need to know up front.

      • The total swing of the input signal from positive to negative peak. In this simulation, I've used one millivolt input and I'm looking for a gain in this simple stage of x10.  The absolute maximum (in perfect operating conditions on a clear day) the maximum gain of a simple, resistor loaded CE amp is 20x the positive power rail - 200x or 46 dB but there are any number of reasons that's not really practical and anyone trying it is in for a world of pain. So:

        1mV in 10mV out.

        If you need more gain you can chain multiple stages - three would give you x 1000 for example, although beyond this simple Class A stage, far better techniques, although most use a split supply.

      • The collector-emitter current in mA. You can get this from the spec sheets, for a jellybean 2N3094 at low noise you need a collector-emitter current of 0.1 milliamps (100 uA). I'll use an even more common 2N2222A here (the BC109 is similar and quite common still.)
      • The input impedance (usually 10x the impedance of the preceding stage). You can get a rough idea from this as the two biasing resistors in parallel, or 50K here. In fact, the emitter resistor is also in play but we can ignore that for now. The input impedance matters. More is better and too much adds in "Johnson noise" - part the tell-tale hiss you hear if you listen to a power amp running flat out with zero input.
      • Not a lot else.

To keep it easy we'll say that the Vcc (power) is going to be 10V to keep numbers simple. In practise, you might be working with a battery of 9V dropping to maybe 7V as it discharges.

OK, so first job is to set the emitter current - and just that. There's a gotcha here called "Re" which is properly called the "intrinsic emitter resistor". It's not a "real" resistor, but at low currents we need to be aware of it. Also, 100uA is rather less than even low-power circuits might use, so I'll bump that to 1 mA.

Why? Re is determined by the emitter current and while some current is going to flow through the base-emitter diode, the majority of it is coming via the collector.

Re is determined by the emitter current proportionally as 25 ohms at 1 mA, rising as the current drops (so 250 ohms at 100 uA) and vice-versa. In simple, small signal examples like this a nice low value like 25 ohms is so small can be ignored. It just helps to know it's there and figure out what it effect it's having.

To get the widest possible signal swing (without clipping the wave) we need to set the voltage at the collector (with reference to the ground here) at 0.5 x Vcc or 5 volts. Easy.

5 V at 1 mA (using Ohm's law) says that the collector (or "load") resistor is:

5 V/ 0.001A = 5,000 ohms.

Easy right?

Ah! But how did we get that 1mA current in the first place.

This is called the quiescent or "Q" point in the lingo and that current is determined by the transistor being switched on. It doesn't have to be "saturated" (switched fully on) it just needs to be ticking over a little.

This is determined by the voltage dropped (the difference) across the emitter resistor. So, let's keep it simple and say that we're going to make 1V appear at the emitter. Using Ohm's law that works out:

1V / 0.001 = 1,000 ohms.

But wait... how are we going to magically make 1V appear at the emitter?

Recall I said that transistors are voltage-based? Compared to weirdness of JFET Vgs spread (akin to to Vbe here) small-signal bipolar transistors start to operate the voltage measured across base to the emitter reaches 0.7 V (700mV)

Looked at another way, the base-emitter junction looks like fixed voltage reduction of 0.7V. Add in the 1V we need for our current-setting resistor, that means the base has to be held at 1.7 volts by the voltage divider network R1 and R2.

Rather than rooting around in these calculations, you'll find plenty of little calculators on the web which will allow you to "guess" one resistor, give it the supply voltage and they'll spit out the correct value for the other one. I use KiCAD for this but Omicalculator is a great resource.

Here's a different one:

https://ohmslawcalculator.com/voltage-divider-calculator

For R1 = 100K, R2 works out in round figures to 20K (for 1.67V)

This has the nice effect that it pushes the base well above the 700mV "switch on" getting our little device ticking along nicely AND is far more than the 2mV total swing of the signal source. (If your signal pulls the bias point below the minimum bias voltage, the output will clip because the transistor turns off.)

Allowing for that 1.7 (ish) volts on the emitter, we can now see (try this in sim if you need proof) is sitting very close to 5V, I mean, what's a third of a volt among friends right? Something that takes a lot of getting used to coming the precision of mathematics to the vague world of electronics, if you get used to making compromises. But that's only 6% of quiescent so we're in good shape for such a simple circuit.

The emitter voltage is only 0.93V because I haven't used an exact value for R2 - but we don't get "exact" values so you can't expect to get exact results, just within acceptable tolerance for what you're trying to do.

I've ringed the simulated values here so you can see this is not an exact science. (What was that the elite suspects were chiding me about this being a science and not an art and a science?) Close tolerance resistors exist, and for when you can't get them there are always presets but that's rarely necessary and if you're using a preset here you're just making life hard.

image

What's the gain? It's about 14 dB or x5 (which you can calculate by doing R3/R4).

Which is OK but not what we want. So what's going on?

The CE amplifier is an inverting amp. When the input signal goes up, the output signal (at the collector) goes down and vice-versa.

But what about the emitter? That's going in the opposite direction - it's said to "follow" input signal. (Followers are current amplifiers, what they lack in voltage gain, they makeup with current gain.)

Since the emitter voltage is moving in the opposite direction, it "pushes back" against the collector, limiting the swing and reducing the actual gain.

Darn!

But there's a fix - because the primary job (almost the only job) of the emitter resistor R4 is to set the Q point at the collector (due to transistor action). If we try that (and there are numerous horrible examples that do just that) the emitter current is entirely determined by the Re (intrinsic emitter resistance) and the collector resistor which throws everything to pot.

But we're amplifying A/C. The signal is starts at 0V, rises to 1mV, drops to 0V and then carries on down until it gets to -1mV before starting back up. (The capacitor does that as it charges and then discharges - so the capacitor is passing the varying current but blocking the DC.)

The answer therefore is to bypass R4 with a capacitor large enough to allow the A/C signal at the emitter to "see" an impedance of (pretty close) to 0.

Now we're cooking with gas!

Of course you can't just stick any old capacitor in parallel with R4 because ... reactance. So we need a capacitor of impedance at least equal to the resistance of R4 - 1000 ohms at the lowest frequency of interest. In audio it's usual to go down to 16Hz or so (even though human hearing tapers off around 20Hz) because the math tends to work out better that way.

This will be our -3dB point incidentally, where the response or "bode" chart starts to drop away at the low end and is reached when the impedance of R4 and C2

The (in Farads) of a (perfect) capacitor at 16Hz can be calculated using a tool like this: https://www.omnicalculator.com/physics/capacitive-reactance

Of course you can't just stick any old capacitor in parallel with R4 because ... reactance. So we need a capacitor of impedance at least equal to the resistance of R4 - 1000 ohms at the lowest frequency of interest. In audio it's usual to go down to 16Hz or so (even though human hearing tapers off around 20Hz) because the math tends to work out better that way.

This will be our -3dB point incidentally, where the response or "bode" chart starts to drop away at the low end and is reached when the impedance of R4 and C2 is equal.

The reactance (in Farads) of a (perfect) capacitor at 16Hz can be calculated using a tool like this: https://www.omnicalculator.com/physics/capacitive-reactance

But if you try this in a decent sim (and you should) you’ll be screaming, “Marc, you plonker! That’s not right! The shots here are from LTSpice but any decent Spice will work. MicroCap, LTSpice and Tina TI are three such examples. KiCAD is excellent but lacks all but the most basic of device models so it's not that great for experimental purposes, unless you can be bothered to source (or write!!!) your own.

A bode plot will show a gain of range from 17dB at 16Hz up to an impressive 45dB above a few Khz. Super, but it’s going to sound rubbish with all that high end stuff. And what happened to that 3dB knee?

image

We’re obviously going to have to get that gain back under control and make it somewhat predictable mathematically.

The solution is so simple, it’s beautiful.

The weird gain plot with frequency is due to the fact (alluded to earlier) that capacitors are reactive. The don’t work like a resistance, so much as a frequency-dependent resistor. As the frequency climbs, the effective impedance of the paralleled C2 and R4 changes quite dramatically eventually levelling as the reactance drops below one ohm.

Wind all the way back up and our design was to give an audio gain of x10 and the way to get (close enough) is to put another resistor in the A/C path (in series with C2) like this:

image

 

The simulation pegs this at about 22 dB with a -3dB point of around 11Hz which exceeds our design requirements and it's pretty flat from 20Hz on (note the difference in the dB scales!). Here's a bode plot so you can see.

image

You may have noticed I skipped over the value of C1. That's wee bit trickier because you have to take the parallel resistance of R1 & R2 with the effective impedance of R4, C2 and C4 which, in turn, depends on the transistor's beta! 100uF is WAY beyond what you need here.

Being the mathematically inept and lazy old oik that I am, I tend to pick something that's around 2-4x the value I think I need and use SPice to get close enough. It is calculable (from the datasheets, if you know the emitter current and collector voltage you can infer a typical beta from the charts. That's a lot of work when (board space allowing) you can get away with something much larger than you actually need.

I know I said this was the quick and easy route and it's longer than many explanations on the web, but it's robust, reliable, relatively predictable (and when you've done it a few times) an absolute doddle. For perfect predictability of gain, you're going to need negative feedback (thanks Harold) because when the "open loop" gain (that's what we have here) reaches into the billions of times, you can throw most of it away and an errors drop off the edge of the map and into insignificance.



Take everything I say with a pinch of salt, I might be wrong and it's a very *expensive* way to learn!

 
Posted : 03/03/2025 8:58 pm
Page 31 / 43