 and on Desk of Lady Aida. Hey buddy and welcome to Desk of Lady Aida. It's Sunday night. We're here at my desk. Do a little bit of engineering and coding as well as some purchasing. Also just hanging out, enjoying this beautiful last weekends of the summer before September kicks in. Never want to pass up a nice night in New York. We went on this Ferris wheel. Maybe fill a little post up. Yeah, I'll post up some, there was like a neopixel-like thing on it, so that'll count. Cause someone will be like, why is this, why is there no electronics in this? So... There's no electronics in the Ferris wheel. Yeah, so I think I can get away with posting. Okay, cool. Posting that. All right, well, let's check out what we're hacking. Do you want to do, let's do this LED thing first and then we can show off. Yeah, what do you want to do? All right, so let's go to the overhead. So we have this design. This is the LED Matrix Driver that we put in the shop. It's lovely. It has 13 by 9 RGB LEDs. It'll break out, ready for use. And then we made the LED glasses, which is basically the same design, but just sort of exploded out. So it's like you could kind of even see. It's like this component is here and then all the LEDs are spread out over the glasses and so on and things that we did. We're gonna kind of put it off for a week, but this weekend we sat down and actually started doing the mapping of the LEDs. And even with this, the LEDs don't map perfectly into memory. The memory isn't like LED one is spot zero and it's totally even. There's actually a little bit of a memory map thing going on with that. And we had already programmed in this memory map before, but now we were like, okay, time to do the LED glasses. And the LED glasses are kind of weird because this is a straight up grid of 13 by 9 RGB LEDs. But this has two round elements and then like a grid element. So you can kind of see there's like a five by 12 grid of RGB LEDs. So you can have like kind of texture or like isometric, you know, like X, Y mapped graphics onto it. And then on the outside, there are two 24 LED rings. People like our neopixel rings, we thought let's take that same kind of fun LED glasses that round shape that people dig and then make it a little bit different than just a plain, you know, glasses that have X, Y. You know, you can buy those, they're available. We want to do something a little bit different. We also put together the LED glasses driver prototype, which looks like this. So this is an NRF 52 840, the microphone, accelerometer. This is an on-off switch. There's a slide switch that you can use to turn it on and turn it off. There's one kind of action button. Okay, I figure you don't believe me more than one. And then a reset button to reset the board or put into boot litter mode. USB-C and battery. And there's a battery charger so you can use this with a LiPo, but we're actually gonna make it by default not work with a LiPo. It's gonna be for alkaline batteries because you can't have a charger for both. You kind of have to choose one or the other. But I want to, I think by default, it should be alkaline batteries because I think those are, especially for something on your face. A lot of people aren't gonna be comfortable with having the battery taped to their skull and if it gets hit, it can get punctured, why risk it? So there's a little jumper that you can solder closed if you want to use a LiPo battery. So people who are advanced enough to use a LiPo, they're also advanced enough to be able to solder closed. You know, that jumper connection, I think that's fine. And then I'm just using a STEMI QT connector because one of the nice things is this is an I-squared C chip. So, you know, I can just use our, you know, ready to go shorty I-squared C cable to make this into, you know, glasses where this is the leg of the glasses and then this is, this plugs into the, you know, front side of the glasses. And then I think I already have a program on here that'll make, let me turn it on. Okay, maybe not, hold on, I was programming it with it. So let me plug into USB. All right, live demo. I know, live demo. I don't know what was on here because I was messing with it earlier. Oh, I was, yeah, I was writing some code, so hold on a second. I moved the LED map into a global so I just have to make it reference itself. Okay, there you go. So this is the mapping of the two rings. And so, you know, they look like they're, you know, when it's mapped, it's like, oh, like zero through one through 23 and they all, they go in order. But these LEDs are absolutely no way in memory ordered this way, right? And this is a thing that like kind of, I was chatting with some of the engineers and I was always kind of shocked at like how, you know, we have 30, 40, 50 years of combined programming experience and yet we're still kind of programming the same thing. Like programming has changed, but it kind of hasn't. So doing memory remaps or debugging with printf or like programming in a simple finite state machine, it's kind of like, the tools are getting better but the programming itself has not changed. Like we really do have the same core issues and the same core ways of programming them, which I think is, which is kind of cool. It means that like, if you learn programming from one language, you can take that knowledge and move it to another. So if I look, you know, if I open up my code and I actually have a little bit of demo code here. Tell me to go to the computer. No, so this is, you know, show here. This is a program that lights every memory spot in order. And you can see that there's some, you know, some of them go kind of an order-ish, but then it kind of like flickers around and it sort of goes a little bit over here. You know, it's not totally random. There's like micro patterns, but for the most part, you can't easily guess where the next LED is going to be because you see that it does flicker around. So this is me saying each LED one through, you know, 351 R, G and B LEDs, each individual one. So that's why you see it's red and then green and blue and then it flickers through the whole body. So, you know, then you have to figure out like, well, how am I going to take this map and transform it into what is a useful map where I want to address all the LEDs or I want to address the X, Y of the matrix. And this is kind of something that I'm doing. Like every month I have to do this for something, whether it's like an OLED or a TFT or an LED driver or like there's only some like memory is X and out, you know, the final result is Y. Keep matrix mapping, you know, all that stuff. So how do you do this? Is there some magical way of doing it? And the answer is no, you just sort of do it. And the way I did this is I actually ended up just writing a simple program where I would light up each LED one at a time. So this is LED zero. This is address zero. The first LED in the memory map for this LED matrix driver is this LED. And so I would actually kind of write down in a gigantic piece of text file, okay, you know, LED ring one blue is zero. And then I would, you know, increment this number to one and save it. And of course it crashes because that's my luck. Okay, so, sorry. So this is zero blue. And then I incremented my code to one and I save it and it goes green. Okay, so now I know LED, you know, the right ring, LED one address one is the green LED. And then of course when I go to two, that isn't red. You think like, oh, it'd be blue, green and then red. No, actually, because again, this memory map and this layout is kind of all over the place. Address two is actually on the other side in the ring. You know, it's like the 17th LED blue. And then three is green and then address four is red. So that one is an order. So I just sat here for like an hour and a half while Phil was doing other fun stuff. And I just mapped every single LED to the LED ring where it was. And sometimes, you know, there's always just like, oh, can I do it algorithmically or should I do it with like a literal like map? And I always recommend starting with a map even though sometimes, you know, to save code space eventually you want to go to an algorithmic method but I actually recommend making a map and then simplifying that map, like optimizing that map before you try to like figuring out like the, you know, you can look at a schematic and try to figure out what is it like this, you know, perfect algorithm that will map every LED to every location functionally. Sometimes you can do it, but often you kind of can't and I just recommend doing it with a text map. So I'll show you the text map codes if you go to the computer. So this is the code, you know, I just sat down and I did it. So this is the LED map for each ring. So, you know, LED 0 is 341, 211, 210, that's red, green, blue. And then there are patterns, right? But I kind of do the pattern stuff later and this is the right ring. And so you can see for LED 0 on the ring, the top most, it's 287, 31 and 30. Those are the three address maps that map to the LED. And, you know, what's really nice and I recommend this if you're ever having to do this is even if it's more work, try to get this work to be done into an interpreted language rather than compiled because one of the nice things about this is every time I wanted to test each LED location, every map to figure out where it ended up in the output, I could just increment a number and save it and it would like immediately run. Whereas with Arduino, I just, I've had to do this before and it takes a really long time. If you're doing it this way because you have to like upload every time you increment the number. And so instead what you can do is try to like have like a space bar that, you know, when you press the space bar on the serial console, there's a little increment and you can do it that way. So I happen to like the interpreted way but you can do it with compilers. You just have to do a little bit of, you know, maybe a button to have it increment and then it prints out what it's doing. But yeah, go through and then map every LED and then, you know, the upshot is when you're done you can have, you know, code that looks like this where the, I can add, you know, I can index into the ring object from 0 to 23 and set it to be a color wheel and that makes the rainbow, the rainbow glow here. So that's... Let me show you. Let's remember, you know, I've got two here, right? This is cool. So this is just the two rings. And then the next step is going to be to do the X, Y matrix underneath. And so you'll have three objects when you want to address into this PCB. You'll have the left ring as like a neopixel ring. The right ring is a neopixel ring and then an X, Y for the grid of LEDs that's overlaid onto it. That's that. So more to go, but much, much math has been done. But there's no, yeah, there's no real shortcut. People always say like, oh, what's the secret? And the secret is you just sit there and you just do it. And then after you've made that map then you can look and see if there's any patterns that you can use to simplify it. Sometimes there is, sometimes there isn't. But nothing really beats just sitting down and doing each LED in order until you make the map up. Any questions about that before I move on to the next thing? Okay. All right. Next up we got a teardown. We picked up a paper shoot camera. So let's let's bring this up here. Yeah. So just to be straight up, we're thinking about doing some type of like easy DIY circuit Python powered digital camera. Maybe with like machine learning and stuff because there's the machine learning, you know, for cameras. So we want to see what was out there as far as like anything with the circuit board, anything that was like sort of in this category, not really anything. But we did find this. We did find this. So we bought it. It was kind of cool. So it's, they're not, you know, inexpensive. I'll say that this is cost more than in a nice camera. But they did do a pretty good job with it. It's got kind of that retro charm. So the camera comes as a PC. We already put the batteries in because we wanted to just make sure. Yeah. And an SD card. Yeah. It looks like you can use a mini card. Yeah. There's a micro SD card on the back. It looks like micro SD slot SD. I want to make sure you keep staying in focus when you do this. Yeah. Well, I'm doing the best I can. Yeah. So it runs off of two batteries. So there's going to be obviously a boost converter. You're going to see even some boost converter technology on the back here. I'm going to zoom in so I can get to the components. So I think here, you know, it looks like there's an inductor. There's a boost converter. That's a micro SD card. There's a buzzer. There's a speaker and a speaker driver over here. It does make little noises when you take a photo. Which you kind of need to because there's no TFT. It makes a clicking sound when you take a photo. But the other cool thing is if you take the SD card out and you try to take a photo, it'll, yeah, go for it. So that's the photo. So you take a photo and then take the SD card out. If I take the SD card out. Yeah. I'm going to do it. Nope. Nope. That may feel sad. Yeah. There's also a microphone because it can take little videos. Yeah. It didn't figure out how to do that. In here, this is just a little, I don't want to take this apart yet, but there's a little camera. This is a camera module with like a built-in lens. And then it has a little piece that goes on top of it that helps you focus the lens. Because even the little micro modules, little camera micro modules, you can zoom in and out with them. I don't know if anyone really messes with this. I'm sure it's just tuned for, you know, infinite distance. There is some cool stuff here. Hall effect looks like. Hall effect sensor. URX4T, of course. That would require you to have, be able to program it. Which, you know, I don't think there's really access into that. Micro USB, you can use that to, I think, to read files off of. And if there's some DFU, I'm sure there's a DFU system. And then on the back, some more. So yeah, there's actually not that much circuitry to be honest, right? There's this little flash memory. This is probably the program memory, not the camera, you know, not the storage memory. A couple other power supply things here. Probably needed for this chip here. This probably gets boosted. This is, you know, two volts or so gets boosted up to 3.3 or five volts. And then, butt converted down to probably 1.8 and 2.8. And apparently, maybe you can point this out, the batteries can be rechargeable batteries and you can recharge it via USB. I'm not actually sure about that. I know, it says on the box. A couple things it says on the box. I'm not sure about that. Because I'm a little suspicious. I wouldn't recommend it. I would use alkalines. And then it looks like here, FL, I think this is probably flash. There's probably, you know, an add-on or an alternative version. I would say that this board has gone through a couple revisions at least because the photo I saw online when I was kind of looking at this did not have an all-in-one chip. It had a chip plus of, you know, SRAM chunk. And this is like an all-in-one chip. This chip is a Novotech NT96658. You know, it's an all-in-one camera chip. These exist. There's probably no data sheet for it. You know, this is a Taiwanese company and also probably a Taiwanese chip design. They probably worked with the company and said, look, you know, we just want this chip. There's no TFT again. There's a little viewfinder that you would look through to take a photo. And then did you want to show some of the photos? You said you wanted to share? Yeah, I have. I can just show. I took one in just color mode. I didn't even point it right or figure in anything. And then I took one. And it's black and white, which I thought was pretty good. Yeah, so let me just grab them real fast. I thought I had them already, but I did not. That's okay. Well, you mentioned them earlier, so here's that. Yeah. So this is a color photo. So it's kind of got, you know, a Lomo lens type thing going on there. And then this is a black and white one. So there's four filters. Let's go to the overhead again. I'll show the filter thing. So when you get the camera, zoom back out, the PCB comes bare and then you have, there's a variety of different paper enclosures. Now, you know, we'll say that they're like, oh, this is an eco-friendly camera. That's not really true. I mean, like, you have the same ecological footprint as any other camera just because the... I've learned there's no nuance, so... I mean, there's no nuance, but I'll say just this is, it's a cool camera. I wouldn't, don't buy this if this is the most important thing for you to save the planet. Just don't buy the camera. So, you know, you put this together and then there's bolts, which I'm not going to put on, but you bolt this together. So, you know, you kind of have it in pieces and it kind of has this nice like paper look and then what is cool here is this is like a little magnetic ring here. It's probably like actually what makes it kind of expensive is you can then attach lenses, you know, like a fisheye lens or whatever using like a magnetic ring sort of like on a smart phone. And this is the button that you press to take a photo and then again this is that viewfinder, no TFT, and then there's only one UI element and there's a switch. And if you look carefully at the switch, this is a four output switch. There's color, black and white, green and purple. Actually, I don't know what the green and purple is. I got to try that. Yeah, we only tried the color and the black and white obviously. But there's four options. There's four filters built in. That said, you know, it's, it does do video. The image quality is quite good. You know, it is, it is definitely an all in one camera thing and you can't hack it. So if you don't, if you want something different, you can't, you know, this is all you get. But I thought it was kind of a cool story. It's this, you know, Taiwanese engineer who designed these cameras and just wanted like it's kind of a little bit of like NYU ITP type project, but became a real product and now these are, these are super fun. Also comes the lanyard you can wear. So kind of cool. All right. And then you were looking at this four position switch. Well, is there any other questions before we? Yeah, keep going. Okay, great. Okay, cool. Yeah. So I thought for the great search, we would show how to Why don't you show that switch? Show the switch on the back, which is a switch. And then I'm going to go into a great search mode. Yes. A four position switch. Where did you Do you ask a lady? I brought you by Digikey. Thank you, Digikey. And Ladyada, Ladyada, you use your engineering powers every single week to find things on Digikey. What is the great search this week? Okay. This week we got this paper shoot camera that we just did a little bit of tear down on and I really like this four position switch. I'm a huge fan of slide switches. I really think they're super awesome. I mean, I like buttons, tactile buttons are good. But, you know, if you're not doing tactile buttons, I really like slide switches. They're easy to understand. They're, they're, you know, you can use them even if you aren't looking at something you by feel, which I really like, so they're good for accessibility. They last a long time, you know, you know, for the most part, unless they get wet, but you can still get weatherproof ones. They're good for power. They're good for signal. They're good for everything. So, you know, on the, on the LED glasses design here, I've got, this is a slide switch that I use for on off. So you can turn the whole thing on and off pretty easily with the slide switch. There's also buttons, of course, to do reset, but slide switches are where it's at, in my opinion. And I've used, you know, single pole, single throw switches, which are kind of rare. I usually use tactile buttons. Single pole double throw, which is on off, single pole triple throw for like three modes. But then this was, this was a fabulous single pole four throw. And I thought like, let's, let's check that out. Because this could be useful for other people. And I like that it's a through-hole switch. You could easily add it to a design to add a four elements of selection. So let's go to the computer and actually wanted to show real fast different switch schematics and what they mean. So this is, you know, I always get confused. What's the pole and what's the throw. So if you don't remember which is which, don't worry. I've been doing this for 20 years. I still can't remember. But the most common thing is, you know, a single pole, single throw, which is like a, usually a tactile button. You know, it's a, it's just, you press, you press it to turn it on. There's a single pole double throw, SPDT, which means there's a, there's a single thing and it can go between, it can throw between two options. So that's usually an on off switch. There is the single pole triple throw. So again, three options. And then I'll note something that it always, you know, doesn't trick me up, but can trick other people up. I'll go to this image and make it nice and large. So the single pole single throw is SPST and then SPDT. And then you'll also often see DPDT that's the dual pole dual throw. I see these often because surface mount slides, which is from mechanical strength, they often have two separate switches. It's also good, the double pole double throw. If you want to, I like these switches when it's like, oh, I want to switch I squared C or UART connections. You want to switch like a simple two wire bus from one set of pins to another or from controller to peripheral. I like the SPDT or DPDT. I use those often on our shields, like for GPS modules where it's like, oh, do you want to use UART on the soft serial or the hardware serial? One switch switches both pins over between two sets. But then when you get to SP3T and above, you don't use T like use S for single D for dual. But when you get to three or four, you use the number. So just remember that don't SPT T does not exist. There's no T for three. You actually use the number three. So, you know, it's good to know when you want to search for it because when you go to the digital key, you know, you can search for SPST and you'll get all sorts of like toggle switches and stuff. Then SPDT also totally awesome. Lots of different options. Relays also you can get them in SPDT type. But if you want to do, you know, fourth row, it's not SPFT, which sounds like something you put on your skin to avoid getting burned. You actually want to do SP4T. So, SP4T actually will get you the thing you want. And I think you can get five T, but four T is kind of maxed out. DT and three T are kind of not too uncommon. But four T is quite rare. In fact, it's so rare that there's only 31 options and slide switches. There's also RF switches. You know, there's soft switches. So that philosophy of like, completely software implemented, which is what you'll get with RF switches and stuff. But for slide switches, oh, toggle switches also, you know, those are, you can use those, but they tend to stick out of it. Not as easy to implement into design. For slide switches, yeah, there's not that many, you know, I mean, they do look kind of like what we want, but there's not a ton. That said, let's only look which cuts it down to only eight options. Really not that many. But all these look pretty good. This one, I thought was like really compact, you know, surprisingly so. This looks very slim. So I don't really want this one. And this one is a right angle. One thing to note when you're programming these, when you're, when you're putting these into your design, really look at the datasheet very carefully because it's not like there's sometimes two pins, even though it's a little pole, sometimes there's two pins for the mechanical layout. Sometimes there's two poles and sometimes they're not in the order that you think it is. Like the leftmost switch is not the leftmost pin or whatever. So just really read the datasheet and maybe use a multimeter when you get the part to really make sure you're mapping it correctly. But these all look pretty good. There's like a bunch of right angle ones. You know, there are voltage ratings. If you're using these for power switches, check out the voltage rating and the current ratings. You know, you can get you know, you can get switches that are high current, high voltage, but what I like to do is if, if I really like a switch, you know, you have to switch power. I'll connect it to a transistor and then the transistor does the, the switching itself. But that said, the one that I kind of like the most, you know, there's inexpensive ones. This one's the cheapest. This was, you know, 45 cents per it's a right angle style and I do like that it connects on the side. But for style and looks and also number of parts in stock, the, this one, the APEM one, I mean, I was 47,000 pieces in stock, which is always kind of promising. I like that. And I mean, like it gets a lot and then they do have the the 3D rendering of this. So if you're interested in like, what does this look like? I like it has a nice sticky Audi part. The the actuator sticks up quite a bit and I think it's easier to solder into place. You know, it is open so you just have to make sure that it's keep it dust proof, but otherwise so you can switch, you know, not too bad dollar or so and then can do up to 300 milliamps at 125 volts. So you could use this as your power switch. You don't need to have any extra circuitry or you can use it a signal if you like either one, but a nice switch for SP-4T. Good for you when you're making a camera with four different filters. And that's the good church? So realize these look like the like when's the next album gonna drop? Lady Aida. So anyways, as folks can probably guess, yeah, we're probably gonna do a camera. Folks are like, we should start a petition. No, we're gonna do it. We're in research mode. So yeah, we'd like to do a camera. I don't think it's gonna cause as much of this one. No, but it'll be a little different. It'll be, you know, we program bull and circuit python. We'll see. It takes a while to get these designs at the door, but we can start researching and seeing, getting ideas. Like, I kind of like that little filter switch. It's kind of cool. And I like the fold over paper design and the batter case. They did a good job with this. I like it. All right, we'll see everybody during the week. Thanks everybody. Show lineup and more. See ya. Bye.