C1248 of 55
0 XP
  1. Hook
  2. Problems

C12 · Problem set 10

Problem set 10: watchdogs, power, flash and control

These problems use lessons 41 to 47: watchdogs, power and sleep, keeping data through power-off, control loops in firmware, and the systems lab. Battery life is capacity over average current; flash sectors survive a rated number of erases; a sampled first-order plant has a=e−Ts/τ and b=G(1−a).

Check

A main loop's longest normal pass is 12 ms. The watchdog gets a 2× margin, and the device may be out of action for at most 500 ms after a hang.

(a)

What timeout does the margin give?

Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.

(b)

Does that meet the outage limit (1 for yes)?

(c)

What is the largest margin the outage limit would allow?

Check

A sensor node sleeps at 0.002 mA. Every 10 s it wakes for 100 ms at 2 mA, then transmits for 5 ms at 30 mA. It runs from 220 mAh.

(a)

What is the average current?

Write units the way you normally would: 1.5 mA, 1500 µA and 0.0015 A are the same answer.

(b)

How long does the battery last?

Check

A linear regulator drops 5 V to 3.3 V for a load of 0.05 mA, and draws 100 µA of its own (quiescent) current.

(a)

What does it dissipate from the load current?

Write units the way you normally would: 1.5 mW, 1500 µW and 0.0015 W are the same answer.

(b)

What is its efficiency?

Check

A task needs 100000 cycles. Active current is 0.3 mA plus 0.3 mA per MHz of clock, and the board can run at 2 or 10 MHz from 3.3 V.

(a)

What energy does the task take at 2 MHz?

Write units the way you normally would: 1.5 µJ, 1500 nJ and 0.0015 mJ are the same answer.

(b)

And at 10 MHz?

Check

A coin cell at 2.9 V has 20 Ω of internal resistance; a radio burst draws 10 mA, and the board resets below 2.6 V.

(a)

What voltage does the board see during the burst?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

(b)

What is the largest burst current that avoids a reset?

Check

A supercapacitor of 1 F charged to 3.3 V keeps a clock and RAM alive at 0.01 mA until the voltage falls to 2.4 V.

(a)

How long does it last (constant current)?

(b)

How much energy does it give up?

Write units the way you normally would: 1.5 J, 1500 mJ and 0.0015 kJ are the same answer.

Check

A device logs 64-byte records 24 times a day across 4 flash sectors of 2048 bytes, each rated for 10000 erases.

(a)

How long does one lap of the log take?

(b)

How long until the flash wears out?

Check

A firmware bug resets a device 5 times a day, and each reset writes a crash record by erasing and rewriting one fixed sector rated for 10000 erases.

(a)

How long until that sector wears out?

(b)

And if 32-byte crash records are appended to a 4 KB log in the same sector instead?

Check

A plant of gain 2 and time constant 10 ms is sampled every 0.5 ms.

(a)

What is a?

(b)

What is the largest stable proportional gain?

(c)

Above what gain does the response alternate sign each sample?

Check

A loop was designed for 60° of phase margin at a 50 Hz crossover, ignoring sampling. It runs at 2 kHz with 2 samples of total delay.

(a)

How much margin does the delay take?

(b)

What margin is left?

Check

A PI controller stores Kp = 0.42 in Q10 and KiTs = 0.0007 in Q20.

(a)

What integer holds Kp?

(b)

And KiTs?

(c)

How far off is the stored integral gain, in percent?

Check

A heater's PWM is pinned at 100% for 20 s with an error of 200 codes, sampled every 5 ms; each sample adds 0.002 × e to the integrator.

(a)

How much does the integrator wind up without anti-windup?

(b)

How much with conditional integration?

Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.

Practice

Keep practicing

15 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.