278: Bricks' Batteries Last Forever

Transcript from 278: Bricks' Batteries Last Forever with Matt Liberty, Elecia White, and Christopher White.

EW (00:00:06):

Welcome to Embedded. I am Elecia White. I'm here with Christopher White, and this week we are playing power limbo as in, "How low can you go?" Our guest is Matt Liberty.

CW (00:00:19):

Hi, Matt. Thanks for joining us today.

ML (00:00:22):

Hello, thank you for inviting me. I'm happy to be here.

EW (00:00:25):

Could you tell us a bit about yourself?

ML (00:00:28):

Sure. I'm a hardware and software engineer. I'm currently running my consulting company, Jetperch. And over the last eight years, I've helped my clients, mostly small companies and startups, to develop products and to solve problems.

ML (00:00:42):

I started on the engineering path when I was little and still remember that moment when we got an IBM PC, turned it on without any discs in it. It had two floppy drives, and it booted up, and there was this little flashing, BASIC cursor. And I thought, "Wow." And ever since then, I've really been into computers. And as I've aged, I try to keep that same of wonder and curiosity. I studied electrical engineering and then went on to work for a few startups.

ML (00:01:09):

Over my career, I've managed a team, designed circuit boards, designed FPGAs, written software, developed signal processing algorithms. And a lot of those were for motion sensing, something that you've done as well. Yeah.

EW (00:01:24):

Cool. Well, you didn't mention one of the reasons you're here, which is your new Kickstarter.

ML (00:01:31):

Definitely. Yeah. So over the last couple years I've been working on a new product called Joulescope that is going to be on Kickstarter coming up on February 19th.

EW (00:01:40):

Okay. Well, we'll talk more about that and what it is, but we need to do lightning round.

CW (00:01:45):

We need to do lightning round. Alright. Are you ready for this?

ML (00:01:52):

No.

EW (00:01:53):

Good.

CW (00:01:53):

That's right. Anemometer, or ammeter, or anemone-meter.

ML (00:02:00):

I say ammeter.

EW (00:02:00):

What?

CW (00:02:02):

I'm not even sure what that question was.

ML (00:02:03):

I don't know either.

EW (00:02:05):

Well, one measures wind, one measures current, and one measures anemones.

CW (00:02:10):

I see.

EW (00:02:12):

Watts or amps?

ML (00:02:15):

Depends on what you're measuring.

CW (00:02:17):

Watt-hour or coulomb volt?

ML (00:02:20):

Watt-hour.

EW (00:02:22):

Would you rather have a penny or 10 million dollars?

CW (00:02:28):

What?

ML (00:02:28):

What?

EW (00:02:28):

That's an easy question. These are supposed to be easy questions.

ML (00:02:31):

10 million dollars.

CW (00:02:32):

Which is greater, the mass of a billion moons or the mass of the sun?

ML (00:02:37):

The mass of the sun.

EW (00:02:38):

Nope.

CW (00:02:38):

What?

EW (00:02:41):

Would you rather have a cup of coffee or 60 Olympic swimming pools?

ML (00:02:47):

60 Olympic swimming pools.

EW (00:02:50):

Have you figured out what these are about?

ML (00:02:53):

Not entirely.

CW (00:02:57):

What's your favorite animal?

ML (00:02:59):

Dolphin.

EW (00:03:01):

Do you have a tip everyone should know?

ML (00:03:04):

Remember to derate your ceramic capacitors based upon their working voltage.

CW (00:03:08):

God, I always do that.

ML (00:03:10):

Yeah. It's critical for -

CW (00:03:10):

First thing every morning I get up and I say, "Don't forget to derate."

ML (00:03:14):

It's important every day.

EW (00:03:16):

Yeah. Okay. That's derate, not berate, right? You don't just yell at them.

ML (00:03:24):

Oh. Oh. Whichever one works for you, I guess.

CW (00:03:26):

Stupid capacitor.

EW (00:03:29):

Let's talk about low power. When people come to you and say, "I want a low power device," what does that mean?

ML (00:03:39):

It really depends upon what you're doing. So there's low-power devices that consume tons of power, but they're low compared to what they replace. You think about a HVAC system...We really strive for efficiency in HVAC, but that's not really what I'm talking about.

ML (00:03:55):

For what I'm talking about it's usually microcontroller-based devices or products that are battery-powered. And you want that battery to last as long as possible, because no one likes changing batteries. So that low power translates directly into a good thing about the product, which is longer battery life.

ML (00:04:13):

And there's products with all different size batteries, right? We have AAAs, AAs, coin cells, big 12-volt batteries. So it really depends. The other thing is devices that are always plugged in. If they're always on, they're always sucking a little bit of energy, and that affects the efficiency of everything across the globe.

CW (00:04:32):

Do people usually come to you with like, "I have a requirement for five days of battery life," or do they come to you with, "Well, I've already got this form factor, and it's got a coin cell, and how long can it last?"

ML (00:04:44):

That varies a lot based upon the customers and the customer requirements. A lot of times if you're designing something that is meant to be low-power, you know going in that you have to have a battery that lasts for a long time.

ML (00:04:56):

So I worked at one point on a remote control and the key rule of thumb that they wanted was, it had to be long enough so that people forgot they replaced their batteries. And that happens to be about three months that people say, "I'm not quite sure when I last replaced it." So that was the requirement.

ML (00:05:14):

And that happens in a lot of different products as product managers are making their decision. They say, "We need something that lasts this long, and oh, by the way, it can only be this much and fit into this size."

EW (00:05:25):

Yeah. It's often the size constraint and the power constraint together, especially with rechargeables, like wearables, that you don't want somebody to have to charge it every day, but you also want it to be small. And so that's a huge trade-off.

ML (00:05:42):

It definitely is. And that makes it challenging. Because like everything in engineering, you have to trade off that cost, the size, the power, and the engineering implications of all those.

EW (00:05:53):

Because there are a lot of engineering implications, including software implications. This isn't purely a hardware problem. This isn't just, you wave your magic hardware wand, and you get low-power stuff, and it's all good.

ML (00:06:07):

Hardly.

EW (00:06:08):

Yeah. So what kinds of things do you suggest to achieve lower power?

ML (00:06:16):

Well, it really depends upon the product. The first thing you want to figure out is, where's your power going? Where's that energy budget? So if you have a Wi-Fi radio, for example, on your product, and you leave it on all the time, it's going to suck up a huge amount of your available energy.

ML (00:06:32):

So when you're trying to think about how to optimize your consumption, you first want to know where it's going. If you spend a lot of time optimizing something that's only 2% of your total energy consumption, you're only going to get 98% of what you had before, even though you optimized that one part 100%.

ML (00:06:51):

