Embedded - 157: Explosion of Multicopters
Episode Date: June 23, 2016Robb Walters of Flybrix (@flybrix) spoke with us about LEGO-based drones. We graciously let him leave with all his hardware. This time. For a limited time, you can get an Embedded.fm tshirt: teesprin...g.com/embedded-fm. Order by the end of June or miss out. (More info about the shirts.) You can order your Flybrix kit and or read their controller code on github (or their controller app code). Robb mentioned a C++ book he liked, it was Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14 by Scott Meyers. He also noted LEGO bricks resale sites: Brickowl and Bricklink. LEGO Digital Designer looks like a fun way to design builds. Cascade PID controllers are on Wikipedia (though I found this tutorial a little easier). The congratulations offered at the top of the show were to Meshpoint.me for winning the Best Humanitarian Tech of the Year at the Europas Conference.
Transcript
Discussion (0)
Welcome to Embedded FM.
I'm Alicia White with Christopher White.
This week, our guest is Rob Walters of Flybricks.
I'm going to keep that a little mysterious because before we say hello to him, I have
two quick notes.
First, t-shirts.
T-shirts are being sold only until the end of June.
Get yours now, unless it is already too late. Also, I would like to offer our congratulations
to Meshpoint, a group of folks who are building ruggedized Wi-Fi routers for crisis areas.
They connected over a half million people with their friends and families during the refugee
crisis in Croatia, essentially building networks out of their backpacks. Deservedly, they won Best Humanitarian
Tech of the Year at the Europas Conference. Congratulations and keep up the good work.
Hi, Rob. Thanks for joining us.
Hi. It's good to be here.
Can you tell us about yourself?
Sure. Yeah. So, I am a physicist and an entrepreneur, and I probably spent about 10 years
longer in school than most of your listeners, mostly because I like to work on hard problems
with smart people. And, you know, that has led me to a lot of really interesting places. But I got
to a point in academia where I wanted to have, I guess, a bigger impact or a bigger direct impact on a larger group
of people. And that led me to getting interested in starting companies and moved back to California
and to San Francisco, started a company. And sort of the logical conclusion of looking for larger
and larger audiences is making consumer electronics products.
And so that's what I am doing now with Flybricks.
Cool.
And we're going to ask a lot more about Flybricks
because it's really cool.
But before we do that,
there is this thing we do lightning round
where we ask you short questions and want short answers.
And if we are not easily distracted,
we'll just go bam, bam, bam through this like lightning.
Which has never happened yet.
Yeah.
So, Chris, you're going to start?
I never start.
Okay, ready?
Should we bring back the dinosaurs?
Oh, like Jurassic Park style with the DNA and so on?
Yes. I think that, you you know anyone who's seen those movies knows that there's nothing that could possibly go wrong very safe yeah would you rather explain E&M or organic chemistry
oh definitely E&M uh nine chemistry was it's a gimmick yeah chemistry and, there's way too many disparate facts.
Favorite fictional computer?
Fictional computer?
I think HAL.
All right, I got to dump that question.
Everybody says HAL.
Everybody says HAL.
It's the most famous of all the fictional computers. Of the two people I've asked, two people said HAL.
Okay.
Favorite processor of all time?
That's a tough one. I mean, I feel, you know, I haven't actually done a whole lot of embedded work over the course of my career.
And so the processor that I'm most experienced with is this Kinetis K20 that we're using in our product now.
And so, you know, I think that's kind of my default.
Although I think the one that's perhaps the most interesting is the Miko 8,
which is actually a soft processor that we use in some of our FPGA work. And, you know,
admittedly, I haven't done as much work in that system, but I think what's really fascinating
about it is kind of the way that it blurs the lines between software and hardware and logic
and the way you think about things. Your favorite thing should always be the thing you're currently working on.
Yeah.
Oh,
I guess I'm up next dog or cat.
Oh,
definitely cat.
What is most important to your job?
A whiteboard,
a keyboard, or a pen and paper?
I think the keyboard,
um, there i think the keyboard um it's usually the best way to write down ideas or to discover you
know to to go and figure out what you're what you need to know um so a keyboard but connected
to the internet hacking or making oh yeah i think both of them are kind of loaded words for me, but I like designing and I guess hacking.
Hacking to me is much more about figuring out the systems and the systems behind making things.
A Lego kit you've always wanted that you don't have.
Yeah, so I recently rediscovered Legos, actually, in the course of the Fiberics product.
And so this was about, I'd say, a year ago.
And we just started using Legos in our prototyping because we needed some systems that we could snap together and play with.
So prior to that, I actually didn't, I don't own any Legos other than that.
But I've since discovered that there is a very deep rabbit hole of used Lego kits, people proposing new kits on the internet.
It's really actually a vibrant world and it's kind of exciting to see.
But I don't actually have a kit that I'm really geeky about and need to get.
Who would win, a pterodactyl or a tank?
I'm going to have to go with the tank. I don't think a pterodactyl would be big enough to pick up a tank
fair enough although if we do the jurassic world thing we can fix that
that's true we could we could genetically engineer enormous pterodonts
that would be really a good idea but we could crossbreed them with the uh
the the little uh scampering dinosaurs that chase people yeah the velociriraptors. Yeah, the Velociraptors.
Flying Velociraptors.
I think that's for the next movie.
Okay, this one in more detail.
Okay.
What is a day in the life like for you, a work day?
So, these days I probably get up around, I don't know, 9 o'clock.
And depending on how much email I end up doing, I will ride my bike into the office around 10 or 11. It usually ends up with quite a lot of
email conversations with vendors. And then if I get around to doing work, it's usually later in
the afternoon, either programming or doing CAD or doing layout. and then you know some days it ends up usually
ends up with talking people in china until you know i go to bed so so you're the second person
recently who has said i do all this stuff and then i finally get around to working much later in the day as though emails and talking to people is not work.
Yeah, I guess it's not technology work in some sense.
It's obviously really important and critical to making something real.
But I think you're right. A lot of times, you know, when I think about the work of creating the product, I guess
my, you know, I divide it into two categories.
No, a lot of engineers.
I mean, it's like all this other stuff is stuff.
And then there's the work, which is the part I enjoy.
And yet, really, the thing that they need to pay me to do is all this other stuff.
Yeah, I mean, certainly when you're a startup company, the other stuff is arguably even more important than the development process.
And, you know, the other stuff turns into, I mean, sometimes the other stuff becomes technical work.
So when we're doing things like worrying about how to run a Facebook ad campaign or worrying about how to manage a mailing list effectively, there's a lot of sort of web tools that you can use for that.
But I think a lot of business is still just relationship building, and that does take time.
And it is work, but it's just a different type of work. It's funny, actually, sometimes I get in trouble because if I spend all day programming or all day doing CAD or layout or something like this, it's deeply technical.
And then you attempt to go to a dinner party and just do random networking, you will find that it's very difficult to switch modes rapidly.
I do better with people before I do the technological work. If I do technology and then
people, I'm like, does not compute. I feel very flustered sometimes. Yeah, I think I would agree
with that. So, fly bricks. We've sort of hinted that it has something to do with Lego bricks,
which I'm going to call Legos.
I don't care.
I can't help myself.
You know,
that was,
was,
was a joking harassment,
right?
I know,
but somebody out there is going to say,
you can't call them Legos.
You have to call them Lego bricks.
But we've already cut them off.
Right.
I'm just,
I already have a filter on my mail.
Well,
I mean,
I also,
I have to admit to Googling things and using Kleenexes sometimes.
So we've hinted Legos and we've hinted consumer product.
What is Flybricks?
So what I want Flybricks to be is the best way for anyone to learn about aerial robotics. And, you know, with that kind of goal in mind, what we've done is created a kit
that lets you build a variety of multi-copters using Lego bricks as the component. And, you know,
Lego bricks are made out of ABS plastic. They're actually fairly heavy. So, they're not,
you know, arguably they're not the best material for making a drone. But what's fun about it is
that you can reconfigure it, try different shapes, try different designs uh and you can do so in a way that uh i think is is
much safer and easier than experimenting with a larger uh drone or larger multi-copter in particular
if you are purchasing kits to build something that looks more like a dji uh style
the phantom like a phantom for you know it would be you know fantastic if you want to do aerial
photography but if you wanted to uh see what it was like to build a new airframe design that you
had or if you wanted to experiment with changing algorithms deep inside the drone i'm trying out
a different control process
or a different state estimation process, for example,
those would be, I guess, non-ideal platforms
because you don't want to do experiments
in a system that's big enough
to either be really expensive or to hurt somebody.
And so if I wanted to know the difference
between having four planar rotator uh propeller quadcopter things
and like um 20 all uh in a ball in different directions hey uh that is the sort of test i
mean i i think doing 20 and and you know some sort sort of, you know, I guess like a, yeah, like a 20-sided dice or something.
A doodaggy hydrocopter.
Yeah, that's right.
I feel like this is a callback.
I think, I mean, I guess you would have to think a lot about the orientations.
So, yeah, we support up to eight just because you have to decide how big, how dc drivers to put on um uh it's funny my co-founder actually is is
frequently thinking that we need to make a daisy chainable motor driver so the same way that you
can daisy chain led drivers these days with a single single line interface that gets consumed
you know a certain number of bits at every every step in the chain you can imagine the same kind
of control structure for a long series of motors. And then you really could do something with like 20 motors.
As it is now, you can build all of the sort of octocopter and below set.
What is the difference?
I mean, you think, okay, I'll just add another.
What is the propeller part called?
Motor.
Motor, okay. There's not some name that is the whole
assembly assembly okay i mean like a motor and a propeller together yeah so what is the difference
between four and five like what are the important things is there a weight well we probably should
back up a little bit we're gonna then talk about mean, do you want to talk about quadcopter physics?
I guess I do.
We have a physicist.
Because that seems like jumping in from, let's go to four to five.
Sure.
We had one on how four works.
Okay, yeah.
I mean, so propellers.
Then we have to start with zero and add one each time.
Well, I can tell you how zero works.
I'm sorry.
I'm going to.
Yeah, it, go ahead.
Yeah, it falls straight down.
Well, so, you know, propellers are kind of like an airplane wing that you're swinging around in a circle.
And so you generate lift or thrust in that way.
But you also have something that's spinning a lot.
So you have a lot of angular momentum.
And so usually in a helicopter, for example, you counteract that
with the tail rotor. And so, you can keep yourself from spinning around. And also, you know, if you
remember your gyroscope, if you actually change your orientation, then you'll start to process.
So, you have to think about worrying about all these sort of counteracting rotation terms.
So the reason that quadcopters are so stable is that you can have two of the propellers
rotating clockwise and two rotating counterclockwise, and you can arrange them in a fairly symmetric
way.
And so a lot of these torques from the angular momentum just cancel each other out.
And then when people come to your talks and they pick up your quadcopter and they say, why does it have three counterclockwise propellers on it? And you have
to look like, oh yeah, it was just for demo, not because I totally forgot. Exactly. But if you
wanted to make a five bladed design, for example, maybe you could do this by having one of them in
the center and then having the outer four all tilted a little bit.
Or maybe you could just have the aircraft be dynamically stable.
Which means what?
I guess it means that it flies, but it wobbles around the whole time.
Okay. Unstable, but within a certain range.
Yeah. And I think, you know, all of these are potentially interesting things to try.
You know, because we're using Lego bricks,
we also get a lot of interest from younger kids, basically.
And, you know, a lot of times
the fun there is just building
something that looks cool
and then seeing it lift off the ground.
So it's less about really experimenting
with novel propeller configurations
than it is about just actually having your Lego spaceship fly. But now I'm sort of
boggled because it sounds like I really do need to have an even number of propellers
or I'm likely not to have stability just by gyroscopic stability yeah so so uh definitely it's easier
if you have an even number of propellers and a symmetric arrangement um but you can also you
know you have control over the amount of power that you apply to apply to each of the motors
so uh you know there i have seen some designs where where people have a central propeller and then two propellers that face kind of the other direction.
They just kind of give it different force inputs as it flies.
So how much of the way and the ability for quadcopters and other multi-copters to fly, how much of that is, oh, we have a sophisticated control system that can take something that's inherently unstable and make it stable, like modern jet fighters, which actually can't fly without a computer. Is there a lot of that or is it just, no, this is a pretty stable arrangement and that's, it's a good point. So, if you are very careful, in order to get everything in balance just right, you have to be very careful about where your center of mass is.
And, you know, you'd have to worry about whether your propellers were, you know, balanced and all this other stuff.
And we can be a lot sloppier that we have on board are, you know, one of the really the key enabling technologies for these kinds of things to become commonplace toys.
You know, the MEMS gyroscopes are the core of the center most loop.
And, you know, you can get about 184, well, exactly 184 hertz of bandwidth, physical bandwidth out of those sensors.
And that lets you close a feedback loop with that kind of latency.
You know, it's interesting,
like I had kind of an epiphany
when I was working on this project at one point
where, you know, we were able to,
you know, we have 100 megahertz processor,
so we can do a fair amount of math
during every cycle, every control and actually we could we could
do we can estimate our state calculate correction factors and change the motor levels uh you know up
to 1600 times a second uh so what's interesting about that is that you know and the the realization
i have is that that does not give you a 1600 hertz loop bandwidth in your control system in some sense that's like a
discrete sampling of a process that has its own physical time constant so it doesn't matter how
fast you know if we had a uh penny you know like a four gigahertz processor on there and we were
able to do you know close we were able to compute our our update at five kilohertz or six kilohertz,
it wouldn't give us better control. It would get us better sampling. So we might have fewer sort of aliasing effects and things like that. But like the physical bandwidth determined by the
sensor bandwidth. So for the gyroscope, that's like 200 ish Hertz. And then this was, you know,
we can talk about software at some point down the road, but like, you know, one of the real confusions for me when I first started looking at kind of the drone software that was available out there is that the way that the control systems were written, in my view, kind of obfuscated the fact that it was using what's called a cascade controller, cascade PID, where you actually have an inner loop that's being closed very quickly and an
outer loop that's being closed slowly that's driving the inner loop. And so, when I first
looked at this and I was looking at the computation we were doing, I was thinking, well, this seems
like it's mathematically equivalent. We're just computing these two loops at a thousand hertz.
So, what are we gaining from this? But what you're gaining is that the innermost loop has
this gyroscope with this physical time constant that's much much shorter than the accelerometer
which is used in the outer loop and so you're actually able to realize a overall feedback
bandwidth that's much faster by using fast sensors on the inside and slow sensors on the outside
and you know where we're going to be going with this eventually is actually putting an even slower sensor one step up from the accelerometer and starting to incorporate some optical stabilization into the control system as well.
One of the pieces you have in your system is the InvenSense MPU9250.
And that's a nine axis, right?
It is. So there's a magnetometer in there as well.
So gyro, accelerometer, magnetometer. Does the magnetometer work? I mean,
you have these motors really close to you and that usually is kind of noisy.
Yeah. So that was, you know, one of the reasons why we wanted to use the MPU9250 was to see if,
see how well it worked you know the the uh the
motors actually are pretty well shielded i think is is the answer um you do see uh bias in the
magnetometer from you know nearby uh pieces you know iron and things like that um so you can
normally if you if you really want your drone to fly well you can
calibrate out the magnetometer hard and soft iron calibration yeah yeah and you do that on your phone
by doing it in this in the yeah you can do the figure eight thing um you know we i i think that
that's an extra step so we leave it on an advanced tab and we don't make people use that um the
magnetometer actually doesn't i mean i guess
it helps to stabilize your your um six axis you know your orientation but it doesn't um but what
you really want is uh i i guess uh position better position yeah gps would be fantastic
but we you know we really we see most people using these indoors and GPS has a lot of cost and weight. So we, I guess you could add a GPS if you put it on the expansion port, but that's not part of the product built in. But yeah, that's, that's the, that's sort of how the control system works. And you're right. You know, it's without a control system, I don't think you'd be able to fly even if the you know, you really worked hard to balance everything.
I wondered if that's why we're seeing this explosion of multi copters and why it seems to have come out just about the same time as the as the cortex like M0 line.
And those are just barely big enough to run a good
Kalman with accelerometers and
gyros. And it just seemed like
that was the point at which...
A lot of the earlier flight controllers were
8-bit Arduino ones, I think.
So I
think you can do it on small
stuff if it's tightly written.
Oh, you definitely can do it.
It's just not as much fun.
I think that it's,
it's the,
the MEMS sensors and possibly also the lithium polymer battery technology.
That too.
Oh yeah.
Really the enabling step.
You've also got a barometric pressure sensor.
Is that,
are you using that for altitude?
Well,
yes and no.
So it's there and you can turn it on, but it's not on by default.
Um, you know, there's actually a lot of things on our, on our board that frankly we've included
just because we wanted to make a really awesome, uh, you know, board for people to do fun things
with. Yeah. Kind of a platform. We're going to put this on here. We won't tell you what to do
with it necessarily. Yeah. So, I mean, it has an SD card. You know, what I want to do with the SD card is comprehensive data logging so that I can improve my state estimation algorithm. So, you know, there's a company in the East Bay that has little blinking red lights, and you attach these to the refer to your sensor input and re-simulate
your trajectories overnight and really understand whether one state estimation approach is better
than another um so did that in 1998 yeah but we used real planes yeah people got really sick
i can imagine you have to generate a lot of different types of motion. Yes.
So, you know, I don't think that all of our users are going to be doing graduate school level research with it. But, you know, I think when I was saying I really want to make a platform that's the best platform for learning about aerorobotics, I mean, that I think is one of the use cases that we want to support.
Even if the bulk of our sales will probably be to people
who want to put together a really cool toy with their kids.
And so what is the processor it's running on?
It's a Kinetis K20.
Oh, you said, right.
It's Cortex M4.
It doesn't have a floating point unit.
It's an M4 without a floating point.
Yeah.
We've actually looked a lot at the Nordic,
the new line of Nordic Bluetooth chips.
So, it'd be interesting if we could fit our processor into that.
It would help us a lot.
I mean, we do have a Bluetooth module on there in addition to the Kinetis, and that's sort of twice the processors, right?
So, it adds to the cost um what we get for that is that we're fully compatible with the teensy um which the teensy board is actually uh what we look like to any computer
that you plug us into so we're actually paying um paul for his bootloader which is fantastic and
we're happy to do that um for at least uh the next few thousand units so and so people can reprogram the system with Arduino interfaces or GCC, depending on when to control it.
Yeah, so I do my development in the Arduino IDE, but we're using all the Teensyduino libraries that there that has the Teensy proprietary bootloader so that we actually do look to any computer system exactly like a Teensy 3.2.
And I knew which sensors you had because all of your code is on GitHub.
That's right, yeah.
And you have the whole flight controller software and both the state estimator and the…
Yeah, so our intention is to have everything be open.
You know, that may change with some of our core logic
on the FPGA products and things like that.
But for the most part, you know, the...
I think that there's more to be gained
by having software be open source
than having it be closed source.
So it's sort of a philosophical alignment.
Also, we wouldn't have been able to make this product without the investment that a lot of other people have made in open source.
So it just kind of seems like the right thing to do.
Also, it means that we have to worry a lot less about our GPL license.
Yeah, but it's sometimes difficult to make a product down that path yeah it's
interesting i mean i think it's a question of like what are the real barriers to entry
in any particular product space and um you know i think you if you're looking for product
protection from secrecy or from patents or from, you know, basically what comes
down to litigation, maybe you're focusing on the wrong things as an early stage business. Instead,
just focus on making a really awesome user experience, build a brand. You know, I'm
continually surprised by the people, you know, we've been starting to run sort of a modest number
of Facebook ads. And so every once in a while, I'll get an email from somebody saying, Hey, you stole my idea. I'm like, well, all right,
go, go download the software and build your own board. Like it's, I don't think I stole anybody's
idea. It's, it's ideas are cheap. It's not like we've ever met. Yeah. And we haven't met either.
Right. But like ideas are cheap and what's, what's hard is actually figuring out how to make
something. And, and then, you know, what's even harder is figuring out how to sell it.
So you are finished with your alpha run of production, is that right?
Yeah, so we did a run of 150 boards right around the first of the year,
and those shipped, and they did not have any Bluetooth on them.
So those basically were locked into an external RC controller.
And the big change in the new build,
which internally we're calling the beta,
has been to add the Bluetooth control.
There's been a few other changes too.
I can show you the boards here.
Well, the Bluetooth control will let you control it with your smartphone.
That's right.
And so on the one hand, it helps us a little bit with cost.
On the other hand, it also allows you
to have a much richer data stream.
So with the RC controller,
we're kind of locked into just sending,
I think, six 12-bit numbers.
I guess technically they're analog.
Well, they're timer signals that come across
the pulse position modulation.
So, you you know with the
bluetooth we can send full telemetry um which you know to a point well to the data rate of the of
the of the system um but it's uh i think we get eight kilobits per second symmetric it's i can't
recall exactly um but it does let us do things like uh you know you can you can look on
your phone and see the the sensors in real time this kind of thing i like watching watching the
accelerometers and the gyros as things move around because i'm just that's yeah that's that is what
it's doing and yet when you give me the data sometimes i can't figure out where it flipped
over well it's tricky because
you're looking at all the derivatives of this the things that your brain sees you're not really
seeing them directly so you know that's why the the state estimation is so critical um so the
other the other cool thing we were able you know we have made some other improvements between the
alpha and beta um you know the uh connectors are just a continual pain to find like we actually
have i started out using using some Molex line
and then it just really aren't suitable
for people plugging and unplugging motors a bunch.
So we ended up going backwards to just, you know,
standard 0.1 inch pitch headers.
But we also are now integrating some Lego pieces
directly into the circuit board.
So it's kind of fun.
We're actually placing one by one round Legos as if they're through hole components with our contract
manufacturer so we get billed the same way i bet nobody's done that before yeah it's kind of fun
um if you think about it like you know super gluing a lego into a circuit board is kind of
the same thing as soldering so kind of i wonder what kind of flux you use yeah well one of the same thing as soldering. Kind of. I wonder what kind of flux you use.
Well, one of the really fun things about working in this regime
with small drones is that you're really in a corner of engineering
where you have to worry about mass and power and cost,
and you're really engineering with a lot of constraints.
So one of the things we try to do is think about
how we can use the electronics
as mechanical components as well because fr4 is actually a pretty strong material
in terms of strength of weight yeah if you open up the the shearson quadcopters the little ones
um that is the board is the mechanical and the plastics on the outside are just coverings
um but yeah that's that's all mechanical.
Drones always seem like the perfect embedded systems to me
because they've got motors,
they do things physically in the world,
they've got control systems,
they've got power problems,
they're moving.
They just seem like a really great platform
for learning all kinds of things about embedded systems,
not just necessarily flight,
but all the kinds of problems we have to solve are there.
I think it's a really good entry point.
I mean, the other sort of natural entry point, I guess,
is people that are making LED art or projects.
And I think, you know, so we've tried to,
we've incorporated four WS2811, 2812 clones, I forget,
you know, that are, you know, daisy-chained together.
So you can do kind of, you know, experiments a little bit
with some of these, I guess we call them blinkies internally.
I don't know if that's what everybody calls them.
Blinking lights.
But yeah, I think the Teensy, for example, was,
so I started out using Arduinos and Arduino Nanos and then found the Teensy, for example, was... So I started out using Arduinos and Arduino Nanos
and then found the Teensy
and really got a lot of use out of the Teensy
right up until the point where basically
I wanted to start making lighter weight,
more compact, denser designs.
And then from there, basically got over the hump
of laying out the electronics around the processor itself, which I don't know why that was so frightening before I did it.
I made plenty of shield boards for a long time.
And then to actually just drop the processor itself into my layout software with all of its you know pins and of course you
know now i'm doing all these 100 100 plus pin pga packages and fun stuff like that so
going from alpha to this beta um i have noticed that your ship time seems to be
not what it was when i first uh saw in january not not quite month for month slip but
has production been harder than you expected well i think so one of the things we've tried to do
we haven't done a large kickstarter campaign or an indiegogo type campaign and i think that a lot
of companies get themselves in trouble by promising to make, you know, in units or in as a large number of units all at once.
And you learn a lot different things when you make 100 than when you make 10 and so on.
So, you know, actually, this board just came from our first run of panelized production.
We made 500 boards this week.
Yeah, so it's really exciting um uh things other things that caught me
up i think you know i really the project got going in october and i it took me probably two months to
rewrite all the code instead of the month that i ambitiously thought it would take so there was slippage there and um then the uh we actually have had some i guess
there's inevitably delays you know so you especially if you're trying to save money
right so you you if you're uh if you want to do 10 day turn on all your boards then
you know it takes you 10 days to find out that you made a mistake um you know i think one of
the things that's uh useful is you know there's a lot of companies now that are trying to make the prototyping process a little bit less painful.
Oh, yeah.
Places like Osh Park where you can get a small number of boards.
Places like Osh Park.
We use Osh Park a lot.
You know, Tempo Automation we use sometimes.
I recently heard about a new company in Brooklyn, or I guess maybe new to me,
called PCBNG, who's been
fantastic. It's kind of like Osh Park
plus assembly.
But we also
end up using a lot of advanced assembly.
We've
started working with Seed Studios
to move overseas
and did a
production run with them.
And now we're also working with Sparktron, which has a local office.
It takes time to figure out your supply chain.
It's also a different financing problem for a startup company, too,
because you suddenly have to worry about managing your inventory costs.
It's not just software.
You have actual things to keep track of.
Right.
Yeah, it's a mistake in software is a recompile,
and you're done, and a mistake in hardware,
which I give you case in point.
On the alphas, we tried to include a little switch
that would automatically change the power source from USB to to battery kind of a convenience thing right so you can program it by without
having the battery plugged in well there's a bunch of uh back emf from the motors that when it hits
that switch puts it into a three three millisecond timeout and so you know then it's like well how
many band-aids do you try to
paste on do you add capacitors do you add zeners do you like try to figure this out and you know
in the end we ended up hand reworking every single board out of the alpha run um because
you know we were trying to push out a product and with a schedule and a volume where you know the reality is it probably
takes you just as much time or just as much cost to manufacture 10 as it does 100 but so you're
always tempted to make 100 uh but then you end up having to rework 100 right so you know it's it's
it's not a problem that i think that i've totally figured out. I'd like to think we're getting better at it as time goes by,
but as far as slippage you know,
yeah,
we've,
we've been trying,
it always feels like we promise people a date that is much longer than it
needs to be.
And then a bunch of stuff goes wrong and we're really glad that we promised
people something that turned out to be manageable.
So I think in the alphas,
we promised February and shipped
the last day of February.
And with the betas,
they're, you know, barring
some discovery this week,
they should all ship in July.
Oh, okay.
I think your website
I think says September.
Well, this is what I mean, right? It's very important to
promise people to over, yeah, under-promise, over-deliver.
Yeah, that's the way.
It's easy to get them confused, though.
That's right, yeah.
You mentioned FPGAs.
Yeah.
What part of the system uses an FPGA and what does it do?
You just told my question.
You got to talk fast.
So, my co-founder started his career in FPGAs.
And actually, his first project was like emulating a PDP-11 or something to run a nuclear power plant on FPGA.
So it's kind of...
All right.
Yeah, I know, right?
Because you can't get the processor and you...
Anyway, so the upshot of that is that he knows how to do fpga stuff i do not
um it's just kind of it's something that i think is fascinating to me um but it's not something
i've gotten into yet but the the specific thing that we want to use an fpga for is to be glue between a camera and a low-cost microprocessor.
So one of the limitations of a low-cost microprocessor,
and maybe you go there for cost or for size regions,
because a small drone, you may not be able to have a 20 by 20 millimeter chip.
But if you're going to use a low-cost small microprocessor
and you want to do video, then you need some way to reduce
the data. And there are a number of very tiny affordable FPGAs out there that are useful for
that. And of course, what we're trying to do is pile on as much functionality as possible. So
kind of the dream feature and the one that we're working on right now is completely autonomous flight using visual stabilization instead of GPS
stabilization, because that would give you
indoor stability. So that's usually done with a downward facing
camera that does like flow estimation or something
and then figures out your motion based on that? Yeah, I mean, so there's
some hobbyist products on the market
that you can get that do this with, you know,
I mean, you can get OpenCV and play with all these techniques.
The challenge is to do it in smaller chips and less power.
And so, you know, we have some ideas that we think are clever enough to maybe work,
and that's what we're doing with the FPGA.
Cool. I did learn an interesting lesson're doing with the FPGA. Cool.
I did learn an interesting lesson when I was doing FPGA layout,
which is that there's an enormous change in cost
when you go from a 0.5 to 0.4 package.
It seems like there's a million options for doing 0.5 pitch BGAs,
and as soon as you go down to 0.4 then everything just
gets really some cliff there yeah yeah so you know you sort of explore these these economies
this is one of the disadvantages of being self-taught in electronics is that you know i
feel a lot of times you have to kind of claw this knowledge out really painfully so it's the uh you
know so it's like it's simple things it's like the first time that you lay out a circuit and you
forget your pull-ups you know and then you always remember to look for pull-ups after that.
Yeah.
Yeah.
Yes.
One way to learn.
Keep shooting yourself in the foot.
Yeah, exactly.
You learn.
And so Legos, Lego infringement, are they supportive of Flybrooks?
Do they know about Flybrooks? Do they know about Flybrooks? Yeah, so I think any big company has to defend their trademarks,
and that's a very reasonable thing for them to do.
Lego actually has a pretty generous policy that they've published.
You can go on their website and see exactly how they want their trademarks used.
And we do our best to be respectful of that. There's nothing to prohibit people from reselling used Lego bricks.
There's nothing from prohibiting people to make compatible parts.
But you do need to be careful that you don't try to create confusion in the minds of customers.
So we are not a Lego product.
We're not endorsed by Lego. And, you know, all of our advertising has to carry that disclaimer so that we avoid potential problems. But I think maybe they did kind of go through a slump where they didn't want outside markets.
And then there was the huge resurgence of Legos as they went more into just build whatever you want instead of you have to build our kits.
Well, it's hard to say.
I mean, so Mega Bloks has been around for a long time.
And, you know, they're not as popular as Legos, Lego bricks.
I think obviously the Lego group is doing something right.
And, you know, I think, you know, I wouldn't speculate on what the legal basis would be for trying to shut down somebody from being competitive.
We're, I think, you know, when we have other problems to worry about in a sense,
I mean, we have been contacted by Lego
and they've reminded us of their trademark use policy.
And, you know, so we're doing our best
to stay inside the lines.
But they didn't smack you down and say,
no, you can't, so cool.
I just, I don't think that that's,
I don't think people can really do that.
I mean, I guess-
I'm always shocked by the people who try. Well, I mean, I don't think people can really do that. I'm always shocked by the people who try.
Well, I mean, I don't know.
I think there's better things to spend your time on than ultimately.
I think we're not a big enough threat to anybody at this stage.
All it's going to do is sell more parts for them.
Yeah.
Because people want to put more and more stuff on there interesting like most most of the the parts that are in our kits actually the
are predominantly used legos lego bricks uh the you don't have to keep doing that i know i know
i i really do i i we're trying to take it seriously and they do want us to say that so
uh in any case the the there's two sites on the internet that we look at
one's called brick link and the other one's called brick owl and they're kind of fascinating they're
basically uh like specialized ebay sites so you go on there and you can search by part number and
by color and just buy you know any particular bricks that you want um so you know i've bought several thousand lego
bricks in the last month um you know and and there's how did you write that on your expense
form i just want to know for our accountant yeah exactly yeah the uh you know i think it's funny
because some of the parts that we've gotten when when you look at them, they're clearly counterfeit parts.
So there is some trade in counterfeited Lego bricks.
And the question is, if you're going to the trouble of actually putting the Lego brand mark on top of the ABS plastic brick, then I like that's kind of a line yeah that's a little bit too far we actually do have one custom brick that we include which is a
motor support arm um and i was a little bit cautious when making it i mean if you you know
the approach we took with the circuit board was to glue in you know real lego bricks and into it's
kind of like a hybrid assembly um and you, we started off doing that with everything because, you know,
we had heard all these legends of how Lego bricks had these like incredibly
tight tolerances.
And I think that there's a lot of sort of conventional wisdom about how
difficult it is to injection mold things.
And so I was really surprised the first time we injection molded something.
It was perfect.
It actually, you know, is exactly the size that we asked for and it snapped in nicely
and it wasn't actually that hard.
Now, the difference is that we're using, we're making, we have a one cavity mold and we are,
you know, making tens out, 10,000 pieces at a time.
You know, I think that maybe what's impressive about what the leg group's done is that they have 64 cavity molds, and they're all exactly the same and perfect.
But I imagine that at some point, we'll exhaust our ability to purchase bricks on the secondary market, and we'll probably end up looking for alternative supply chain um are they cheaper on the secondary god i feel sort of like is it cheaper on the lego black
market right well you have to you have to use the the dark web um yeah no the uh
it i think i mean from my, my thinking there effectively, I
mean, the Lego bricks are not the most expensive.
I mean, it's plastic, right?
It's not the most expensive part of the system.
Um, if you go on one of these sites, you'll see that you can buy one Lego from somebody
and someone and some somewhere else will go into their garage and like put a Lego in an
envelope and mail it to you.
And, you know
it's amazing to me let's try this you should go for it um i think if you were going to try and
assemble an entire kit uh from like the bill of materials which by the way lego sells a really
awesome cad tool uh lego digital designer um which is fun you can you can actually use that to assemble designs we we
started off using this but it doesn't actually let you uh it really wants the pieces to always be
legally connected and you know like our octocopter design um there's one fit that's just a little bit
close it's like 50 microns off so i can like i can force it in a proper cad
program you know we use solidworks um but you know the the um when we started off we used all
the lego digital designer to play with different concept designs and i got to check that out
yeah it's fun and it'll actually print up it'll give you like a printout of how to assemble your
design as if it was a lego guideline
and a bomb and everything and it gives you a bomb so then you could take that bomb and you could go
to one of these like use lego sites and order all the parts so can i see one of the boards can i
see the one with the lego in it yeah so this is the the beta board here and the outer edges where
i might normally expect there to be screw holes or Lego bricks.
Right.
Or one-bys.
Yeah, one-by-one round pieces. So that's so that you can actually use that as a structural component in the airframe, which saves a lot on mass.
But your solder for your battery would...
Oh, of course I would have to put something bigger than the header, so the solder for the battery wouldn't matter.
And these are glued in somehow yeah so we just use super glue it seems very reasonable yeah you know i think in the long run we might imagine uh two-part uh abs
assemblies that snap together with something like that so that we can minimize labor on that you
mentioned earlier having trouble with connectors choosing connectors um it seems like a really hard
problem because normally when you're building something like this for a consumer product you
plug it together and you hope that nobody takes it apart again and you're actually saying we want
you to take this apart and put it back together hundreds and hundreds of times potentially are
there are there connectors that are good for that kind of thing that or well i think it's like
a hard thing to find in the small form factor i think it is a hard thing to find also you know
the currents are quite high you know you're driving two amps for to each of these dc motors so
you know we ended up just going to straight pin headers um for that reason and before that um
you know i spent a lot of time looking at molex and JST, which I don't know why it seems like it's really hard to shop for connectors too.
Nobody has that interface down.
Well, I think you get in good with the connector vendors and they come and visit you.
They tell you what to do.
Maybe that's the way to do it.
Once you touch it, it gets a lot easier.
The hobby world adds an entirely, a whole other layer of complexity here too, because there everybody likes to use trade names for the connectors.
JST.
Everything is a JST connector, which doesn't help when you're.
XT60, which you probably aren't using.
Right.
So, you know, like a year ago when we, when we were first starting out, we would just buy a huge assortment of connectors on Amazon and Alibaba and like try and sort out what was what.
And now I feel like after a while,
you kind of get a sense for who's using what.
The battery connector also is an issue potentially.
So we're using a connector that I think is nice because it handles the current
and it's pretty hard to plug in backwards.
But it's hard to find hard to plug in backwards uh but you know
it's hard to find a surface mount version of it so you know it's the question is do we want to
maintain uh compatibility with lower cost you know industry standard batteries or do we want to
go to a custom connector solution that would let us you know that's a tough choice yeah yeah so if you have a board that is doing cyber things and you have lego bricks on
it and in some sort of hybrid is this is this a cyborg wow it's not quite self-aware yet but
you can you could program it to be put a chat bot on there christopher's underwhelmed i'm just well
uh so he just asked about uh having to take this apart and put it back together and expecting
people to touch it and and move things around but you had to do that with your code as well
you're really expecting people to read and modify your code. I think that I would be tickled if 2% of our users looked at the source
code. I think, you know, so our job is to make sure that it's easy enough for someone to use
without ever plugging into a computer. So, you know, you should be able to use the app to
reconfigure it for different motor configurations,
and rebuild it.
We're shipping it with three basic models,
so an octocopter, hexacopter, and a quadcopter.
And the Doteca Hedrocopter.
And the Doteca Hedrocopter will be coming in September.
I have that domain name, so you can talk after if you want.
Yeah.
So, as it is now, it typically falls apart if you crash it. So,
you get good at building it quickly. And, you know, we think that's part of the fun of the experience. I'm just excited to think about like all the other things you can do with it eventually.
Like, I want to program, you know, I don't remember, I don't know if you guys did this
when you were kids with your Legos, but know i routinely would just build these cities and castles and then we would you know launch legos at each other's castles
and just have these little battles that would play out it was spaceships for me spaceships
so you know i i think at some level it would be fun to have a ballistic mode where you could
program intertrajectory and just you know launch the launch the multi-copter at the structure.
Sort of like, think of it as Angry Birds mode
for fly bricks. So I have a question, which I
probably should have held to the end, but now I'm going to ask it.
So you've got motors,
you've got a control board. There's no
reason you can't turn the motors out or
put wheels on them, right? That's right.
Yeah. Or make a boat.
A boat!
Christopher's frantically taking notes now.
Yeah.
I have to wonder.
There's other things that I think, you know, so one of the things that I am really interested in doing, you know, when we have free time someday, is think about what you can do without propellers too.
So, you know, we talked earlier about balancing torques.
You know, what if you could have a octocopter where some some of the axes weren't in fact propellers but were just little weights
and so you could actually have gyroscopic turning by accelerating or decelerating a motor
could you do something fun with that like reaction wheels like reaction wheels yeah
then we can put it in space and then it would fly in space which is the point because then you could
you could take it off with a helium balloon and then it might still fall back i'm gonna make the first cube
set made of legos yes yeah uh but because you are writing code for people to read
you have written it a little differently yeah so. So, this is an interesting point, too, because I have to admit to being self-taught in the programming side as well.
So, when I started out, it was mostly adapting C code and doing things that seemed like they made more sense to me.
We've since then started working with a person who is much more talented programmer than i am and so we we've now have have incorporated a lot of sort
of modern c++ syntax on top of that which is really powerful to my eyes it makes it a little
bit less readable but i think you can have you know endless uh arguments about which is better
style um i think the important thing is to have the code out there. You know, one of my regrets,
in a previous life,
I worked on a robot car team
during the Grand Tarpaulin Challenge.
And that was one of my first entries
into doing state estimation
and control theory
and things like this.
And, you know,
we were in all three
of the Grand Challenge events
and never released
any of the code that we wrote,
which is just kind of a shame. And I think in retrospect, it was because the team thought
that the code was just too ugly or the code was not going to be useful to somebody or,
you know, I don't know, maybe somebody wanted to, you know, thought they might use it for
something commercial at some point. But the end result of it is that, you know, now it's like 10
years later and, you know, effectively we had a Toyota Prius with a nice Velodyne sensor on top that
was driving around the streets of Los Angeles.
And, you know, maybe somebody would have gotten some use out of that.
So, I think it's probably more important just to open source your code and not worry about,
not worry too much about readability.
Although it makes it harder to do kind of,
I guess, piecemeal patches.
I mean, it's a little bit embarrassing to like check in,
fixed it again, fixed it again, again.
Yes, but we all have to do that.
And it is very C++-ish.
Well, it's modern C++ too.
It is very modern C++.
Using modern features,
which I've never seen embedded before
yeah I had to look up a number
of things I mean there are templates
and the lambdas
lambda functions
how did
I kind of want to tell people to go look
at this not only because it's
an interesting set of code because
flight controllers are cool it's an interesting set of code, because flight controllers are
cool. It's an existence proof.
It is an existence proof, and
it has sensor handling that's interesting, but
it's actually, this
is the reason you should try to use
C++, is because look at how all of these
things are separate,
and they don't talk across
their boundaries very much.
I didn't read all of your code.
I mean, that's the goal.
I mean, you can re-implement all of C++ in C.
Right.
So, you know, it's just if you prefer function tables or something else.
And I think it's hard because when you first find out about object-oriented programming, your code just tends to spiral out of control
into this, you know, everything is more and more abstract.
And that's, you know, not the ideal outcome either.
So, you know, I don't know.
Hopefully we'll strike the right balance.
You know, there are actually a number
of other open source drone control projects out there.
And so what, you know, we certainly drew from all of them when we were rewriting you know i i the things that were important to me uh were to
try to simplify the code so we we got rid of a lot of support for a variety of systems um you know
it's funny like we started out thinking oh it'll be great to get rid of the board header so that
we don't have to define all the the io and of course, now that we have a beta board and an alpha board, we have a board header file.
That's inescapable.
It's inescapable, but it's kind of like
when you write an essay and then you throw it away
and you write it all over again.
And every time, you know, when you do that,
you can do a better job the second time.
You know, I think the other reason is when you, you know, by virtue of having rewritten all the software, then now our company as a team understands it a lot better.
And so, you know, some of the things that we have in mind for the future really require us to have kind of a deep understanding of one set of code and the nice thing about starting from scratch or from forking it and making your own is that then uh you know nobody complains when you rip out all of their
hard work and replace it with something that's modern style and terrible you know but uh yeah i
think you know i'd welcome people to go check it out at the flybricks github page there's uh we
also have code for our our chrome we have a chrome app that is basically just
a visualizer for the serial data stream um one of the things that i spent a couple weeks on in
december was worrying a lot about serial transfer rates um because one of the you know when you have
an embedded system you can be processing power limited or you can be um connectivity limited
and you know the the unfortunate thing is that sometimes these things
intersect when you end up with like blocking transfers and so now we're we're actually
dealing with that again all over with the bluetooth and and the sd card which are now two
new features on the beta board but uh you know we ended up implementing a constant overhead
byte stuffing array that worked really nice.
So that is implemented on the app side too.
We also wrote a firmware updater
so that you can update Teensy firmware
using the Chrome extension, which is kind of fun.
And the long-term goal, obviously,
is to move all this over to Bluetooth and do over the air.
What did you learn, modern C...
You guys are using C++11 stuff.
We've had questions from people.
We've encouraged people to explore C++ on the show for Embedded
because it's kind of anathema to a lot of people,
but we both kind of think, there's some value there.
But one question we often get is okay how do we learn this
and there's lots of resources out there for garden variety c++ from the 90s but uh did you find any
resources that were helpful for the more modern stuff because i haven't found much so i did buy
a textbook i haven't opened it okay uh i and it was recommended to me by the programmer that we're
working with so there's a very talented programmer that we found in Bosnia, actually, in Mostar, named Adnan.
And he's actually responsible for, I would say, 99% of the C++.
And I think it's actually really impressive how clean his code looks by using the modern techniques.
So, you know, I will go in and write something that's really ugly and barely functional, and he'll come in and fix it up.
And that's fantastic. And, you know, increasingly... We all and write something that's really ugly and barely functional and he'll come in and fix it up. And that's fantastic.
And, you know, increasingly.
We all need one of those.
We do.
Yeah.
So, and, you know, I think one of the cool things about electrical engineering in particular is that there's such a common language that you can work with people all around the world. So I've had board layout done in Malaysia and I've had, you know, adjustments
made in Vietnam and we've worked with programmers in a variety of places. And, you know, it's fun
to meet people in other countries and then, you know, find that you have a lot in common and you
can work on something together. so state estimators we've
we've done a show or two about kalman filters and a little bit about inertial sensors and how those
two things work together but can you tell us what you were doing with fly bricks and and are you
doing you mentioned the the pid with cascading, which I didn't know was a term.
But now that I look at the Wikipedia page, I'm like, oh, yeah, we used to do that.
Yeah.
Well, I think having the right words for things is really important.
And this is the thing.
As soon as I found the Wikipedia page for cascaded PID controller, then everything that I was looking at in the code and struggling with in these other uh flight control systems made sense so in our
code we abstracted the cascaded pid class outside of the pid class whereas you know so it's just
like trying to trying to have i guess uh complexity be reduced on the conceptual level in the code um
you know the way i look at it is state
estimation and control are kind of two sides of the same coin like you can do really well in state
estimation and then and that's a totally separable problem from your control theory side so on the
control theory side there's lots of other different types of controllers that you could imagine
implementing but everybody uses pid because it just works really well.
And it's intuitive to tune.
Well, once you learn how to do it, it's not hard.
The initial how to tune a PID is kind of a pain,
but now there are plenty of tutorials, and so it's not impossible.
Right.
And it helps to have loops that are closed nicely.
Back from the robot car days,
tuning the brakes was a fun thing.
Literally jerking to a stop repeatedly
until we looked at oscillation periods.
But I think if we actually did have
one of the reasons to put the SD card on there
is to get the data stream, look at the ground truth,
and really play with things like a modern controller, which I think they don't get a lot of use because they're just harder to tune.
But if you have all the data, then you ought to be able to tune it in a brute force way.
We're adjusting LQR parameters a little bit at a time and just seeing which weather.
Monte Carlo simulations?
Sure.
Yeah, or pick your favorite optimizer.
Yeah. Or pick your, pick your, uh, pick your favorite optimizer. Um,
yeah.
Anyway,
uh,
on the state estimation side,
um,
I mean,
the nice thing about a common filter is that it is,
gives you less delay than a low pass filter because you're making a
prediction about the future.
And the prediction is the only way that you can tell the difference
between noise and signal.
Uh, so, you know, a common filter, it's just assuming a linear prediction.
So things are going to be basically doing what they used to be doing.
And then I can consider some amount of my signal as signal and some amount of my signal as noise on the next measurement.
Whereas if you just use a low-pass filter, you can also do state estimation,
but you're going to end up with a higher latency because you can't predict future at all.
So the column filter works really well.
I think the implementation we have is, I can't exact, I'm blanking on the guy's name,
but there's a couple of different papers that were written about doing this specifically in lower
speed processors.
And so, we're not
doing anything unique there, and you can look in the code
and see that it's the same.
Calman.cpp?
Yeah.
But you're doing
this
on... It doesn't look like you're doing this on a quaternion.
Did you guys skip quaternions?
How did you skip quaternions?
Oh, I think there's a quaternion filter in this somewhere.
Oh, we get to the inquisition portion of the show.
Yeah.
Quaternions, hmm?
Boy, quaternions are just hard, huh?
They're the coolest thing.
Does anyone really understand quaternions?
It's like asking people if they really understand quantum mechanics
right
while he's looking up I will explain quaternions
to the best of my abilities
see you take three space
and you have x y and z
but then you're dealing with angles
because
because physics
so you have roll pitching y'all but roll goes from like
minus 180 to 180 and then if you as you're going to 180 you you go up and you go up and suddenly
you're minus 180 again and so there's this discontinuity and all of the angles have that
discontinuity it doesn't matter if you use radians or use degrees you still
have to flip over from um from minus 180 to 180 or zero to 360 or or two pi to zero you have to
have that discontinuity but these filters they don't uh they don't do well uh in that discontinuity
and anything you have to integrate when you integrate the acceleration
into velocity then your your tiny changes your discontinuities really blow up inside that
integration and so quaternion takes these three values the roll pitch and yaw turns it into four
values that we aren't even going to discuss what it is except a lot of math. And then you can do all of your integration there and do a bunch of math to get back to roll, pitch, and yaw.
But you've lost all of your discontinuities when you're in the fourth dimension.
Hey, I like that talk. I'm sorry.
Discontinuities in the fourth dimension.
Yeah.
So, I'm always remembering.
So, in retrospect, linear algebra was probably the most important
math class that i took i think it's really the most important math class period it's also probably
the one that i remember the the worst yes it's just so hard and i remember you know seeing um
seeing all the cool things you can do with you know using an extra dimension so you can translate and scale
in computer graphics by going one one dimension higher and you know like there's all these tricks
where if you just kind of like you know look at the problem with an extra dimension then everything
becomes simpler because you can exploit geometries in different ways and so i mean i the problem i
always have with with katernians is that because i kind of still have i mean i get it i sort of get
it but i but i don't have that like real confident grasp of how to do it like i couldn't sit down and with Katernians is that because I kind of still have, I mean, I get it. I sort of get it, but I,
but I don't have that like real confident grasp of how to do it.
Like I couldn't sit down and derive something for you with Katernians.
But.
No,
that's what Wikipedia is for.
Yeah.
But yeah,
it's,
it is a Katernian filter.
If you look in the first line there,
it's a,
there's a float queue array.
All right.
Inquisition over.
Yeah.
It has more than four things but that's okay it's a quinternian as nine i'll read it later non-one thing is to
think about how do you describe state um you know so you can think about your three angles and three
positions like six degree of freedom but then you can also estimate the derivatives.
So you could have a state vector that's 18 numbers long very quickly,
and then you could run a Kalman filter that used an 18 length vector.
I feel like throwing all that into a Hamiltonian for some reason.
But tuning the Kalman filter is non-trivial.
Are you going to help people? I mean, how are you going to set up
the system so that people who actually are willing to dive this deeply
get beyond PID tuning, which you probably can figure out
giving tutorials on the web, to tuning this particular
Kalman, which has got to be its own separate thing.
Well, it's an interesting point. how do you tune a state estimation filter?
So, I don't think most people will have to retune the state estimation filter. And, you know,
the filter that we have, so the two different implementations, and I remember the names Madrick and Mahoney are the two implementations of the inertial filter.
And, you know, I think one of them is a discrete cosine.
But basically, they look the same in the frequency domain.
They just have different implementations in the time domain.
So they turn out to be like one or two parameter filters so you know i think the tuning
process can be you know ideally you tune for stability um so the stablest version is when
it's on the ground doing nothing no i mean like like uh stability in like a ringing sense so you
know if you have a filter that you know like you you, if you take your device and you shake it around, does it go crazy and start spinning?
Does your state estimation start spinning wildly or does it like settle down and relax?
Even if it's wrong, you've accumulated some error over the course of the trajectory.
But you're right.
And, you know, we've tuned this by trial and error and by physically taking advice and moving it around.
And, you know, how much performance is still on the ground, you know, still left on the table?
I don't actually know.
And that's why I think the right way to do this in some sense is to have ground truth trajectories that you know and then see if you can do a better job.
And this will become even more important when we start estimating state with greater fidelity.
Like, you know, right now we have no sense of XYZ location
and only a little knowledge of your velocities in those directions.
But if you add more sensors and you add more estimates,
you should be able to do a pretty good job.
The problem right now is that we don't have any physical velocity sensor.
So we have to integrate twice. every time you integrate you get a
little bit of integration noise so you know there's no sense estimating position in any absolute sense
barometer gives us a measure of your height for example that we could feed back in
sort of kind of sort of kind of yeah although it's it's it's amazing to me that it's as sensitive as
it is like you can plug it in and lift it up and put it down and see, like, you know, a few, I think it's rated 10 centimeters.
That's about the size of a stair step.
I wonder.
Until it gets windy.
Yeah.
Until it gets windy.
Oh, sorry.
I cut you off on your little.
No, that's fine.
The barometer is kind of fun, because it has uh the the manufacturer so we
use a bmp 280 which is a barometer from um i want to say bosch yeah they uh if you look in the
product spec there's a set of you know there's basically it's there's some calibration factors
and you have to take the calibration factors and work them out through some semi-empirical equation to get the altitude.
And so that's a fixed-point implementation,
which is kind of cool.
And I think that actually would be fun to do at some point, too.
If you could actually think about doing fixed-point implementations
of some of these filters that we're using floats for.
But we have plenty of processing power.
This is the other thing.
It's like if, you know, with 100 megahertz M4,
even without the floating point,
we're able to close the loop.
I was about to say, wait, you're using floats
and you don't have an FPU.
That's right.
So it's all software FPU.
Wow.
Yeah, they've got such a giant processor.
I mean, of course you can do it.
Although, you know,
it would be really fun to take out those floats.
It would, right? And to see like how small can you get do it. Although, you know, it would be really fun to take out those floats. It would, right?
And to see like
how small can you
get the system.
And I think, you know,
that's the fun
of product design
in electronics.
It's, you know,
where do you
put your effort?
What do you squeeze?
You know, and
it's an interesting challenge.
Well, we have kept you for quite a while and I have a
whole bunch more questions but
I think we probably should start
you know moseying along
Chris do you have
your show closings
are always
really graceful I know
no I asked my robot question and then I didn't Show closings are always... Yeah, they're always really graceful, I know.
No, I asked my robot question.
And then I didn't think of any others.
All right.
Then I have a question about your previous company.
Sure, yeah, go ahead.
You were CEO of Integrated Plasmonics Corporation.
And from the internet, they work on nanotechnology.
And I hear about nanotechnology and I hear about it in the same sort of thing I hear about pixie dust.
What is it?
Well, if you sprinkle it onto your research, it does become more attractive.
The grants become more plentiful?
So, my take on nanotechnology is that, you know, if you look back to the National Nanotechnology Initiative in the, you know, around year 2000 or so, basically the semiconductor industry
was starting to produce tools that, you know, were coming down in price enough where a university
could afford them.
So, you had the availability of tools that then could be brought into research environments and used to do fabrication and metrology at very small link scales. So, you know, SEMs are
really easy to get, but now you can do things like a focused ion beam where you can actually
do milling at, say, 100 nanometer link scales. And so, the ability to make structures is then
coupled with the ability to measure
the things that you can do,
and that just feeds on itself.
So, you know, depending on who you ask,
nanotechnology could be this, like,
really purist approach of, you know,
the self-replicating nanobot machines.
Or it could be...
That movie didn't end well either.
It did not.
I mean, so my take is that it's,
nanotechnology is just technology
where the link scale is measured in nanometers.
So for, you know, I would argue that
any silicon process that uses
less than 100 nanometer feature size
is nanotechnology too.
And so, you know, when we went from
calling it, you know, micron to, you know, 90 you know when we went from calling it you know micron to you know uh 90
nanometers that was probably the transition where you could say now it's nano now it's nanotechnology
um you know when i uh when i was in in grad school and in my postdoc i was working on um nano scale
optical technologies so we were using some of these tools to make extremely small systems that
interacted with light. And Integrated Plasmonics was a company that I formed to commercialize
aspects of that research. So, plasmonics is a special kind of light. It's light that is kind
of trapped at an interface between a metal and a dielectric. So, you know, a metal is just a special type of dielectric. It actually, if you think
about, well, I don't want to get too far into linear algebra, but basically, you know, Maxwell's
equations are linear. And when you talk about the dielectric constant, you're talking about the
transfer function from field to polarization, polarizability so you are um
that um transfer function can be positive or negative which means it'd be like in phase or
out of phase and then it can have an imaginary component you know is the material one that
boosts the signal or decays the signal and so a metal is just one that has a negative
real dielectric constant so the response of the material is out of phase with the driving field.
And so when you solve Maxwell's equations
in a particular environment
where you have a metal next to a dielectric,
you'll find a special solution,
which is a wave that's trapped at the interface.
And so that wave is called a plasma
or surface plasma on polariton.
And it is a type of light
that we can do interesting
things with kind of like if you were doing microwave devices and you solved maxwell's
equations in a microwave wave guide like a copper pipe you could make different types of devices
that use that wave guide technology like a radar or something as opposed to like a microwave oven
should use a different types of
microwaves um uh well both are in a cavity but in any case for the the service plasma and flaroton
work uh we were trying to use this special type of light and the nanotechnology fabrication tools
to make really tiny spectrometers um and the idea is that we could make a spectrometer cheaper than
anybody else provided that we could afford a spectrometer cheaper than anybody else
provided that we could afford a semiconductor fabrication process well sure fine that's
no problem it works out great if you can sell the critical number turns out to be about 10,000
spectrometers a month and so yeah well i mean if you're going to use a you know think about
one cassette of 300 millimeter wafers and you want to push it through a fab, that's about how many devices you get. So then you just need to figure out who needs
to buy 10,000 spectrometers a month. And also, you know, you don't want to just do that once,
but you want the business to be growing to justify the investment. So we ended up with a company that
was pursuing a vertically integrated story in consumer health. So the concept was that we would use the spectrometers every month,
and we would use the spectrometers to build home blood testing devices.
And fast forward five years, I have a different perspective on the use case
and the viability of the business model in certain ways.
That was such a different answer than I expected.
So I'm going back to a very easy question when you started getting involved with flybricks yeah uh did you just take
a list of like cool things lasers nanotechnology robots drones legos dinosaurs 3d printing
and then just like choose two like with darts or something
picked him out of a hat no i i think so i think my co-founders and i saw a unique opportunity to
combine well originally combine computational photography and drones and i think that there's
some really interesting things that are going to happen there.
And so the,
the,
when you think forward a few years down the road, you have to imagine a world where you have extremely inexpensive vision
processing systems.
And so we're,
we already are starting to see some of these things like with project Tango
out of Google and you know,
like the stuff that's happening in the VR and AR spaces.
The price point for doing computer vision
is dropping rapidly.
And so when that price point comes down
to a level where it can be incorporated
in consumer electronics products,
we're going to have to, you know,
there will be opportunities that are created.
And so, you know, our hypothesis is that drones are going to be one of the areas that can maximally take advantage of that technology when it becomes available.
So we want to get ahead of that curve.
And along the way, I think I mentioned, you know, we started doing prototyping work using lego bricks uh so for us it
was a convenient system to build prototypes quickly and play with different geometries and ideas and
things like that and uh that i guess at some point kind of snowballed into a product opportunity in
its in its own right i love how stuff works like that sometimes and then you know you start with
this and then yeah build on top of it and now you have stepping stones that make sense instead of reaching for okay we're going to revolutionize
drone vision exactly so you know and in some sense like it's still all on the same path i mean we
have we have been forced by virtue of making something that's small enough to be safe to
really pay attention to size and power and we have been paying a lot of attention to cost the whole way
um you know i'd say like the the company's been around for about two years now and in that two
years we've also seen uh qualcomm come out with a drone platform that uses a much more powerful
processor uh and we will start to see i mean there already are some products on the market
you know that are in the 500 to to $1,000 range that are taking advantage
of that platform
and so the question
becomes like
is that the platform
will that platform
come down in price
and become like a true
mass market product
or will instead
the innovation
come from
you know
people that have
I guess
chosen to work
with more constraints
earlier on
so
very cool do you have any last thoughts you'd like to leave us with I guess, chosen to work with more constraints earlier on.
Very cool.
Do you have any last thoughts you'd like to leave us with?
Sure.
Yeah, I was thinking, you know, I introduced myself today as a physicist and entrepreneur.
And I was, you know, I was thinking in the car on the way down here today, actually, that, you know, I have occasionally have a lot of cognitive dissonance about whether
I'm still a scientist.
And I think that, you know, part of it is when you leave academia, then it's harder to think of yourself as a scientist.
But on the other hand, you know, I think that that's still a lot of how, you know, how I identify and how I see myself.
And what it really comes down to is that you, you know, you can be a scientist no matter where you work or what really what you work on.
And it's really just about, I guess, like a curiosity, curiosity that you bring to problems and sort of a disciplined approach to how you actually go about answering them.
And so, you know, I think like the time that I spent in academia has actually been pretty useful in a lot of ways. And I think, you know, I think it'd be a good thing if more people thought of themselves as scientists.
Yeah.
Yeah.
Okay.
I'm all on board with that.
My guest has been Rob Walters, co-founder and CTO of Flybricks.
Thank you so much for being here.
My pleasure.
Thank you for having me.
Thank you also to Christopher for producing and co-hosting. And of course, thank you for listening
and for considering buying a t-shirt. You can find the link on the show notes or anywhere on
Embedded FM right now. You can also hit the contact link if you'd like to say hello. Also,
if you have a good book or reference on the language Ada, could you share
it? I suspect it will be important soon. And finally, a tiny little advertisement for us.
I will have availability in August, so if you have neat problems, drop me a line.
And now, a final thought where I will not be singing Everything is Awesome from the Legos movie, despite the fact that that was what Twitter wanted.
Everything is awesome.
But I will take a quote from the movie.
Everything is cool when you're part of the team.
I'm done.
Do you want to look up the rest of the lyrics?
I'm done.
They're in the show notes. I'm extremely done. Okay. But you feel free the rest of the lyrics? I'm done. They're in the show notes.
I'm extremely done.
Okay.
But you feel free to, I mean, that is the chorus.
Go ahead if you want to.
No, that's fine.
So Emmett in the movie says at a critical time,
you don't have to be the bad guy.
You are the most talented, most interesting,
and most extraordinary person in the universe.
And you are capable of amazing things because you are
the special. And so am I. And so is everyone. The prophecy is made up, but it's also true.
It's about all of us right now. It's about you and you still can change everything.
Embedded FM 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 any revenue from them. At this time, our sole sponsor remains Logical Elegance.