 And we'll just let you leave a Mario Kart edition everybody. Which funny we actually saw a Mario Kart on the street today Yeah, we just got back from the office and that's our kiddo zippin around. Yeah, it's a remote control So cheap she's a driver's license. Yeah, that's what we'll tell everybody. Yeah Okay, so it's me lady. I'm here at my desk. I'll work on some hardware So this week on the hardware you can see on my screen that came in To get put together is the bus pirate RP 2040 version which Maybe you call circuit Python. Maybe a bit blast or I don't know. We're gonna call it something We don't know exactly what yet. I'm calling it circuit pirate for now, but it Name might change or just need to you know have something for the folder name So let's go to the computer real fast and I'll I'll just go do a quick overview because it's been actually one quick thing We had a bit. Yeah, we're running a little bit behind tonight. Sorry everybody We had a visitor Eric can from seed studio stuff. I also Zach from Particle. We're starting to do things more and more. So Thanks for visiting and we have some maybe some surprises and some collabs that we're gonna be doing with seed soon Anyways, yeah back to the show. I forgot back to your computer. I'm wearing the same shirt as yesterday Okay, so back to my computer So this is The the bus pirate which is this open-source public domain board you can see here had a mini USB FTDI chip Pick chip and it had this little like jumper cable out here that you could connect To all sorts of chips and modules and things to you know do interfacing with the buses So, you know, we we stocked it and you know, it's unavailable. So this is the latest the 3.6 the latest version You know, it's got this you can see here the The header with the labels for all the pins. It's got these LEDs power to let you know it was powered USB like data transfer mode and then Wait, this is upside down Why is upside down weird? mode and then the regulators because there's two regulators output I was one of the things I really liked about this design is it had these regulators that Three volt and five volt output and you could the enable pin was tied to a micro controller pin So you could disable and enable the output power pins, which were over here Auxiliary and then it had SPI, but he could also do In addition to SPI he could also do I squared C and I love digital inputs and it was really cool as it was a completely public domain a creative common zero, which is really cool Unfortunately unavailable and I think probably because the chip shortage got discontinued We had around it maybe revising it updating it and using the RP 2040 Which is not a full drop in compatible chip, but maybe you can do a lot of the things necessary. So let's go to the overhead real fast So this is this is the one I'll show this is the demo so this is the board I thought I would just point out some of the things Here and then I realize I don't have something to point with Let's say Grab a pen So we do an autofocus lock. Okay, so the RP 2040 chip and then this is the Megabytes of SPI flash a megabytes of the ton. We don't need that much But maybe if you're programming a chip you have the firmware on the flash and that like in the file system And you know, you can have a standalone programmer We talked about this is the analog switch Which is used to connect and disconnect the external pull-up resistors They're a very interesting technique for interfacing with five volt logic Even though the even the original bus pirate was a three-volt chip. This is also a three-volt chip I added a couple of things like the stem IQ teaport and a mode switch To connect between there's a couple different You know, we're not different modes for use like if you want to have one circuit Python And have the rebel be available or maybe hide the rebel and only have the user interface available The reset button what you need, you know always and then the boot button, which is also a user button This gets you to the bootloader mode and a couple extra LED So we have that standard power LED and the mode LED I added two LEDs one for each regulator three and five volts And then Rx and Tx, you know, I thought this could be like activity. Maybe I don't know I But these are really cheap. So I threw them on Neo pixel down here, but yeah, I'm thinking maybe put the Neo pixel up here instead. I don't know And then a little bit of analog circuitry just to kind of help interface. These are the regulators So the onboard 3.3 the external three and five It's a five volt fuse crystal and then a couple resistors to keep the USB C happy and then that same header That connects and what's neat is, you know, this is the demo board version This is running my little demo the original Buspire one of the things that came was nice. It came with like a cable set that made it easy to use and You know, even though the RP 2040 is not the same as the pick chip, you know, totally different families The pick is you know pick 16 and this is an ARM Cortex M0 and it's you know Got it's got some cool stuff like PIO, which I think would make it Very useful, I think and also Pico probe, which is the open OCD port so that you know The RP 2040 I think is a really good chip for this core Sorry for this project But there's there's a couple things that were a little complicated that I'm still kind of working out so You can see here These diodes so Can you go to the computer real fast, maybe? So the diodes are Here and The idea I had is you know the thing that you know, what's interesting is your original bus part only did For sorry for ADC's to monitor the two regulators auxiliary auxiliary output so the ADC outputs and Sorry, I remember so there was the ADC the external voltage and the 3 volt and 5 volt power supply. So the fact that the RP 2040 only has 4 ADC's actually is totally fine because you only need 4 ADC's and It definitely has enough GPIO One thing that's a little annoying is you know, the the pinmuxing is identical, but you know You can mimic I scored C very easily It doesn't have open drain connections But you can also mimic open drain by like switching from output to input and then using these external pull-ups But the thing that was a little it's challenging was the pick 16 that the bus power used was 5 volt Friendly like you you could it could accept 5 volt signals even though it was running at 3.3 volts It's just something about that chip. Some chips can do this. I know the STM F103 I think very popular chip has some pins that are also 5 volt compliant And so you can use that to interface like some people use it interface with like SCSI or something Which is a 5 volt protocol even though you're running on a 3.3 volt microcontroller The RP 2040 is a 3 volt chip and it didn't say 5 volt compliant. And so one of the hacks that I do often You know, I was like, well, I was gonna rush to kind of get this out And I was like, well, I don't think it's gonna work, but I just popped it on anyways is What's called a zener clamp? And so if these signals these signals go through a 1k resistor and then they have a 3.6 volt zener diode Reverse connected. So if this voltage Let's say this SDA 0 pin goes to 5 volts This Zener will hit 3.6. This is a little, you know, plus or minus 10% That's why I use 3.6 not 3.3 because you know, I want to get a little bit of room in either direction It'll hit 3.6 volts and like turn on And clamp this voltage at 3.6 and then you'll lose that five minus three point six the You know 1.5 volts across the 1k resistor 1.5 milliamps will get drawn from the five volts Supply the digital output and it'll clamp the voltage and you have used these voltage clamps all the time They're looking, you know, they're also good for like reverse You know Voltaging if this goes below Zero volts this will also clamp the other direction So it's you know, these these are like a very inexpensive. They're too sense of peace an expensive way to limit the voltage And this would work great if this was digital IO and this input was five volts again You know as long as the thing that's pushing five volts in can supply one and a half milliamps You're good to go promise. I forgot we're not accepting five volts in as a digit Like you may get a five volt logic level input from like a CMOS push-pull output But for the most part we're probably going to be using this Pull-up kit here where we use the 4066 to pull up Those voltages and here I actually kind of messed around with this and made this 1k But this is actually So as I kind of messed around these are all 10k pull-ups the very weak pull-ups because they're meant to work with I squared C you know or I Think SWD maybe also is is open drain so This doesn't work because When this pull-up is enabled you've got a 10k you know from v external might be five volts Through the 10k resistor and then through this 1k resistor You're not going to be able to get 1.5 milliamps because you've got that 10k resistor. That's that's acting as your choke so This Xenodio needs a fair bit of current to kind of activate and without that It kind of floats at a lower voltage. It doesn't clamp at 3.6 to clamps a little bit lower So it doesn't work very well with pull-ups, you know, I should have remembered like oh, right I'm using pull-up resistors, but hey, that's why we do board spins We learn from our mistakes and we do more so I was kind of like what am I going to do like it's it's not easy to have a Digital input be protected against five volts and also be able to have you know, there's there's a lot of chips that do Level shifting bidirectionally, right because you want bidirectional and open drain support the TXS 0104 can do open drain the TXB 0104 can do digital But they can't do each you know, you can't do both and I wanted to work with both SPI and I squared C and one wire and like who knows what else protocol so That's kind of like what do I have to give up right because I'm in I'm in trade-off land and then like oddly enough I was kind of like googling for something different and I bumped into this article That linked to a post from Evan From the Raspberry Pi Foundation. It's like this project that does you know some PCMCA thing and they're like well, it's five volts but like They just plugged it in and just say hey whatever like let's just blast five volts into there and Evan said actually Even though it's not documented The pads are five volt tolerance just not five point five volt tolerant which means that You know, there's enough inputs you know current limiting and diode protection To keep just if you put five volts in you'll be fine, but five point five It's not guaranteed Also, it's not a bad idea not to guarantee this because people just like big. Oh, I connected six volts in why didn't it work? Right because you can have you know plus or minus couple Point X volts. There's a really good app note from Microchip and it's just called like Just like tips and tricks we will tip the tricks and they had a whole mess load of different ways of doing Level shifting and and what schools add a bunch of like Xena diode stuff to it's okay You want to make like a really cheap three volt regulator? I use a Xena diode. I love Xena diodes. They're great They also do a lot of three to five volt level shifting You know and I've used a bunch of these tricks to do this diode offset I've done this before Voltage comparators plus or minuses and then don't forget again inside of every microcontroller Well, almost every my controller the once in a while again, they might not have this double diode protection there's these clamping diodes that You know, you can kind of sort of mostly get away as long as this R serial this like choke Resistor at least it's high enough The only problem is that the way this resistor and this capacitor form an RC filter and so it'll slow down high-speed signals but as long as You don't have enough current that will blow out this Diode and like the diode is not going to be like a power. It's not a one-watt diode It's going to be you know, who knows me 10 milliwatts 100 milliwatts something You can dissipate that current and you can have five volts inputs and there's a couple other Options, so I might look at you know one thing is I'm thinking if it's already five volt compliant What I might do is just keep that 1k resistor and maybe I'll email, you know the RP 2040 folks Just be like hey, can you tell me the wattage of this diode and just make sure I'm well below that another thing is though when you have this current Going in here this five volts minus three volts. This is you know one point five volts across this R-sir Whatever that current is that current is going to be injected into VDD And so your VDD will start rising a little bit and I've seen this there sometimes there's boards that are like Hey, yeah, like the inputs are five volt compliant But when you power it from three point three volts and you put five volt signals into the pins The VDD starts floating up higher and higher and you know, maybe like one or two IO pins It floats up to three point four three point five But before you know it, you know, you have a couple of IO pins being fed five volts It starts to float up to Four volts so and then like now your chip may be out of spec because it's not spec to have the VDD that high so Things to watch out for you can also of course have an external Clamping diode and then you set the wattage You're like hey, you know make it as big as you want and they have another option here where this They talk about the diode clamp A cheap way to do it, but if you want you can use This transistor clamp. I've never done this trick. So I think this might be interesting. I might check that out Okay, so that's that's where I met with a bus pirate. I did write a quick hardware test you know, I love doing this because this is a fun way of verifying All my hardware capabilities. So like setting up the neopixel when you saw it it floating around and then Let's see if I can run this test So I just have a you know, very basic test that scans the I squared C and maybe they'll plug something in real fast So you can see it change And then we'll move on to So now, you know, you can see that the secondary I scored C finds the 70 address and then Remember that internal ADC measures the three and five volt external voltages and it you know, just verify that it works fine It works fine So I'm still gonna be able to use this hardware You know, I can just remove those Zener diodes and just start playing around with this hardware I'll do this over a vision maybe with those other clamp Techniques, but it's tough because it's again It's like it's very easy to shift if you're just doing I squared C or SPI or one wire like only one of these protocols Oh, yeah, there's like a really easy way to do level shifting or low protection But if you're trying to support all of them and 1.8 volts like it seems get a little bit weird and funky anyways So that's where I'm at. Okay. So Let's get on to the great search The great search brought to you by did you key and a fruit every single week Lady did use a private engineer and help you. Yes, you find the things that you wanted to key calm lady What is a great search of the week this week? We're looking at Zener diodes. So let's go to the computer and I'll show my moment of zener So Zener diodes are great for a bazillion things one of the projects that I've been working on is this protocol interface That is supposed to be five volt compliant And one of the ways I'm doing that is using this zener clamp to make sure that the inputs coming into these GPIO pins Never really get above three point three three point six volts and I've realized, you know, people will realize how amazingly wonderful Zener diodes are. They're great. They're wonderful. I mean, they're they're a dessert topping and a floor wax Some fun tips can be found in this document. It's just called the three volt tips and tricks And the particular technique that I mentioned, there's actually a couple in here So one is using a zener as a very low-cost Regulator or power supply or like whenever you need a voltage reference plus minus 10 volts It's not precision, but sometimes it's okay. Sometimes you're just like look I just need about three volt input to buy us something You just need a resistor and current going into the Zener diode And this will kind of sit at whatever, you know, this is rated as the three point six volt zener This will be around three point six volts So that's a zener power supply and there's a couple of notes about it A zener clamp, that's the voltage Protection circuit that I mentioned before The voltage going into here as long as this resistor makes the bias into D1 about Five milliamps or so or or Less, yeah, we're like five million. I mean, it's not you depending on the wattage This V out won't exceed the reverse voltage of the zener diode. There's also a Great tutorial by evil mad scientist is over ten years old, but Zener diode never go out of style So check it out interaction to Zener diodes by EMSL Wonderful scientists over in California and I tackle all the different tips and tricks that they use zener's for again, like You know simple voltage regulators level shifters Making you know stacking them up to make multiple reference outputs from a higher voltage supply Because they'll have that Positive they act like a normal diode when forward biased with like a point seven volt drop But on the reverse bias they can have an adjustable drop And so when you purchase the zener diode, you'll have to specify what the reverse voltage breakdown voltage you want is And we'll show that More more tips and tricks. Here's a fun one, you know, they use this to drop 36 volts input into a five volt regulator They just need to like lose 10 12 volts a 12 volt zener will do it as long as it's Rated for the amount of current and then the voltage drop across it. So that's something to watch for Zener diodes, let's go to digikey and check what they've got first off You have you wondering am I at the digikey site because the logo looks different. They just did a Logo refresh that they're going with a brighter red color, which I like and then losing the dash and the digikey I think they did a post on social media also about their rebranding. I like it's a little bit more modern I Personally think that the D like the the D in the center of the D like reminds you of the catalog sitting on my shelf for You know decades, maybe that's what the D stands for So they've got zener diodes. Do they ever? Hundreds of thousands of them almost so there's zener kits And there's a zener diode arrays, but we'll just look for the single zener diodes Looking for you know active ones In stock not marketplace so it gives us down to you know 9000 So the reverse voltage, so there's a couple of standard voltages There's a few you know families that are popular. I tend to use the mm series. It's made by them. Yeah, they're made by multiple different Manufacturers and they come in kind of set voltages like every point three volts It's like one point eight two point one two point four two point seven three point. Oh Three point three three point six, etc. Etc They go very very high, but for for what I often am using the Unisport, which is again clamping a signal down from say five volts down to 3.3 volts I'll let you just 3.6 volts in or now you're wondering why aren't you using a 3.3 volt? Because oftentimes I'm not biasing with a full milk five milliamps and most of them are rated that Voltage that they're rated at the nominal voltage You only get when you're putting a significant amount of current through But if I'm taking this up to some other digital signal, I'm not usually getting a full Five milliamps. In fact, this 1k resistor is limiting me to Your 1.5 Volts across 1.5 milliamps through the 1k resistor This is gonna be you know 1.5 milliamps I've measured it never quite gets to three point six is usually like three point two three point three so let's look at Again, but you can get any voltage you could possibly want including three point three So let's look at three point six volt Zener and then I'm gonna do surface mount because Personally, I'm gonna be using surface mount, but they have through hole, you know It's one thing you can definitely get through hole forever our Zener diodes and Basically, you can get, you know any package you like and the thing you're gonna walk want to watch for is No, wait, did I click three point three? Sorry. I meant three point six. So let me Let me delete the nominal voltage And then go back and I'm going to select nominal 3.6 Um Apply and then don't forget you always have to have, you know Zener die is the only work when there is a resistor you always have to have a resistor to Limit the current and the voltage that's going to appear at the So that this reverse voltage has there's some The Zener diode has like a three point six volt reverse voltage If you try to put full five volts directly on it It doesn't like regulate it. It'll it'll try to pass all that voltage through Um, it'll draw a lot of current and it'll blow up So you need to have much like an led needs a choke resistor. You do need to calculate your choke resistor How do you calculate it? It depends on the milli wattage of the diode So you have to figure out with that voltage drop across the reverse biased Zener Three point three three point six and how much current is going through it. You can't go above the milli wattage so It's a trade-off right if you're if you're trying to drop a huge amount of voltage With a lot of current you're going to have to go big. So these tiny sod three two threes You know good for those little one one point five to five milli amps little little signal level shifters If you're trying to use it in a power supply Um, like we showed with the evil mad scientist example of using it to drop the voltage into a regulator You're going to need something much much bigger. Uh, you'll need like a one watt or a two watt zener and they make them in those Um wattage, but you might have to go through hole to get that physical size Or you could always, you know, use multiple ones. This one looks like, uh, you know, it's chunky It's a do two one nine. They be 800 milli watts you can get them in, you know, you can look up here For the power max You can get them up to like a watt or one half, but again, we're doing it for signal We don't really care and I do like the sod 323. Um, I want it to be nice and compact So i'm going to pick Um that for the size The rest the 123s are a little bit bigger. I don't I want to kind of minimize space and, um You know, there's there's a there's a lot, but this one's a really, you know two two and a half cents on semi So I know that they're going to be able to always have them in stock I'm not zoom in Um come and tape in real and then, you know, look at the datasheet for Um specification I will say that they're jelly bean parts the mm 3z series, you know, they're available for multiple vendors Um, they'll just have that different 3v6 Where the xxx is in the in the datasheet? Um, you'll get different voltages from 2.4 to 7 75 volts Um, but still not a bad idea to look especially if there's um an impedance And what current it's expected again 5 milliamps is pretty common That's a good idea to look and the variation you will get variations for the 3v6 like I said can go as low as 3.4 to 3.8 at 5 milliamps um But I don't usually drive them at that Current usually drive them at a lower one. It looks like once you get to the higher voltages They're expected to be driven at 2 milliamps instead So zeta diodes, they're amazing. Uh, really they do everything I love to throw them into my designs for all sorts of like random voltage reference protection circuitry And they're really cheap Two cents. So uh, check out some of those links We'll have them in the description so you can read the evil mad scientist guide As well as the microchipped uh google tips and tricks pdf for these wonderful zeta diodes And that's our show for the week this week. Thank you so much Everyone for joining us get a little glimpse of what we're up to and more will be Online all week Tons of cool things tons of cool projects beep beep You'll see lots of factory footage new products We got show and tell we got ask an engineer. I got everything going on this week and more. We'll see everybody Later. Thanks everybody