So it's really important to figure out where the most energy is going and really start there. And a lot of times there's some hardware components. So you can remove things like pull-up resistors for sleep mode, and we can talk more about that.

ML (00:07:06):

And then on the software side, it's turning off things you're not using, and only usually getting on and turning in to a full power mode when you really need to, and then going immediately back to sleep.

EW (00:07:18):

That's what you can do, tactically, when the board is designed. And I want to come back to that, because there are some more strategies there. But even before the board is designed, you look for the parts, and you find the low-power parts.

EW (00:07:32):

And then as you are making your block diagram, or you're making your design, you need to know what the theoretical best you could do would be. You need to make a model. And it can be Excel or whatever.

EW (00:07:45):

But you can't just say, "I want the power to be as low as possible, and it should last for five days," and not know if it was theoretically possible.

ML (00:07:56):

Right. Yeah. So if you're talking about the upfront design phase, then you can certainly pick out the components that you're interested in, take a look across, and they'll have all different types of active currents for different modes that they're in as well as sleep currents.

ML (00:08:10):

And in a lot of modern designs in products that I've worked on, you spend a lot of time in that sleep mode. And that's not usually the first thing that people look at if they haven't done this before. But you really want to compute your lowest power possible when you turn everything off and are really not operating.

ML (00:08:28):

You still have battery power so you can turn back on, but you need to figure out...that lowest thing, and that amount of current varies dramatically between different parts that are on the market.

EW (00:08:39):

You also need to...create a plan for how the device will be used.

EW (00:08:47):

Looking at the sleep current for all of your parts and then looking at the partially awake, maybe doing the minimal thing of whatever it's supposed to do, and then looking at the power for when it's active, and squawking, and interacting with the user, those are all different power levels.

EW (00:09:05):

And knowing how much time is going to be spent in each level tells you where you have to optimize the most.

ML (00:09:12):

Exactly. Yeah. And it's actually really difficult upfront in a lot of design for software things. Because you don't have a real good sense, until you actually try, of how much time you're going to spend in a full active mode unless you prototype upfront, which is what I recommend.

ML (00:09:28):

So as soon as possible, start figuring out those unknowns so that you can design your budget for the power side and figure out which modes you're in when.

EW (00:09:38):

Yeah. And...what do you use for that? I do tend to use Excel, but do you have better tools?

ML (00:09:47):

I don't, no. I tend to use Excel and Python. So when Excel becomes not enough, or I want to do a little bit more sophisticated things, I really like Python.

EW (00:09:57):

Fair enough. It's been hard with clients sometimes getting them to understand why I want to know, "Okay, 24 hours, how long is the person going to be using it in this 24 hours? And how long is it just going to be sitting there?"

EW (00:10:09):

And that level of design seems obvious. But to them, they just had a thing that they wanted to work whenever it needed to work.

CW (00:10:17):

Sometimes...it's very difficult to figure that out, depending on the product. What your user's going to do -

EW (00:10:23):

Well, yeah. My Fitbit doesn't need to do very much at all at any point.

CW (00:10:27):

But an active user of a Fitbit might be looking through a screen 100 times a day. And so sometimes you need to actually just have logging in the field.

EW (00:10:36):

And prototypes.

CW (00:10:36):

And when you're beta testing, and you've got a critical mass of users, then you can say, "Okay, most of our users have 20 seconds of active time every hour," or something like that. But again, it depends on the product.

CW (00:10:49):

...The consumer product that somebody's interacting with is a lot different from a thermostat where you can say, well, a thermostat's not necessarily low-power. But something that you know, "Okay, people tend to look at this twice a day," or it wakes up twice a day to take some reading.

ML (00:11:04):

Yeah, and what I've done as well with some of my clients is walk them through. So you say, "This type of user," and you kind of categorize it, "will do this per day. And we have this other user that's like this and this other one that's like this."

ML (00:11:15):

And you kind of build up your story of how your product's going to be used. And from there you can kind of better estimate your power budget.

EW (00:11:23):

Exactly. Okay. So we've estimated our power budget, and we've used Excel again, even though last time we promised ourselves we wouldn't. We have chosen parts to optimize what we need to do. And we've come up with some number that is the ideal current use in multiple states. What do we do next? I mean build it, but yeah.

ML (00:11:50):

Build it and make sure that it works. So the first part before all this is, you have a product that has to do some function too. And power is just one of those aspects. It's an important one, but it is just one of them. So you have to worry about everything coming together.

ML (00:12:06):

And you do your best with all the design upfront, especially when you're talking about hardware. You want to at least be close on your first iteration if possible. But the cost of hardware has definitely gone down. So iterating is much more possible than it ever used to be.

ML (00:12:23):

But then you go and design the whole product and implement everything. And as you go through, one of the things that you're working towards is that power budget. And you continue to engineer until you get to where you need to be.

EW (00:12:36):

Yeah. And not to pick too much on Fitbit, but if it doesn't count steps -

CW (00:12:40):

Please stop.

EW (00:12:43):

On nameless pedometer, if it doesn't count steps, it's of pretty much no use.

ML (00:12:50):

It doesn't matter how long it's battery lasts.

EW (00:12:52):

Yeah. Bricks' batteries last forever. Okay. So I get my board. I get it working. And then I want to do sleeping. And so I read the sleeping chapter, and maybe I lower my clocks. And I optimize my code so I can spend as much time sleeping or as much time in a low-power state as I can. And you mentioned GPIO state.

EW (00:13:22):

Could you talk more about that? That's a really important thing that a lot of people don't get until they've done power a few times.

ML (00:13:30):

Yeah. So there's a lot of things you can do in the software side to make it low-power. The first is, like you're saying, turning off clocks, turning off peripherals, shutting everything down. The other, though, is more at the hardware level. And a lot of times you'll have signals on your board that are going between components.

ML (00:13:48):

Some may have pull-ups, which are resistors connected to VCC, your positive supply, or to ground. And if you're not careful and put the signals into the right state, you could leave a resistor essentially powered. So there would be current flowing through that even in your low-current state.

ML (00:14:05):

And it's amazing how fast you can burn up tens or even hundreds of microamps with just a resistor. A 10k or 100K resistor at 3.3 volts is a lot of times your entire power budget for sleep modes.

EW (00:14:20):

So for example, if you have an I2C bus, and those have pull-ups so that they function correctly, they're external to the chip usually, then...as you power off, you just say, "Go low," to all...GPIOs, then you have a high-to-low connection there through that resistor. And it's just burning power doing nothing.

ML (00:14:44):

Yeah. And that's usually a 4.7k resistor for I2C so...if you're at a 3.3 volt system, you're almost drawing a milliamp. So that's a killer.

EW (00:14:54):

Yeah. But you don't know that until you measure it.

