EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure...

38
EECS 473 Advanced Embedded Systems Lecture 9: Groups introduce their projects Power integrity issues

Transcript of EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure...

Page 1: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

EECS 473Advanced Embedded Systems

Lecture 9:

Groups introduce their projects

Power integrity issues

Page 2: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Final proposal due today

• I should have feedback by Tuesday night to all groups.

• I have office hours today for last-minute questions.

Page 3: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Where we are;where we are going

• Labs 1-3 done, lab 4 due this week.• PCB lab

– Much less conceptual—it’s about learning a tool

• Entering full-time project mode.– Have midterm and 2 homework assignments before project due.

• Everything else is project (and lecture).• HW1 posted by the end of the day Friday. Due 10/14 (13 days from

now)– I expect it will take ~4 hours– It’s a nice prep for the midterm.

» Also practice midterms are posted.

– You should be putting in ~15 hours/week into the project.• The more you put in now, the less you have later.

– And some things (reorders, PCB redos) just take time—can’t cram.

• You really (really) want time to debug!• Large part of project grade based upon fully working.

– More complex projects get a bit more slack, but…– Project due a week before classes end (design expo)

Page 4: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Today: Restart on electrical issues

• Talked about PCBs last time.– Talked about sizing traces– Started on power integrity (keeping power/ground at the

desired voltage differential)

• Will talk about power integrity in a lot more detail today.

• But first, pitches:• Today: GROUP 1: Mouse, Door display, Shoes, Bees, PoS, Covid

tracker• Tuesday: GROUP 2: Racing, Mixology, Pond, GPS tracker, Plants, T.

Glove

Page 5: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Things you should be thinking about for your PCB

• Have you selected parts you can solder?• Have you selected a processor that has a good dev board?

– Has the I/O you want on-board or that you can easily connect to.

• Can you program your processor?– Many dev boards are programmed via a bootloader that was put there

before being added to the board.• The processor you order probably doesn’t have one.

• Can you test?– LEDs, switches, extra headers to otherwise unused pins are a really

good idea.• Can be tricky if your goal is to be small, but still should probably have some.• If you don’t care about size, consider having a fair bit.

– If you are focusing on power, you’d like to be able to see where your current is going. Needs to be measured in series.• But be careful, can make power integrity worse. Could have a scratch-off wire

for power.

Page 6: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Bootloader

• A bootloader is used as a separate program in the program memory that executes when a new program needs to be reloaded into the rest of program memory. – The bootloader will use a serial port, USB port, or

some other means to load the application.

– Frequently a bootloader will always execute on restart to check if a new program is to be loaded or if the application is to be run.

– Sometimes a bootloader will have primitive functions that the application also calls.

https://www.sciencedirect.com/topics/engineering/bootloader

Page 7: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Covod remote lab equipment

• If you need to purchase remote lab equipment (USB scope, etc.) we have about $500 per group for this.

– It can’t be part of your project, it must be returned to us, and it must be something that has a reasonable expectation of future use.

– Reimbursement will be similar to regular stuff, but tracked differently and money is coming from a different account.

Page 8: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Some electrical issues related to the building of PCBs

Page 9: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

High-speed PCB design issues

• There are a lot of electrical issues to deal with when working with high-speed PCBs.– Supplying power, storing energy and dissipating heat

• Power supplies, batteries, and heat sinks.

– Power Integrity (PI)• We need to be sure that we keep the power and ground at

approximately constant values.

– Signal Integrity (SI)• We need to make sure data on the wires gets there.

– Electro-magnetic interference/compatibility (EMI/EMC)• We need to watch out for generating radio-frequency noise

– The FCC is a bit picky about this.

• We don’t want RF noise to interfere with us.

EE issues overview

Page 10: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Outline

• Background

– Understanding power and energy

– Current limits

• EECS 215 “review/introduction”

– On capacitors, inductors, resistors and impedance

• Power integrity (PI)

Page 11: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Power!• Electric power is the rate at which electric energy

is transferred by an electric circuit. The SI unit of power is the Watt. (Wikipedia)

• Power (as opposed to energy), in-and-of itself isimportant in embedded system design.– For example there may be a limit on power draw from

a given set of batteries.• That is, they can’t supply energy at more than a given rate.

– Melting issues are power issues• Admittedly over time.

Page 12: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Power vs. Energy

• Power consumption in Watts

– Determines battery life in hours

– Sets packaging limits

• Energy efficiency in Joules

– Rate at which power is consumed over time

– Energy = power * delay (Joules = Watts * seconds)

– Lower energy number means less power to perform a computation at same frequency

Understanding Power and Energy

Page 13: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Power vs. Energy

Understanding Power and Energy

Page 14: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Current limits

• While most of you won’t be doing high-power work, sometimes you do have high-power motors or other things.

– If you push too much current through a trace, it can melt.

• Need to worry about “thermal runaway”

– There are lots of formulas, but let’s do a chart version.

• Assumes max temp you can deal with is 105 degrees C.

Understanding Power and Energy

Page 15: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Minimum Trace width for a given current• Example #1

