 The great search brought to you by did you key and a different every single week lady a user power of engineer and help you Yes, you find the things you're looking on For and with did you key calm? Okay? What's up? Okay, so let's go to my computer So this week I've been working on this design which is is pays homage to is a derivative of an open source project called the bus pirate and One thing this project did which I thought was interesting was uses an analog switch To enable and disable Pull-up resistors from these for GPIO pins to an external voltage which which might vary and you know I thought it was interesting because I Was like, oh, why didn't they just use like a bunch of transistors? You could do this with a bunch of fats and I was like, oh, you know Like it would take a lot more board space up and it might be more expensive than just plopping down one analog Multiplexer slash switch and then I realized, you know, we we've never talked about this kind of part We often have buffers or we have maybe op-amps But analog switches kind of a cool weird thing in between it's it's made up of MOSFETs And it's basically, you know, you could think hey I can I can connect and disconnect some things by you know Connecting up some n-channel and p-channel MOSFETs and and you should basically disconnect and connect a pathway between two IO pins particularly for analog voltages is what they're they're good for they're called analog switches, although of course you can do them for digital signals They're just not going to be as as fast as They're best used for analog you can't use them digital but of course there will be a limit of how how fast the frequency you can push through them is and You know, of course, this is a replacement for mechanical switch But there are some trade-offs just because they're called analog switches doesn't mean they replace a switch There's a there's a couple things to watch for so first off, you know, you can go to Digi-key and search for analog switches as opposed to mechanical switches, right, which is like the clicky things and There's a couple zones. There's like, you know, a special purpose, but there is you know one Main section for them and there's a lot of settings a little not every setting is covered So the upshot is they're you know, they're they're silicon chips and The most popular ones are the ones that are kind of bar from old CMOS logic So this design used the 4066 which is a four-channel SPST switch, but there are other ones too like the 4051 and of course the allow the CMOS logic as it became more modernized and more durable You're gonna see it called 74x, you know, 74hcvhcvhcht whatever that series so the 4051 is a Multiplexer D multiplexer. So what's kind of neat here is that you have one Sorry, you have one of 80 code. So this one is a single pole octal throw sp8t so used to connect one Input Z. So Z is the input or output. You know, that's the thing. It's analog. It's can go bi-directionally To eight different outputs. You can it's basically like an eight-way mechanical switch and then use the three logical inputs s01 and 2 To select which of the eight outputs or connections. You'll have Z connect to you Yeah, VCC ve power and ground you'll notice a lot of these Because they're meant for analog signals, which used to be like positive and negatively referenced like negative 12 to plus 12 It's not that unusual to see these chips have pretty big power supply Possibilities so you can usually while you could run them zero to five Wedding them like negative 12 to plus 12 is there there are definitely versions for that. There's a navel and then a ground So a couple things to be aware first up there is So this one has, you know, wide input range of negative five to five, but of course your power supply has to be Beyond that usually mean maybe maybe plus or minus one volt You can't use like a one of these analog switches It's powered off of three volts and use that to switch five volts like any your signal input output Cannot be above or below the rails except for like one weird situation where it can't On resistance so unlike a mechanical switch where you have a resistance of like point zero one or point one ohms like it's almost nothing There is a resistance so These are low-cost 40 xx series you're gonna get Fifteen fifty one hundred ohms So, you know, just be aware that there's some impedance. This is this is not a power Like, you know mechanical switch you can easily get ones that give you amps of current through this one You're not going to be able to drive that much current through and there's all another Limitation of how much not all these are resistance, but there's a limit of how much current, you know Usually looks like, you know, 20 milliamps or so Between each input and output So this power supply for example, you can run it up to plus minus Five volts or zero to ten volts, you know, you can do either as long as the total differential is Ten or less so that's like one example, but there's there, you know, there's others the 451 The 4052 which is a two by four switch. So this would be good for like a stereo signal two inputs And then four outputs for a two, you know, two options for each so here you've got one Z and then goes to You know, why zero one two three and then to Z which goes to this set So it's like two to four to take stereo switches and four options each So there's like every which combo you could ever want There's SPS T that, you know, normally open and then you'd have to do something to connect them SPS T switches There's ones that are single just like one little switch different resistances You know again, like I said though the inexpensive fee of 10 20 40 cent chips are going to be a couple ohms But you can get one that are, you know, very low homage under one ohm Resistance you also get ones that are massive, you know 64 circuits. So just kind of bonkers You can't imagine how big this is. Yes. This is like a beast 44 BGA, but you can get it All is available What we want actually so this is the 4066 series. You just want to, you know, show a couple options in the 4066 Family Let's just look at the active ones for now and Only surface mount although they are available in through hole by the way, I did use them in lab when I was a student They were very popular There's a couple standard packages. There's the DV QFN there is the SOIC and The T-SOP that we're actually going to use the T-SOP in our design and the LVC is a good family to use it can run from three to five volts and Trying to remember if this voltage Yeah, so I would run it at five volts and then, you know, I'd use three volt signals to enable it But then if the external voltage was higher than 3.3, it would be fine for my switch I wouldn't have to deal with Dealing with the above the you know, it's a little tougher to switch voltages that are above your power supply rail So I think this is why The digital designer decided to go with the 4066 so Your enable switches three volts, but the external voltage is five You power this from five volts and then now you can turn on and off and connect those pull-up resistors to the through the analog SPST Without having to worry about like oh now I need like two layers of fats to make that higher voltage for for switching them So the VHT so this is probably I'm going to end up going to the LVC. Sorry the LVC series is good Once from a fine voltage, you know, it can Fairly low on resistance six ohms not gonna affect it each switch can handle 32 milliamps plenty Because again, it's just a pull-up resistor and it's also fairly inexpensive. So, you know, you're you're talking about like 40 cents 40 cents in in a reel at a time So a good price and so, you know, why not just do this with Fets on your own you can but for 40 cents You just drop it down and you're ready to go. So this is my Great search pick of the week