ML (00:14:59):

Yep. And that's the challenge. So you can look at your schematic ahead of time and kind of pick out all those resistors that are going one direction or another so that you can design what you think should be the low-power mode. But you really don't know until you build it. You inevitably, at least I do, I inevitably miss some.

EW (00:15:18):

It's one of those things that when I have a fantastic EE, they make a sheet of GPIOS and describe what each one is supposed to do.

EW (00:15:29):

And often will tell me, active high, active low is always a nice thing too, but will say, "In sleep mode I think it should go into a input state so that it's...high impedance so it doesn't draw anything," or, "I think it should be high, because that's where the resistor is pulling anyway. So you're just not going to fight anything."

ML (00:15:54):

Yeah. It's great if your EE is helping out that way. A lot of times it doesn't work quite that and you have to figure it out.

EW (00:16:00):

Yeah.

ML (00:16:01):

And the other thing that I've found, some microcontrollers actually have different preferred low-power states. Some you want to drive out at...whatever level it needs to be. There are other ones that prefer to have them just set as inputs and leave them somewhat floating and they have logic inside.

ML (00:16:17):

That's not what used to be. You usually want to drive them all low, but I encountered one chip recently that it consumed more power that way, which was weird.

EW (00:16:28):

And sometimes you just try it, which usually leads me back again to Excel or some spreadsheet, where I start on day one with my, "Okay, it's all working. Now it's time to optimize power or do first-pass power optimization." And so I measure everything. And then I make some changes.

EW (00:16:48):

And then I measure everything. And then I make some changes, and kind of like a drunkard's walk, try to get to the lowest possible state through a bit of trial and error. And things do depend on each other. So you have to be aware of that.

EW (00:17:03):

And when I hear about people just changing everything, it worries me a bit, because it's like, "Well, are you sure?" How do you do it? [Laughter] Matt's like, "I just change everything."

ML (00:17:21):

I just change everything, and it gets better. No. Measuring as you go along is really important. If you don't know what you're doing, you are just stumbling blind, like you're saying.

ML (00:17:31):

And...historically, that's been kind of the best that I've been able to do. And...that's been numerous times in my career, and that's why I set out to create a better way to do it.

EW (00:17:45):

And we're still not to the better way to do it. It's so sad. It's like, "We're going to talk about all these other things first."

ML (00:17:50):

That's awesome.

EW (00:17:52):

Okay. So how do you measure power?

ML (00:17:55):

Well, the way, in electricity, as you measure power, is by measuring two other quantities typically. So you measure voltage, and then current, and then you multiply them together. So current times voltage is your power.

ML (00:18:08):

And then that power is just the instantaneous value. The thing that really matters is how much power you end up using over time. And the integration of power over time is energy.

EW (00:18:21):

And that's joules.

ML (00:18:22):

The SI unit of measurement for that is joules.

EW (00:18:26):

And that's watt-hours?

ML (00:18:28):

Watt-seconds.

EW (00:18:28):

Watt-seconds. Okay.

ML (00:18:31):

Yes.

EW (00:18:32):

So I want to go back and unpack a lot of that. So there's voltage and current, and sometimes when we're doing low-power systems, we don't talk about power. We just talk about current. But that's because our voltage is usually the same going in. So current is nanoamps, or amps, or microamps, or whatever. Milliamps, whatever.

CW (00:18:56):

Amps.

EW (00:18:56):

It's the amps thing. And the volt is on our power supply. And...before we got to joules, we had power, and that's watts.

ML (00:19:09):

Yes.

EW (00:19:10):

So that's all sort of defined. The easiest way for me to measure power is to look at my power supply. And I have a desktop power supply, and I set it to five volts, and then it says 0.03 or whatever I'm drawing out. And that's current, and I can make power by multiplying those two numbers.

EW (00:19:32):

But that is the easy way to measure power, and it really requires having a desktop power supply. It only gives you the instantaneous value, and it isn't necessarily very exact. So the next method would be a multimeter. I always get confused on how to set that up. So, Matt, how would you do a multimeter?

ML (00:19:54):

Well, there's two parts with the multimeter. If you want to measure voltage, you always measure across your target device. So that is the voltage that is across the target. And doesn't tell you anything about current. If you want to measure both voltage and current at the same time, you need a second multimeter typically.

ML (00:20:14):

And that one's connected in series. So between the positive, for example, on your power supply, the positive terminal on your device, you put the multimeter in the middle, and the multimeter is then able to measure the current flowing through it and through your target device.

EW (00:20:30):

And of course the multimeter has to be in a special mode to do this. And it's kind of confusing, because you put your red probe into the power supply's red terminal, and then you put your black probe onto your device under test's red terminal.

EW (00:20:47):

And that step always feels super wrong, because connecting the black and the red together just is wrong, wrong, wrong, and yet -

ML (00:20:54):

Don't mix those colors.

EW (00:20:56):

Yeah. And you mentioned doing it on the high side. You can also do low side. It doesn't matter, does it?

ML (00:21:02):

It doesn't, but it does matter if you end up having grounding issues in your system. So there's a lot of times that people are more concerned about connecting to other equipment.

ML (00:21:11):

So if your device has peripherals that are not isolated, electrically isolated, such as SPI, or I2C, or USB going off to other devices that are powered separately, it's more important to keep those grounds all at the same level.

ML (00:21:27):

And by introducing something in that path on the way back on your device, you can introduce other problems, grounding issues.

EW (00:21:35):

Oh, that's neat. So I could theoretically put my multimeter in serial on the negative terminals. Of course, then I have to connect my red to a black the other way.

EW (00:21:50):

But you're saying that if I do that, and I have a debug port over to my computer or a programmer over to my computer, that's going to mess up the ground. So...if you're on your desktop, it's safer to put it on the high side and not the low side.

ML (00:22:06):

Potentially. Yeah. But it also depend upon your power supply. If your power supply is a bench supply, and it's isolated, you're not connecting it up to earth ground, or at all, then it really doesn't matter in that case. It's only if different parts of your system are at different ground levels.

ML (00:22:22):

And that ends up causing ground loops, and ground noise, and things to be injected into your system. And if you're dealing with analog, this is all really bad stuff. It makes noise, -

EW (00:22:30):

Yeah.

ML (00:22:30):

- and things don't work.

EW (00:22:32):

Ground loops. I remember for a long time, anytime anything went wrong, it was either cosmic rays or ground loops.

ML (00:22:39):

Easy to blame those.

EW (00:22:41):

Okay. Now, if you don't have ... an ammeter in your multimeter, possibly because you hooked it up in such a way that it blew a fuse, which...when you're measuring current, it can happen, you can also just use a resistor.

EW (00:22:59):