– Say you have 1 amp current and you don’t want to see a rise of more than 30 degrees C.

– Your wire has a thickness of 0.0007 inches (fairly standard)

– So you need a width of around 40 thou.

• What is Example #2?

Understanding Power and Energy

Page 16: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Background issue #1: Inductance

• An inductor “resists the change in the flow of electrons”

• The light bulb is a resistor. The wire in the coil has much lower resistance (it's just wire)– so what you would expect when

you turn on the switch is for the bulb to glow very dimly.

• What happens instead is that when you close the switch, the bulb burns brightly and then gets dimmer. – And when you open the switch,

the bulb burns very brightly and then quickly goes out.

http://electronics.howstuffworks.com/inductor1.htm

EECS 215/Physics 240 “review”

Page 17: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Background issue #2: Capacitance

• A capacitor resists the change of voltage

– When you first connect the battery, bulb lights up and then dims

– If you then remove the battery and replace with a wire the bulb will light again and then go out.

http://electronics.howstuffworks.com/capacitor1.htm

EECS 215/Physics 240 “review”

Page 18: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Background issue #3: Impendence

• Impedance (symbol Z) is a measure of the overall opposition of a circuit to current, in other words: how much the circuit impedes the flow of current. – It is like resistance, but it also takes into account the

effects of capacitance and inductance. I– Impedance is measured in ohms.– Impedance is more complex than resistance because

the effects of capacitance and inductance vary with the frequency of the current passing through the circuit and this means impedance varies with frequency! • The effect of resistance is constant regardless of frequency.

http://www.kpsec.freeuk.com/imped.htm

EECS 215/Physics 240 “review”

Page 19: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Impedance vs frequency

• Say you have a sine wave being driven over a device.– How does the impedance of each device vary with

frequency?

• Resistors have an impedance that is independent of frequency

• Capacitors have a lower impedance as frequency goes up.

• Inductors have a higher impedance as frequency goes up.

Page 20: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

0.001

0.010

0.100

1.000

1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09

Imp

ed

an

ce

Frequency

Pureinductor

Cap/resistor

Pure cap.

A look at impedance(with capacitors, inductors and resistors vs. frequency)

Notice the log scales!

EECS 215/Physics 240 “review”

Page 21: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Power Integrity

• In order to get digital electronics to work correctly, they need a minimum* voltage differential. – If we get below that, the devices might

• Be slow (and thus not meet setup times)

• Lose state

• Reset or halt

• Just plain not work.

• Even a very (very) short “power droop” can cause the chip to die.– In my experience, this is a really common problem.

• Keeping power/ground constant and noise/droop free is “Power Integrity”

Power Integrity

*and maximum. Don’t forget this is really a range though we usually talk about the minimum

Page 22: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

So?

• We need the Vcc/Ground differential to be fairly constant.– But rapid changes in the

amount of current needed will cause the voltage to spike or droop due to inductance.

• We basically want a “no-pass” filter.– That is we don’t want to

see any signal on the Vcc/Ground lines.

– The obvious thing?• “Add a capacitor”

– That should keep the voltage constant, right?

• The problem is we need to worry about a lot of frequencies AND capacitors aren’t ideal.

Power Integrity

Page 23: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Lots of frequencies

• Even fairly slow devices these days are capableof switching at very high frequencies.

– Basically we get drivers that have rise and fall times capable of going 1GHz or so.

• This means we generally have to worry about frequencies from DC all the way to 1GHz.

– Because our chip may be varying its draw at rates up to that fast.

Power Integrity

Page 24: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Non-ideal devices.

• ESR is Effective Series Resistance• ESL is Effective Series Inductance• Ceff is the effective capacitance.

– How does quantity effect these values?

• Obviously impendence will be varying by frequency.

Power Integrity

Page 25: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Other things can add to ESR/ESL

• Generally a bad solder job can make ESR/ESL worse.

• Packaging has an impact

– wires have inductance so surface-mount packages preferred

• Pads can have an impact

Power Integrity

Page 26: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Power Distribution Network

• Talked a lot about keeping the power supply voltage constant.– Should think of situation as follows:

– If the processor drops 3.3V and uses 100mA, what is it’s effective resistance?

– If the power supply is 3.3V, the processor uses 100mA and the total resistance of the PDN (Power distribution network) is .01Ω, what voltage does the processor really see?

InputPDN

Processor OutputPDN

Power Integrity

Page 27: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Consider an FPGA with the following characteristics

• Acceptable voltage range is from 2.65 to 2.75V

– Max current is 5A.

– What is the largest impedance we can see on the PDN and still have this work?

Page 28: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Given the previous table..

0.001

0.010

0.100

1.000

1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09

Imp

ed

an

ce

Frequency

Decoupling Impedance vs Frequency

Z(pup)

Z(tant)

Z(1uF)

Z(0.1uF)

Z(0.01uF)

Z(pcb)

ZT

Z(LICA)

Power Integrity

Page 29: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Removing the PCB…

0.001

0.010

0.100

1.000

1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09

Imp

ed

an

ce

Frequency

Decoupling Impedance vs Frequency

Z(pup)

Z(tant)

Z(1uF)

Z(0.1uF)

Z(0.01uF)

Z(pcb)

ZT

Z(LICA)

Power Integrity

Page 30: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

But wait…

• VRM

– Voltage regulator module

• bulk bypass (tantalum) and decoupling capacitors (ceramic).

– These capacitors supply instantaneous current (at different frequencies) to the drivers until the VRM can respond.

• However sets of different capacitors cause problems!

http://www.pcbdesign007.com/pages/columns.cgi?artcatid=0&clmid=65&artid=85396&pg=3&_pf_=1

Power Integrity

Page 31: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Other power integrity issues

• Of course, one source of power integrity problems is coming from the processor

– Power supply just can’t keep up with processor varying (what we just did)

• But there are other problems.

– And these are issues introduced by the PCB designer.

• Don’t be that guy/gal.

Power Integrity

Page 32: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Connecting ground poorly

• One big issue is that people think of ground as, well, ground.– It isn’t.

– Only one point is “0V”. • Everything else has a higher voltage.

– Wires aren’t perfect.

• It’s really easy to make this mistake.– Classes like EECS 215 basically encourage it.

– Better to think of things as “return path” not ground.• And yes, you can make the same mistake with power, but people

do that a lot less often.– Partly because we often have different “Vcc” levels on the board.

– But mostly because we just think of power and ground differently.

Power Integrity

Page 33: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Consider the following

• Consider the figure on the right.– Why is the top picture “wrong”?

• Let’s consider the case of “A” being DC motor that runs at 120 Watts (12V 10A).

• B is processor drawing 100mA– Wire from A to PSU return is

15cm long, 400mils wide.

– What is the voltage at the “ground”?

0.1A

0.02Ω

10A

3.3V 12V

Top figure from “The Circuit Designer’s Companion”. If you are going to do PCB design much, buy and read this book.

Power Integrity

Page 34: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Review: Power integrity (1/2)

• Processors and other ICs have varying current demands– Sometimes at frequencies

much greater than the device itself runs at• Why?

– So the power/ground inputs need to be able to deal with that.• Basically we want those wires

to be ideal and just supply how ever much or little current we need.

– If the current can’t be supplied correctly, we’ll get voltage droops.

• How much power noise can we accept?– Depends on the part (read

the spec). • If it can run from 3.5V to 5.5V

we just need to insure it stays in that range.

– So we need to make sure that given the current, we don’t end up out of the voltage range.

• Basically need to insure that we don’t drop too much voltage over the wires that are supplying the power!

Power Integrity

Page 35: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Review: Power integrity (2/2)

* http://www.n4iqt.com/BillRiley/multi/esr-and-bypass-caps.pdf provides a very nice overview of the topic and how to address it.

• So we need the impedance of the wires to be low.– Because the ICs operate at a wide

variety of frequencies, we need to consider all of them.

– The wires themselves have a lot of inductance, so a lot of impedance at high frequencies.

• Need to counter this by adding capacitors.

• Problem is that the caps have parasitic inductance and resistance.– So they don’t help as well as you’d like– But more in parallel is good.– Each cap will help with different

frequency ranges.

• We also can get a small but low-parasitic cap out of the power/ground plane.

• Finally we should consider anti-resonance*.

Power Integrity

Page 36: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Power Integrity (PI) summary

• Power integrity is about keeping the Vcc/ground difference constant and at the value you want.

• Covered two issues:– Many devices that sink power do so in “pulses”

• Due to internal clocks and time-varying behavior• Need caps to keep value constant

– But parasitic ESR/ESL cause problems– So lots of them==good

» Reduce ESR/ESL» Increase capacitance.

• Anti-resonance can cause problems!– Need Spice or other tools to model.

» Will do a bit of this next time

– Also, need to watch return paths• Can easily bump up your ground level

– Cuts into your margin for the work above…

Power Integrity

Page 37: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Additional “reading”

• http://www.murata.com/en-us/products/emiconfun/capacitor/2013/02/14/en-20130214-p1

– Very nice coverage of ESR and impedance in a non-idea capacitor. Touches on the fact that ESR varies by frequency! Very readable and short!

• http://ksim.kemet.com/

– Nice spice models of real capacitors.

•http://doc.utwente.nl/64874/1/tiggelman.pdf

– A much more academic treatment of ESR.

• https://www.youtube.com/watch?v=sW0a9d_vWoc

– Mildly amusing and useful (who doesn’t like magic smoke?)

Page 38: EECS 498 Advanced Embedded Systems1.E+03 1.E+04 1.E+05 1.E+06 1.E+07 1.E+08 1.E+09 ce Frequency Pure inductor Cap/resistor Pure cap. A look at impedance (with capacitors, inductors

Up next

• Next week:– Batteries

– Linear Regulators

• Week after:– Fall break (HW due Wednesday after)

– Exam review

• Week after that– Milestone meetings

– Introduction to special purpose processors (mostly DSPs)