Embedded - 444: It Is If You Do It Wrong
Episode Date: March 3, 2023Peter Griffin spoke with us about operant boxes, juggling many projects, getting into embedded systems, and bottle rockets. When we talked about 3D printing, Peter mentioned the Maker Muse Clearanc...e and Tolerance 3D Printer Gauge. The book we mentioned was Hot Seat by Dan Shapiro (Embedded 125: I Like Cheat Codes). Peter on Github Transcript Please note that Peter Griffin spoke with Embedded.fm as an individual and not as representative of Slalom Consulting or any other organization. All views, thoughts, and opinions expressed are his own and not necessarily those of his employer or any other organization.
Transcript
Discussion (0)
Welcome to Embedded. I'm Alicia White, alongside Christopher White. Our guest this week is
Peter Griffin, someone who's a little new to Embedded Systems. Well, he was when I met
him anyway.
Hey, Peter. Welcome.
Hello.
Could you tell us about yourself as if we met at a local maker meetup?
Sure. Hi, I'm Peter Griffin. During the day, I'm a consultant in Solum's data and analytics
practice. And I might think of that as a department. I love the variety and bigger
picture problem solving that comes with consulting. And my superpower is I can automate just about anything.
On evenings and weekends, I split my time between various embedded projects
and being a husband and snuggling with three adorable fur babies,
two cats and a dog.
I tend to get really into my hobbies, always have.
They never really go away.
So when I switch to something new, they kind of just go dormant,
waiting for the right time to reemerge.
And yeah, that's
me in a nutshell.
Unfortunately for you, Lightning Round has been
really bummed about not
recording as often.
And so it really wants to have
a few more questions than usual.
Are you ready?
Absolutely.
I'm looking through this wonderful list here.
When do you think Star Trek-style transporters will exist?
Ooh, maybe never?
Is it better to sort Lego bricks by color or shape?
Shape.
G-Stream or Q, leaky upstream or downstream?
Oh, God, I can't remember.
Both? No, this is a serious question, I can't remember. Both?
No, this is a serious question.
I need to know.
Uh-oh.
I'm kidding.
Look it up.
I'm kidding.
What's the most amazing thing you've built with Legos?
Ooh.
There's a couple contenders there.
Either the prototype for the project I'm working on
or a money-flinging machine that would, like, make it rain.
I didn't have enough money, so I used Monopoly money.
Two listeners, do not email us. We know it's Lego bricks.
I said Lego bricks the first time. I wanted to annoy everybody equally.
Does an ice candle really have ice in it?
It does when you're pouring it. It melts and leaves those wonderfully shaped holes.
Which is better, a ground-level mouse maze or an elevated one?
Elevated, so they aren't inclined to wander out of the maze and into the rest of your lab.
That was a good thing.
What is the optimum proportion of water to air to maximize altitude in a water-propelled bottle rocket?
Oh, it's actually about two-thirds to, wait, say, water to air. So it'd be one-third
to two-thirds as proportions of the bottle. Why would adding weight to the nose of a bottle
rocket increase its altitude? This is actually a really, I can't answer this quickly.
Okay, take your time. That's the short answer.
What's that?
Momentum.
Momentum.
Are there any buildings
on Whitman College campus
that you did not climb up?
Three at the time of graduation.
And since?
At the time of graduation.
That's very qualified.
I haven't had a chance
to add to that.
They've built more buildings. Oh, okay. So there are now more buildings that I haven't climbed. Oh, that's unfair. They shouldn't had a chance to add to that. They've built more buildings.
So there are now more buildings.
Oh, that's unfair.
They shouldn't have done that to you.
Is baking soda and vinegar a good way to create pressure inside of a bottle rocket?
It can be.
It can also be a terrible way.
Favorite fictional robot?
K2SO.
This was seeded by you and I'm not sure
about it, but what is your wife's favorite voltage? Negative 70 millivolts. It's the typical resting
membrane potential of a neuron. Okay. I knew that for a week in 1993. It was far more interesting
than my answer, which was five volts. Oh, last one. Do you have a tip everyone should know?
Yeah, this one I haven't.
I've heard a lot of great tips on this show, but I would say show up before the pandemic.
I used to mean that literally, but really, it's important to show up even virtually.
There's a lot of opportunities now to go to conferences that you had to pay for travel
before.
And now you can show up for free online.
So do that.
It's like the, yeah, show up.
Cool.
So you mentioned Slalom and Data.
How did you get into that as a career?
Ooh, Data is a long journey. It started all the way back with Excel in college. I had a professor
who would pay students to do data entry, and he was really nice about it. And I said, hey,
if I write a program to do all of this automatically, will you pay me as much as it
would have taken? He thought about it for a minute and went, yeah, sure. And so he estimated it would
take about 15 hours, and the first program took me 20 hours. And so it was a loss. The second
one took me 15 and the third one took me 10. So by the end, I was, you know, all on my way to
data and analytics and automation and, you know, my love of Excel.
And have you always been interested in microcontrollers and gadgets?
No, I actually had kind of avoided it for a long time.
And I feel like it's such a shame because they're so awesome.
And it made me appreciate certain programming languages more too.
What programming languages did you appreciate more after that?
Oh, C++ for one.
I took a C++ class in college and was like, why would anybody do this?
It took me seven hours to create a Fahrenheit to Celsius converter.
Like, I can just Google that.
Like, what on earth?
What a waste of human effort.
And then once I was like, oh, this runs on really tiny machines that don't have memory to do anything else.
And they interact with the real world.
Like, oh, that's why a compiler is useful.
That's why it's worth putting all this effort into something that is,
I don't know, just kind of a light bulb moment.
I wish they had done that in college.
Because you kind of lose a sense for the value of programming when you're running it on your laptop
and you spend so long to do things
that are so silly. That's an interesting perspective because when we were in college,
C++ was the main language that was taught. And it was very new at that point. I think they just
switched to it as the language. And there wasn't a lot else. So that was the language you wrote
desktop applications on and stuff.
That was the new, the shiny new language.
That was the shiny new modern high-level language.
Beyond Pascal, beyond C.
So to see the evolution of it being pushed down to being the low-level language.
And it's still used in high-level applications a lot,
but it is kind of interesting how things evolve.
But usually number-crunching ones.
Video games.
Yeah.
Number-crunching ones.
Yeah, right.
Yeah.
When did you, or why did you first try out a board?
So it depends what you mean by try out.
So this started during the pandemic.
I was looking for an indoor hobby,
and that's what kind of got me into all of this.
But the first time I tried the Arduino board, I just made the onboard LED blink, and then I put it away for about six months.
And about six months later, I actually came back and did something interesting with it.
So one of those two times I would count as the first time.
I'm not sure which.
What did you do with it after the six months i don't remember what i did first but
you know basic stuff hooking up a breadboard playing with the the parts it came with um
i don't know making the piso buzzer play the mario song what drew you to it uh it was there
like if i'm being honest there i didn't know anything about it. I didn't know the difference between a board and the microcontroller that was on the board.
I think at the time I reached out to you, it was my parents were sick of me calling them up and asking them questions about voltage.
And they were like, you should really talk to our friend Alicia.
And I was like, okay, like, sure, I guess.
Appreciated all the guidance since what makes embedded cool enough to spend your nights and weekends on um there's a couple
different things i i do like that it's an interaction with the physical world the
applications of it i think are what's kind cool, is you can really do things that fit your needs,
and nobody's made them yet. Like, you can really tailor things in your house and your life to be
just for you, and that's pretty neat. So, you learned some about the voltage,
and more about C, but as you put together devices, which we're going to talk
about what the devices are soon, are you using more computer science, mechanical engineering,
electrical engineering? Which areas have you had to learn the most in?
Oh, gosh. All of the above. Every time I'm like, oh, I don't need that discipline,
it comes and kicks me in the butt and is like, no, no, look over here. I'm going to ruin your day
by, you know, there's a reason. There's whole disciplines around these things. They're not
trivial. Maybe the most circuit board layout was completely new to me.
And making heads or tails of that was not trivial, even with help.
I totally agree.
Layout.
I was like, okay, it's just like playing Tetris or any other pattern game.
And it turned out that was so not true.
I'm finding the same thing with mechanical, which is stuff i'm having to do for the first time and i it's i just need to draw something right no
no you can draw something but then there's a whole other world you have to learn about screw pitches. Yeah, assembly.
That's a thing.
So what was the first big project
beyond playing with it?
The first big project,
the big one was pretty immediate.
The reason Gwen had gotten this Arduino kit
was she wanted to build her own operant boxes. And it had
sat on the shelf for two or two and a half years. And I had promised her that, you know, I wouldn't
take it and go play with it without her. And it's been on there so long, I eventually asked, like,
are you still going to do this? Like, I'm happy to do it with you. But like, you know, if you're
not, can I play with it? And so that kind of immediately was the first big project I dove into.
I think that was kind of what I reached out to you about when we met.
And it was Legos.
I built this prototype box with an Arduino and a bunch of wires and a breadboard and Legos.
And that was the first big project.
And it kind of integrated a bunch of different systems.
And I had each one working independently.
And then as soon as I put them together, not so much.
Operant boxes are things like feeding mice when they touch a button, right?
Yes.
Thank you for the reminder.
I should define this.
So operant behavior, which is the kind of thing you think about when you think of like
Pavlovian training or responding to stimuli. I'm not describing this real well. Operant boxes
are a way of having these behaviors that you can... So for mice behaviors, for example,
these boxes have like either nose poke holes or buttons and the mice will go push the button when
a light comes on. It's a lot like Simon says, except instead of just getting a happy little
tune, you get to actually dispense food. And so the mice very quickly learn like, oh, if I,
you know, push the button when the light is on, I get food. And then these processes can get more
and more complicated to study different components of how mice learn or unlearn sometimes.
So it's like, oh, I should stop pushing the button when the light is on because it'll turn on the house lights and they're nocturnal animals.
So that's kind of obnoxious for them.
And you made this for Gwen, who is your wife.
Yes.
Yeah, my wife is a neuroscientist. She got her PhD at Vanderbilt and is currently teaching neuroscience in a psych department at Wittenberg. She's awesome. And one of the things she saw was like, oh, these really aren't that complicated. Like, it shouldn't be that hard to, you know, put one together,
and I've been suckered into that ever since.
And it is a computer science problem because the scientists want to have all kinds of control
over what you're feeding the mice and when and what they have to do to get it.
And so there's no single solution.
Yeah, that's actually one of the things that has shaped my approach to this the most
is the variety of needs in this space.
It's really varied.
There's some core features, but how those features are used almost by definition have to be
controlled by custom written software. Each lab is going to want to do a different experiment and
to push the boundaries of what we know, those things have to not have existed before. So it's
not really like you can ship a pre-programmed thing with some features and a couple parameters and call it a day.
There really needs to be some deep customizability to these devices.
But how does it work?
Do you have like a solenoid that kicks out kibble or some sort of rotating thing?
So for the food dispensers, there's two main methods. There's pellet feeders
and liquid reward dispensers. So I'll start with the second one. Liquid rewards are something like
some kind of something like sugar water that is dispensed from a little dripper into a trough.
And so usually there's like a syringe pump or a peristaltic pump.
Peristaltic?
Peristaltic.
Okay.
Yes, the word is harder than the concept.
It's basically a liquid pump.
So those are the two main ways of implementing that.
Pellet feeders are pretty straightforward for the most part,
but the ones that are pretty straightforward for the most part, but
the ones that are pretty common tend to not always dispense reliably. And so when you're trying to do
an experiment where the mouse always gets rewarded when they do X and your machinery just doesn't,
that's kind of a problem. They also do things like jam more frequently than they should. So I have some clever solutions to that, I think.
But yeah, there's some interesting mechanical challenges.
Those parts are pretty central.
But exactly when things are dispensed and how much, all of that will vary based on what you're trying to study. When I worked on similar things like a decade ago, we used a photo sensor to detect if the kibble fell pellets because of the potential for jamming and failure of the pellets to dispense. And it really felt very much like a hack
because you're solving a problem
that you really would rather not have the problem at all.
And if only you could just solve the original problem.
So I think I have that solution,
but like it's a step improvement,
but it's not perfect.
No mechanical system with these irregularly
shaped pellets will be perfect. And so the idea is also to incorporate that kind of sensing.
The key part of making it work is if it fails to dispense, it has to fail in a way that it
doesn't... Its failure is not correlated with subsequent failures. Because if you have a
pellet jam, its failure will cause the next pellet not to dispense. And so even if you detect,
oh, it wasn't dispensed, and you go, you know, try and rotate in another pellet,
it's still going to fail. And so the key is you want the only way it can fail to be, oh,
it failed to like pick up a pellet. And if it
failed to dispense it, it's released back into the tray. Are you making little grabber arms like the
video games? Cause that would be really cool. Not exactly. It's more like a Ferris wheel on a 45
degree angle. Um, and so it's, it would be easier to show a picture. It's a great, great concept for a podcast because it's a very visual device to understand how it works.
Did you buy the Ferris wheel? with a close friend of mine and we kind of came up with it together like neither of us we could
we could both see all of the problems and we laid them out and went through like oh this won't work
and if we do this way it won't work and if we do do an archimedean screw it won't work and
all of these other different approaches to dispensing irregularly shaped pellets
and then we sort of came to the solution together and then i just had to design it and print it um go from there did you design
and print that's easy yeah yeah just just design and print it so yes this is another um whole area
where i am getting my butt kicked in what i don't know and what i need to know so designing all of
the stuff i've done so far has been in tinkercad, which sounds insane for the people who know CAD tools.
I've tried Tinkercad.
It is the most simple, right?
A good analogy is it's the Microsoft Paint of CAD tools.
Yes, that's about right.
And so when you're like, oh, yes, I painted the Mona Lisa in Microsoft Paint, people look at you like you're absolutely bananas. But it was kind of the thing I was like,
I know I can get this project done with this, get the prototype out and get feedback. I'll learn a
proper CAD tool later, but like it doesn't, I'm not going to waste time learning a CAD tool before
I know if this thing even works. And so I've found myself modeling my way through making things work in this tool.
So I have started transitioning,
but it's a slow process
to pick up a new tool.
What are you moving to?
Solidworks, the maker version.
The elevated zero maze
that I was working on recently.
So to give you an idea what that is,
it's a circular maze. So
basically a track and it's elevated about two feet off the ground. So the mice don't jump off and run
into your lab and sections of it have very high raised walls. So the mice feel safe and secure.
And then other sections of it have open walls. So they can like, they feel like they're exploring
and it kind of pairs these two drives that mice have to feel safe and secure and to explore for food against each other.
And you can measure anxiety by how much time they spend in each of these relative in each of the sections.
So the problem with that is when you go to 3D print this thing, it's continuously curved and it's very large.
It's, I think, about three feet across.
It's huge. It's absolutely enormous. I had to print it in like eight segments. And Tinkercad
does this thing where it approximates circles with 64 segments, which is fine for things that
you hold in your hand. It's a lot less fine when you want your things to like slot together and
have slide together pieces that
slide around a curve. And it's like, oh, now this curve is segmented. Now it has little bumps. And
like, it's, you know, my tolerances aren't good enough that I can accommodate those bumps.
And so that was what pushed me to, you know, stop messing around with Tinkercad and actually
pick up the big boy software and start learning that.
How have you found that experience?
Oh my God, so painful.
Thank you.
I have nothing positive to say about SolidWorks yet, which is sad because I really want to like it.
But I think it's just early days.
I think I just need to get used to it.
How much ME did you need?
How much mechanical engineering did you need to get used to it. How much ME did you need? How much mechanical engineering did you
need to create this maze? That's a good question. I don't know how to quantify that.
Um, I think the part that was most needed, it's not a particularly structural thing. The part of mechanical engineering
that I needed the deepest knowledge on was around what my 3D printer is capable of. And so that's
a little bit about tolerances, a little bit about overhangs, a little bit about designing to print
in multiple parts and assemble nice friction fits
that can be easily disassembled and cleaned, but also won't fall apart while you're using them.
So that's the part where I would say like, yes, I had to learn some mechanical engineering,
but the broader spectrum of like all the things covered by mechanical engineering,
not so much. Did you, the friction fit seems particularly interesting and hard to me.
How did you learn how to do that?
Trial and error. Basically, I just tried different friction fits. One of the things I found was
there's like a Maker's Muse test your printer part. It's like his most popular purchase design,
I think. And it basically prints a bunch of rotating disks with different tolerance gaps.
And so it goes from like 0.5 millimeters, I believe, all the way down to like 0.15. And
you can basically see if you can rotate these things after you've printed them,
which is cool because it tells you like, you know, how tight are the tolerances on my printer. And what I found was like about
0.3 millimeters was about what my printer could do cleanly without having to like break things off
or like sand or do post-processing. And that was still a pretty snug fit. What I ended up going
with was a 64th of an inch because in Tinkercad, all of these boxes, all of the measurements are in inches.
So I just set my system to inches and a 64th of an inch is somewhere between 0.3 and 0.4 millimeters.
So it's still a pretty snug fit, but it's slightly on the looser side.
So I generally haven't had problems with that so far, but I know I'm going to have to redesign this whole thing
because not every printer is a... What I have in my office is a Prusa i3 Mark III S or something,
S Plus, something along those lines. And it's got incredible tolerances. It is amazing for a filament extrusion printer.
What I'm trying to design is, I'm trying not to make the M4 of designs where it has to be like tightly maintained and the tolerances are very demanding.
I'm trying to make is the AK-47 where you can bury it in the sand for a month, pull it out, and the thing still works. So I'm trying to, I need to redesign all of the parts with different tolerances so they can be
printed on Gen 1 3D printers that a university might have on hand. So the zero maze, is that
what it's called? Is that because it's a circle or is there another reason it's called that?
That's exactly why it's called the elevated zero maze. it's a variant of the elevated plus maze which
gets its name for the plus shape um the big difference between those is the plus maze um
each segment like each of the branches is either has those raised walls or doesn't and the problem
is in the middle it's unclear whether the mouse is exploring or hiding because they have raised walls on two sides
and open walls on two other sides. And so sometimes you get mice who just kind of hang out in the
middle and it's hard to kind of quantify what are they doing. So the variant is to turn it into a
giant circle so you don't have this weird, awkward transition zone that's unclassifiable.
And are these traditional, well-understood mazes?
Or does a scientist say, I want to design a maze that has three branches to the left?
These ones are pretty standard.
So the kind of behavioral things you measure, these mazes are aimed at measuring certain types of things, usually some measure of anxiety.
So there are other mazes that people develop to measure other things, and some of those get more exotic, I guess is a way to say it. The thing with these is
they normally cost like a couple thousand dollars for one. And what we are testing this semester is
basically being able to make one for a $20 roll of filament, a 3D printer, and about 10 feet of PVC.
It's really pretty straightforward, and we're hoping that these kind of designs will open it
up so that universities have other options and can make these things more accessible
to undergraduate students when they don't have huge lab budgets.
And that's the same principle for the operant boxes, making it more available and cheaper and more flexible. Yeah, exactly. They're kind of at
different price points, different markets, in a sense, like the elevated zero mazes are on the
cheaper end of lab equipment, like, oh, it's only $1,000. So making those cheaper
and more accessible means making them with tens of dollars. The operant boxes, those tend to run
$40,000 for a set of four is not uncommon. And the really nice ones with touchscreens run $80,000
plus for a set of four. So they have a lot of challenges. And so making cheaper ones that are
more accessible doesn't just mean bringing the price down. It really means also making sure they
aren't locked into a special ecosystem with proprietary languages. That's actually pretty
common, which sounds weird and archaic to those of us who are like open source everything, but
that's just the way it is right now.
How far along are you with the operant boxes?
So I would say I'm on a version one prototype.
We're hoping to have them deployed in Gwen's lab and start testing them this summer and hopefully get a paper out in the fall and present that paper maybe at a poster session at SFN, which is the Society for Neuroscience
Conference. So that would hopefully give us a little bit of feedback about whether anyone else
cares about these. It's a little hard to know whether or not there's actually a market here.
And so if we do this kind of poster session presentation and we get lots of people coming
up going, you know, tell me when you can buy one, take my email.
Like, okay, maybe there is something here.
If people are like, oh, that's nice.
I'll just keep ordering boxes from the company I've been ordering them from.
Then we know that this is helpful for Gwen's lab and we'll leave it there.
But you're moving away from Arduino towards CircuitPython, right?
Yes.
So yeah, this is actually kind of an odd thing.
I'm doing both Arduino and CircuitPython, and that's very intentional.
The goal with these is the end user needs to reprogram them.
And so because that's a really core design feature, it really needs to be as accessible as possible.
And it's not just, oh, the end user needs to reprogram them. Let's throw them into the STM32Cube IDE. It's like,
no, these people aren't programmers. They aren't chip developers. These are scientists. Their goal
is not to write a program. Their goal is to test something new. And a program is just in the way,
to be honest. So, I mean, coming at this from my programmer background, I'm like,
oh, I can do programs for that, but I can see the pain of using this. Like, I've watched Gwen
struggle with, like, the MATLAB code she had to use to analyze certain signals in her lab.
And so, I'm like, okay, I know this can be easier, but I can also see the pain points of the existing boxes.
These proprietary languages are challenging to learn. They don't have much transferability.
You're very limited in what you can do, and the documentation is just whatever's there.
And one of the things I saw as an opportunity is by focusing on Arduino and CircuitPython, there's this huge, huge library of existing documentation.
And it's no longer an anchor that weighs you down of like, oh, I built this custom language. Yeah,
it's great for this task, but now I have to document it all. Now I have to maintain it.
And all of a sudden, as soon as it's released, it's out of date and it doesn't do the things
it needs to, and you have to tack things on. And so that
just seemed like a bad way to go. And making sure that these were compatible with these two
very common ways of programming microcontrollers seemed like it would have a lot more opportunities.
And the reason I'm focused on both is I think there's kind of two markets here.
There's going to be universities that are giving these to undergrads and saying,
oh, do your first research experiment.
I think that's more of the people who are going to be using CircuitPython,
where they're completely new to this process of programming a device,
and they may even be completely new to programming entirely.
And it may not have all of the advanced timing and interrupt features
that they would want for some of the advanced monitoring of neural circuits, which requires very precise timing. But I wanted to
make sure I picked hardware that wouldn't close off that path. So making sure that it was compatible
with the Arduino ecosystem means you could use C++ and interrupts and all of the more advanced
features. Now that totally makes sense. But if you're going to a conference and asking if people
want this, but you're also very much in the open source, let's make it available to anybody who
needs it, how will you make money?
So that's a great question. It's right. If you're giving away the product and the design
and you're relying on open source libraries for the coding, what exactly is it that you sell?
So part of the assessment of figuring out if there's interest is maybe people are only
interested in building these themselves and there really is no market to sell anybody anything. That's fine. It still improves the world just to put out these designs and maybe
leave it there, let other people contribute to it. What I think is more likely is that people
are like, oh, that's great, but I don't really want to build it. That seems like a lot of work
and it seems complicated. Can you just send me one? And I think that there's going to be kind of a spectrum here.
There's going to be some universities that just want their students to go build them themselves
and they don't want to spend a lot of money for it or they just don't have the budget for it.
And that's fine. I'm never going to be able to sell anything to those people anyway. And now
they have something. There's going to be people who want it fully assembled because time is
precious and they don't want to stick around with printing it and making it. And that's totally fine too.
And I think there's also an intermediate group that's going to say, oh yeah, I'll just take the
base design, print it myself, assemble it. But hey, can you make me a custom part that slots in
to your existing design and adds feature X? Because of the sort of, I don't know, unique
nature of each experiment, I think there's going to be kind of a market for customizations or add-ons
or other things that are compatible with once an ecosystem is established, like an existing
standard. Do you want this to be a business that's your full-time job?
I'm not sure yet. I'm open to that possibility. I really like what I'm doing currently. So it's kind of hard to just say, oh yeah, like I would jump on this as soon as possible.
I would like it to fund its own development, if that makes sense. It doesn't have to be my full-time job.
When you started this in 2020, could you have imagined where you are now?
No, not really. I didn't know what I was getting into in 2020. I just thought it was interesting and I wanted to see where it would go. In some ways, I always had this, I don't know,
grandeurous vision of where things could go
and trying to make sure I wasn't cutting that off by not planning ahead.
But it's very different to think,
oh, it might turn into something bigger
and actually see progress in that direction.
But I seem to recall you thought it wouldn't be very hard.
Oh, yeah. No, it can't be that hard. It's only a couple sensors and so on and so forth. The hard
making one box for yourself is not hard. That I will say. What's hard is making it
reproducible, well documented and accessible. And what I mean by that is I'm
trying to design things so that they can be what's called drop-shippable. So if I get an order,
I'm not pulling it out of my closet and putting it in a box and sending it off. It's a program
that automatically orders parts from a number of suppliers and ships them directly to the customer.
And that means that those parts have to be designed in a way that the suppliers can manufacture them
or the end customer can assemble them.
And this has a lot of important consequences in this particular work because it cuts out inventory costs.
It cuts out additional shipping costs, which means the price point for these things could be a lot lower than traditional manufacturing methods. But it does
mean I have to design them to accommodate those processes. How are you learning this new field of
manufacturing? Well, business, manufacturing, inventory, timeline, supply chain.
How are you going about learning that?
Not trial and error, probably.
Well, no, you'd be wrong about that.
Trial and error.
All right.
So for the boxes for Gwen's lab, for example, I printed one of them.
But the print time right now before doing a redesign and some optimizations is about two straight weeks of
printing and probably more than two rolls of filament. So it's intensive. And the deadline,
what we were originally looking at for our class was much earlier than I could print four boxes.
And so we looked at basically hiring, there's these contract 3D print services where you can send them your files and they'll ship them out to print farms all over the world and then ship you back the parts.
And so I got to do trial and error with that.
And one of the things I learned is that my tolerances were way too tight and a lot of the parts I got back wouldn't slot together because the machines they use are whatever people don't want to use for something else.
They print, but their tolerances are bad.
Let's just say that.
And variable, probably.
You probably get some parts that are...
Yeah, and there's weird things.
Like when it goes around a corner, it doesn't reduce the amount of filament.
So you get these corners that are kind of like bulgy and rounded.
And so it's like, oh, yeah, I forgot that the Prusa does that really nicely.
And so you can't have square pegs that slot into square holes.
You have to have square pegs that slot into square holes, but with little extra cutouts for the corners.
And yeah, those kinds of things.
We've talked about two projects, the Elevated Zero Maze, which is print project, and then the Operant Boxes, which are electronics and code and printing.
How big are they? They take two weeks to print? Yes.
So part of that is,
like, there's a lot of long prints,
like the tall,
there's like four tall columns and those take like,
those can take 18 hours to print.
I think I was printing them in pairs.
I'm trying to remember what took so long.
It's a fairly large amount of filament
in version one. So part of the problem
is I can't quite run them around the clock because it's like, oh, this part only prints for three
hours. And so I could start it, but then I can't change it in the middle of the night. So I lose
some time printing a three-hour part in the evening.
There's some stuff like that.
There's some stuff where it's just not as optimized as it could be.
So my parts are probably bigger than they need to be.
There's probably more parts than there needs to be.
Things like that.
I could probably use circuit boards for some of the paneling with the right coding.
But right now I'm using 3D printed panels. So that just takes more print time.
Just buy more printers.
You know, I wouldn't mind that.
That's not a bad idea.
But it does sound like a redesign
might help you organize these
so that you have everything that prints
about the same amount of time on the same print job instead
of maybe printing a column here something smaller there yes there there is that component um
it's just a balance of trying to figure out the more things you make 3d printable the less
extra materials you have to
source and that becomes increasingly interesting when you talk about like oh a lab in europe
might not be able to get imperial measurement bolts right um so it's it's kind of a trade-off
where i think what if i had to guess i think the final version is going to have it both
ways there's going to be a I don't want any extra materials here's how you 3d print it and then
there's the oh I don't want to waste you know time 3d printing it you can cut a third or half the
time out with some basic fasteners making it this flexible and making it drop shippable does add to the complexity. You could do it all yourself and ship them a finished product, and that might decrease the complexity of the system as a whole. Is there and bandwidth is limited, and I want to make sure that stays focused on design and improvement. And yes, I can assemble some, but what I've seen so far is there are some labs that have done their own designs, and they're usually pretty rudimentary.
And some of them use an Arduino or Raspberry Pi to add some feature for operant boxes.
But even the ones that are published as open source projects aren't really as reproducible as you would like. And it's mostly because the person who would go
to reproduce it goes, oh, I don't actually need that feature. Mine's a little different. I need
to do something a little different. It's not obvious how to extend it. And they actually have
to do it themselves. And so I think a lot of the challenge for why these haven't caught on
is kind of the same reason why I think an open source thing could work as a business is that it's not exactly a maker community where people will just
grab the free design online and go make it themselves. There's actually a lot of friction
there. Have you been part of the maker community before this? No, not more broadly.
I've definitely made things before this, but sharing them or being involved in a larger community, I think, is something that has become more appealing to me now that I'm older.
Speaking of a community, you are currently leading the book club on our Patreon Slack slack i believe it's dan shapiro's hot seat
yes um that's a really interesting book i actually got the idea to read it um from one of your
earlier episodes a long long time ago uh so we're only about a third of the way through the book at
the moment um but the section we've read so far has been really helpful for someone like me who's trying to figure out if this is something that I should be doing and how and what it means to start something new.
This is a book about startups?
Yeah, sorry. I should have given that broader context first.
Actually, could you describe it a little better?
Yeah, it's from what I can tell, it's a book about the process of being a startup.
And he speaks to his experience having gone through five or six up to that point.
And they're all a little different and they have different things.
And he talks about a lot of the processes and he even has some exercises, which I've gone to the
trouble to actually do about like how you should split founder shares or how you decide which
startup to do when you have dozens of ideas. That's not my problem in particular. In this case, I don't have that many
ideas. I'm pretty skeptical about new ideas that might change things. I think this one resonated
with me because even if I was off by an order of magnitude in the costs, I knew there was still
margin there. And I was like, okay, if I think this is exciting i'm probably wrong but i can be wrong and still come out okay so and it's helping someone you care
about so even if you're wrong such that you don't make money as long as yes you can help there's
some value in learning all of this and helping exactly and it's yeah i knew it wouldn't go to
waste if that makes sense.
Like it has, the prototypes even have value to, yeah, to someone I care about.
So even if those are absurdly expensive and it doesn't go beyond that, like at least those have value.
You said you don't have a lot of ideas, but you mentioned recently in our complainatorium that you finished one project and started five more.
Yeah.
So I do normally work on multiple projects at the same time.
I'm kind of like start a dozen to finish one type of person.
So that's it.
The complaint in complainatorium is more about like I was working on one project which had a deadline and it kept me laser focused and I hated it.
But it gave me some perspective for like, oh, I actually got something pretty impressive done because of that deadline.
And the things that I want to get done now, normally I don't care about deadlines.
Like my side projects are to learn.
It doesn't matter if I finish them. But the five
side projects that I started working on after this, I kind of, I don't know, there's not a lot
of learning going on. And so I'm doing them mostly because I want the finished product. And so,
you know, not being terribly focused on any one in particular doesn't get me any of the five things
that I kind of want to build. But you also were having fun bopping between them.
Yes, it's a difficult balance sometimes.
Did we have a conversation about orange juice recently?
Or was that offline?
I don't remember a conversation about orange juice.
I don't remember a conversation about orange juice. I now want orange juice. in the world and you may be providing high quality, super duper defense evolution orange
juice with other yummy things. But then if someday you stop having input, you stop having whatever it
is that you take in as fuel, without oranges, you can't make orange juice even if you're the
best juicer ever. And I bring this up because it is important to sometimes just have fun and not make progress.
Although it is also sometimes important to make progress, even if it isn't fun, because then you get the dopamine hit of being done, which is such a nice dopamine hit.
It is, but it doesn't last as long as you would hope.
What are some things that have surprised you thus far with embarking on this project,
apart from 3D printer tolerances?
Oh, gosh. I don't know. There's a lot of little things that have surprised me.
It's kind of just been like a series of small little surprises.
Every new domain that I have to learn has its own surprises.
I don't know that there's been big surprises.
Sorry, that's not a terribly exciting answer.
Sometimes having a hundred little surprises all the time is...
Nibble to death by ducks.
Yes.
That's accurate.
So one of the things you sent me before the show was a 70 entries long, which I have to admit made me laugh.
But you have since put in that many of these are completed.
So you only have like 30 open right now.
Do you always keep this good of documentation on which projects you have going on?
No, I started doing this actually because I was listening to the podcast. And as I was working on little things to learn, I was kind of bouncing around and the lightning round question of,
you know, finish one or start a dozen. I was like, I don't know, am I working on a dozen?
I should write them down and find out. I can't actually keep track of them all.
So I started writing them down and, and then very quickly, I think I had eight when I started and
it wasn't more than two weeks before there were more than a dozen. So, um, that's kind of where,
where the list came from was just to know if I'm the, you know you know, finish one or start a dozen.
And it turns out I do a lot of both.
But usually there's about a dozen or so that are broadly open or waiting to be worked on.
Has it been hard to kind of focus on this thing that you're trying to make a serious project
and not get distracted by the other ones?
Not get distracted by, say, tearing apart your headphones
and changing everything inside of them.
Yeah, I mean, I think they broke.
He had to fix them.
You know me well.
So yes and no.
I mostly use the other projects as a way to not burn out on the main one.
So because there was a deadline for getting the boxes version one ready for Gwen's class
in case they wanted to do that kind of research,
I was working basically exclusively on that
for about six months straight.
And when they decided they didn't want to do
that kind of research,
I was very much relieved being at like the 95% mark,
but was very ready to just start
doing some other stuff in the meantime. And there's still lots of learning and a lot of
things tied back. But yeah, it kind of goes in spurts. And so I tend to set the other
miscellaneous stuff aside when there's something I actually need to make progress on. But right now I'm kind of in a
lull. So I'm doing a little bit of everything. We just mentioned your headphones and fixing them,
but you have been doing a lot of projects with salvaged parts.
Yeah.
How did you get into that?
So that was kind of interesting. I think when I started, I saw, I don't know,
maybe a couple of videos where people noted things that you could take apart to get something useful.
And there's always that, I don't know, drawer of junk electronics. And I was kind of curious how
they worked. And I just started taking things apart to see if I could find things that were
useful. And I would actually recommend it if you're looking to get started.
There's a couple things that I didn't expect to get out of it
that were actually really helpful.
One, if you build things out of salvage parts, it's the hard way.
It is not the order two boards that are supposed to be compatible
from Adafruit and just stick them together
and download the sample code and you're off. You have to look up the data sheet. You have
to find the markings on the chip and figure out what kind of chip it is and figure out the pinout
and do your own testing. One of the other benefits is it gives you kind of one of everything.
If you take enough things apart of different varieties, they have components.
So the reason I do it, I like doing it. One is it's kind of a form of recycling. And two,
I think my brain is broken. I think the way my brain evaluates these hobby projects is it looks
at it as a percent ROI on the raw materials. It doesn't matter how long it takes me to do it, but if the materials cost me nothing and the end product is useful to me,
then that's like an infinity win, which is a little silly, but I don't know.
It just shows you don't value your own labor.
Pretty much. So that's largely why I do it.
There's some really neat stuff that you find when taking things apart.
One of my favorite discoveries was I was taking apart an alarm clock.
And I was like, oh, this is like, you know, a fairly simple system.
There's going to be some kind of like clock and a couple other things and a display and maybe a display driver.
And I'll take it apart and take these different things apart and repurpose them. And there was none of that. There was one single IC on the
board. And when I desoldered it and cleaned it off and figured out what the number was,
it's an alarm clock IC. Almost all alarm clocks have this IC. It's an integrated circuit that
does one thing. It's an alarm clock. And that's why almost all alarm clocks have snooze buttons,
because on this IC, there's a dedicated pin to snooze. And it's a feature of the IC. And I was like, oh,
it's just one of those things where completely useless, waste of my time to desolder.
But it made me realize when you take things apart, sometimes you find really cost-optimized
things that aren't that general purpose.
And sometimes you get really juicy things that were made a long time ago before those optimizations were made, where they're really made of basic components.
You know, there's a toaster chip, too.
Yeah.
And it's got a bagel input.
The bagel pin.
The bagel pin.
That's delightful. I did not know that.
Yeah, I think for anything sufficiently high volume,
there's a dedicated little IC for it.
It costs three cents.
The bagel pin.
Bagel pin.
Yeah, I want somebody to do like a whole compendium
of chips with weird named pins
for strange functions like that.
Snooze button, snooze pin, bagel pin.
There's got to be some others.
I have a question about the mouse thing.
Yeah.
Have you considered grabbing the mouse
and bringing it to the food instead?
Because that probably would solve a few problems.
Well, yes.
Well, the mice are about the same size.
So the food, you said the food was variable size.
So if the mice are...
Well, yes.
Oh, oh, you mean having the device.
Grab the mouse.
Okay.
And hold it over a bowl of food.
Oh, so when the mouse.
So you're thinking like a pick and place machine,
but instead of taking the chips off the feeder and putting them on the board,
it's taking the mouse off the board and putting it next to the reel of chips.
Right.
It pushes the button and then it gets picked up and transported to the food, where it gets a second to eat, and then it's transported back to wherever it was.
Yeah, there's no chance that would jam or cause harm in any way.
And the mice would certainly enjoy their little flying adventure.
I mean, yeah, you could change it up a little bit.
You wouldn't have to be a grabber.
It could be like a thing that scoops under,
a little plate that scoops under them,
like a little elevator, like a little Mario platform.
Or like a tractor?
Oh, wait, so when they push the button,
they're already standing on a Mario platform.
And that just, this is easy.
So you take, okay.
So they're standing there, and you've got a couple motors.
So when they push the button, the side walls come up, so they can't fall off.
And then it lifts them up, and then it just slides over to where the food is, and then it slides them back.
It's a little elevator.
I mean, it would be consistent.
Star Trek, what do you call them?
The tube thing.
The hyper tube.
The turbo tube.
The turbo lift.
Interesting.
I can't say that anybody's done that before.
See, it must mean it's a good idea.
That's what it usually means, yes.
Your goal of making something reproducible by many people seems at odds with the salvaging.
But those are just two different hobbies, right?
I mean, they're not hobbies that you terrible.
Two different areas of interest.
Yes and no.
So the version zero prototype made with Legos was also made with salvaged parts for things that didn't come in the Arduino kit.
But that was because I didn't need to make more than one of them.
I was just checking that there wasn't a $40,000 reason this couldn't be done. And so it didn't matter whether the LED came from some toy that
I took apart or whether the fan came out of a broken computer. I just needed to see that it
could be put together. The version one that I've been putting together, I have had to tamp down on my temptation to build them out of salvaged parts because I'm like, no, I need all of these to be the same.
And I need them all to have the same things.
And I need to be able to tell people where to get them.
And I can't just say, oh, go take apart a printer.
And you're looking for a stepper motor, but it has to be this big.
And no.
So, yeah, those are at odds um occasionally i dig into the salvage bin and
pull something out in a pinch to test that it'll work before i order four but um you know other
than that they're those are pretty separate yeah oh peter um it has been really great to talk to
you do you have any thoughts you'd like to leave us with?
Keep exploring and learning. It makes life more interesting.
Our guest has been Peter Griffin, consultant at Slalom,
data engineer and embedded systems enthusiast slash developer.
Thanks, Peter.
Thank you. It's been a pleasure talking with you.
Thank you to Christopher for producing and co-hosting. Thank you to our Patreon subscribers for their support.
And thank you for listening.
You can always contact us at show at embedded.fm or at the contact link on Embedded FM.
And now, oh, I'm sorry.
The lightning rod had one more question for you, Peter.
No.
Returning to bottle rockets and baking soda and vinegar yes is that a good way to clean the kitchen cabinets and ceilings now i know who you talk to
um it is if you do it wrong