Because that's all this really is. You use a resistor in serial. I don't want to monologue. So I'm going to ask Matt to explain that.

ML (00:23:08):

Cool. So this is Ohm's law. What happens when you have a current flowing through a resistor, it generates a voltage, and that voltage is relatively easy to measure. It's much easier than current. Counting electrons, there's a lot of them, it just doesn't happen very easily, especially in electronic circuits.

ML (00:23:27):

So we tend to measure the side effects of current. The voltage that's generated by the current flowing through a resistor is the one that's most common.

ML (00:23:36):

And that resistor in that configuration is typically called a shunt resistor, because the current is flowing through as a shunt between it and the actual target. V=IR is one of the fundamental things that is Ohm's law, and really is what a lot of the different ammeters are based on.

ML (00:23:56):

Another way of measuring current accurately is through...the magnetic field that is generated by the current flowing through the wire or the conductor. And there's current clamps and other ways of measuring current based upon that.

EW (00:24:12):

Okay. Yes. I'm going to stick with the resistor. Because I understand that one more. When I put the resistor between my device under test and my power supply, I can then use multimeter to measure the voltage drop over the resistor.

EW (00:24:32):

And because of Kirchhoff's laws or whatever, the current has to be the same going through my resistor as it is through the whole system.

ML (00:24:43):

Kirchhoff means that the electrons don't disappear. So as they flow through, they're guaranteed to have the same ones, right? So they're not vanishing and reappearing, at least at the scale we care about, as they flow through your circuit.

EW (00:24:58):

And so I do this with a 100 ohm resistor, pretty low resistor, because I want to be able to measure on my multimeter.

EW (00:25:07):

And I calculate, "Okay, if my voltage is this, and my expected current is that, what resistance will I need to - ," or I take a resistor and I say, "My expected current is 40 milliwatts, and my resistance is 100 ohms. What voltage range am I expecting?"

EW (00:25:28):

And so that gives me an idea of what resistor to use, but then things start to go wrong. At what point do you think things start to go wrong with measuring current using this resistor way?

ML (00:25:42):

It starts going wrong as soon as the current changes. And in modern devices like microcontroller-based designs, where we have large variations between the active currents and the sleep currents, they change a lot. And the problem that you now have is that your voltage is equal to the current times of resistance.

ML (00:26:04):

As your current goes from, let's say 100 milliamps down to one microamp, that's a huge change in the voltage that you're trying to measure.

ML (00:26:13):

And the problem ends up being that you can either measure it on the high current side and do that well without having too much of a voltage drop, and I'll talk about that just in a moment, but you lose the resolution, the ability to measure it on the low side.

ML (00:26:30):

The one thing that is happening with this whole setup is we are introducing an intentional voltage change between your power supply and your device. If that gets too big, your device gets a voltage that's a lot lower than you're expecting. And it starts misbehaving, typically called brownout in microcontrollers.

EW (00:26:48):

And so we have a dynamic range problem. We have a too-low voltage, and there's one other problem. Burden voltage, burden current, burden something. What is the burden that we all share?

ML (00:27:03):

Well, in this case, it's actually based upon the resistor's value and the current through it. The burden voltage is the amount of voltage that is being consumed by your multimeter or whatever that piece of test equipment is. It's also called, in the RF world, insertion loss, means the exact same thing, or voltage drop.

EW (00:27:23):

And so that resistor or the multimeter that is in serial..., it's causing things to happen.

ML (00:27:35):

Yeah. Your test equipment is not ideal. Although the manufacturers try very -

EW (00:27:40):

Shocker.

ML (00:27:40):

I know. Seriously. But it's really easy to forget that. I mean, you plug your stuff in. You're measuring. You're all happy, and it doesn't do what you're thinking it's doing. It is actually introducing error through the observation, right? So as you hook it up, it's not perfect.

ML (00:27:56):

But...as engineers, we tend to think of some of our test equipment as perfect. But our multimeters have a 1 megaohm or ten megaohm input resistance. Oscilloscopes are in the same range, depending upon what type of oscilloscope you have.

ML (00:28:11):

So when you're talking about low-current stuff, low power, that can be a lot. You can be injecting a measurement error just by measuring voltage on your board.

CW (00:28:21):

Heisenberg's never going to let you go. Yeah. And it's not just the electrical measurement equipment. You could screw it up by having your in-circuit programmer still attached or your debugger. That could possibly throw things off as well, right?

ML (00:28:37):

Oh, definitely.

CW (00:28:37):

Even just having a serial port active or doing something.

ML (00:28:42):

Yeah. That's definitely an issue. So whenever you're making power measurements and trying to debug at the same time using your debugger, you're not measuring the actual power.

ML (00:28:51):

That debugger is typically consuming some of the energy from your board. And they're not designed necessarily for low power unless you get one that is specially designed.

EW (00:29:03):

That's a good point. When we talked about the things you need to do, you have to disconnect your board from anything that is outside of it. It needs to be as self-contained as possible. And sometimes running off of a power supply instead of batteries is another change in the system that doesn't work that well.

ML (00:29:25):

It really depends upon your system. There are some systems that are not as dependent upon that. But if you have some type of switching regulator, a lot of times those will be more affected by especially the impedance difference between a battery and a power supply.

EW (00:29:42):

Okay. So...if you're using a resistor, resistors,...I don't usually look at the last band, because who cares? Tolerances are good enough. Whether I'm using to 4.7 kohm to pull up my I2C or whether I'm using a 4.4 kohm, I don't care. But when you're measuring things, it matters.

ML (00:30:15):

It does. Yes, so -

EW (00:30:16):

I mean, -

ML (00:30:17):

Oh.

EW (00:30:17):

- that tolerance is what is the error of your measurement in addition to all of these other possible measurement errors.

ML (00:30:26):

Yeah. It's a huge amount of difference. 5%, if you're talking about your power budget, could be enough that, the change you just made is only a few percent. So you want to be able to capture that.

ML (00:30:36):

And if your equipment is varying over time, if you're changing in and out resistors, then it can change as well. Now, if you're just using the same resistor, as long as they don't have too much of a temperature coefficient, you're okay.

EW (00:30:50):

Yeah. As long as you're just trying to go down, it doesn't really matter what the number is. Then you can use the same resistor,...no big deal. Okay. So we've talked about dynamic range, which is actually what I was trying to get to in lightning round.

EW (00:31:06):

All of the things that we asked you about were 10 billion things apart. The difference between -

CW (00:31:12):

10 billion?

EW (00:31:15):

No. A billion, a billion things, a billion apart. So nine orders of magnitude, the difference between an amp and a nanoamp. The one we didn't get to ask about was one second to 30 years.

EW (00:31:32):

