 Adafruit would again like to remind parents this Halloween to please carefully inspect your kid's candy Oh for crying out loud We will never give you up and they never give you in whatever uh Happy halloween everybody halloween eve eve. Yeah, let's make a candy for uh versions of doom and uh rick rolls Yeah, um, thanks to phil b for making uh simple areas videos to cheer us up Um, and I hope everyone's having a good night finishing your costumes or going to parties Or coming home drunk from your parties, but we did some engineering today instead Uh, we actually got a bunch done, which is why we're filming a little bit later than usual Um, it's still hacker o'clock here at desk of lady aida Um, let's dive right in. Yeah, let's do this. What are we doing first? Okay, so first up Let's go to the computer. Um, so, you know, we've been revising a lot of our um tfts, um, we've got a new tft supplier Um, they can basically make the tfts that we've been getting from our supply that we've had for the last couple Years decade, but um, the prices have come down a bunch and they're you know, the display's nice and bright Um, and they seem to be really good quality and I was thinking like while I'm Revising the the products to use these new tfts because it's like a kind of a big revision Like we know it's not uh, what we call a mix and match revision This is a good time to go to the pcb and also make some pcb revisions because like why even I don't have to change it There's a couple things I wanted to update. So, um You know in this original design, this is really old You know, I use a lot of 0805 parts, which I think is fine, but I really wanted to add an iSpy connector So that especially for this board because it has iSquared C for capacitive touch And you can use spi for the tft display You know, I wanted to shrink down these soic connectors to t-sop because also, you know, we don't need to use I originally picked so I see because um You know, we had this really big pick in place This is a really old product Uh, and you know, we used to have this pick in place It was like not as good as the one we have now And it really wanted like the bigger the part the better Yeah, I found that you know for especially these, uh, 245 74 Lvc 245 Getting them an sys package has not been as easy lately It's actually been easier to get t-sop like, you know, didn't t-sop is still huge So I want to revise that and also, um, you know with that space that was left over to make a iSpy connector So let's go to the overhead and I'll show the new prototype Um, so now it looks like this, you know green prototype PCB so you can see I just shrank these down Um, and you know the pins are the same Orientation they're just tiny or so. Um, all the traces shifted and then that gave me a little bit of space This is actually moving up a little bit. So it's even with the, um SD card Uh, but I have it here just hooked up to my key pi and then let me just uh Plug this baby in Okay reset, okay. So this is the uh standard uh capacitive touchscreen drawing program Um, you can pick a color and you can draw with it Uh, so it just shows that the spi interface is working in the iSquared C interface working and the irq is also working There's an irq line Um, and so what's really nice is there's no soldering, you know, you just you just connect an fpc to this Uh cable so you know again, you know the 1.3 htft will be revised the 1.54 inch the 2.2 and the 2.8 like i'm just as i'm Switching them over to this new um display provider Adding iSpy connector just something i have a meaning to do so it's kind of like i'm using this as an excuse of like, okay You know, let's just do one revision and then be done with it. So Um, that's coming along so that that'll be you know, what's funny is we have 12 in stock of the the current Old version and it's still perfectly fine. But when we went through when we're done with those That you know, that's when we'll do the changeover. So basically the changeover happens when we get close to out of stock of something Um, I'll do the revision that's okay So the exciting thing that I worked on is I'm finally like trying to like get some stuff done from projects from earlier this year So, um, one of the boards that I didn't That I started actually december 2021. I laid it out and then I never We ended up not being able to get some parts and I was just like, ah, I'm doing a lot of things Um, but I do want to finish this is the scorpio board so this is the rp20 40 and I've got a 74 hct 245 it's also a level shifter similar to the one on that capacitive touch display This one takes a three volt logic signal from the rp20 40 and shifts it up to five volts. Um, and then gives you eight Five volt outputs with matching grounds. Um, great for driving, you know, neopixels or anything that needs Five volt logic, but especially neopixels because the rp20 40 has that pio um programmable io state machine system Um, and we've you know got neopixels one of the first thing obviously It's one of the first demos that people wrote with it And then we got the eight strand neopixel code working with it And then we got the height at the hdr neopixel Um library working with it as well so you can actually get like sub Timing dithering going on not a lot just two bits of dither but still, you know more than zero Question came in because you know there's a way to life. Uh, the previous thing you showed off Will the revision be drop in compatible? It's otherwise drop in compatible. It's just like I just added this connector So, you know people who use the old, you know, if a lot of people have used the old versions and their designs They're like I need the paints to be the same exact everything's the same. It's just like if you want to now not You know soldered in because I do see people who are like I just want to connect To it as a tft breakout. I don't need the eight I expose the eight bit interface but a lot of people don't need it and honestly, you know SPI's really the peripherals for SPI are so fast these days originally when those breakouts were designed They were designed when you know people were still using Arduino UNOS and eight bit interfaces Sorry eight bit microcontrollers Your SPI interface was like two megahertz maybe right but your eight bit you could bit bang At much higher speeds because you could write one Um, you could write one port at the same time. So if you had that eight bit aligned with your gpio You could actually like slam through Your graphics very very quickly nowadays to be honest What i'm noticing is that bit bang gpio is much slower on a lot of chips like on the esp 32 bit bang gpio is not You know, it's not anywhere in year as fast as that processor speed It goes to a secondary bus But spi when you dna it which again didn't exist on the eight bit microcontrollers, but now you have dna on almost every platform Um, it's blazingly fast. So like, you know, we have these boards that expose an eight bit interface Honestly, very few people use eight bit interfaces anymore. It's not it's not significantly faster than spi Even though tech, you know, technically the spi is overclocked. You're not supposed to clock those displays at 60 megahertz But you can do it. It's fine. I won't tell anybody Anyway, so the rp20 40 scorpio uh board so, um You know, I wanted, you know, like I kept revising because I was like, oh, I want a stomach ut connector on it And uh, you know, put the a megs of flash and then we want a nice silk screen. So it's basically a feather And um, you know, it turns out that if you arrange All the pins there is actually like gpio 16 through 24 are available 16 through 20 whatever Are available eight in a row eight Gpio in succession, which means that you can then do Pio tricks because you have to have all the pins in succession for them to be Easily addressable. So, um, I got that going. So here's just a quick Demo, so I've got this like ultra hdr neopixel strips. This is like, you know, 300 leds per meter and um, you know, you have to power the led separately, but then um You know, here's here's it driving The this pixel strand demo, um, does, you know, a pulsing Uh strand test throughout the color space. So, you know, this one is Now it's yellow and then if I had, you know, eight of these these would be all going at the same times This is yellow green green teal blue purpleish And pink so, um, you know, this is the this is a strand test for neopixel eight Obviously, I only have one strand of neopixels, but I can drive eight in a row and you know, the the rp20 40 also has a ton of memory 256 k 264 k of ram and so Um, I think you do the math and it's like you can do eight strands of like 500 pixels a piece easily You can just buffer that much much memory. Um, and unlike the um sami 51, which I'm not going to get for like two years You don't have to like expand The bit space to dma it like the pio is like it can use you can do it at a bite at a time. It's a little bit more Um memory smart like with the some like I think the teensy Neopixel dma also you have to like expand The bit pattern and then pulse it out and it's okay, but it just ends up using a lot more memory than like If you're shifting the data in one bit at a time and you don't have to like expand it um For for the dma axis of the dma and g pio axis. So the rp20 40 is particularly well suited for this There's also an hdr mode um So the hdr mode doesn't do um As long strands it's only for like 64 pixels in a row, but it's um It's spatially dithered which is you know, it's going to be hard to see here, but basically You know as you get to the lower brightnesses of neopixels because our brains and our eyes are long rhythmic um You know doubling the amount of current through something doesn't double it actually is more than double the brightness like it's it's quadratic So getting Low brightness leds require gamma correction, which means that you have to Um, you know, you're you're you start seeing noticeable differences because our eyes are more sensitive at the the lower range of brightness What you can do is is Subtemporal dithering. So you're writing the neopixels and you write them so fast that you can um fake Like you can kind of fake pwm than neopixels by um Writing, you know ones and zeros to to pwm you know within What your brain can see and these are running. I think at 400 kilohertz pwm Sorry 800 kilohertz update rate. I think the pwm rate is like Yeah, it's a 10 kilohertz or something basically you can do two extra bits Of data before uh, you run out of time. So You know it goes from basically being eight bit color per channel You know eight bit red green blue to 10 bit, which is still again, you know better than nothing Um, and and some people especially when you're doing very subtle lighting effects will will enjoy it So this is just the demo of that and then On the bottom of the board um You know added two jumpers So you can change the buffer from being outputs to input So you use this as a logic analyzer where it would take it could take up to five volt uh input signals Um, and then shift them down to three volts for you and then you have a connectable buffer as well So, you know, I know that there's people have turned rp2040 into um a logic analyzer with Whatever that free logic analyzer software is I don't remember the name of it off the top of my head, but um, You know, you get eight channels and again with pio you can and and all that ram You can do pretty fast pretty good, uh data capture, uh for logic analysis So, uh, you know, if you if you can afford a salae get one if you can't maybe this board Will do the job and then of course it's still a full feather and you can use, you know, you can attach You know sd card if you want very easily because it's just you just plug it in a data logger wing You want to add a tft? You want to add? um Sensors whatever you want to add an airlift with wi-fi to make it be wi-fi controllable, uh go to town. So that will be um Coming soon. I think this is done now. You know, I've gotten everything working And I tested it. I just kind of had to wait till all the parts were available, especially that um Tqfm level shifter that was being a little bit difficult to get but now it's available. Yay, you know, you can get it Showed up at uh at uh, Rochester. Did you key in Rochester had it? So I was able to order A thousand pieces so that's good You want to do some great search? Yeah, so I thought what uh, what I'd show Um, all right. Let me start this intro start the intro It's not a great search. What do you buy? Did you key in a deferred every single week lady to use their power of engineering to help you? Yes, you find the things that you're looking for on gtiki.com lady What is a great search of the week this week? Okay So this week I'm working on this neopixel driver board the rp2040 scorpia, which I just chatted about and neopixels are driven with this a square wave that is Manchester coated the the width of the pulses is what determines Um, the data being sent which means you can use one wire and you don't have a clock in data You have one wire and this is gonna be very handy because it's very convenient for wiring. It's very easy to do wiring And this board has eight outputs So you can see here here's uh, oh, let me go to the computer and I'll show the um So you have eight outputs here And each one is driven by this high speed microcontroller the rp2040 which is running at like 133 megahertz And the um bit pattern is 800 kilohertz, uh clock speed But the And it's level shifted as well. So there's a level shifter here. You can see the the 74 hct b 20 74 hct 245 bq which is the tdfn version very compact version because they don't have a lot of space um, but the the thing that we've noticed is you know, um Having that level shifted up to five volts is really good. You really want a nice nice five volt signal But sometimes the strands of wire that reach from the Uh, new pixel driver to the new pixels can be like multiple meters and we tell people, please don't do that And they do it anyways So the problem with that is you know, you've got the capacitance of the line And you've got this very strongly driven five volt square wave Um, and if you combine a very strongly driven five volt square wave with a very long wire, you get ringing Um, and that's why normally you would have a terminator at the end But we we're not going to force people to have termination at the end They're not going to do it But the good news is that you know, the widths of the pulses can be there can be a little bit of variability because every new pixel we Um reshapes the waveform and so instead what we'll do is we'll just put A little bit of resistance in line With each output and you know that combined with the the capacitance It'll smooth out the curve a little bit. I'll keep it from from waiting the capacitance inductance I'll keep it from raining as much You'll get a little bit of a you know, it'll be a slower rise time, but you know what that's that's fine. So um, the only problem is is that like I really had very little space left over Because I needed you know, all the feather circuitry which was here and then the rp 2040 which You know, even you can see I did a 7 7 rule It's a two sided board, but I have to get so many traces around It was it was just difficult to make a lot of room There's a lot of capacitors that you need and you need this flash memory and you need this crystal And you need this neopixel so in the end and you know the stem and qt I really had almost no space. I had like two millimeters of space And I was you know, I was actually trying to figure out how to fit it all in And even a 402 Uh resistors were like I couldn't stack them up next to each other and then I realized like oh wait I can get resistor packs In a 402 and then I realized I don't think I've covered resistor packs on the great search So let's go to the overhead and I'll I'll show Some off Because they are Very very handy Um, I mean we see them a lot in circuits, but you know, I feel like beginners don't always Know to use them Um, so basically Yeah, I know I gotta back it up There's a minimum distance. Okay Um, so, you know, I've got uh, you know when I revised this board for example There are you know a couple spots where I have individual resistors the problem with individual resistors Not problem. I love them and everything but you do need to have pretty big pads on either side Um because they love to tombstone whereas with resistor packs Like for example here, I've got four LEDs in a row You have four LEDs in a row and you can make them all use the same, you know choke resistor value one, uh resistor pack is the same size as a single 1206 resistor or you know 0805 resistor basically but you get four in a row and another nice thing about them is Um, they don't tombstone. I found there they as long as you place them straight on Um, they are they're they're wide enough and they're kind of heavy enough that they don't seem to lift as much So, you know, the pads are smaller and it's okay Um, I'm not having any issues. This is a 1k. I think it says No, sorry, it's 472. So it's a uh 4.7 k Because you're very bright. Oh six or three resistors 4.7 k resistor pack Um, the resistor packs tend to be 5% not, you know, you usually get 1% uh precision Although I think you can in some values And then this one is just it basically is just four or four or two resistors, you know all in a row But it's even more compact because you don't have to have space between them and it gets placed as one component Likewise on the scorpio board here Again, I have a lot of space And um, you know, I'm not against using o201s, but like You know, it's o201s are are tough to place These are basically sorry. These are two one equivalent. These are This is uh a weight of four. So this is Oh 402, sorry, these are o402 Size resistors the other ones were o603 size resistors are packed together. These are o402 pack resistors and you know, they're very compact But you know, they place very nicely. I've had very few issues even if Um, you know, the pitch is actually not that bad um, they definitely fit within an eight eight mil rule And uh, they're inexpensive and then you know, I was able to basically where normally the traces would go through They fit perfectly in between all the different traces Um and allowed me to do to have a little inland resistor without a lot of effort. So let's go to the computer again and we'll I'll show it. So then you can see here Um, very compact and this spacing is almost identical to the spacing of this component, which is uh 0.5 mil So these are about 0.5 mil as well, which again is a very standard pitch and you know, you're you're You're not going to have to spend more on manufacturing for 0.4 0.5 millimeter Pitch 0.4 is where it gets a little bit nasty or below but 0.5 is fine. So these are well within a reason and these are Four times o402 so these are o408 These are uh eight mil by four mil. Okay, so let's go to Oops Digikey So let's go to resistor And I'll show you so um resistors are so many resistors that actually have multiple different Categories just watch out because it's like you're not going to find them in one one category There's a through hole and the surface mount but resistor arrays are actually a totally separate category. They're not part of the surface mount resistors Um, I also actually use these for Uh, I tell you another thing I use them for is the um spokepaw boards Which we don't really make anymore, but let me uh Show you the kit and um, these were great for the spokepaw's hold on this is the Oh, it's not invisible on this image. Hold on Oh, they are but they're stacked. Oh, you're there. So these yellow leds here um These these are these yellow uh resistors over here Those are bust resistors. So they're a resistor arrays, but you get they're nine pins And you get eight leds and they're all they all have one end connected together Their bust and then the other end is um left over. So they're really great for led, you know choke resistors basically You know each spokepaw had like 30 leds And I didn't want to also, you know, you have to solder on the leds But I really didn't want to include 30 resistors Um, and I wanted to have some I wanted to have the even coloring So you have to have choke resistors. How do you deal? You know, how did I minimize it? You include a resistor pack because it was easier for people to solder So good for surface mount and through hole uh usage, but that said Uh, we do want to have a surface mount version We're not looking for through hole and then the next step the value so um, you know, basically the the value is going to be 100 ohms um, again, you can get Weird values like one percent or point one once in a while, but really your resistor packs They tend to be about like five percent only like those are the easiest ones to get the five percent values um So go with your nice even 2.2 k 10 ks Etc um They also have like voltage divider versions. I said bust versions where you know, you have nine pins eight Resistors and they all share one Common pad, but we want isolated. So they're they're individually Separated each one is a unique resistor. They're just glued together side by side Um, they do make them in four and eight. I could have picked eight, but I happen to like the four packs And I just put down two um, so I'm actually going to do in stock and uh, no marketplace. I just see what's in stock at uh Directly at eight of four and you can see, you know, you can get the eight packs um, you know, you see this a lot on um, like computer cards or anything that has a bus You know, you have an eight port bus and you'll have a resistor pack or something, you know inline or um You know, this was another eight resistor pack 1206 We want a four resistor pack because again force Two I feel like it's two little eights a little bit too much For us nice in the middle And then I want it in that tape and reel Secondly, I want the package now remember, um There's basically three packages of resistor packs. There's the 1206 package Which means it's the size of a 1206 resistor and it's equivalent to 40603 resistors back to back There's the 0804 which is 40402 resistors Back to back and then I never used the 0502, but that's clearly the 0201 resistor That's going to be really tiny. I mean, you need a lot of resistors. You don't have a lot of space go with that I want to go with the um 0804 because again It's 0.5 mil spacing. It's within reason And then um, you know, I can just sort by you know price Let's see you get a wheel wheels tend to be about 10,000 pieces Um, this one has a lot of stock. This looks nice and generic. Let's look at the specs again five percent You know, so just be aware just be aware like not good for precision resistor needs Eight pans, you know, it's kind of your standard resistor um And it's in stock and you know in quantity it's about a cent I'll say that if you're You know one thing to keep in mind because you know, I'm trying to use more resistor packs is There's a temptation that when you look at your raw bill of material cost It is cheaper to go with individual resistors like individual resistors are basically like free their tenth of a cent So this is actually more expensive than for individual resistors however When you go into manufacturing, you're going to be paying per placement usually um because each placement takes time and so You know chances are you're paying not per joint Only but per component pickup If you're paying for paying per component pickup and your pickups are, you know, two three cents a piece, which is pretty common It's still going to be cheaper to go to resistor packs. So you'll be surprised even if I don't always use all four resistors Sometimes I'm only using two or three. It's still Cheaper and faster and easier to use a resistor pack. And so you'll see I really like them All our stem acute keyboards have a you know, 10k resistor pack because and the mosfet's dual a dual pack. I just Pick and pick and place them again. They're a little more expensive than the individual but the size and Uh, manufacturability is superior in my opinion. So um, I do recommend resistor packs Even though there's they're not something I learned about till after I left school because they're You know, they're they're kind of like a weird, uh mutant shape of a common part But this is what I would you know, I ended up picking for the Inline resistors and uh, they work lovely and they picked and placed very cleanly Um, so hopefully this is the last piece of the scorpio board. I'll get that fabricated That's a great charge All right, everybody. Thanks so much for coming by tonight. Have a happy Halloween Don't forget to check that candy for turning complete Ingredients all week. We're girls. Yeah, and we'll see everybody out throughout the week. We have a whole Cadre that work of shows and more collection. Yeah And uh, we'll see you