 It's midnight. Do you know where your child's toy is? Well, it's being hacked right now on my desk There's a special broadcast of Desk of Lady Aida what we're doing some baby toy hacking because the baby is asleep I think yeah, so mr. Lady Aida want to get a little recap. Yeah, so this is the toy It's baby. I'd sign take a long tune thing. I think it's called. Here's some human babies we did a Teardown yeah, we're calling these take-aparts and Lady Aida went through like how it works all things that We're doing I talked about some of the songs we want to put on it a lot of people got back to us Or posted up on social and they're like, this is great. I want to put my own songs I want to be able to do all sorts of things. I wanted to do this But you know, I got too busy when I was raising my kid. Thanks for doing this Yay open source and all that so you asked me to do something Yes, I said, could you please when we took it apart and I said, please scan the PCB I scanned it Thank you for scanning it. I scan. Thank you for giving me the scan. So you gave me a scan at you. Thanks for you Have a Epson scanner you can also use a camera as long as you can get it You know perfectly square or you can you can then square it later But and then you know measure it With calipers and then you know kind of cross-correlate to twist it until you get exactly a flat image because basically what you want to do is Get that image so you can import into the PCB software to you know trace out where the whole slots are because it's an unusual shape It's not a rectangle or like a circle or a square or whatever. It's got like all these funky cutouts You know and they want to make the PCB as small as possible And so I think it doesn't have to be as small as the PCB is so let's maybe go to You're showing the scan. Let's go to the computer and I'll show the scan images so This is the scan. Oh, sorry, it's not the scan This is the scan you gave me And it's oh do you want me to change this to 720 dpi? No, okay So this is a scan you gave me and it's very nice And it's full color and I was kind of like oh like should I and I Rotated it just to make it like more square and I was like well should I like trace it then import it And then I just got really lazy and what I did is I just opened it in You know, I kind of tweaked I deleted the background in image ready so that wasn't you know didn't get confusing so like That's cut out here and the slots here because there were some shadows that made it like a little confusing So I just deleted all that background and then I just kind of increased the contrast and then I actually Just converted it to I tried 16-bit color and that was taking too long to import. So I just convert it to monochrome And this is you know good enough, right? You just need to know kind of where the Sotter points are speaker solder points the holes and then you know the outline of good Of the shape and then I measured it and it's like four millimeter. Sorry four centimeters by I think Seven centimeters almost exactly and so I just made this 400 pixels by 700 pixels and it was pretty much You know exactly Right because it was squared and then what I did is I imported it using in Eagle CAD There's the import BMP tool. I'm not gonna run it right now But basically you can select a bitmap and then import it and they'll import into Whatever layer you want. So I said import it into layer 200 so you can actually see it like this is you know It's it's very low res you can see the Even though markings the capacitors resistors and then once I had this I was like, okay now I can trace it out So I traced out the dimension and I got these little tabs here This is the ground and power you can kind of see it says VCC and VSS and so the locator tab And then you'll see that the PCB actually kind of does this little necking thing it like next in and Next out here and there's no real reason for that. I'm looking at the PCB. They just I don't know why they they did that. I Don't think it's for like any mechanical reason So I just made it like square I squared it up which gave me a little bit more room that I actually needed and you can even go out a little bit more Meals we will show you have a different injection mold in the past and they need Like there's or could be in the piece of these used in two toys, you know, who knows what you go the other way By the way, can you show the original so yeah, but we have a spare spare and so can you just show what it does? Yeah, this is gonna cause some parents to like they have some flashbacks Yeah, so just like has this little like three LEDs super cute But it needs to play joy division and tour you most in print and the cure and stuff like that Well, I think that's very fascinating is like, you know, it has this whole window But there's only three LEDs and they're like in this corner. Yeah, we'll be able to do cool stuff Okay, so show the the innards, right? So So in the innards so you can see this kind of like oh, yeah shaped PCB Yeah, maybe maybe in the past the other might be a reason like Yeah, I mean, I don't think it may be like tiles perfectly or something. I don't know anyways So what I did is I just brought this line down and you can even break I mean, you do have to avoid these bosses here. These are used to Secure this part. So, you know, as long as you don't bump into any of these holes You can extend it which I actually needed because I need a little bit more space So back to the you know, and then I can I can go down quite a bit here if I need more space on here All right, so let's go to the Computer again. Okay So I'm gonna hide that layer So, you know, I'm clearly not done. I'm still working on it I mean, I just you know started kind of putting things together. So the next thing is and we chatted about this on The last desk of a lady it is I've decided like what chips that do I want so the chip inside of here is a ROM 8051 or Z80 or something like you're never gonna be able to reprogram it It's it's completely like burned in at the factory So I want to put in a microcontroller and there's a couple debates that, you know, Phil and I had which is one I wanted to make it kind of unbreakable. So ideally something with a wrong bootloader so that no matter what or you know Even if people want to build us on their own You don't need a separate programmer because you don't need that anymore these days a lot of chips I built in around bootloaders the ESP 32s and the RP 2040s in the STM 32s and M7 chips a lot of yeah, a lot of chips in LPCs. They have built-in ROM bootloaders, whereas The samdi 21 and 51 don't and it can't get those chips anyways So then it was kind of like do I want the RP 2040 or an ESP 32 Those are the two chip families that like you can get very easily right now Because we're still dealing with this chip shortage and the prices is fairly affordable and they actually are both, you know Fairly low-power ESP 32 series especially could go to very low power modes Which could be handy because maybe like the button, you know, if you forget to turn it off it You don't want it to like drain the batteries because it runs off of the doubly batteries or not But you can have rechargeables, but you have to put pull them out and you get a screwdriver to pull them out So like ideally, you know, it runs for a long time even if it's left on by accident And so we're actually sort of chatted and it's like well You can either have an RP 2040 which is definitely going to be able to play audio clips and has lots of pens And it's you know runs at three volts and is otherwise really good But you to reprogram it you would need to open up the case because There's no USB slot available I don't want to have to like drill holes or like cut holes in the case for people to use this so if it's Using USB like RP 24 you'll have to open up to put in new songs Which maybe is okay But I also thought it'd be kind of cool if we used a Wi-Fi chip like the ESP 32 series because we really get circuit Python support And we have PI leave and so like you could you know with Wi-Fi You could reprogram it wirelessly or you could upload files wirelessly, which I thought was kind of neat And then we'd have an SD card slot on the inside So if you don't want to have the Wi-Fi on you don't have to like if you never Associated with an access point it just will never use the Wi-Fi and then you just use the SD card for songs So I thought we thought we'd start with that Also the ESP 32 S2 is again fairly expect inaccessible. It's our inexpensive. It's accessible. It's available And you know, you can have a you have to boot loader where it's it's you know drag and drop compatible So the C3 was you know another possibility, but the C3 I feel like is still It's still kind of early for that chipset and Frankly, I don't know if we have an MP3 decoder for risk five Whereas I know that there is one for the 10 silica core. So right so back to the Computer sorry, yeah, we are it's computer. So So this is the layout I've got and so I'm using the ESP 32 S2 module I'm not using the S3 mostly just for pricing. I don't think I need the power of the S3 I don't think I want Bluetooth. I don't see a lot of benefit from Bluetooth when you can just use Wi-Fi And one of the things we thought would be neat is you know You could have a be a little podcast player like you could we could connect to the internet and get Audio and download it and play it so you could have like songs in the day Yeah, I mean neat like a neat little dev system get your infant started on Joe Rogan as fast as possible That's that's right. He's got it. They've got to get on TRT Okay, so next up. That's teething Yeah, test the replacement therapy. Yes Okay, so we've got this Outline it's all good. And so here's all the little chunks So I've got I basically took a feather ESP 32 S2 and I kind of gutted it and then I did a couple of decisions And one of them the decisions actually made was So this is an unreleased guys, this is JP's C&C Brick C&C Yeah, you'll see tomorrow it's gonna be live really soon And so I kind of started this was like a month ago Like hey, can you grab one of these C&C's and like cuz we you know, we got a gift when gifted and It's like here's a cow or like here's a sheep. I'm like, there's no sheep in Manhattan Why need I need this baby to know like here's a taxi Or you know, that's a delivery about our train or the ice cream Truck. Yeah, there's a lot of things that a modern baby needs Probably not gonna run into hippos as much as Barking dogs and how to handle Train can be the train guy. Yeah, it's a rat So I love this artist artist by Brian Kiss kissinger. I hopefully a prince. All right, they're kissing her So it'll be only tomorrow, but you know as JP was building it we actually learned a lot because he's like I was like, can you try this with a power supply try that? It turns out like you really do want to for at least the RP2040 you really want to have one of our little TPS boost converter chips and Because the batteries that people can put in might be rechargeables Which means we're gonna get only 2.5 volts. I was like, well, you know, theoretically they're P24 I can run 2.5 volts. Yeah, but the it was amplifier like really was didn't sound so good at 2.5 It really wants to have a higher voltage in this case. They're boosting up to five volts and then regulating it down to three Not sure we're gonna do that But I did want to add the TPS 61023 so one thing that's funny is this is a like total overkill. It's like a two amp Outputs sorry one amp output and there's no, you know, I don't think we're gonna use one amp because the speakers like only You know half a watt a quarter watt, but you know, this chip is actually really inexpensive the TPS 61023 and only 20 cents whatever in quantity and so it's actually even though it's like total overkill because we stock it I'm used to it. I have you know, I know that it works That's the Power supply we're using so this is the boost converter. So I'm pretty sure I'm just gonna boost a 3.3 volts I think that'll be fine and then I'm not done here. I'm still working on it, but I added a micro SD card slot them it wire up There's one neopixel, but I'm actually gonna have I think six on the front of the Like the display on the player because I think that could make like for cooler facts I think like six pixels Three by two. Maybe you can go to the overhead and we'll We'll show it. So this is where The screen goes and you can see the the bosses that hold it in place So I'd have to bring the PCB out a little bit But instead of just having like three like one red one green one blue LED It would be like one two three one two three. So I think I'll have six because I like cool I'm gonna be seven. We'll have one up here, too And they'll also be used for like, you know, a state of the of the Wi-Fi and stuff Yeah, we can have it do things like tell the time and you know We could put a bunch of way files on there That'll be like the time is or you can have it like you're you know, hi, baby. You're 50 days old Yeah, some fun. Yeah, we're just making the platform Yeah, so people could do this and that's second Python makes it really easy like audio projects are really they can't really do this Anything else? No Arduino. I mean you could do with Arduino or platform. I know but I want to make it You know really easy for people. I don't think you know what I will throw down the Challenge because it'd be great to have multiple versions of this like cool Coated up in whatever do rust do you Arduino? But I but I really yeah, totally Yeah, but but I but I really think the the whole idea of this being so easy or just drag and drop files That's really hard to do on I think any other embedded Platform language or whatever. Anyways, yeah, and then for the audio output, we're gonna use the i2s The max 98 through 57 on the last great search We actually found another good alternative, but I happen to have a lot of these in stock Because we bought like a year's worth because of the silking shortage And so I'm you know, even though there's there might be more fancy amplifiers. I don't need all those fancy things This one's good. And then I can just wire this up to the i2 To any pins because ESP32 can use any pins for i2s and they can use any pins for SPI for the SD card So it's actually kind of nice. It's like I still have these pin names left over from the feather. Oh, sorry I forgot to say go to the computer. This is the Max 98 357 audio amplifier and then This is gonna be hooked up to the ESP32 s2 module here, which still has the feather pin numbers But we'll I'll just I'll just arrange them to use whatever and then there's that native USB see which is great And they'll kind of you know if you really have to and then you always put you know Probably, you know, if you don't put an SD card, we'll just store You can store like fairly small but not like, you know, maybe like a minute or two of audio on the built-in Memory, but if you have an SD card, of course, you can have the long, you know as long as you want and There is an MP3 decoder for The ESP32 10 silica core, I think it'll be able to run on the s2. We have to go look into it But there's definitely wave playback and we have wave playback working. I'm almost positive Because we usually that's like one of the first things we get working and it's probably fast enough You know, you'll just initialize the SD at like, you know, 60 megahertz Read it off and blast audio onto the max 98 and then you'll just have to generate wave files We have tutorials on how to do that. So there's still a couple pieces going together There's also going to be a stem IQ t port if you want to connect sensors, you know, you want to have it like motion activated or Maybe it can like read air quality and I'll tell you the air quality, you know, whatever you want to do You can like hack this hack this even more But wanted to start with like just the basics the little audio platform To get this going and then if the s2 turns out to be not powerful enough The good news is the ESP 32 s3 is the module is pinout compatible. So you just Swap it in. I don't have to change any pans or any, you know, it's just the code that gets updated so the next thing I have to do is route this board out and Get prototypes and make the prototypes and then just see if I can just start streaming audio or make sure it fits inside I have to make the ports for the the slide switches that the slide switch is off low volume and high volume and The button is going to be the boot zero button, too So if you hold it down while resetting, it'll enter into like the bootloader so that way you can If you're using USB you can bootload it manually. So I think Yeah, sorry about that That's okay. Okay, so that's why that's my part two. So part three Hopefully by this weekend is Laying out all the parts and then I'll probably cut it out. You know, I'll print it out on printer at work Cut it out and just make sure that it all fits like kind of like put the pieces down and make sure because I'm kind of fitting to And the closure that already exists. I want to make sure that I'm not bumping into anything and then ordering those PCBs Okay, all right. Well, keep staying tuned. We will keep sneaking around the night while we sleep later