That's the difference between a nanoamp and an amp, is the same as one second to 30, I think it's 32, 31 years, but about 30 years, or the difference between a cup of coffee and 60 Olympic swimming pools. So this dynamic range thing is more interesting than most people think.

EW (00:31:57):

And...we want this to happen. We want to switch between these states. We want to go from super sleepy nanoamps to maybe running a robot in amps....I can't change the resistors. On my power supply, I get a rough estimate, but it's just rough.

EW (00:32:23):

My multimeter says I have to choose between milliamps and amps, and I can't change the dial...That's how I blew my fuse the first time. This seems like an impossible problem. Does anybody solve this?

ML (00:32:41):

Yes. There's a new product coming out.

EW (00:32:45):

Would you like a softer ball?

ML (00:32:50):

So there's a product that I've been developing over the last two years called Joulescope, and that's its entire purpose. So it has been very frustrating to do exactly what you're saying, trying to measure these dynamic ranges of currents.

ML (00:33:02):

And typically you you'd have to either put it in the high-power mode, and measure it there, and then specifically set it up so it would go into the low-power mode, and then measure it there separately. With Joulescope, the product that I'm doing has a variable shunt resistor, essentially.

ML (00:33:18):

And it switches so fast that it can go from that really bigger shunt resistor for low currents down to a much smaller shunt resistor for high currents without affecting the device that you're measuring.

EW (00:33:32):

Why can't you just measure all of them in parallel all the time?

ML (00:33:37):

Well, if you do that, your resistance is going to be one of those values to your target device. So if you did it in parallel, there's no way of making that resistance be all those different values at the same time.

CW (00:33:52):

What if you just round robin between them at 100 megahertz?

ML (00:33:57):

That's close enough. No. I mean, what you're doing is you're introducing, at least for some period of time, a high impedance. Let's say you're drawing an amp and you switch to a one kiloohm resistor, well, it's not going to be drawing an amp anymore, right?

CW (00:34:12):

Right.

ML (00:34:14):

So yeah, you have to kind of pick what's appropriate for the current that you're measuring. And one challenge is also keeping that burden voltage low, because as that burden voltage gets too high, bad things happen on your target device.

ML (00:34:28):

We tend to, as engineers, say, "Our power supply is really clean. It's plus or minus 2%, 3.3 volts. I'm awesome." But the reality is that things on your board are switching all the time, and they're having variable demands on your power supply. And all of the supply chain in your product has some type of dynamic response.

ML (00:34:51):

And if you look closely enough at the datasheets for drop linear regulators, switching regulators, they'll all say something about how they perform when the load changes from some step, a small step, typically, and a larger step.

ML (00:35:06):

But the thing about your test equipment is it has to be able to do the same thing. It has to be able to respond to those changes in current. And that's exactly what Joulescope is designed to do.

EW (00:35:16):

And I should just leap onto there and talk about that. But there is another tool out there that I think many people have heard of. And that's the EEVblog's µCurrent, EEVblog of the enemy podcast. Have you tried one of those?

ML (00:35:36):

I have not personally tried it. I know exactly what it is, and they're great. So the idea is that you are able to measure more accurately specific current, but it is not an autoranging, the shunt resistor is selected by you with a switch. But it is designed to be a very precise measurement.

ML (00:35:56):

And unlike your multimeter...or oscilloscope, either one, which has a 1 megaohm to 10 megaohm input impedance, the µCurrent has a much higher input impedance. So you can actually measure small currents accurately.

EW (00:36:12):

Yes. But you do have to switch between the different modes. So if I want to measure in milliamps or amps, I have to do what you said before. I have to set up my system so that it's ready for that.

EW (00:36:27):

And then if I want to measure the sleep state, I have to measure the sleep state and set up my system so that it will do that automatically through usually a power cycle. But it doesn't range automatically.

EW (00:36:39):

It was really interesting when it came out, because it talked a lot about burden voltage and what that does for you, which I'll link in the show notes. But your Joulescope..., the autoranging is what's important, right?

ML (00:36:55):

That's a huge part of it. Yeah. So it's able to dynamically switch its shunt resistance so that it is always at the right range. So that burden voltage that is in between your power supply and your device under test is always held to a very low value.

ML (00:37:12):

And Joulescope's designed to be 20 millivolts across that shunt resistor max from zero amps all the way up to...two amps. So that enables it to not really affect your target device. Whereas if you're using a multimeter or even µCurrent, you have to do that autoranging manually. And it's just not really practical to do that.

EW (00:37:35):

How fast do you switch?

ML (00:37:36):

It switches in about one microsecond. Sometimes a little less, sometimes just a touch more, but definitely within two microseconds. So that's one millionth of a second.

EW (00:37:49):

Okay. And how does it work? I mean, is it like the multi-meter, I just put it in serial and then what?

ML (00:38:01):

Well, Joulescope is actually a combination of both a voltmeter and an ammeter. So it has both of those things at the same time. So you run from the power supply through Joulescope into your device under test, and that measures current on that side and then back out.

ML (00:38:16):

And usually it goes through Joulescope, but actually it doesn't have to, it just needs one side. But that other side is how it's referencing the voltage. So it measures voltage across your target device as well.

ML (00:38:26):

So by connecting it up to both plus and minus to your power supply, plus and minus to your device under test, it makes it simpler to think about. And it's able to measure both voltage and current.

EW (00:38:36):

And then it seemed like it was sort of like Saleae, that it didn't have a display and it didn't connect to my oscilloscope...You made a computer interface for it. Yeah. Computer interface. I'm going to go with that.

ML (00:38:52):

Yes. It connects up over USB. So just like the Saleae logic family, it has all on-screen software. So it's a Python program actually that's open source. You just launch it.

ML (00:39:02):

And you can view your multimeter style view if you just start caring about the current value, or you can go into more of an oscilloscope view, a waveform over time to investigate things in more detail. And you can see really cool things, like your microcontroller when it turns on and goes into an active state, when it has interrupts.

ML (00:39:23):

And it allows you to see all that with great details so that you can make changes and see in more or less real time, how those changes are affecting your power or energy consumption.

EW (00:39:35):

I remember not that long ago, probably five years. Wow. When did that become not long ago? There was this idea that you can break encryption with differential power analysis. Are you familiar with that?

ML (00:39:53):

I am. So I know Colin O'Flynn -

EW (00:39:56):

Yeah.

ML (00:39:56):

- has done a lot of the research on this. And I had the opportunity to meet him on a couple of occasions.

ML (00:40:02):

And he has a specific product that he sells that actually looks directly at the chip's power supply and has some software as well that's part of that, that looks at the decryption cycle over time and does power analysis to figure out exactly what the key is, given enough information and enough luck in how you're capturing it.

EW (00:40:24):

