Embedded - 284: Honking Big Asparagus
Episode Date: April 4, 2019Ori Bernstein (@oribernstein) joined us to talk about the dielectric constants of foods, reflective energy steering, and smart microwaves. Elecia got a little silly. Ori works at Level Hot Pantry for ...more about the smart microwave, check out his !!ConWest talk. Ori has a github and personal site. EMSL papadum testing (where our thumbnail came from, with permission) Hackaday explained recently why grapes explode Short intro to how a microwave works
Transcript
Discussion (0)
Welcome to Embedded.
I am Alicia White, alongside Christopher White.
And in studio with us this week is Ori Bernstein.
He's going to tell us about how microwaves work.
Hi, Ori. Thanks for joining us today.
Thanks for having me.
So tell us about yourself and how you got into microwaves.
So I'm a software engineer.
I got into microwaves because I put my resume on hire.com.
Leonard found me.
Leonard's the CEO and said, hey, you want to join this company?
I talked to him for a little bit, went, you know, the problem you're trying to solve is
actually kind of hard. I think you're a little bit, went, you know, the problem you're trying to solve is actually kind of hard.
I think you're a little bit doomed.
This sounds like a fun problem.
I'll join.
I didn't say that I think that you're a little bit doomed part out loud at the time.
Although I did tell Arvind that later.
I once had a job interview where I told them they were a little doomed.
That only made
them want to hire me more. So it's not always, you know, the end. Yeah. So before Leonard and
Markov, what software engineer, what kind of software engineer? I think I'm kind of a generalist.
Before that, I was at Facebook working on network infrastructure.
Before that, I was at Google working on ads.
And then I'd done a bunch of OS and compiler stuff at various internships over the... Well, I was still in school.
I mess around with basically everything.
At heart, I'm really a systems guy.
And yeah.
There'll be more specific questions.
But before we do those, we want to do a lightning round where we ask you short questions and we want short answers.
And if we are behaving ourselves,
we won't ask why and how and all of the questions
that will inevitably come up when I ask you such things as
peeps or grapes.
Grapes.
Favorite wave.
Sign.
Favorite frozen meal.
That shouldn't be a stumper.
Yeah, I do not like frozen meals.
Startups are big companies.
Startups.
Favorite programming language. C. Favorite big companies. Startups. Favorite programming language?
C.
Favorite operating system?
OpenBSD.
Or Plan 9.
Plan 9?
Oh, wow.
There we go.
I actually have a Plan 9 laptop.
Do you have a tip everyone should know?
Think through your problem before you try to solve it.
Nah, that'll never work.
Complete one project or start a dozen.
Is this advice or your preference?
What you do.
What I do.
Not what you recommend to other people.
Okay, so a microwave.
And I've been kind of cagey like microwaves,
but it's peeps versus grapes was the the real question and uh so you
work on a smart microwave and what why huh why i don't want a dumb microwave
oh and what's a smart microwave what's a what's a smart microwave yeah My response to that is, yeah, I kind of do want a dumb microwave, except this one actually cooks better.
And that's the reason it's interesting.
A lot of Internet of Things devices in my mind just kind of say, hey, we take this thing and it does the thing it normally did the same way it normally did it.
There's no advantage to this, except now you have firmware updates and insecurity.
And now you need the internet in order to turn on your lights.
Yeah.
So what we're actually doing is we're taking the heat patterns in the microwave,
we're shuffling them around,
we're trying to cook things evenly,
or we're trying to, well, we're mostly trying to cook things evenly,
but sometimes foods cook to different temperatures and we can also deal with that. So assuming we're
doing what we're supposed to be doing, you could cook, say, a delicate s'mores cake sitting beside
some pork belly, which needs to cook to a different temperature.
So dinner and dessert at the same time.
If that's how you roll. Or maybe asparagus and oatmeal.
Yeah. Things that don't really go together.
Asparagus and oatmeal. Or things that do go together, like chicken and asparagus.
Okay, so we're going to cook things to different temperatures. how do microwaves work?
I mean, you know, I know it works because I put stuff in the microwave
and then I push the button and then I come back and it's half hot and half cold.
How do dumb microwaves work and why is it half hot and half cold?
Okay, so you have a few parts of the microwave.
You've got the magnetron, you've got the waveguide, you've got the cavity.
And usually you have a stirrer or antenna and maybe a turntable if you've got a consumer-grade microwave.
So the magnetron produces microwaves.
The microwaves bounce up through the waveguide into the cavity and form a standing wave. The standing microwaves have a wavelength of about 10 centimeters
or 3, 4 inches if you're American.
I'm Canadian.
So 10 centimeters.
And you get kind of hot and cold spots at those intervals, roughly,
depending on the specific standing wave you get in the cavity.
Consumer-grade microwaves especially don't even try to move that around very much.
Commercial-grade microwaves have an antenna that rotates instead of a turntable,
and that kind of changes the standing waves up, but not in a very even way.
So these standing waves, of course, have hot spots and cold spots.
If you're not sure exactly what a standing wave is,
imagine that you had a skipping rope tied to a wall,
you were waving the end, and as anyone knows,
you get parts that move a lot and parts that kind of stay still.
So standing waves work the same way.
And so the cold spots are actually the parts that stay still.
Yeah, exactly. And I think I saw
on Evil Mad Scientist a way to find your microwave standing waves. Have you seen that?
Yeah, I have. They put in papadums, the crackers that you can get often at Indian stores.
And they put them in, they're so flat,
and you put them in the microwave and the parts that puff up,
it just shows you what your microwave pattern is.
Yeah, and you can actually calculate the speed of light from that.
That's a fun little physics for kids thing.
You do that and, you know, use the wave equations and stuff and you can figure out the speed of light.
You've got some smart kids.
Sounds so cool. I didn't realize.
Have you done that with your microwave?
We haven't done it with Papa Dom's.
Actually, once I saw that, that got on the list of things to try.
We've done it with a lot of other things, though.
So we've got a thermal camera in there.
So even if you don't cook it, we can see the kind of heat patterns you get.
So we get the exact same kind of effects with just a sheet of cardboard in there.
The cardboard will heat up and you'll see standing wave patterns on the cardboard.
Other things we've done...
Are there any downsides to putting cardboard in microwaves?
Not really.
Okay, I'll be right back.
The downside...
No.
So the downside is that
if you don't have something else
in the microwave with it, the cardboard doesn't have
enough mass and you might
get reflections back into the magnetron
and damage it.
But that's not the cardboard fault.
That's the fault of you having old cardboard.
So I need cardboard and a glass of water?
Yeah, cardboard and a glass of water works.
Take the staples out first.
The other thing that we've done, which is more visual, but actually doesn't work quite as well, is we have a board
with a bunch of LEDs on it, and each LED has a couple of antennas. The antennas will pick up the
microwave radiation and will light up the LEDs. Oh, that's cool. You're not supposed to put metal
in the microwave. I have learned this the hard way. You're not supposed to put spiky bits of
metal in the microwave. You can put in a round lid, for example, or a spoon, and it'll work just fine.
I'm going to say right now, don't try this at home, because I don't want to get blamed. But
if you were to try this at home, please do send me a picture. No, I am really sure they told me
never, ever, ever, ever put metal in microwaves, and now you're telling me something different.
It's a good rule.
It's a good rule by default, and there's no good reason to put metal in a microwave, because
you're not going to be cooking it and eating it.
But it's the shape of the metal that makes it worse.
It's the shape of the metal that's the problem.
Why?
So, if you think back to your high school or first year of electromagnetics,
you may remember that the electric field and static electric charge on a piece of metal is
is proportional to the inverse of the radius of the curve. So the sharper the point,
the higher the electric field. As you get a sharp point, you get a high enough field induced by the microwaves to actually start arcing and sparking and damaging things.
Why do grapes arc and spark and damage things?
Because they are, as far as I remember, roughly the resonant frequency of a...
Well, they match the resonant frequency of the microwaves.
No, no, I saw that on Hackaday.
And you told me just a second ago, 10 centimeters.
I have never seen a 10 centimeter grape.
Okay.
These are the hard-hitting questions that we...
Welcome to Embedded.
I understand you're a software engineer you don't
have to um to yeah i will have to you don't have to explain the grapes i'm sorry about the grapes
i've read the explanation of the grapes so i feel bad because i should know this well i mean i read
an explanation of the grapes too but it didn't actually make sense oh well okay so one of the
demos i saw with your microwave was one color water was red and one color water was blue
and you boiled water on one but the other one was i don't know you could touch it afterwards
yeah it was it was still heating up It was definitely less hot than the other one.
So you have the standing wave with the dumb microwave,
and it creates hot spots and cold spots.
And that's why they tell you to wait a minute after you cook stuff,
which I never do.
I just like the difference.
But with yours, are you moving the waveguide?
We've got
an array of antennas on the top, and that's what we're moving.
So, physical
antennas, each one's about
two or three centimeters long.
He's holding his fingers
about the size of a very large
grape apart.
Two or three centimeters.
And each one of those large grape apart. Two or three centimeters. And
each one of those
antennas is individually
actuated, so we can
basically
move the
waves around. Are these motors?
Yeah, stepper motors.
How many did you say?
24,
I think. Can I borrow your stepper motor board i have an idea
uh sorry um so you move them the antennas around so that you don't end up with standing waves
so we end up with standing waves but we control where they are
and so can you actually designate a point that you don't want to get hot at all and like
the inverse of that's pretty tricky that is very tricky the problem is well so when i talk to
physics people about this sort of thing they immediately go oh so you have phased array at
the top of this device yeah exactly and no um the short summary is that phased arrays are making an Yeah, exactly. And no.
The short summary is that phased arrays are making an assumption that, far-field assumption, so they're assuming there's no reflection, there's no bouncing around.
And we get a lot of that. The whole idea is to bounce everything around.
Yeah, that's the microwave's goal, is to bounce everything around.
Yeah, so we're more, I think the polite way to put it is heuristic driven.
So we guess randomly.
Or we make random guesses at where the things may work.
We've got a few heuristics about,
well, these configurations might make more food,
more energy go here.
These ones might not.
But in the end, it's kind of guess, check, and then remember it
so we can reuse it later.
But you've got the thermal camera,
so presumably you could kind of learn that over time.
Exactly.
And do you do immediate corrections,
or is it heuristics and you stick to your heuristics in the field?
It's heuristics, corrections, and, well, he want this sort of array for your antenna array,
this sort of configuration or moving configuration.
Yeah, we'll move through sets of configurations.
And then you get some, I don't know, honking big asparagus.
Sorry, I'm just picturing that.
You get an asparagus about the size of the chicken.
Yep.
And so this pattern doesn't work as well as it did in the lab, and so you use your infrared camera to heat up the asparagus somewhere.
Where did this go? Yeah, so basically what we can do is we can try to...
It depends on how we've set things up.
So there are a couple of options.
We can either just completely give up.
Always a good option.
Yeah, it's really easy to implement.
Just completely give up, start shuffling the patterns randomly,
and hope that while the edges will be hotter than normal
because there's more area there and they just fundamentally absorb more,
we're not too far off from even.
The other thing we can do is slow way down and start probing new configs.
So basically say, okay, we thought we had a bunch of things that would work,
but let's take a bit of time, see what this thing does.
Okay, now I've seen this one.
Let's start learning another one that will complement that one.
And this takes a while.
So the other thing that our company does,
and this is why we've chosen the business model that we have, we do a little bit of engineering of the food to try to make it more uniform.
So I'm sure we'll get into the business model a little bit later.
Yeah. Well, I mean, let's go ahead and do it now.
Okay. Sounds good.
Okay. I'm going to put a pin in engineering food.
Yes. Yes. I think that's good. And heuristics and how they're developed.
But you aren't selling these microwaves.
No.
So right now, I don't think that our company is quite ready to go into a consumer market,
specifically because of that whole problem of, well, what happens if someone puts a giant asparagus in with a tiny chicken?
We haven't learned how to do that yet.
So what we're doing is we're basically doing second-order V-Seek funding.
Hey, you're a well-funded startup.
How would you like to provide three meals a day to your employees?
Okay.
Yeah, I mean, I know that's a thing, but yes.
How come our business doesn't do that for us?
It does.
We go to the market every day, we buy the food for ourselves, and we eat it.
Yeah.
I'm just going to take this marketing opportunity and say, well, you could have that with a smart microwave.
But you provide the food and the microwave.
Yes.
And the microwave is smart about the food.
Yes. And the microwave is smart about the food. Yes. And you have, you know, good food, not just what we found at the market in the frozen section.
Hey, that's good food.
Yep.
And they're actually not frozen because freezing food actually has another side effect.
Yeah, because the little ice crystals, they
puncture everything. They're very sharp.
But also, it turns out that
ice is transparent to
microwaves. My god, how does
anything I eat work?
Well, not entirely transparent, but
you know,
partially transparent. So
ice picks up a lot less energy.
So what happens with frozen food is that sometimes the edges will start thawing a bit first and pick up all the heat. And a lot of the that isn't ice that really helps heat it up as well.
But frozen food may heat more unevenly than thawed food.
Oh, that explains so much about my lunches.
Okay, the business model.
You are basically providing a company cafeteria sort of thing.
Yeah, a box.
I mean, less like a vending machine.
Yeah, less like a vending machine, more like...
So one thing we're not good at right now, or we may never be,
is providing meals for a team of 100 people that wants to go grab lunch at once.
Yeah.
So if you want to do that, we'll happily sell you devices,
and we'll happily sell you devices, and we'll happily
sell you more devices so that you can accommodate that rush.
But what we're really targeting is, say, you don't want, you can, you're okay with, maybe
you're okay with providing your employees a fully catered lunch, but you, but they're
clamoring for more.
They want to have breakfast.
They want to have dinner.
So you go, well, we don't have the budget for giving you three meals a day how about we fill in the gaps here we've got a so here's a
hot pantry and there's hot there's cold lunches in the fridge you pop them in you get them cooked
evenly intelligently to you know perfection or as close as we can get.
Is the microwave a major selling point to this?
I mean, fresh, yummy food provided to startups.
I mean, do they care if the microwave is smart
or would they just microwave it and not care?
You'll have to ask the marketing team if it's a major selling point.
But I have heard feedback that people have tried taking our food pods, tossing them into a regular microwave.
And yeah, sure, they'll heat up, but it's not as even and it's not as good.
So people seem to notice.
It's sort of like, yeah, it's...
I think food pods was a good word there. It's kind of like the Keurig pods.
Yeah, but it's taking it a step up from, I mean, anybody can get food. So I guess the
idea is they're taking it a step up from what you could just grab from the fridge and stuff
like that. But do you have a filter that prevents fish from being microwaved?
Wait a minute. I read that they were
fanless. No, ventless.
No? No.
I think you need a vent.
Seems kind of important.
That was why I noted it.
Okay. Fish.
Pressure cooker, too.
Yeah, we definitely have
fans. We should have vents.
Okay, that's my bad.
When we were experimenting with fish for one of our dishes, people noticed that dish is no longer on the menu.
What about the other things people often cook in the office that makes other people in the office crazy,
such as popcorn. Do you do that?
Not only makes people crazy because they want it afterward. It's not, you know.
Yeah. So right now we're kind of shipping it with a fridge of food pods and it seems like
most people actually kind of get the association and don't really try to do other things with it so okay so it's mainly used for the food pods they don't use it in their
kitchen for everything else too yeah okay i mean we've had some people put in interesting things
spoons i think my all-time favorite was a sign where uh, we love Markov. Because they knew we had the cameras in there.
Oh, gosh.
I mean, your cameras go back?
So there's a, we do take, yeah, the cameras go back.
So don't put your private documents in the microwave to get rid of them.
Yeah.
We've only got inward-facing cameras.
I had a serious question, and i've lost it um oh so how i mean this is very basic how big is it is it larger because you're cooking multiple things is it a larger volume than it's a larger volume
than most consumer microwaves it's i think so our initial uh go-to-market was idea was we would be targeting restaurants
so we designed it so you'd be able to put in two uh cambro containers and if you don't know what
that is imagine um those trays that they the yellow trays that they have they put the various
foods in a subway okay so two of those would be able to fit in side by side. Okay.
So it's somewhat bigger than most microwaves.
I think it's on the large end of a commercial microwave.
And did the restaurants not go for it?
As I said, one of the problems that we ended up not solving very well is high volume cooking.
Oh, okay. ended up not solving very well as high-volume cooking.
So while we wouldn't say no to working with restaurants,
it just at the time wasn't the best fit.
And the other problem is, again, engineering the food,
which meant that it would have taken a lot more hands-on involvement with the restaurants than both we and the restaurants had the time for.
So it worked better to contract out the food to someone that was working closely with us.
Okay, so that's the marketing plan.
If we pop back up, do we go to engineering the food, or do we go to how do we figure
out where to put our array?
Let's talk about engineering the food, because it probably folds into the array.
Okay.
No.
We'll just talk about that because that was the next thing.
So if I buy a frozen meal and they're smart,
they have realized that it's going to heat from the outside in
and their protein is going to heat.
So they're likely to put a protein in the center
and stuff on the outside that it's okay to overcook, like that cheesy bit that gets really crispy.
Crispy cheese is awesome.
So that is an instance of food engineering. Is that what you mean?
Kind of. For us, it's mostly just trying to get it fairly even in size, fairly even in mass,
so that the physics just works out.
There's a limit to the amount of variation we can have
between the temperature.
There's a limit to our temperature difference.
There's a limit to how well we can direct heat away.
So some things will fundamentally act a little bit more like antennas
and absorb more energy.
So we just try to make sure that they're not sticking up like antennas
and picking up all the energy and directing it away from other foods, for example,
or making sure that the foods are basically just working on the food
and the device at the same time to make sure that all the foods will
cook well together that's really the big part what foods are most antenna like asparagus i'm just i
can't believe i said that but yeah asparagus does seem asparagus is actually one of them
good job carrots i'm just like is this just all long beef jerky?
Well, we don't microwave beef jerky.
I don't know.
Microwaves, great.
This isn't dry enough.
Yeah, so those are big ones.
Other ones may be, I'm trying to remember if ribs are actually long enough and not chunky enough to do that they do have corners which will
crisp up but at the same time having slightly crisp corners isn't in my mind a problem so no
no no uh but you don't toast i think that was actually how we met at bang bang con was us
talking i was in a group talking about your microwave and And I was like, but you still have to toast.
And you came over and you're like, yeah, you still have to toast.
What are the things you wish it could do?
Toast.
Toast, bake cookies, make cookies.
Yeah.
And I keep on telling people,
you know, it shouldn't just be sitting
in a corner there. I shouldn't have to
walk up to it. It should detect when I'm
hungry. It should come up to me
and feed me. But they keep
on rejecting my ideas to attach it to a segue.
I mean,
you really could. You have a camera
inside that's going back to your servers. You
could have a camera on the outside so that when somebody walks by, like they're going to get coffee, you just automatically pop up, you know,
Oh, you look hungry for a brownie. Do you want a brownie?
And then have it already be hot and ready to go.
Oh, that would be awesome.
Nothing could go wrong with this plan.
Okay.
So food engineering, about making sure you don't have antennas.
Is it about also making sure that the water content, you said the mass should be about the same.
Yeah, more or less. Is mass and water content about equivalent in these terms or is there a difference?
There's a difference.
It's not a... I mean, water content will make it heavier,
but just different foods have different dielectric constants
which control how much they absorb.
So we've actually got a big book of all the dielectric constants
of a bunch of foods.
I was amazed to learn that this book exists when I started.
So, yeah, flip through.
Oh, there's a dielectric constant of chicken.
Excuse me, I have to search on Amazon for dielectrics of food book.
That is super weird.
Yeah.
What food?
It seems like you should be able to determine that with a couple of probes that jams into the food and, you know, measures the capacitance.
And there you go.
Probably.
But we've got a book for that.
Yeah, but I have a little thing that tells me the capacitance of things.
So, you know, it should.
Yeah.
Okay.
So, you have a little thing that tells me the capacitance of things, so you know. Yeah. Okay, so you have a big book, and you are making your own meals.
Do you have some sort of identifier on them that tells the microwave what it's cooking?
Nope.
A barcode?
Nope.
What we've got is machine learning.
Oh, no, not machine learning.
I feel like we throw this problem at everything.
Yeah.
Tell me more. Tell me more. Sorry.
Yeah, we do. But there are a few things that machine learning is actually good at.
So one of them is recognizing what's in an image and what it actually is. So we use it for that.
We're not using it for the cooking algorithm because it doesn't work very well for that.
So the machine learning is really just form-fitting to complex functions when you don't actually know what the function is.
That's an interesting way to look at it.
Yeah.
And machine learning is pretty good at kind of deriving what content an image has.
And so the image here is your infrared camera.
It's the RGB camera.
Oh, okay.
Yeah. So we've got two RGB cameras to find the food, locate where it is, and, well, at some point, construct a 3D model of the food so we can try to approximate the internal heating.
We're not there yet, but we'd like to get there.
And then we've got the RGB camera to kind of bring in the feedback loop so we can see the food, see how it's heating, adjust, and try to get it to where we want it to be.
I'm sorry, I think I misheard that.
Two RGB cameras and one infrared camera?
Correct.
Okay, yeah.
Okay, so the RGB cameras go into your machine learning algorithms?
Correct.
And the ideal array patterns come out?
No.
The RGB cameras
go into our machine learning algorithms and say,
here's food.
This is what it is. This is where it is.
Because to direct energy
into food, we have to know where we're
directing the energy. We have to be able to say,
this pixel of thermal camera is
food. This one isn't.
So there's a carrot at
pixel 102 by 104.
Exactly.
And that way they don't have to have somebody register the food
in exactly the same way every time, right?
Yeah.
And then once you know it's a carrot,
you look it up in the electrics book.
We look it up in the database and say,
here's the temperature we want to do it, here are the settings, and here are the heuristics that we have painfully discovered for how these things are best cooked.
Okay.
And do you have some foods you can't cook at the same time?
Currently, I believe, yes. I think there are, well, I think actually the example I used earlier on is one of the ones we can't cook at the same time yet.
S'mores cake turns out to be pretty delicate because them and will just kind of be a sad remnant
of its former self.
Will it expand?
And then contract.
What about things that typically explode in microwaves, like black beans?
Do you, A, why do they explode?
And B, do you have any problems with them?
We have black beans, or we had black beans on the menu at one point.
I don't think we actually had trouble with them.
Just me.
Christopher, why are you?
I don't know. Maybe I trouble with them. Just me. Christopher, why are you...
I don't know.
Maybe I cook them too long.
Okay.
Oh, we have had really fun times with eggs.
We've managed to explode sunny-side ups.
Oh, yeah, eggs are...
Yeah.
Don't you have to do something where you slice something so that the egg and the whites...
Maybe I should just ask you and stop talking?
Well, I'm trying to remember so i think that mixing it up will fix the problem yeah yeah so yeah mixing up so that the yolk isn't
all in one piece will fix the problem but we've also had uh the yolk itself just explode and i
think we were we had somehow been dwelling on a single config for far too long,
and had managed to just heat up the bottom after the top of the yoke had hardened.
So we got a perfect...
He made a little bomb.
The same charge.
You say this.
So what I was about to say is that we had a perfect cone of explosion,
120 degree circular, with a very clear origin point.
And the inside of the entire thing was just kind of completely coated with egg.
See, the great thing about this product is it involves, it's like all embedded things, or a lot of embedded things.
It involves so many different interlocking fields. You know, it's got physics and, well, it's all physics,
but physics and food, it's just a weird...
Computer vision, control theory.
Motors.
Motors, databases, backends.
It's got everything.
Yeah.
You told me another story about eggs.
Do you mind sharing that?
Oh, yeah, sure. So eggs turn out to actually be a really good, well, they're really good demo material.
And the reason for this is that egg whites specifically have a very clear transition point from when they're liquid and clear to when they're solid, well, goopy and white to when they're solid and white.
And this transition happens within something like three degrees Celsius.
So if you try to cook a small tub of egg whites in a regular microwave, you will get either
raw bits or parts where the eggs have started boiling over as they are cooking.
And it's very clearly foamy and rubbery
and terrible. And sometimes you get both raw and the rubber at the same time. So one of the demos
that we were putting together was, well, showing that we can cook these pretty well. So we started putting it together and after several very long nights we managed to get
something working a lot of torn hair tears suffering okay it wasn't that bad but it was
probably one of the hardest parts of getting the through it was probably one of the parts where
i've worked the hardest at this company.
I was very close to burning out.
So we got it to work.
And then... Okay, cool.
What does working look like here?
Working means a perfect round
of
flan-like consistency.
No air bubbles, no raw parts.
Even Leo all the way through. Which means that we managed to get across 3D, across the 3D volume, we managed to get the temperature up to our target within
plus or minus two degrees. And so this would go perfectly on an English muffin. Sweet. Okay.
And then, so you, you, you, blood, sweat, tears.
Yep. And then we ship the device across the country to the NRA show in Chicago. NRA being National Restaurant Association. So far fewer bullets around. We set it up. We do the pre-flight check to make sure that, well, the people that went do the pre-flight check to make sure that it worked. And it doesn't work. So what do you do? Well, start debugging. Try tweaking the parameters that we have. And keep going. And the demo doesn't work.
And eventually, after we fly it back...
Demos't work. And eventually, after we fly it back... Demos never work.
It worked fine again.
So I spent a good week or two trying to figure out what had gone wrong.
Was the machine just shy?
Maybe. But no.
It turns out that I was trying it with the Costco brand eggs that we'd gotten here.
They'd tried it with the Costco brand eggs that we'd gotten here. They'd tried it with the Costco brand eggs that they'd gotten there.
Thankfully, we had enough left over that I could actually try replicating it with those brand of eggs.
It failed.
Huh.
It turns out that the green cartons that we got over here were fine.
The blue cartons that we'd gotten in Chicago were different enough.
And then, you know, so we went out to the grocery store and brought a whole bunch of more eggs.
And it turns out that there's
a huge amount of variation between the various
kinds of... Oh, no.
The behavior of different
egg white, cartoned egg whites.
It turns out that
yeah,
our best guess is pasteurization.
Yeah, that makes sense.
Yeah. So, also, there are some additives that are allowed to be added, like salt, a little bit of sugar, and so on. I read a 60-page document to try to detail where things could go differently in this thing.
60 pages of how eggs broke our machine. No, 60 pages of how the, I don't remember which regulatory body it was, but how you are allowed to pasteurize eggs for sale in grocery stores.
Wow.
Wow.
And we think our jobs are boring sometimes.
I never thought I would be reading about egg pasteurization when I signed up for this.
Yeah.
But now I can bore strangers with it.
So what do you do in that case?
Do you say, okay, only these kinds of eggs work?
Or do you try to expand your database to include all of them?
To kill all the eggs.
Well, again, this was demo ware.
It's not something that you would actually want to. Well, again, this was demo-aware.
It's not something that you would actually want to eat too much.
So this was just egg whites.
We didn't have yolks mixed in.
We could do yolks, but this was specifically to show off,
hey, look at how great we are.
We can do this.
Which is, I mean, no microwave can do anything close to that. Exactly.
We actually tried it with the sous vide, and our device came out better than the sous vide which was not what i was
expecting yeah i thought sous vide was supposed to be like the perfect egg cooker it's pretty good
um well this was for specifically just egg whites yeah um and trying to do it gently to that temperature i think they ended up being a little
bit i don't remember why how it didn't work out and i'm sure i could have gotten it to work pretty
well in there but but your job is microwaves yeah basically the idea the reason i tried doing the
sous vide was to show people hey this is how they should come out and then okay going back to i mean sort of like this but how
how else do you visualize what the microwave is really doing the infrared camera gives you
just one perspective you have this led thing is it a cube of leds that lights up that would be
really cool yeah for this one it's really just a board.
The other problem
with putting things in to measure it
is that those...
So the standing waveforms are actually
dependent on the foods
or the...
Well, not just the foods, anything you put in the cavity.
So the cardboard will actually
produce a different standing wave pattern than the
no-cardboard case.
So it's good for visualizing and understanding what's going on and what you're doing.
But in the end, what it really comes down to is it's a tool for developing the algorithms that will work without you needing to visualize exactly what's going on. So even what bowl I put something in makes a huge difference to how the standing waves configure themselves.
Possibly.
There's a certain range where you get the same patterns.
And then it's a chaotic system.
So there are certain grooves, if you will, where things will kind of roll down the same path.
But if you change what's inside it, move it by more than a certain amount, or put in another plate under it, or rotate the chicken breast 90 degrees or something like that, it'll go down a completely different path.
And there's a fairly clear transition point between the two configurations and how do you deal with that i mean we talked about the uh array of antennas in the infrared camera but is that enough? Yeah. Okay. Turns out that it's pretty...
Well, so what we do is we treat each independent heating pattern as a single step, and then we add them up.
So if you think back to linear algebra, you can think of them as vectors in a 20-something dimensional space.
And each time you take a measurement, you get a vector. And then you take another measurement,
you get another vector, and you can add those two vectors together to get to,
you know, the sum of both of those heating patterns. So then what you can do is you can
collect enough of them. And I can't say how much enough actually is, but...
You always want more.
You always want more.
And then once you have enough of them,
you can start doing function fitting and kind of getting,
well, almost arbitrary temperature profiles.
Do the machine learning part... I know I'm not supposed to ask you specifically like convolutional neural network or SVM or whatever the exact algorithms are.
But it seems like cheating that you are fixing your inputs by providing the food.
Isn't that cheating?
I mean, I guess none of it's cheating
but doesn't it feel like that's cheating it's constraining the problem yeah yeah it's cheating
when you control things i mean you know if they went into the startups in the middle of the night
swap their food out without their knowledge that seems like cheating i guess it's just when we
think about machine learning problems it's often the ability to handle arbitrary inputs.
And you're constraining your inputs so that you get a better result.
And you're doing the machine learning earlier.
So machine learning isn't actually involved in any of how we cook.
That's all a little bit of hand-waving around linear algebra magic. And what we use the machine learning for is really just the image recognition and localization of food. Wow. I just am so stuck on asparagus.
Okay, so that's finding it, and then you need to cook it, and you're just using these patterns that you've learned previously, heuristically, which sometimes is known as empirically, sometimes known as in the lab, just trying it over and over again.
Is that right?
I mean, are you just brute forcing a solution for how you're going to set up your array to get to a good temperature?
There's an element of brute force, but we're a little bit smarter.
Part of that is because I'm trying to remember roughly what it was,
but it's tens of millions, hundreds of millions of possible configurations,
and we can't try them all.
So there's sampling, and there's guesswork at what antenna configurations are useful.
You don't need the absolute minima or maxima.
You don't need the optimal path.
You just need a good path.
Exactly.
Okay, I want to ask a different question.
I once somewhat oddly went off on a podcast, not this one, about UIs and microwaves.
Because I love our microwave and I love its UI and the fact that I can just push one button, walk away.
And turned out like on Monday, somebody said, I have that same microwave and I hate it because do you know how hard it is to put in 15 minutes? And I'm like, why would you microwave anything
for 15 minutes? But that's what he does. And so he hated this microwave because he had to push 97
buttons to get to some more. I mean, once you got above 10 minutes, the microwave would just mean to you.
How are you doing the UI so that it is super efficient to the user? Or do you care about
efficiency to the user? We care. I mean, we have to make the user happy in the end.
So basically, the experience that you get is you walk up to the microwave,
you put your food in, you put maybe two or three foods in, you close the door.
It asks you, is this steak?
You push the yes button.
It asks you, is this one eggs?
You push the yes button, or you push the, actually it gives you a sorted list of what it thinks the top foods are.
So it shows you steak as the first element, you push that one.
It asks, are these eggs?
You push that one.
And if it gets it wrong, hopefully it's further down the list.
If it's completely wrong, there's a button that lets you deal with that.
And then we go in and look at it and figure out what went wrong and fix it.
Those are always the most fun of Saturday mornings.
Well, and that's why we report the images back so we can see what went wrong and fix it.
Okay. So if I just wanted to cook one meal, mine, how many buttons do I have to press before it is done?
One.
That's nice.
But your interface looks tablet-like?
Yeah.
It's basically an Android tablet mounted on a door.
And then hooked up to the actuators through the hinges.
Or hooked up to the control board with all the actuators on it through the hinges.
I want to ask, doesn't it get affected by the microwave radiation?
Yes.
Part of me is hoping that you say no,
because I don't really want to believe the microwave radiation is getting out the door.
It's not going to hurt you.
There's a little bit of leakage that's allowed.
I think it's something, don't quote me on it, actually.
I don't know the number.
It's small, but there is some leakage.
So what happens from there is, yeah, the USB lines will sometimes pick that up.
The biggest time that we end up picking it up is actually when you open the door in the middle of a cooking session because we're still powered on and it
takes you know a few microseconds or on that order of magnitude for the uh safety to latch and or to
safeties to catch and then the a little bit longer for the magnetron to lose power because there's
some stuff in the capacitors and yeah so there's a lot of code in there that uh deals with hey usb went away
how do we not crash things you don't think about normal development
yeah so it's safer if i don't open my microwave until after it's had its little beepy dance. Yeah. But it's not dangerous.
We have a question from a listener, Keith. Wanted to know
if there was any difference in the shielding between his grandmother's microwave
from the 1980s and the new ones that are available today.
Is it worth getting rid of the old one to replace it for a new
one, not just because it's more efficient, but because it's also safer?
So I can't think of anything in the shielding.
The one reason you might want to replace it with a new one is because
newer microwaves have started to move to inverters instead of,
I think it's triformers, the usual transformers,
which makes them more efficient, but also
somewhat better at heating things. So traditional microwaves will blast at, if you set power to,
say, half, they will blast at full power for two seconds, then cut off to zero power,
then blast at full power for two seconds, and cut to zero for another two seconds, which is a really, really bad PWM.
Modern microwaves have a good PWM.
From Ben, he said that hacking microwaves sounds like fun.
Oh, no.
And that he's seen somebody stick their head in a running microwave very briefly
when the sensor door was busted.
How terrible of an idea is that?
Jeez.
Most people don't have spare heads, So I'd say don't do it.
I mean, if he's okay after it,
there's probably no actual damage because... I would argue he's not okay before it.
I would agree with that.
Just as okay after.
Yes.
He is no worse off after.
Because there's no scary microwave radiation
that'll cause cancer.
Really, all the the damages from heating. But
you wouldn't stick your head in a boiling pot of water either. So don't do it.
I read that a microwave heats about 100 degrees Fahrenheit per minute,
which would mean two minutes to get to boiling. Is that right?
I mean, that seems kind of slow, but not that slow.
How much are you heating?
That's really the question.
Oh, so it depends as much on mass.
It's not just...
Oh, conservation of energy.
You've got...
Most microwaves are putting in...
Good point.
1,500 watts at something like like 60 to 70% efficiency.
Older microwaves are actually less efficient because the magnetron wears out over time.
But you're putting in, say, you're putting in roughly that order of magnitude, 1,500 watts per second. And water has, I believe, 4,000 joules per...
I don't remember.
Some constant.
It is some constant.
It's 4,000-something per kilogram, I think.
So, you know, do the math.
Figure out how many joules of energy you're putting into it, and that's a rate of temperature increase.
Okay.
So my 100 degrees per minute probably was just fine, but it totally depended on how much water there was.
Exactly.
That goes back to the whole head microwaving thing.
Yeah.
Yeah. Yeah. And microwaves are actually pretty good at getting all the energy into the food
because the waves will bounce around until they're absorbed by something.
That something can be either the walls, the magnetron, or the food.
And the food is almost always much better at absorbing
than everything else in that system.
Would it be better if the food was lifted off the floor
into the center of the microwave?
It's always on the bottom.
Or are they configured such that that...
That's a good question.
That's a good question.
So, at least in our device,
what we've got is a false bottom.
Oh, okay.
So, it can go under and then bounce back up.
I think in most consumer microwaves,
it's got enough of a gap that
you can get the wave under it, but I'm not sure. Okay. Looking at your website, there was reflective
energy steering. Is that controlling the antenna to put the microwaves where you want them?
Yep, exactly. And I understand that it's very chaotic. We've covered that. But if the environment was more controlled, less chaotic, you know, you can, I mean, you get to control these things.
How precise could you get?
Could you sculpt a marshmallow into a peeps? so in a completely unconstrained environment which probably means you've got a this peep
sitting in the middle of an empty field an array of uh or i guess with our technology you'd probably
have to have specific reflections uh or you'd probably have some sort of reflector
i think the answer is I don't know.
How long will it take you to try it?
How much are you willing to give us for R&D?
How much money would you pay for a piece of sculpt sheet?
I don't think it's going to work.
It's not going to sculpt.
It's not ablative.
Yeah, I think that the problem is the microwaves just aren't. The wavelength is too long.
But it's an interesting thought.
I feel like this technology...
We need tunable wavelengths.
That's your next product, right?
Well, that technology kind of exists.
Okay. This reminds me of the UV 3D printers where you're trying to put the UV in just the right spot in order to harden the material.
Yeah, that's exactly what you'd getting radiation treatments for cancer where it's trying
to actually put all of the energy in one spot and not in the rest of your body yeah but you're doing
kind of the opposite you're taking it from that one spot where it might naturally have a a node
to putting it all over the little chicken's body. Yep.
I didn't get any laughs for that one.
Come on, you guys have been pretty laughy.
Kind of reasonable.
The little chicken body.
Thanks.
So what are you working on specifically?
I don't work on things specifically.
I work on everything.
That's the life of a startup.
Yeah. Motion's okay. That's the life of a startup. Yeah. So I have...
Motion control of databases and...
I have literally worked on every part except for actually training the machine learning models and the rewrite of the UI.
That's a lot.
So I wrote the initial version of our firmware, and now I'm back to maintaining that part of it.
I wrote the hardware communication layer, some of the drivers, some of the...
Well, right now I'm working on our data pipeline, so Spark streaming and all of that kind of big data world.
I worked on the firmware update or not the firmware the software update back end i worked
on yeah basically if there is code there i've probably touched it if or and if i haven't
touched it i've looked at it so what was that like transitioning because your history you mentioned
facebook and google and more pure software kinds of things. What was that transition like to move into, okay, here's a thing, control it?
It was fun.
It was actually kind of a throwback to the very first thing I was doing,
which was, so I started my first internship out of, well, still in school,
was at Research in Motion, where I was working on their fingerprint scanner
and smart card reader.
I actually ended up being, quote-unquote, lead developer on it,
because, well, they didn't care enough about it
to put a full-time engineer on it, I guess.
Jeez.
So, it was a fun start.
And then through school, I was actually studying engineering physics rather
than software okay so i've definitely had exposure to hardware and it was really nice
actually getting back to using the stuff i'd studied rather than the stuff i'd self-taught
one of the things uh you mentioned was that you you like your own programming languages.
Could you tell me about my Erlang?
That's not how you say it, is it?
No.
If you're Welsh, you pronounce it Merdan.
If you're a normal person, you pronounce it Merdan.
The double D is apparently pronounced TH in Welsh.
Wait, this wasn't the one I saw, was it? No, it was.
I abbreviated in
the site okay yeah so that language i built it for fun um we were actually running it in production
at work for a little bit um we were actually running two production two languages that i'd
written in production at work but we'll get back to that.
So that language is basically me going, I wonder what it would take to write a programming language.
Oh, this is kind of fun.
Hack, hack, hack.
Cool, I've got a language that I've written that is actually kind of usable and fun to write in.
And now I've got some people actually contributing fairly significant chunks of code to it.
What made it special?
That's a really hard question.
So I guess the best way to describe it is, imagine a C and an ML met and loved each other very much.
So that's kind of the baby.
ML being the programming language?
Yes, not machine learning.
That looked kind of like Pascal, but was very, very object-y?
No.
This is ML, the language that looks a little bit like Haskell.
Okay.
So the functional language.
Okay, yes, functional.
That was the word.
Is it in your module?
I might have been.
Who knows?
Yeah, so pattern matching and so on.
Okay.
So you've got namespaces, which i think are the thing that's missing most
in c um you've got pattern matching you've got slices which are basically arrays but or views
into arrays so i think c style pointer plus length um it's got, um, Haskell-ish type classes, traits, you name it.
And yeah, it just kind of does things the way I would want.
So when I write code in it, it just kind of flows.
It's like having your own secret language.
Yeah.
Except it's not a secret.
It's on the web.
Uh, and you use this in production along with another one? Why would you have two?
Well, this one I used in production because we needed a build system. I didn't want to figure out how to set up Jenkins.
I'd written one in itself for testing itself because pride and hubris and all of that stuff.
And dog food. Don't forget dog food. Dog food, yeah. So, you know, it was kind of,
well, I know we won't use this forever,
but for now, it does the job.
Let's use it.
It's there.
Yeah, I mean, startups don't spend time
doing something that you don't have to.
Don't reinvent the wheel.
Just deploy something written in a language
no one ever used.
Yeah, that's perfect.
It's very maintainable.
Yeah.
I mean, it's an acknowledgement that someday you're going to burn
this down and rebuild it.
Yeah. And it was a sad day when it
happened, but I knew it was
coming. And then the other one was basically
so
we've got this device.
We need to
take measurements off of it.
So at one point we basically had a Java app on the device
that was doing all of the control,
and we built a gRPC hook into it.
So that gRPC hook was basically allowing us to instrument whatever we were running,
do a bunch of test algorithms,
try to understand what's going on with the food
when we do something
or another. What's a gRPC?
I mean, I think an RPC is Remote
Procedure Call? What is the G?
Google's implementation of it.
So it's a framework. Oh, okay.
So you're using Java and you're
talking to Google. Yeah. Well,
not talking to Google. Using
Google's open source.
Okay.
Okay.
Yeah.
It's a well-known product that implements RPCs for you.
Okay, cool.
So we have that set up.
It's listening on the network.
Not shipped in production, but for lab environments.
So what we do then is go and start poking it.
And after a while, we realize,
oh, networks have latency.
Wi-Fi has more latency.
This is enough latency to make all of our measurements not work.
We've wasted two weeks doing all of these measurements,
and they're all wrong.
We need some low latency way of actually hooking things.
Hey, Ori, can you make Python run in this Java app?
And I look at it and go, yeah, that was my response too.
First of all, no.
Second of all, how does that help latency?
Well, it's better than network latency.
It's not good.
Oh, I see.
You want to put the local computation in the Java.
Yeah.
And the gRPC would inject some Python code in.
But yeah, the first of all, no, was also my response.
So I kind of went, okay, give me two days.
I will implement a language for you that will do all of this stuff that you need.
Actually, I was just going to have little sets of commands.
Yeah.
Like, read this sensor, this sensor, this sensor.
And then I went,
oh, it's actually really easy to make this Turing complete.
So,
and people are going to want it
to be Turing complete.
So I just kind of took the extra step and designed it
instead of hacking it in as a poorly thought-out afterthought after the fact.
So I basically implemented a mini-fourth-like.
Okay, yeah, that's fair.
Yeah, so two-day hack implemented in Java,
so I didn't have to glue Python's C API to JNI.
My liver wouldn't take that.
I'm just boggled by the idea
of...
I've never
written my own programming language.
A fourth interpreter's fine.
It's not that much worse than making a command.
No, it's not that much worse than making a command line
interface, which I do all the time.
So it's just... It's easy enough a command line interface, which I do all the time. So it's just,
it's just,
it's easy enough to make it turn complete.
I have never thought that never,
ever.
Now,
now,
next time I need to make a command interface,
the hardware is a service.
It seems to be coming popular,
going back to your marketing or your,
your implementation, your business plan, marketing or your implementation? Business plan.
Business plan is a good word.
I understand because the steady income is nice, but how are you
going to keep the hardware as a focus if the service
is popular? Maybe this is a question more for your marketing,
but I can see it going,
so, oh, we really like your food,
and then that becomes a whole direction for the business.
Hardware is so expensive and so difficult to develop.
I mean, I think the hope is that we just do that much of a better job,
that if they try to just go for the food, they go,
oh, this isn't quite as good.
But yeah, this is really a question for our marketing.
I'd also be surprised if we've thought that far ahead.
I could be wrong.
For startups.
We met in person at BangB Bang Con West a few weekends ago.
How did you hear about that and what made you go to it?
You're going to say Recurse Center, aren't you?
No, I'm not.
Okay.
So I've actually got a friend who had spoken at the New York one.
I don't know how he heard about it, so I can't tell that part of the story. But
he kept on badgering me, hey, you should submit something. Hey, you should submit something.
So at some point, I submitted something to the New York one and got rejected. And then,
yeah, okay, fine. Then he told me, hey, there's one on the West Coast. You should submit something. You should submit something. And I got accepted.
And, you know, why did I attend?
Well, it's hard to speak remotely.
Yes.
Of all the conferences that might have let you.
What did you think of the conference?
Was there anything you particularly enjoyed?
Yeah, there were a lot of really good talks.
Keynotes were definitely interesting.
I like the Lego planning one.
The Unix history one's near and dear to my heart.
As a former Bell Labs intern, I was actually there for a lot of the history
and had heard more of the same stories from other people that were there at the time.
So it was just kind of a personal connection. history and had heard more of the same stories from other people that were there at the time.
So it was just kind of a personal connection.
Do you go to many other conferences?
Yeah.
Where do you go to?
So I'm going to actually be speaking at BSDCAN in Ottawa this year.
I assume that has to do with OpenBSD?
Yep. I implemented some code for OpenBSD recently.
Specifically the QCOW2 disk format for VMD. VMD is the virtual machine layer. And QCOW2 is the QMU copy-on-write, expand-on-demand disk format.
So you work at a startup and you also work at home on OpenBSD.
Yep.
That seems exhausting.
I don't know.
I think I've got a great work-work balance.
Okay.
Yes.
Let's see.
Do you have anything else I should particularly ask you about?
Well, I mentioned Plan 9.
Right.
I also... From outer space.
That was bad for me.
This is from Bell Labs.
All right, Plan 9,
which is not from outer space.
It's an operating system.
Yeah, so I actually
have also been hacking
on that stuff for a bit.
Recently, I managed to
implement a Git client for it.
Why is that odd, not knowing that much about Plan 9?
Plan 9's a weird OS.
I remember playing with it in 1993, I think.
Yeah, it's still alive.
The Bell Labs distribution of it's completely dead.
Okay.
I think, well, not completely dead, but everyone paid to work on it has gone on display at Google.
Okay.
Distinguished engineers that are...
There is a community fork called Ninefront, which is basically implementing all the things that are needed to keep things working in the modern world so fixing the various bugs
they're they're adding things like their own implementation of ssh because it's not a posix
system and it's while you could they have a posix emulation layer it doesn't feel right to be using it. Why? I mean, this doesn't...
Are you doing this for the challenge? For the love of history?
I'm using it because I like the system.
Are you using it to do anything?
Yeah, it's one of the systems I actually use regularly for writing code.
For writing code for modern systems? For modern systems and for Plan code. For writing code for modern systems?
For modern systems
and for Plan 9. I can log into
other systems to actually run and test the code.
And you can actually...
So
when you log into a
Plan 9 system from a
modern
Unix, there's a tool called
Draw Term. Your files on the modern system will show up on a tool called Drawterm.
Your files on the modern system will show up on-line under Mount Term.
So there's really easy cross-communication.
You can use more than one operating system at once.
I do that a lot, but usually it's with a virtual machine and an SSH to a hardware piece.
All running on my Windows box.
Okay, I suspect that is appalling to you
just as Plan 9 is odd to me.
I don't have any problem with people doing things differently.
No, no, there's often goodness in difference.
It's just Plan 9 is okay.
I guess it's because every time it's
Plan 9 from Outer Space, I can't
even stop my brain.
It just goes.
That's what it was named after.
Yes. I'm told
specifically as a way to piss off the marketing
people.
Dear marketing people, we
hate you. You're stupid, stupid minds.
We are not going to name this super happy, fun OS like you wanted.
Okay.
That was a quote.
I wasn't talking about marketing people.
I was quoting the movie.
That does not shock me.
It should.
And that's not what we're watching tonight.
I don't know.
Ori, do you have any thoughts you'd like to leave us with?
I think I'll quote our marketing team.
One day, AI is going to destroy the world, but for now it's going to cook us a heck of a good meal.
All right.
That's a top ten thought there.
That really is, yes.
As long as you don't put your head in the microwave, it's fine.
Our guest has been Ori Bernstein, software engineer at Markov.
If you are hungry, you should check out their hot pantry.
It's called Level Hot Pantry.
I'm hungry.
Thank you for being with us, Ori.
Thanks for having me.
Thank you to Christopher for producing and co-hosting, and thank you for listening. You can get the show links or you
can contact us on the Embedded.fm website. And you know what? I'm not going to leave you with
a quote because I think you should just, I think Ari is just really good, you know? Seems right. So have a good week.
Bye. Leave now. Stop listening. Go. Don't you have things to do? Work. Go get working.
Embedded is an independently produced radio show that focuses on the many aspects of engineering.
It is a production of Logical Elegance, an embedded software consulting company in California.
If there are advertisements in the show, we did not put them there and do not receive money from them.
At this time, our sponsors are Logical Elegance and listeners like you.