 Hi, welcome to the show. Welcome to me having audio and everything. Thanks everyone for stopping by. It's time for John Park's workshop. Here we are. And first of all, want to thank the people for stopping by our chat. We've got YouTube chat and we've got the Discord. And that's the main place for chatting with Adafruit people during shows or even not during shows. Head on over at adafruit.it slash discord and jump into the live broadcast channel. Live broadcast chat channel. We've got, you can see right there today, a whole bunch of other channels too with different interests in mind. So check that out over at our Discord. And oh wow, yeah, so sorry, there's a bunch of white noise, huh? Yeah, I had this mic pack off and for some silly reason when the transmitter pack is off the receiver pack makes a bunch of noise, which I apologize for. That's annoying. And I said we've got the YouTube chat, but I don't have it popped open. So let me do that so I can see it. Hey Gary T, I see it over there on our YouTube chat. I'm just going to pop that out right here right now and now it shall persist. So let's get on with some things. First of all, in non Adafruit news, I was excited to learn this morning from this press release. Wrong one. This one here, yeah. General Mills is coming out with a limited edition of redesigned monster serial boxes which have art done by artist Kaws, K-A-W-S Kaws. And Kaws has the famous sort of panda guy with the bone ears and the X's for eyes. So there's going to be a set of monster serial boxes that have the X's for eyes and a redesigned retro style packaging in honor of which I'm wearing my Boo-Berry shirt today, which is the best monster serial. But I don't know if they have it listed here, maybe not in a photo. Oh, there it is. Fruit Brute is coming out. Fruit Brute hasn't been on the shelves in like a decade, so get ready. I'm assuming this is Halloween stuff. This has been your free, non-sponsored media blast for General Mills monster serials. Very excited about those. Are you excited about those? Also, we have a jobs board. So if you're looking for work to pay for all that good monster serial, or if you need to hire someone to help you get through all the monster serial, then head on over to jobs.aderfruit.com. Here it is. It is entirely free. Head on over there and you can post in our job board. It's free. You can also post if you're looking for work, your resume over in the available for hire section. If I click over there, I think I'm logged in today. You just have to be logged in. There's no cost anything. There's no spamming of anything, but as long as you have a login, you can use this service. All of the job positions are vetted through Lediata and PT, so you know they're good. But here's a sort of sample of people who are looking for work. I've posted up their info and these are very often remote. People want to do contract work and freelance work remotely, or even full time or part-time work remotely. So don't worry too much about where they are and more about what they can do, what they can do for you. So that's at jobs.aderfruit.com. Let's see. What else? I have a show on Tuesdays. Logo looks like that right there. It's JP's product pick of the week. Here's the thumbnail from this week. And what I like to do on the show is a product pick, which is going to be massively discounted during the show. So just throw it in your cart. There's no need for a coupon code. You can get that product for, in this case, half off. We sold through about 100 of these at half off prices. And I'll usually do a demo, sometimes a software demo, a hardware demo, show you how it works, give you some backgrounder on it. And here's a little excerpt from this week's show. It is the motorized slide potentiometer. But you can see the cool thing is we can play around and then let go and get back to our preset position there, thanks to the motorized fader. We can also go to other presets. So if I click my encoder, I can go to a different preset. And another one of these is just four positions that I've pre-programmed. I've set up my rotary encoder as a direct control there. So you can see as I turn the rotary encoder, I'm changing the position of the fader. I'm also using that as a stored position. So now if I hit this four times, it'll come back to this position. I have four saves. So one, two, three, four, back to that new position. It is the motorized slide potentiometer. And that's it indeed. Love to see the projects people are going to do with those. We got a bunch of them out there into the world. I think I showed last time I've got this learn guide here that I put out, which is the basics of using these motorized slide potentiometers. I'm going to be adding Arduino code to it as well. And an update on how to use the motor feather wing instead of a H-bridge chip, sort of bare L9110, which is what I used for the original project. I demoed this, I think, on a show until last week. Yeah. I can't remember now, but I may have an update on the update, which is let me go to a down shooter here. So let me put this under here. We'll go on and move forward in a second with another segment, but I just wanted to make sure I let you know that I was successful in getting a Chrome conductive slide cap. Oh, it's not powered on. So that's like I do anything. Let me plug this in. Since this has capacitive touch on it, you can do things like move to a position when you touch it or turn off the motor. It's the most likely use. If I power this up and see this might be, there we go. So you can see I'm now using a set of the bare, pull this off of here, the bare lever stem thing, which in itself is connected to the cap touch pin. This is a chromed plastic fader cap made for this purpose. I think it's a replacement part for Yamaha mixing board, and it works great. You can tell it's letting the motor go as soon as I touch it. So we're trying to source those. Lady Aida was looking around to see if she could find those. We are also, don't ask, don't tell, but we're probably going to be getting some sort of regular rubber fader caps that fit this type of potentiometer, and I will make some attempts at using some copper tape to wrap inside and around it to see if that'll work well as an alternative. So as long as it's capacitive touch, it'll work. I was not able to get it to work with a very, very, very low threshold through another material, but I'll give it another shot with the plastic or rubber caps that we get. So that's the update on that. It is made of plastic. Yeah, it's a conductive chrome plate. A lot of chrome paint, that was questioned by the way from Todd in the chat there, a lot of chrome paint does not conduct. I tried it with some really good chrome paint, pen paint, super shiny reflective stuff. It was not at all conductive, but this, however they're doing this process is. So we'll see if we can come up with a source for those. Let's actually, before we go any further, dive ourselves right into this week's Circuit Python Parsec. All right, let me do a little setup here and grab my window. So what I wanted to show today for the Circuit Python, let me say that again. What I want to show today for the Circuit Python Parsec is how to use a new line when printing to serial instead of the default carriage return. No, wait, do I have that backwards? Yeah, starting again. For the Circuit Python Parsec today, I wanted to show you how to use a carriage return instead of a new line when you are printing to the serial output. So here's an example of a free floating analog pin that I'm reading. You can see here as I touch it, I see numbers go by and I have a neat little print statement going that gives me sort of a graph of the values that I'm getting as I touch this analog pin here, sort of grounding it. But that's hard to read because we have these characters flying up the screen. And the reason for this is that the default in the print is to end with a new line, which means it goes to the beginning and adds a new line for every print statement. If we change this instead to a carriage return or return, what happens is it goes to the beginning after each print statement, but it does not add a return. It does not add a new line return. Instead is just this carriage return. And so you can see here the way to do this is if I take a normal print statement and add to the end of it this here comma end equals and then in quotes backslash r and that's the return or carriage return. The default, if I don't have that in there at all, or if I change that to n, looks like this. And so we get this sort of string of characters flying by or a string of lines flying by. This instead is a lot more helpful for measuring values and seeing them without getting endless scrolling of your text. The other tip that's going on in here, a little bonus one, is I want a bunch of these dashes at the beginning and you can actually multiply text by a number. So I have a number of dashes multiplied by whatever the value is and my value right now is I think going from 0 to 128 or something like that, 0 to 64. So when I am up here at a high number, I get a whole bunch of these dashes in there without having to type them. So you can do some math on your strings, which is pretty cool. But this is the key thing here is this end equals backslash r. And so that is how you can use a return instead of a new line when you're printing to serial output inside of Circuit Python. And that's your Circuit Python parsec. And yes, I actually, thank you, yes, I'm Dexter, so they like the blueberry shirt, blueberry forever. See Grover had suggested maybe drill a tiny hole in a fader cap and use some metallic epoxy, also an interesting idea. Hey, Rich, sad, nice to see you. By the way, you may, this may look familiar, this little tip that I did today with the Circuit Python parsec because I had a similar setup going, let me unplug this and I'll re-plug in my fader here. I put that on camera. Let's see if it connects to this one. I think I got to reconnect because it has a different name. Yeah, that's right. So let me disco tool. It's the feather. Okay, yeah, it was a different disco tool dash and there we go. So here you can see this is actually kind of the more typical behavior. That's just because I have a narrow window. So I'm getting sort of automatic looping around. If I widen this up, there you can see that's the behavior we're looking for. It just makes it a lot easier to see what's going on. It doesn't give you a history like an endless scroll does, but in a lot of cases, this is really snazzy, really helpful. And big thanks to Todd Kurt for both the multiplying your text, in this case the dashes. That tip as well as the new line versus carriage return tip. Really useful. So thanks for the good stuff. All right, so let's see. That covers updates on the fader. It comes from Circuit Python Parsec. So I want to start getting into this coffee scale project. So let's back up a step. Let me see. Do I have a little prop here? So this all starts with these two things. So one, we've got these load cells and these are a piece of aluminum bar that's been carefully drilled and calibrated with this arrangement of resistors, this sort of S-shaped arrangement of resistors called a Wheatstone bridge that can measure the flex of this metal bar really precisely as an analog read on an amplifier chip, an ADAC chip rather that can deal with the very, very, very low values coming off of this, make it useful. So this is our, what is it, the NAU 7802 is the chip we're using. Cedar Grove, our good friend over in the chat there, created a feather wing with this chip on it that I believe reads two of these at a time. And then Lady Aida had been working a long time ago and then we had parts issues. We're working on doing a standalone single channel with Stem-A-Q-T. So I'm using this but I'm also going to be building a version using this feather wing that Cedar Grove made to read this sensor, which is what's inside of a scale. Most scales use this type of an arrangement. The neat thing about it is that with the library and code that Cedar Grove has made for us, we can make really nice scale displays. We can tear to remove weight from a vessel that you're putting on that you're going to pour something into, in my case coffee. Add some nice graphics, do a bunch of things that will run on the clue on I think a TFT feather wing, on a pipe portal, maybe a couple other platforms. So it's great time to be making scales. The challenge I had really, because all the heavy lifting was the stuff that Cedar Grove maker had built, real challenge is mounting this in a way that's useful for your use. So key thing is these can't be resting on something because we need one side of it to flex. The other side needs to be really stable, locked down. So they put these threads for an M5 screw on the sort of stationary end and they put M4 screw threads on the flexing end and then it's up to you to figure out how you're mounting that to your enclosure, how you're mounting something like a tray that you're going to set your weight down on top of to this side. So I wanted to show kind of my process for coming up with this espresso scale. I also want to talk about why. What are we doing this for? So when you're making espresso in particular, you can really get a lot of change in how things taste with some very, very minute changes in the fineness of your grind, the amount of coffee that you put into the portafilter, which is this thing, the basket that goes into the machine, gets chucked in there like that and then a lot of hot, high-pressure water goes through. Tamping that evenly, having an even grind, all of these things change the extraction because we're doing an extraction of a whole bunch of these solids out of the coffee with the water that's coming through. If you can reduce the number of variables you're dealing with, you can focus on the ones that really matter, such as changing your grinder settings. So what I want to do is pour a consistent amount of coffee in a consistent amount of time, and that allows me to focus on just adjusting the grind. There are other variables you could deal with and lock others down, but weighing your coffee is a really great way to do this, and you'll see a lot of high-end coffee people in baristas using little scales that they'll set underneath the machine as they're going, and then they can take that off and proceed. So I wanted to build something like that, but it kind of make it a little bit more permanent. And so what I'll do first is let me show you a little video of part of this process and action that I took a shot earlier. You can tell by the blueberry shirt reflected in my espresso machine. So check this out. This is about 27 second pour, which is usually what I'm going for, for my double basket. I just wanted to, sorry, thanks for, I just wanted to minimize that video there for a second so you could see it. It's hard to see it at this scale, but what I'm watching there is on the little clue there, on the display there's a little gauge moving up and down that shows at the bottom both grams and ounces of weight that it's that it's reading. So if you watch that you'll see that number going up. Right. So one thing I'll mention is that I don't have a lot going on with sort of splash proofing yet. And so there's some electronics sitting a little worryingly near some water, but not too close. The ADC and the clue, and I'm using batteries so it's not plugged into the wall, which is a bit safer. Those are a little bit removed and then everything else is just the load cell, which you could protect. It's fairly, it's got silicone over the wiring and the rest of it's all aluminum. So let me show you, someone found Lars, a little Lars alert. Let me show you over here what this is looking like and what my process has been for putting this together. Throw a bench or a main view. There you go. Let me scale that down. All right. So what you may have seen when I first posted this or first started showing some demos of this was one of these helping hands. This was actually a really nice base for this. We actually sell these in the store. It comes with some magnetic PCB holders, as well as these two helping hands. And I was able to just use this slot here and some M5 screws with washers to mount the load cell here. So let me take off these for a second. This was a really expedient way to get a prototype working and a little more stable than me just kind of holding things in my hand there. And so I'd recommend if you can get some trays or boxes of M4, M5, M2, M2.5, M3 screws in a few different lengths, you can tackle a lot of these projects. Ideally, they're all metric, not always. And so here are some M5 screws for you there. So I was able to put those up through there, put a nut or a washer over top of that just to actually know I didn't need to yet just to get a little bit of space so that the other side is elevated up. So you can see, I just put a nut right there that you can see. So that's going to give me some space so that when this side flexes, once this is screwed in tightly, it's not bumping into anything. So I will just attach one side of this just showed off quickly. Oh, that nut got caught in there. Let me try that again. Yeah, I wish I had an actual washer, which is going to work a lot better. Okay, I'll, for this sake of this demonstration, we'll pretend there's a washer there. By the way, one thing that bit me recently is these have a little arrow on one end that tells you the sort of size of the load cell is a one K, one kilogram and a down arrow. So it's saying flex it that way. So that means the other side here where the wiring is coming out, at least on these ones, this is what you'll mount and you'll want your weight pushing down on the direction of that arrow. That's the ideal. I think it'll it'll still measure it in the other direction, but you might have to screw with your wiring to get that right. So it's basically like that, except with with a little spacer in there. And then you've got these M four side to connect something that you can set your weight on. So I had just taken a little piece of acrylic here and drilled a hole in it and mounted it like this at first. So that was that was kind of the version that I was using during my development of this. And this will work pretty well, you could could refine this and then just have a little gizmo to put on the espresso machine set under there. Now we're great. That's a lot more like a traditional scale. However, I wanted to instead make this sort of integrated with my machine. So as you may have seen from the image there, there's a large drip tray, this right here. And unfortunately, I can't bring my machine, it's plumbed in to my water and water filtration and wastewater and all that. So it's big pain, big heavy thing. I don't want to unscrew things and move it into here. If I don't have to. So this is the drip tray. And it means any water drips through comes and exits through a little hose to the wastewater. And this is this little mesh that sits on top of the tray. And that's normally what you set your cup down on top of under the spout and your portafilter and brew head and all that are right above it. So after at first, just setting a thing in here like this, that worked pretty well, but it also did elevate the height of my cup at to a point where I couldn't even fit. I don't have one of those here, but I couldn't fit a spouted portafilter. So some of these will have a spout coming off of them or a double spout coming off of them. And as you start eating up space above here, it gets a little crowded in there. So I want to go as low profile as I could. And you can see here, in the end, I'm really just adding this inch or so of space. And you can see I've got this kind of floating scale that is mounted to this steel grid. This is this is strong enough that it's not flexing, which is great. We don't want the whole thing to flex on us, or we won't be able to to measure the weight very well. And so I've mounted a mounting point to it, the load cell, and then to the load cell, this little floating piece of aluminum, on top of which I can put a little, here's a nice little ate a fruit coaster, right set that down there could maybe use some if we wanted to some magnets or double stick take or something like that. So this stays on there. But that works well, gives us a large enough surface area to not have to be so precise. And it's all easy to wash, easy to care for. So then over here, this is at least temporarily, I might do the guide based on this setup, I have the clue with our little acrylic case for the clue. And that makes it a little more splash proof, it's not waterproof. But it also gives me something to affix things to, if I want to use like double stick tape and attach it to some other type of mounting point, I'm just using a nylon screw here, which is working well. And then an extra long screw on the back means that I have a place to connect the little ADC board there stem acute ADC board. And then finally, I've got battery power using three triple A's and I stuck the lid of the case, just using a little of that you glue sort of double stick goo tape squares. And that means I can slide the battery pack into here. So it'll come off for changing, but I also have an on off switch there so I can turn this on boot up here. Unfortunately, at the angles, I have things you won't be able to see me actually weigh something too well, I just realized. But maybe we can, we can fake that. And so here it's booted up now I am using actually sort of by accident using a 10 K load cell on here. So it's a little bit noisy, you'll see this value fluctuating a little bit, I can hit the tear button, kind of get it back to zero. But this is a bit of a noisy value here because of that load cell being 10 K. And we're trying to read at this very amplified level. So one K is more stable than that one. But you can see sort of see here, fake the angles a bit if I set my cup on here. Yeah, that'll work I guess 264 grams or 9.3 ounces. So I'll go ahead and click that button that zeros it out or tears it. So now it's essentially at zero. And zoom in a bit. So you can see down there in the bottom corner, says coffee. And the way I'm leaning this here means we're not really getting accurate readings. But I don't have a good way to actually you know what, let me just take the I'll pull this off. Let's do that. I'm gonna unscrew the the clue from here. And then we can look at the values that we're getting. So this is just a nylon is actually the nylon screw that comes with this case, this clue case here. So set that there like that there and I can see it refocus. Okay, so zero that. And then you can see here, simulate pouring the espresso in there, the scale goes up and up and up and up. And you can stop wherever you need to. You have to anticipate that a little bit with the espresso machine, just because you get some extra coming out after you pull it. So there's some finesse to getting that but it's a scale. It's really well integrated, I think into the machine itself. Now, I may use a little Otter box or who knows what to seal this up better. Another suggestion actually that Jan had see to Grove maker was to use one of these little sort of security camera tripods. It's a mountable one. And mount that somewhere and use a little thread mount. We have some nice thread mounts for the Raspberry Pi cameras. I might be a good basis for that. If you're doing stuff with a circuit playground express circuit playground blue fruit, the little case that we have for that also has a thread mount for a tripod. So you can screw that into there. So that's another another idea for getting that kind of accessible but off to the side a little bit. But this is this is working pretty well so far. I just used it a couple times yesterday and today to make my espresso and it's been delicious. Sorry, I can't share that with you. The some of the details on the mounting stuff that I've got going on here. Let me unplug a couple things from here. And I'll pull this back out back here. This is all I think almost all of this is available actually in native fruit store because this is some of our 2020 aluminum plate that you use with this T slot aluminum. So we have in the CNC section of store this this T slot aluminum and similar to 80 20. If you've ever used that stuff. And we have accessories for that such as these little triple couplers. And that's what I have right here. And we also have some larger adapter plates, which is what this one is this also one shaped like this. So depending your needs, you can you can use this stuff. It's I think this might be a m six hole roughly and so you can you can fit the m five and m four through this nicely. See there there's the m five so that would that would go on to that site even if you're just making kind of a cover for this or something so long as you add a little spacing so that it can still flex that would work well. So that's all those two pieces are and then it's a matter of this thing only would accept the m three screws so I have a just some nuts at the base here and some washers on the other side to to give that lift that up a little bit give us clearance again this side can stay and needs to stay stable the side needs to float. See you'll see there I've got the gap there and it's a tiny bit I mean the flex is really minor that that is caused by pouring some coffee into there. Let's see. Let me swap camera views over here. Swap back over to this camera see if anyone's got any thoughts questions. And the Todd says he measures his coffee consumption and pints alright I get it. The other thought I have is with the feather wing that Seagrove made which allows you to use two cells. I could do both like grounds weigh the grounds and one way that people will work is they'll grind up their beans and then they'll have their dispenser dispense based on weight and these just usually specialized machines. So you put the port of filter in and then it dispenses you know 18 grams of grounds into there whatever the amount you want to start with and you can go through your whole preparation process. I tend to weigh the beans or measure the beans throw those in and just grind one at a time because I'm not doing large scale production. But there you have it that's that's the project. The guide is Janice been working on the guide. It's looking great has code has libraries has the graphics you need to do the backgrounds and the scale elements. I'm shooting photos now of the the process on my machine. So once we combine those things together we'll have a really good guide I think for you to check out and can be a launching off point for any kind of scale based projects. All right well I think that's it. Let's see have I forgotten anything I think I think that's all I had today. Thanks everyone for stopping by thank you for the people in the chats both in our discord and over in the YouTube chat and believe we've got a foamy guy deep dive coming up live stream tomorrow. Scott did a guest guest spot last week. And then we'll start up with our regular shows next week. Oh here's a nice view by the way of my portal version Jan scale there and that's the one that I was talking about the idea of having both your beans and your coffee from two different load cells by the way really nice feature of the code is with one line of uncommenting you can go through a calibration process using a known weight and calibrate the cell just one time thing throw some numbers into the main body of the code. Recomment that calibration line and you can you can trust your your scale from that point. All right well that's going to do it. Thank you everyone for stopping by for a different industries this has been John Park's workshop I'm done Park. Bye bye Don't forget to eat your monster cereals