That was the scariest thing I saw in a long time. It really opened my eyes to how it's all impossible. But can I use the Joulescope to do that?

ML (00:40:37):

Perhaps somewhat. It's probably not fast enough to do that same type of analysis that he's doing. So the point of Joulescope is really to measure more changes over larger periods of time and typically more at the board scale.

ML (00:40:51):

So in order to get that type of power information, I think he's connecting typically right to the power pins of the microcontroller or the chip that he's investigating. And that allows you to have a much higher bandwidth signal.

ML (00:41:04):

The problem with most boards, well, not problem, but the constraint with most boards is that they have decoupling capacitance, and that allows them to function. Without that microcontrollers don't do what they're supposed to, because you have these voltage variations.

ML (00:41:19):

The thing about looking at a target device is that it has that capacitance on it, which tends to hold the voltage steadier to these changes. So Joulescope is designed more for that type of bandwidth than super high, fast, just looking right at the chip's pin, where the power's actually going in.

EW (00:41:39):

Well, that makes sense. Colin also didn't have to worry too much about this dynamic range problem. If he was going straight into the processor, he didn't have to switch current levels like you do.

ML (00:41:52):

Exactly. Yeah. So he doesn't care about sleep mode current, and trying to decipher what the private key is. You just are more or less at an active current all the time. Your dynamic range is not as interesting as your sensitivity, and that's really what he was looking at.

ML (00:42:08):

With Joulescope and measuring your board supply, you really care about every single mode that it's going to be in. And that can be a huge variation of that current.

EW (00:42:18):

Looking at the display, it looks like a lot of work. I mean, that is one of the things that Saleae and Digilent, and all the people with the USB-based scopes, it seems like that's the secret sauce. And you're making it open source and it looks like a lot of work. Explain yourself.

ML (00:42:43):

Well, I have a view that you should be able to use your test equipment however you'd like. You shouldn't be locked into just what is provided for you. So I like scripting up a lot of my test equipment. I want to make sure that people have that opportunity with Joulescope. So part of what I've done is I have two separate projects.

ML (00:43:04):

One of them is the driver. It's not really a operating system driver, but it's the driver software that connects and communicates with Joulescope over USB. And you can use that. And there are some examples of how you can just use that to collect data to a file if you so want.

ML (00:43:21):

And then the oscilloscope side or the user interface side is a separate project. And yeah, it is a lot of work. But if I'm successful, which I certainly hope that it is, then I will be selling hardware. So it's a hardware-based model and the software yeah, will be a continuing ongoing part of the project.

ML (00:43:42):

But people have the opportunity to modify, tweak it, add features if they so want, or if they want to use it for something else, that's great too. But I feel that's part of giving back to the community and being part of a community.

ML (00:43:57):

I really do like open source, and I've benefited a lot from it through both my career professionally and in developing Joulescope. So it's part of being part of that community.

EW (00:44:07):

I like the idea of being able to modify it for what I want, because sometimes I want different things. And I don't necessarily trust other people to know what I want.

EW (00:44:18):

One of the examples that was brought up in the Slack channel was, sometimes you want instantaneous measurements in multiple states, and sometimes you want a summation of the states so you know what your overall power draw is.

EW (00:44:31):

And you probably have implemented both of those, because those are the obvious features, but I can just imagine there'd be other features.

CW (00:44:39):

Do you know what I want?

EW (00:44:40):

What do you want?

CW (00:44:41):

I want it to integrate with an IDE, and so like a profiler, it will show me blocks of code and a heat map.

EW (00:44:52):

I think Atmel was trying to do something sort of similar on one of their dev kits, the D21, SAM D21, or something. But yeah, it would be neat to have it integrate all the way and show me where my sucky code is.

ML (00:45:10):

Yeah. That would be really cool. You're not the first people to mention that either. Having the trace output from a Cortex-M for example, M3 and M4, you could certainly correlate that to the energy consumption.

CW (00:45:24):

Yeah.

ML (00:45:25):

But right now I'm hoping to just get Joulescope out there and -

CW (00:45:28):

Yeah, yeah. We're thinking the future.

ML (00:45:30):

I know. Assuming everyone picks it up and is using it as their daily tool of choice, we will go from there.

EW (00:45:38):

Yeah. And making an open source, there are people who will be like, "Oh, yeah. That'll be a fun project." So yeah. Cool. Have at.

ML (00:45:47):

Yeah.

EW (00:45:47):

So, I was going to say, when do I get mine? But I realize I already got mine. So, when do other people get theirs?

ML (00:45:54):

Well, the Kickstarter starts on February 19th, and it's going to run for 30 days. And after that, I'm going to be doing everything you need to do in order to build and ship a product. I already have the beta units, but there's a lot to do to build up a number of units on the manufacturing side. And those should all ship by the end of June.

EW (00:46:14):

And...the beta units, they look nice. They look like products...You didn't just send me a raw board and crayon instructions.

CW (00:46:32):

Does that happen a lot to you?

EW (00:46:35):

No, but I'm waiting for the day. You seem pretty far along for a Kickstarter. It's not like you haven't ever made this before.

CW (00:46:47):

Give us the money and we'll figure out what's... -

ML (00:46:50):

Three years later, "I'm getting around to it." No, I've really spent all the work upfront to make sure that it is a product. So what you've gotten already, and what people can see if they go to the Kickstarter page or the website is very close, if not almost exactly to what you'll get in the Kickstarter campaign.

ML (00:47:10):

And that took a long time to get there. So I've been working on this for two years and have built over that time, 17 different prototypes of various purposes, and learning, and iterations. So it what you're looking at is not just the first shot out of the gate. It's actually a refined design that I've worked hard to get there.

EW (00:47:32):

Where do you think it will go after Kickstarter? Are you planning on making a business? Are you going to make more tools?...What's the plan?

ML (00:47:41):

I think it really depends upon how your audience and our audience here is going to respond. So if everyone loves it and buys it, then that allows me to have the time to really continue to develop it. And that's really what I would like to do.

ML (00:47:55):

I'd like to see this as a product and a business that helps, really, engineers, and makers, and developers all over the world to improve their products and reduce energy consumption.

EW (00:48:06):

How much is it going to be?

ML (00:48:08):

On Kickstarter it's 399 starting for the super early bird and then 799 retail. So Kickstarter is a great deal.

EW (00:48:17):

Yeah. 399 super early bird, 450 for early bird, 500 for the suckers who wait too long. Okay. So that's February 19th, which isn't too long after the show airs, and people should sign up for your newsletter in order to be reminded. Is that right?

ML (00:48:44):

Yes. So you can definitely sign up for the newsletter at the Joulescope website. You can also go to the Kickstarter link, which I think you you're going to provide, and click "remind me" there. So it's a preview page for the Kickstarter, but you're allowed to have it remind you from there as well.

