- When to Schedule Python for Engineers Intro Stream?
- This Saturday July 10 at 6PM central
- Twitch URL for the stream
- Overview of the Topics
- Setting up a python environment on Windows PC
- Python script talking to an embedded device over serial communication
- Not a how to write python/code stream
- Might get into Tkinter for GUI stuff
- Embedded Device will be Arduino
- SCPI to handle the coms
- List of items
- Windows PC
- PinoTaur Production Update
- Production is going well, boards are slated to be completed soon
- The Future of the Supply Chain
- Finding part alts that work for you
- Finding different temperature ranges, packages, and even packaging
- Adventures in Plastic Injection Molding
- We have reached 1 Mega presses
- First analysis – Images below
- All “failures” were due to test bed
- Could probably go more than 1 million presses
- Will repeat 3 or 4 more times
- New batch of actuators due any day now
- Finally Real Engineering
- Ran into my very first honest to god Differential Equation…
- Got around it with excel
- To all college students – Do well but….
- What is the most computational intensive work you have had to do on the job?
Special thanks to whixr over at Tymkrs for the intro and outro!
About The Hosts
Parker Dillmann is MacroFab's Co-Founder, and Lead ECE with backgrounds in Embedded System Design, and Digital Signal Processing. He got his start in 2005 by hacking Nintendo consoles into portable gaming units. He also runs the blog, longhornengineer.com, where he posts his personal projects, technical guides, and appnotes about board layout design and components. Parker graduated with a BS in Electrical and Computer Engineering from the University of Texas.
Stephen Kraig began his electronics career by building musical oriented circuits in 2003. Stephen is an avid guitar player and, in his down time, manufactures audio electronics including guitar amplifiers, pedals, and pro audio gear. Stephen graduated with a BS in Electrical Engineering from Texas A&M University.
Host 2 00:11
Welcome to the macro fat engineering podcast. We're your hosts, Parker, Dolman.
Host 1 00:15
And Steven Gregg.
Host 2 00:17
This is episode 284. So last week, at the end of the podcast, we talked about Python for engineers and maybe doing like an introductory stream slash video or something like that. Sort of like a webinar. Yeah, kind of like a webinar except. And formal, informal webinars seems very marketing term like
Host 1 00:40
Yeah, very much is. Yeah. And this is some dudes getting on Twitch.
Host 2 00:45
Yeah, no, no, no marketing people were, were used in the making of this stream.
Host 1 00:53
It's a good way of putting it. I guess, though.
Host 2 00:56
So we talked about the end of last week's podcast, and we had a lot of people in our Slack channel, say, yes, they want to do that. We had a couple of dates thrown around. And some, the majority of people seem to be okay with a Saturday stream. And so we're going to do this Saturday, which is July 10 2021, at 6pm Central time,
Host 1 01:22
For all those people listening in the future. Hey,
Host 2 01:25
You never know, we'll be surprised how many people listen to our back catalogue?
Host 1 01:29
Oh, for sure. Yeah.
Host 2 01:31
So yeah, this Saturday, July 10 2021 6pm, it'd be on twitch.tv/macro fab, you'll see that URL in Twitter and in our Slack channel. And so what this is, is going to be an introductory to Python and embedded systems, but not in the way that most of these are set up. Most introduction to Python, like, go into Cody, we're not going to Intro This is not intro to coding, you kind of have to know how a keyboard works for this. So we're going to be setting up a Python environment on a Windows PC. Because that's just what I have right in front of you right now. And that's gonna be the easiest, we're going to set up a Python script to talk to an embedded device, and that embedded device is going to be an Arduino. Because that's what I have in my drawer right back here. It's what probably most people listen to this podcast have. And it's the best seo that is the marketing person, right?
Host 1 02:36
There it is. They creep in eventually, but grief
Host 2 02:39
Individually. And so what we're gonna do is we're going to write a Python script to talk to the embedded device over serial communication with this. So this is not a how to write Python, C code stream, like, you don't have to know Python, but you had to have some coding experience. I mean, it's this thing. Code is just code, it's syntax. Changing languages is fairly easy. So if you know if you know how to write Arduino code, you will be able to do this fairly. Yeah. And
Host 1 03:11
Actually, that's what I've seen a lot in our Slack channel of people saying, like, Hey, I know C, but I don't know Python. And this could be really useful.
Host 2 03:19
Yeah, it'll be a very good introductory to it. Because we're going to set up a a Python event, we're going to be using a IDE programming environment called PI charm, which is free, the non commercial version is free, we are not going to use it in the full capability that it has. But we will get started. And maybe I will learn something from someone who will probably have some Python tips for me too. We'll go through some of the modules, like which are Python libraries, the core modules, the modules that I use a lot like the ones for this new one. That was that ice cream one from last week, or two weeks ago, we'll go over that kind of stuff. If we have time, I don't know how long we're going to have this thing run for. I think it's gonna be kind of like till we're done or just tired of talking.
Host 1 04:07
I'll probably at least expect at least an hour.
Host 2 04:09
Yeah, at least an hour. It would be cool to like get the stuff working and then kind of do some GUI work on the on the computer side on the PC side. And we'll be using to cater for the G GUI stuff. Cuz that's what I'm used to. And it's the great thing about that is I want to kind of like only use stuff that's portable, in terms of it runs on any operating system. And so the idea is going to be getting a better device. Yeah, the bit devices Arduino. And then we're going to use the Skippy module that's in Python to handle the communication. And so we're going to set up Skippy as well on the PC, because you have to have the the NI VSA drivers to make that work, which is natural instruments in that That's free as well. So all this stuff is free slash open source kind of stuff. I don't think NIV says open source, but it's free. At least. There is a there is an open source version for it, but I haven't tried it. It's like pi visa. I haven't played around with it yet. Maybe I'll get time to do it before the podcast afford this, the stream and we use that but yeah, I think it's gonna be informative for for hardware engineers to kind of learn setting up a more advanced, like testing system for their devices.
Host 1 05:35
100% I'm really looking forward to this for myself, because I'm 100% a student here. I'm going to be learning a lot myself on this. So um, yeah, I'm really, excuse me, I'm really looking forward to it. Now, I guess to two things that might be helpful here. Sounds like there's a handful of things that we're going to need to download are going to need to install. Maybe maybe it'll be helpful if we could just have a list with URLs that we could get them beforehand, to kind of speed things up. And then perhaps, what might even be helpful, I don't know. But like a small Arduino sketch that handle Skippy they, like you could prove things being communicated to the Arduino.
Host 2 06:20
Oh, yeah. Um, so on that will be when we write the Arduino side for it for Skippy, because we will just have a little script that will write ourselves a sketch, I mean, a sketch. And you can actually just open up a comport and because it's because Skippy communicates over comport with, with Oh, so you can just human readable characters, so you can actually send it over a serial terminal to it to make sure it's working correctly.
Host 1 06:46
Okay. Yeah, I was just, yeah, something that makes the Arduino blink, confirming that it received the code.
Host 2 06:52
Exactly, we're gonna be totally doing that. That'd be like, the first step is we're gonna do that part. And then we'll go jump into the Python part and replicate what we just did in serial terminal into Python. And, yeah,
Host 1 07:06
Very cool. That's, that's gonna be great. So once again, that's this Saturday, July 10, at 6pm, Central, login to twitch.tv/macro. Fab. And join us for that. You know, I had a client provide us a testing script for one of their boards just the other day. And they provide a really great instructions on how to how to use their python script. They also provide a really great instruction saying like, this is the exact version or greater of Python, you need these or you know, your Python code you need to run in order to install whatever modules were required for the test. And it's kind of cool because you plug into the board. And then you run this, this Python Python test script, and it brings up a GUI. And the GUI has all these little sliders and values on it, and you turn pots and switches on his board, and you see the values change. And that's the test you you just need to guarantee that if you turn a pot, you see the slider move. So it was a really well done test if he asked me in terms of making it easy for an operator, because they don't have to know anything, they don't have to care about what the value is, they don't have to look at a scope and turn a trim pot for until a very specific specific waveform shows up. They just turn a pot and see if things slide. If they turn the pot and don't see it slide. That's a failure, you know. And it was all done with this really simple GUI. I really liked it. I think that is a a shining example of a good test on it. Now, the thing that sucks about it is the actual programming connector didn't connect to the board very well. So you have to hold it at a weird angle. So the software side is beautiful. But the hardware side is like ah, like we're 99% of the way there. So there's it's hard to it's hard to make both worlds work perfectly.
Host 2 09:05
Yeah. Well, well, that would be the point of this is we'll try to make both worlds work perfectly with this. One and a half hour stream we're gonna be doing this Saturday. Yeah, yeah.
Host 1 09:17
Cool. Looking forward to it. So I've got an update to our plastic injection molding. For those who maybe haven't listened to the past, I don't know. 30 episodes or so. Occasionally I've been giving an update on a if you haven't, welcome back. Yeah, welcome. I've been giving updates as I go through plastic injection injection molding, a switch that I've been designing. Actually, I've been designing the actuator which which basically fits on top of a snap dome, metal snap dome that that interfaces with some pads on a board and I'm basically building my a switch from scratch. There's a lot of reasons why it makes sense for us to do this. It is cheaper at the end of the day. But it's also, we have the ability to control everything and make it as reliable as we want. And so I actually have the first round of samples of these actuators that I designed. And I've been torture testing one of them. And the goal was to press this actuator a million times or take it to failure, whichever one comes first. Well, I've eventually, you know, after weeks of pressing this button with a with a test jig, I've finally got to what I call a mega press. And we're finally there. I've actually got 1 million presses on this switch, and it's still functioning, it's still working well. In fact, I really do think I could have taken it farther than a million presses. But I'm just, I'm at I'm at a million I'm happy with stopping there. I've no, it can go past that. So I have a handful of pictures. Because at the end of this test, I disassembled my test rig, and I took a bunch of pictures of all the aspects. And all of basically what has happened to the switch over a million presses after million presses. So I've got these pictures up for those who are watching on our Twitch stream, and we'll put them up on on the blog, Mac fab.com/blog, you'll be able to find it when this podcast is live. So the first thing I looked at was the pole, the center stem of the actuator to see if anything had morphed or changed on that. And there's very small indentations on the top from being beaten to death with a linear actuator. It's actually pretty minor. So the the the center stem the part that the user's finger will press, I don't even think after a million presses, you'd be able to tell. I mean, you may have like rounded over the edges a little bit might have that that use plastic sheen to it. Yeah, you might have smoothed it a little bit. But I think I think we'll be fine. The main thing I took I really focused on was looking at the legs of the spring. So I this is a circular spring on this actuator. And I really wanted to see if there was any stress fractures. Or if there was any, like, you know, when you stretch plastic, and you get that you get that white, it changes colors, you go past its plasticity. I don't I'm an electrical engineer, I don't know the right words. But like you go past the point that it will return in its stress curve. I don't I see none of that on this actuator. And from the images, you can look at the it basically looks like it did when I first originally got them. So luckily, there's no big stress issues with it, I just, I don't see anywhere on it. Now here's the here's the thing, the actual spring is moving 16 1000s of an inch, so it's not very much, and 16 thousandths of an inch is the amount that the center pole has to move up and down. But the legs of the spring are kind of rotating. So there at any one like I don't know, cross sectional area of the leg of the spring, it's not moving very much. So this is not surprising, but it's nice to actually test it and figure out like okay, yeah, we're, we're not stressing my actuator too much. Can you scroll down a little bit proceed to the next page. So I took the actuator off the board and took a look at both the snap dome with the plastic overtop of it. Basically the way the the snap domes are are fixed to the board is they're placed on the pad and then a plastic film is placed on an adhesive effectively. The adhesive is about I don't know three thousandths of an inch thick or so. So they're basically just stuck to the to the PCB with tape packaging. Yeah, it's a little thicker and more like I don't know, spongy than then packing tape, but it's pretty similar. You could probably do it with packing tape and I've actually repaired
Host 2 14:11
All the Atari 2600 joysticks have snapped domes that are applied this way. Yeah. And they did it with begging day. And I've repaired because the the plastic had failed after what they're 50 years old now. Yeah. And you just put new Yes, put packaging tape on it. And that seems to work. Who knows how long that's gonna last but whatever.
Host 1 14:37
It seems like a pretty simple fix, right? If it does fail. Yeah, so after a million presses. Luckily, this adhesive film looks fairly good. It doesn't it doesn't have any tears. It doesn't have any, like big issues on it. It does have a little bit of rippling on it. And you can kind of see the direction that the center pull All as it was pressing down on the snap dome, as it kind of tended across a million presses. And that's because the center pole wasn't always pressing straight down onto the dome, sometimes it angled a little bit. So kind of scooped the dome in a way. And that stretched the the adhesive film a little bit, I guess, and kind of pushed it. Now the good thing is that's relatively imperceivable not relatively, it basically imperceivable. When this when this test was done, I actually grabbed my little test jig that has four of these actuators on it. Three of the actuators have been pressed 10 or fewer times, and one was pressed a million times. And I took it around the shop and I handed it to people who have never even seen the jig before. And I told them, three of these had been pressed 10 times and one has been pressed a million times. Can you tell me which one was pressed a million times. And every person I gave it to got it wrong? Which is which is pretty legit. That's great. That's great. That's great. That's exactly what you want. And after I after I told them which one it was, they were like, ah, yeah, I guess so. But but in a blind test, they were not able to tell if it was more or less tactile springy or spongy? Which Hey, perfect. I mean, all of this is exactly what what I was looking for. So So in the next image we have down here I've actually pulled the dome off of the PCB because this was the most scary part. Scary in quotes. I wanted to see how much the dome dug into the pad that it was on because
Host 2 16:37
Oh, yeah, cuz when you're, when you're pressing it down, it's got to flatten out all
Host 1 16:42
Its Yeah, yeah, has pivot points, it's got these little has, it has eight points that actually make contact with the, with the pad. And those points ever so slightly jiggle, not jiggle, but they have motion when you press have
Host 2 16:56
To go outwards when you press the button down. Right,
Host 1 16:59
Right. So in this image we have here you could see clearly the eight points that the dome was riding on effectively. And something that's really important to note about this image, I took this this image with my microscope, right after I pulled that the snap dome and the adhesive off. So I mean, I had it under the scope when I pulled it off, and I just clicked you know take picture on my computer. And you can see the points at which the dome was writing it dug through the Enoch coating on top and it is it hasn't gone all the way through the pad because you can see silver underneath each one of the pivot points here. So it rip through the neck and it's down into the undercoat whatever that nickel or whatever it is on this particular board. So luckily it hasn't eaten through entirely a full pad in a million presses. So the thing that's that's interesting is if you scroll down here, I took I got out the Barlow lens for my microscope and I took a really close picture of the of the pads and they're no longer silver. So in the amount of time it took for me to unscrew the lens on my scope and put the 20x lens on my scope the the under material whatever it is on these boards I'm not entirely sure but it oxidize pretty heavily like in these images you can see that that material is black now. And actually you could see gold dust around the around those points. Like I mean just a million presses have just pulverized the egg into powder around there. And when I first saw this I was like oh this is not good. Because I guarantee that oxide layer whatever is growing on it is non conductive right so I was getting a little bit concerned about that because if if not pressing it can lead to oxidation could you get to a point where a press is just doesn't register but then I thought about it this thing has a huge amount of surface area any one of those eight pivot points needs to make contact but there's more of the dome that can make contact as well. Also when you press it it's going to dig out that oxide layer by itself it's going to self clean and actually about the use that term
Host 2 19:31
Host 1 19:32
Yeah like like like arcade buttons you know how they they're labeled as self cleaning.
Host 2 19:37
Oh well that's the old school with the leaf switches were because the when the leafs which would contact it would contact and then slide against the contact right we effectively cleaning the contact
Host 1 19:50
Off right right. It sort of in the same it mechanically you're digging the oxide layer away. Also, I thought about it in my testing Basically what I was doing is I was I was turning on my test rig at eight or so in the morning and letting it run for eight hours, and then it would rest overnight, or it would rest over a weekend. Every time I came back and started the test rig up, it immediately was registering clicks. So even with multiple days in between testing, if it grew an oxide layer, that never was an issue up to a million presses. So I don't care if it digs through the egg a little bit. And I don't care if it grows an oxide layer. I never once had an issue with it. It is kind of interesting, though, because it only takes a few seconds for that for that nickel to go from a nice silver to full on black. It's not even like gray. Like you see aluminum doing it oxides this it almost looks like black pad. Have you ever seen black pad before? It on a PCB on a PCB? Yes, yes. Yeah. It's like it's it's a very interesting phenomenon where the pad will literally turn black.
Host 2 21:06
Only. I've only seen that on organic. What's that? Oh, so service p
Host 1 21:12
P is whatever. Oh, is? P I think? Yeah. Yeah. We had that once when I was at macro fab. And it sucks because that oxide layer, resist soldering, and it doesn't clean very well. And it resists everything. Well, yeah, they basically, if you see it, it's kind of like a start over. Yeah, almost.
Host 2 21:32
Yeah. Yeah. Yeah. Oh, SP. SP, that's what it is. I've only seen that on OSP boards.
Host 1 21:39
So this was the first actuator, I have one point of data now. So I'm going to continue this test and do at least three or four more of them, I'd love to get to five. If I can get five actuators that consistently go to a million presses, then I think that's enough for me to say I'm, I'm okay with this. Frankly, we only need them to go to like 100,000. So a million is ridiculous. I would
Host 2 22:06
Say the only thing you need to improve with your fixture is to have have it as feedback have a feedback loop because right now you're running open loop. And I would just if I was you, I would just put an opto coupler or an optical put an upflow Opto. Line being basically
Host 1 22:27
Right. So you know that like it should be pressed. And then you ask the question, did it get pressed? Yeah, yeah, that's how I originally had it set up, I would prefer it to be that way.
Host 2 22:38
While you're using that linear actuator, which is basically just a DC motor running a flywheel, right. And so if you use that same setup, you just have to know when it should be in the forward position and when it's in the back position. So you can either do or you can use a hall effect sensor. But that would be an easy way to
Host 1 22:59
Write, right? Just know that you expect a button press and then ask Did it happen,
Host 2 23:04
Right? Because what you could do is just wrote when you're rotating, have a hall effect sensor, just measuring rotation and go okay, we rotate 300 times and I get 300 presses.
Host 1 23:16
I actually did have a handful of I call them quote failures, they're not failures. In my mind, they're more the test rig, just the linear actuator in some situations could push the button away from it, such that it wasn't actually clicking the button. So the linear actual like it would stop in that situation. So yeah, this one was hobbled together a little bit more than I wish but it works, you know. So yeah, and at the same time, I actually have a new batch of actuators that are due to arrive any day now. So I'm going to try to switch over to those actuators for continuing the test just because they're slightly different material.
Host 2 23:59
Host 1 24:00
They don't have the void. They do not have the void Well, I don't know yet. I haven't seen them. They should not have the void. Yeah, yeah. So I'll post up some pictures as soon as I get those.
Host 2 24:12
Okay, so I have an update to but this was with pinball, the penetrator production is going well. It's a little bit slow right now, but it's going well. Boards are slated to be completed soon. So this is like the first 275 of them. So we built for as like a first article and not all worked fine. So this is like the first Ranjit I guess they're legit run so it's almost done. We got Bill 1000 Now though, huh? So what I want to talk about is kind of like the supply chain hurdles. I've I'm going through right now of doing the good 250 was Okay, we got 250 through, but now it's 1000. That's when it's like, okay, now you start buying, you can't just buy off cuts from reels and stuff, you're buying full on trays and reels and everything now. So the main one is the microcontroller. And, and so I'm not going to say what the port number is, because that's irrelevant in this situation, but it's finding alternates and port numbers that will work for you. And something that you can think about when you're actually picking a microcontroller. And how to be better at picking one, I guess, because we actually lucked into, I wouldn't say lucked into, we did pick this microcontroller, because we knew was a really popular one. But also, there was a lot of stock, it's an Atmel, SAM D chip. But there's also lots of variants of this microcontroller. And so we were able to leverage the variants as well. So the big thing to look at in his mind, because right now, like, all microcontrollers are like wiped out on the market, like everything's like zero doubt. And that's basically start looking at like the, on the part numbers start looking at like, can you get away with less RAM, can you get away with less ROM, we were able to get away with, like half the ROM that we needed. So we were able to basically cut that out. And we were able to go to a completely different, almost different chipset just had half the half the rams are now half the ROM size. And that was like, it was like untouched inventory. Right.
Host 1 26:49
The going the other direction can also be helpful as well. Like, if you're scoring more, if you just need more, and they don't have the lower and you're willing to pay a higher price.
Host 2 26:58
I mean, everyone's willing to pay a higher price right now everyone's willing to Yeah, that's that's super helpful. But for this 1000 unit run those were starting to dry up. And so, we I actually just switched to a different temperature range, I paid three cents more per unit and I just got the wider temperature range. And basically what that all that is I found out at least for these chips is just a different coating on the leads of the J leaks on like the QFN qf P I should say
Host 1 27:29
Really what I was like What What purpose does that serve,
Host 2 27:33
But the internals, the dyes the same, everything else is the same, it's just the the tin coating is slightly different with different alloy alloy, and it can resist temperature operating temperature higher. So, instead of like going up the ADC it goes up to like 125 C, right. And a man paid three extra cents I think per unit. So yeah, that's a no brainer.
Host 1 28:01
Yeah, it was no brainer
Host 2 28:02
Because I could just buy 1000 router off the shelf. And I'm done. Yeah, he's also another thing is look at different packages. Sometimes you can get away with doing like a dual package q if P QFN. We're doing we want to do que FPS because we want everything to be visually inspected. With optical, we don't want to have to do X ray stuff in production. So we wanted we want all the leads to come out. But some people don't mind for optical or anything like that. So they want so you can use qf NS but even the packaging matters. What so this is between packages and packaging. So packages are like the physical part itself and it's land pattern that goes on the board. That's where you get qf peas and qf ends and PGAS and so etc, etc. But the packaging is how those parts are stored. Are they on real other on a tray? Are they bulk? That'd be really bad by entering it circuits in bulk, because it's just thrown into a bag.
Host 1 29:10
Are they in tubes, or in there?
Host 2 29:13
That's right tubes. And so a lot of times manufacturers will have a, a suffix on their part number that is the the packaging of how it's like I think like what is it FTDI uses TR for tape and reel which is obvious and then ti if you ever scroll to the very end of their data sheets, they have like four pages of different part numbers that have all different suffixes. It's all the different packages and packaging options for their parts. Now you won't find all those at your normal distributors like Mouser DigiKey. Sometimes you have to go to the dish distributors sell over the manufacturer itself. And they will carry all those or they can Oh, they have them in stock for you. Like I bought my chips directly from Microchip, because it came in a because Mouser DigiKey only really carried these parts on tape and reel and they were all out. Well, Microchip had, like, you know, 1000 of them in tray. And I'm like, Yeah, tray is fine. I don't care.
Host 1 30:26
You know, also above and beyond that it goes even one layer deep, deeper than that. Sometimes there's different reels. Like there's certain resistors we carry that come on a seven millimeter and some that come on a 13, even though they're identical resistors there's a different suffix for seven versus 13.
Host 2 30:45
You're talking about the width? No,
Host 1 30:47
It's a diameter, hub size, basically diameter.
Host 2 30:51
Oh, the core size? Yeah. That's weird. I've never seen it super. We've seen the whole diameter, like a seven inch verse of like, was it a 12 inch? Reel? or bigger? Yeah, but I've never seen like, a core size difference.
Host 1 31:06
Yep. Yep. And it's the exact same resistor and it just different quantity. And different cost actually, based off of that. So it's rare that I've only No, I've only seen one manufacturer do that. But you know, you can. It happens.
Host 2 31:24
Let's put it that way. Yeah, it happens for her. So well, I can tell everyone listening, that's like sweating bullets at their supply chain right now. Talk to your CM. And be like, I'm so lost the ends will just go towards like, you gave him this part number and they will try to give that part number and they can't get it. So that's it. But work with your CM be like, hey, this part numbers got different packaging options and stuff. What about all these? The better CMS? Well, we'll know that as well. But not all CMS do.
Host 1 32:00
You know, also, if you have some fourth site on things, especially on like weird parts, don't be afraid to put different packages on your layout. And you can populate based off of what's available.
Host 2 32:15
Or you can even go if you can do dual footprints, that's preferable, but sometimes you can't. And it might be worth having two different skews of your internal or internal skews. That are I guess they wouldn't be revisions, because I guess they are revisions. But they're parallel. Yes. One has one footprint one has the other footprint. Yeah. That is an option as well, too.
Host 1 32:40
I've seen that happen in an ISO 9001 situation, which doesn't allow for parallel revisions. So it was like you had to roll the revision to make the whatever version you had. And then if you wanted to switch to the other, you had to roll to the next to switch to it. But then if you had to go back to the other one, you had to roll it again.
Host 2 33:01
It's awful. That's rough.
Host 1 33:03
Yeah, it's no fun. I mean, it's clean, I guess you could say but it's annoying.
Host 2 33:09
Yeah, that's annoying. I got it, how you can do it. You have a PCB board as a part number, and then you have an alternate part number PCB, that's just that slightly different bomb and slightly different gerber files that way that would work in ISO.
Host 1 33:27
Yeah, as like a configurable thing. Yeah, because well, because
Host 2 33:31
Because part alternates are allowed in ISO documentation. So you just have you'd have to confirm your entire PCB assembly package would have to be duplicated as an alternative. So it would have to have a different part number which in this case, it should because it has a different package for part on it. Right? Yeah, that was yeah, that is that would be the probably better way to do that than to keep incrementing the revision every single time you had to switch to a different thing because the supply chain issue
Host 1 34:01
Well this this was done not thinking that it would ever switch back and then it did that switch back.
Host 2 34:07
Switch back every six months. Yeah, it's like Oh, no. It very interesting stuff going on the supply chain stuff is definitely like 80 Mega 328 Ps are like, like non existent right now.
Host 1 34:24
Oh, the entire s t micro catalog is non existent.
Host 2 34:30
Yeah. I wonder who's buying all that stuff? I wonder if it's people buying it for future like they're building up stock for next year? Panic buys? Yeah, for sure. Yeah, I wonder how much of it is it's like that whole gasoline thing in Southeast United States where like that pipeline went down and saw a bunch of people panic, like, there wasn't really going to be a shortage of gasoline. But then a bunch of people packed bought gasoline and then caused the shortage right they made it happen. Yeah, they made it happen. So fulfilling prophecies, right?
Host 1 35:03
Honestly, that's kind of like traffic jams, right? If everyone just slowed down, there wouldn't necessarily be a traffic jam. But nobody just slows down. Everyone just raises up to the very front where the clog is at. They make the clog. Yeah. Fun.
Host 2 35:22
No, it's not.
Host 1 35:25
So I ran into something this week that made me smile. I say, I have finally reached real engineering, or at least I find decades since you graduate. Well, that's just the thing. I finally feel like I've run into a situation where I was like, Oh, this is what I thought engineering would be like, every day. And oh, one of those in terms of I okay. If you went back and asked me in college be like, Oh, okay, yeah, that's like a normal day. And so this is sort of the first time maybe not the first time, but like, it kind of resonates with me. So I'm designing this circuit right now. That that solves an issue that has been around for a long time, or I'm in at least attempting to solve an issue that's been around in this particular circuit, you input a pulse, and that pulse gets morphed somehow. And, and this circuit has, has the pulses as an input, but then it has feedback that feeds a VCA. And depending on how that feedback is applied, and the amplitude and the polarity of that feedback, you can change the shape of how it morphs things. So you can move things linearly exponentially, or logarithmically, and anywhere in between. So it's it kind of allows for a lot of variations here. Here's the thing that that that sucks about this circuit. It's well, okay, so let's put it this way, it's really easy to go accomplish what I just said. But what ends up happening is in time, none of these things fit within the same time frame. So let's say you hit this circuit with a pulse, and you have the feedback set such that it responds linearly, it'll start and end at time, zero and time t, where t is your endpoint. But then if you change the feedback, such that it responds exponentially, that endpoint is no longer T It's something else. And then if it logarithmic, it is another t. So the feedback adjust time. And that's just kind of how it's always been in synthesis. Well, I've kind of set out to see like, Could I make a compensation circuit that adjust time, such that they all start and end at the same point? So the only thing that's modifying is the shape?
Host 2 37:51
Oh, man, we're getting the hacking time time. Yeah,
Host 1 37:54
No, it's totally exactly what it is. And so, over, I had this, I had a long weekend, and I didn't have a lot to do. Actually, what's funny is my AC is busted right now, which we're getting fixed that I shouldn't say fix, we're getting a full brand new AC for our house, which is an ordeal. And so my house has been like Uber hot for a while, and I haven't wanted to do anything, but like, sit down and play video games or just not move very much because it's gross. And what like I got the itch, and I pulled out a notebook. And I started writing out the equations for this, like I actually went to like circuit analysis on this thing, which this is what I thought I would be doing when I was back in college. And after writing out this equation, I come to the conclusion that I have a function that goes into this circuit. But this circuit integrates the function itself. So effectively, what happens is I have on I have this function on both sides of the equal sign. And it's inside of a feedback equation. That's an integration. And once you start getting dirty with the math, it ends up being a differential equation. And I'm like, oh my god, like, I haven't seen a diff EQ since diff EQ class basically. Like, I mean, I'm sure like, Okay, here's the thing, if we wanted to Barker AI or any engineer out there, like we could we could make a differential equation happen in our circuits, but like, 99% of engineering is avoiding these kinds of things, like designing a circuit, so you don't have to do this crap. Right. Right. Like
Host 2 39:34
You're laughing country country. Depends on what you're doing. But yes, yeah. So so this circuit is now your whole goal is to make the whole goal in your least what I myself because it's all digital stuff like that. You're trying to make stuff as linear as possible.
Host 1 39:50
Right? Right. Exactly. You're trying to you're trying to get rid of all nasty stuff. And it's funny too, because this entire circuit legitimately has one cup acids, like one capacitor screws everything up, and just makes it makes it nasty. So, so yeah, it ends up it ends up being a differential equation, but not like a really clean one. Because it has, you know, some power functions and things like that in it. And, and I started going down the route of like putting all of my controls into the my equations. So I have I have inside my equation, I have a potentiometer for time, that controls like the rate of things, I have another potentiometer that controls the shape of things, and all this other stuff. And effectively, I was trying to characterize my entire circuit such that I could back solve for A Compensation circuit, or a compensation curve and equation that keeps time fixed. Effective. Basically, my goal was, if I could put in time t, and then make all of the variables stack together such that I get a curve, that could be a minus T at the end. Yeah, effectively. Yeah, like they all they all equate at the end. And I started playing around with this, I even went on to Wolfram Alpha and had it do all my diff EQ for me, and stuff. And then at the end of the day, I was like, Man, this is this is rough, and I was getting some stuff that worked, like legit, like, it was sort of doing what I wanted. Then I just, I stopped and I was like, You know what, this could just be done with Excel, of just like doing trial and error in Excel until the curve popped out. And I did that and what was like hours of work kind of grinding out a differential equation ended up being like 3040 minutes of like, just trying things in Excel until, like, iterative process in my head, the machine learning tactic, effectively, effectively. Yeah, and I'm not saying I haven't solved, like, I don't have the circuit built or anything like that. I just have I have a curve back calculated in Excel. And it kind of got me laughing because it's like, what I thought I was doing in college, which actually, I mean, we had to do that in college. I mean, you took difficult, right? You had to sit there and linear first order homogenous non blah, blah, blah, equal, you remember all those words that you had to go into? It? Yeah, it's not fun, difficult, like, I don't know, a certain type of person really likes that stuff. But yeah, but like, I thought I was going to be doing that a lot. 10 years later, I finally run into one. And I run into this situation, trying to solve an issue that probably hasn't been solved, because no one wanted to do this right? In the past. And I guess I'm speaking to all those college students who are out there is like, my suggestion to you is do well in your classes, learn all that stuff, because it's really great to know it. In fact, what was what was funny was like, in in deriving these equations, I was able to derive the equations, and I laughed about it, because I, I could look at it and be like, I know what this is, because I've done this before. That doesn't necessarily mean I had to grind out the actual solution. And in reality, even if I found what, like, the true honest to god equation was, there's probably not an analog circuit that actually does that, that curve, or does well, or does it perfectly Yeah, right. So like, even if I found like the
Host 2 43:38
Slab of C 6000 DSP on there, and implement that equation in
Host 1 43:42
It, or slap a microprocessor with an A to D on it, and just have the D loop itself and find all the correct values and then you back calculate a curve, right? Like, actually one of the so it's funny, because one of the reasons why I'm even designing this or looking into it, it's not a design yet, but just, I'm kind of exploring right now. One of the reasons is back to what Parker we were just talking about is, is parts shortage, microcontrollers are hard to find right now. So we're looking at Hey, can we make analog circuits that don't require microcontrollers right now? Well, sure. Now you got to start making some some crappy circuits.
Host 2 44:20
Yeah, that so that was the my first so I went to school and my my, when I went to school, my expertise, I guess, because you get the pick, like what like you want to do power or stuff like that. I did embedded systems. Like there's some electrical engineers that do math. Least at UT they do math as their expertise. I didn't embed systems so I was doing I might labs were more focused on you know, writing C code, figuring out digital circuit, logic, that kind of stuff. So that was what I went to school for. work. My first project that first product I had to design and this was for this is back pre macro fab with still with Chris church who's co founder of macro fab, he founded a company called Dan perception anyways, he said he wanted to design a motor controller, joystick controller device thing without a microcontroller. Because he didn't want to program it. And I'm like, I went to school to do that stuff. So I had to learn, like op amps. Like I, like I, we touched, I touched up at like, when I was in school, I touched op amps. I'm like, what they are. Yeah, cuz you have to have to. Didn't do anything with them, though. Like, after that one class. I didn't even do anything with them. So I'm like, Okay, I have to figure out how to make these. Like, how to make this thing work.
Host 1 45:54
Yeah, yeah. You know,
Host 2 45:56
It was fun. It was a good learning experience. I learned how the feedback loops, like actual Fizz, like actually doing it cackling out. Basically, I built a thing I told you before the
Host 1 46:08
Wave core, right?
Host 2 46:09
Yeah, yeah. And then it's probably not the best way to do it. But yeah, it was a triangle wave. And then you change the offset of the triangle wave to go into a comparator that drove a H bridge.
Host 1 46:21
Yeah, basically a PWM. generated that dumps into an H bridge. If I remember, right, you showed me this schematic one time?
Host 2 46:28
Yeah. It's not elegant. But it worked. So and it didn't use that many parts. I think I only used I think you use the quads only for op amps. Yeah. So per channel. And one of those was as a buffer, because it came you had a pot input. So you needed a high input impedance? Yep. Yep. Otherwise, it would, I figured out why I needed it. I just knew I needed it. Because if I didn't have it, it killed the whole circuit. It wasn't till later, I'll talk to Steven, we actually talked about this circuit, at some beers or something. Yeah. And you explain why I needed high impedance input for there. So
Host 1 47:08
You know, and so the thing is, maybe, maybe Parker, and my experiences are different, maybe worth normal. In terms of engineering? I'm not sure. So I kind of want to cap off this episode with a question to everyone. It's what is the most computational intensive work you've had to do in your job? And I'd kinda love to see what people have to say about that. And maybe that'll make our our listeners who are currently in in college excited because what they're learning is practical, or maybe it'll just make them really depressed, because what they're learning is not what you're gonna do. It depends
Host 2 47:46
On the field. It does. It does. Yeah, yeah. Like if I went into the DSP side, because that was actually also part of it is embedded in DSP. DSP has that which is this digital signal processing has tons of math in it, and implementing that math into C code and and in your circuits. So if you go that route, and embedded that is tons of math, I ended up just not following that way in commercial and just ended up not, you know, if you asked me to do it again, I probably couldn't do it. I have to have to study up on it has been forever since I've done any DSP work. Yeah. It's just a shame. I really liked doing it in school. It's fun, though.
Host 1 48:28
So yeah, log into our Slack channel. And it let us know, what's the most computational intensive work you've had to do? And was it just simple addition? Or were you doing like triple integrals and all kinds of craziness and stuff? So,
Host 2 48:44
So mine is I don't know. Because I was solving, I made a model, and then sent it off to a solver. I don't know what the solver did. By No, it was really complex. It was a mixed integral nonlinear problem. And it's really hard to find a solver that does those well, too. Because it's, it's basically it's a theory theoretically infinite solve, you basically have to solve to a certain amount of iterations and go, Okay, which is the best outcome.
Host 1 49:22
Sometimes that numerical analysis is the way to go. But like, you don't actually solve it, you just find values that are close to it. And you say, like this, in the real world, there is an actual solution. So therefore, I'm getting closer to it, you know? Yeah, yeah.
Host 2 49:37
Well, the problem with those those problems is sometimes there isn't a exact solution. That's the trick. So
Host 1 49:46
That's one of the things I really like about slow moving analog signals, like I deal with. If you see something approaching a value, there's a very, very low likelihood that it's going to x flow does something you don't expect as it gets close to that value. Like it's not going to just jump to infinity or negative infinity. You can you can start sort of start to guess where it's going.
Host 2 50:13
So yeah, the Slack channel is mcwrap.com/slack. Let us know. I liked that question a lot. I kind of want to know I kind of want to write my own solver now.
Host 1 50:25
I'll never get to it. Yeah, no, you got more important. You
Host 2 50:28
Got a lot of stuff. Yeah. So that was the backdrop engineering podcast. We're your host Parker Dolman and Steven Greg. Later everyone take
Host 1 50:37
Host 2 50:47
Thank you, yes, you our listener for downloading our podcasts if you have a cool idea, project or topic or crazy formula that you had to solve up a job? Maybe on a whiteboard in front of your boss, how know let us know. Tweet us at Mac fab at Longhorn engineer or analog E and G or email us at podcast at Mac fab.com and the Slack channel is Mac fab.com/slack.
Transcribed by https://otter.ai