EW (00:48:59):

Cool. You said you had 17 prototypes. What went wrong?

ML (00:49:07):

Some of them, in the early ones, I was trying to experiment with how it would work. So it's just a resistor and a voltmeter. But in order to get the dynamic range and the switching side, there's a lot of things that have to go in supporting that.

ML (00:49:25):

So in some ways it seems a lot of work to get to where I am now, looking back at it, but there are a lot of things that I learned along the way. So there's some of the upfront components that I had to select that were very difficult to find in a way that responded correctly.

ML (00:49:44):

So there's MOSFETs to actually switch between the resistors, and those have to be very low leakage. So the amount of current that flows through them when they're off has to be very low. If it's not, then it's affecting your measurement in the low-current modes.

ML (00:50:00):

So all the MOSFETs, even the big ones that are working on the amp range, have to behave properly. Then the way of quickly switching uses a different signal path. It uses a couple comparators that are chosen specifically to be fast enough. And then there's an algorithm in an FPGA that is controlling the selected resistor.

ML (00:50:24):

So all of that I had to iterate with to get right, and then there's more the mundane side, just getting it to communicate correctly to a PC. Powering it is actually a challenge to the design. It's what's called electrically isolated, meaning you have as a transformer between the USB side and the sensor side.

ML (00:50:42):

And all that just took time and was a little more out of my comfort zone. So I was an electrical engineer by training, but I haven't really done a lot of analog design for quite a while. So some of that was me trying to learn and figure out how to do it both cost effectively and accurately.

EW (00:51:02):

And the USB, the power, that's because your system has to be powered by the USB five volts. You can't sip off of the device under test's power, because it could be a battery that can't power you, or it could be anything.

EW (00:51:18):

But anything you take from it will affect your measurements. So getting power from the USB makes it so that your measurements are cleaner, right?

ML (00:51:28):

Exactly. Yeah. So I can't take any power from there, because I'm advertising nanoamp-level accuracy. You can't power very much on a nanoamp. So yeah. Yeah. It's all coming from the USB side. And I've designed the sensor side to be very low leakage or also called high impedance, so that it does not affect that device under test.

EW (00:51:53):

And I want to go back to volts and current. We talked about where minimizing current is what we usually think of, but the other thing people can do is minimize voltage. Do very many people take that route?

ML (00:52:10):

Well, every modern IC is getting lower and lower voltage. So certainly, we used to have chips at 5 volts. Arduinos are still there, but pretty much everything else has moved on to 3.3 volts, 2.7, 2.5 -

EW (00:52:26):

1.8.

ML (00:52:26):

1.8. And even zero point -

EW (00:52:26):

I have a bunch of 1.8s.

ML (00:52:28):

Yeah, 0.9 now. I mean, for some things it's pretty crazy, but the problem as you get lower and lower voltage is that your tolerance shrinks.

ML (00:52:38):

So if you're drawing an amp at 1.8 volts, and you have normal resistance, which happens everywhere, so unless you have a superconductor, your board has resistance, the wires have resistance, it's affecting the actual voltage that is arriving at your chip.

ML (00:52:56):

So as you get lower and lower voltage, we have to think as engineers more and more about keeping that supply within range, which is part of the challenge. And also one of the things that I had to design into Joulescope, and that's why that burden voltage being so low is very important.

EW (00:53:14):

Is there anything you wish you could tell the Matt Liberty who started this project?

ML (00:53:23):

Projects always take longer than you think even when you are very pessimistic, and Joulescope has certainly taken a long time over the last two years. And another one is knowing what I know now about how to do the electrical isolation.

ML (00:53:42):

So that's something that took me a long time. I initially started out with an off-the-shelf little power brick, and it's great. It does what it does, and...it includes a transformer, and the IC to drive the transformer, and then the regulation on the far side. And it was working okay, but I always had more noise than I thought.

ML (00:54:02):

And tracing down sources of noise in analog designs is really hard when you have lots of noise sources. So it took me a long time to figure out...where my noise sources were. And a huge one that didn't look like it really, because it was at some different frequencies than I would've expected, was from that switching regulator.

ML (00:54:22):

And I ended up going to a discrete solution, my own transformer, this great driver from TI that another engineer pointed me to. And that solved a huge amount of my issues with noise and also what's called common mode noise, which, probably more than we want to go into.

EW (00:54:41):

No, no, I want to know more.

ML (00:54:43):

Okay. Common mode noise. So what happens when you have any type of device, you have a signal referenced to something, and typically that's a ground. And as the signal wiggles, it should be wiggling separately from that ground plane and -

EW (00:55:01):

Should be.

ML (00:55:01):

- that's called, should be, that's called differential. And sometimes you have differential noise. But what happens if both the ground and the signal wiggle together?

ML (00:55:10):

The signal,...let's say it's out at 3.3 volts, just to pick a number, it's always staying 3.3 volts above the ground, but relative to a separate measurement, like your device that you're communicating with, or earth ground, they may both be wiggling. And that's called common mode noise.

ML (00:55:28):

And...for something like Joulescope, which is isolated and trying not to interfere with the devices on either side, either a power supply or your device under test, common mode, noise is a big issue. And transformers can actually couple and cause common mode noise.

ML (00:55:44):

And it took me a long time, longer than it should have, to figure out that issue. But there are a lot of other issues of noise that I was tracking down at the same time.

EW (00:55:54):

Did anything in your development go unexpectedly right?

ML (00:55:58):

That doesn't normally happen. I would say -

EW (00:55:59):

I guess not.

ML (00:56:01):

I was overly pessimistic about USB communication. So I've done a number of USB projects in my career and getting data over USB fast enough is actually more challenging than you would think. So I was pretty pessimistic about being able to keep my, what I'm calling the software driver, even though it's all in Python, still in Python.

ML (00:56:24):

I was thinking I'd have to move it to some type of compiled code rather than Python, but I have Joulescope working on Windows, Linux, and Mac, all without any additional driver software, still all in Python. In Windows it's using WinUSB, which is built into Windows 8.1 and later, and then on Linux and Mac, it's using libusb.

ML (00:56:46):

But the rest of the communication is all at Python. So that was a good surprise. And that work actually took a while. It's now all open source, so people can benefit from that.

EW (00:56:57):

Is your hardware open source too?

ML (00:56:59):

The hardware is not. Neither is the FPGA code, at least for the time being. I made a choice to open source what I thought people would be most interested in modifying. But I have spent a lot of time on this and haven't quite figured out how to make that open source and still be successful.

EW (00:57:18):

Yeah. And that's really hard. On one hand you want to open source everything, because it's nice when people use it, and change it, and get excited about it. But on the other hand, you need kibble. Yeah. So you sell things, and it's important to have something to sell. And if you give everything away, you don't have anything to sell.

ML (00:57:45):

That is the challenge. And there are some companies that have done remarkably well about that open source model, but I'm here competing against test equipment manufacturers where nothing is open source. So I think from that perspective, it's a step in the right direction for this type of market.

EW (00:58:02):

It seems like a lot of people are interested in doing FPGA to development or getting into it. Do you have any advice for those wanting to try it?

ML (00:58:10):

Definitely. It's gotten so cheap to get involved and actually try it out. So for the price of a few coffees, you can go out and buy one of the inexpensive development boards. I'd recommend the Lattice iCE family, simply because there's so much out there on the open source community.

ML (00:58:28):

The IceStorm tools that have been developed, they're really easy to pick up and use. The main thing to think of when you're developing FPGAs though, is that it is fundamentally different from writing software.

ML (00:58:42):

So if you're used to writing sequential software, in hardware, everything runs together by default, so it's a different way of thinking about attacking a problem.

ML (00:58:52):

And that's the biggest hurdle, I think, for people getting into FPGAs, is to just wrap your head around how hardware works and why it's different from writing code for a microcontroller. And there's a lot of examples out there, again, all around the IceStorm tools that can help you get started.

EW (00:59:11):

It's more like if you have a queue, a line of children waiting for lunch, and that's sort of how software development works, the kids come in one at a time, versus in an FPGA, you have a room of children, all doing things. Screaming.

ML (00:59:29):

Screaming.

EW (00:59:30):

Oh, wait. No.

ML (00:59:32):

All running in different directions at the same time.

EW (00:59:35):

Yes.

ML (00:59:35):

Yeah. So, it is. You have every little piece of hardware. And we think about this in our daily lives. You have a desk, for example, and all these little things are sitting on your desk. And they're doing whatever they do independently without knowing what else is on the desk. You could have your phone that's sitting there doing its thing.

ML (00:59:53):

You could have speakers. You could have a little desk toy, and it doesn't matter if you remove one, the others keep working. And that more the analogy with hardware, you have flip-flops and gates that will continue working on their own, regardless of what the other flip-flops and gates are doing inside the FPGA.

ML (01:00:11):

They're all in parallel. And the challenge is, in some ways, opposite of software. It's trying to get them to do things together is the design challenge. Normally they are all kind of separate.

EW (01:00:23):

They don't wait for each other unless you make them.

ML (01:00:26):

Right.

EW (01:00:26):

And it's really hard to remember to make them wait for each other, because it's so exciting that they're all doing things. Are there any other features of the Joulescope I didn't ask about? I'm excited to use it. I have to admit I haven't yet, but I will soon. But what else should I know, or what else is really cool?

ML (01:00:48):

So one thing we talked about was the ability to switch really quickly between the resistors. The other is it's very high impedance or low-leakage current. So it's not really drawing any extra power or current from any of your devices.

ML (01:01:02):

So it keeps everything thing working exactly like you would think without having Joulescope be a big change to your system. The other is it's electrically isolated, and this is actually more important than you'd think. Jacob Beningo just wrote a great article on electrical isolation and test equipment for more or less debug stuff.

ML (01:01:25):

But every time you add one more thing to your design, so if you're connecting up an oscilloscope, or you're connecting up your debug port, that's one more path for signals. And a lot of devices these days have sensors, and those are analog.

ML (01:01:39):

So by having these different things connected, and you're usually injecting noise into your system, by having an electrically isolated system that's done right, you actually remove that noise in a stronger way than you would've otherwise.

ML (01:01:54):

It also means that you can run your device at a different voltage from your USB port on your computer. So it's not tied to your USB ground.

EW (01:02:04):

And that's really important. I mean, so seldom am I actually running devices at USB levels.

ML (01:02:11):

Yeah. I have a nasty habit of touching my oscilloscope probe to things that aren't ground when I'm connected up to my dev boards.

EW (01:02:21):

Well, I think I'm out of questions. Although I am going to do a slightly uncharacteristic plug for my own book, because chapter eight is all about optimizing. And optimizing is what you need to do, hey, wait, chapter ten is about reducing power consumption.

EW (01:02:37):

One of these chapters will be available for people who want to see it. Chapter ten. If you email me, hit the contact link on embedded.fm, I'll send you chapter 10 of my book, and you can see if you like it. It's the last chapter. So you can read the ending first, find out what happens.

EW (01:02:59):

Matt, do you have any thoughts you'd like to leave us with?

ML (01:03:03):

Yes, I do. I'd like to talk a little just about perseverance. So if you work on any project of any size, you'll run into issues. And eventually they will be difficult to overcome. But it doesn't matter whether it's your first project or you're a professional, you run into these issues.

ML (01:03:21):

And you don't know what it's going to be upfront. You can say I'm going to run into an issue. It could be your microcontroller driver ends up being too slow. It could be your software library you select ends up not being a good fit. You break your only prototype that you've built. I've done all of those in the development of Joulescope.

ML (01:03:40):

So it's a frustrating period going through these roadblocks, these hurdles, when you're developing any type of product. But when it happens for me, I just take a break until the frustration passes, step back, and really start solving the problem, exercise curiosity, and ask questions, and keep going ahead.

ML (01:04:00):

So a lot of people, especially junior engineers I've worked with, get frustrated when this happens and have a hard time refocusing. It happens to anyone who's developing new stuff.

ML (01:04:12):

And having a good sounding board, whether they're people in your community or your coworkers, being able to talk to them or even just to your rubber duck at your desk helps as you go about solving the problem. But persist, and keep going, and develop great things.

EW (01:04:28):

Thank you. I like that. Our guest has been Matt Liberty, proprietor of Jetperch, and creator of the Joulescope.

EW (01:04:37):

It's Kickstarter launches February 19th, 2019. Check out the Kickstarter link in our show notes, or head on over to joulescope.com, that's j-o-u-l-e-s-c-o-p-e.com, to sign up for the newsletter to be reminded. Matt, thanks for being with us.

ML (01:04:57):

Thank you very much for having me on the show.

CW (01:04:59):

Thanks, Matt.

EW (01:05:01):

Thank you to Christopher for producing and co-hosting, and thank you for listening. You can always contact us at show@embedded.fm, or hit the contact link on embedded.fm. And now a quote to leave you with.

EW (01:05:13):

"Anything that's human is mentionable, and anything that is mentionable can be made more manageable. When we talk about our feelings, they become less overwhelming, less upsetting, and less scary. The people we trust with the important talk can help us know that we are not alone."

EW (01:05:28):

That's from Fred Rogers, Mr. Rogers. I just thought it was related to measuring things. 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.

EW (01:05:49):

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.