D13 Final capstone · Practice
Solar sensor node: firmware that sleeps
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
Check
This node reads the TMP102 every 100 ms but waits busily in between. Make it read from a 100 ms timer interrupt and deep-sleep in between, printing the same hundredths of a degree (−5.25 °C here).
C on the course's RISC-V board (10 MHz, no floating point). #include "board.h" for the registers; print(x) shows a number. Tab indents; press Esc and then Tab to move on.
Check
The TMP102 counts in sixteenths of a degree. What signed 12-bit value does it report at −5.25 °C?
Check
A TMP102 register read takes 45 I²C clocks. How long is that at 400 kHz?
Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.
Check
A node is awake 0.5% of the time at 2.05 mA and sleeps the rest at 0.052 mA. What's its average current?
Write units the way you normally would: 1.5 mA, 1500 µA and 0.0015 A are the same answer.
Check
Firmware wakes every 600 s for 5 ms at 5 mA and sleeps at 5 µA otherwise.
(a)
What fraction of the time is it awake, in percent?
(b)
What is the average current?
Write units the way you normally would: 1.5 µA, 1500 nA and 0.0015 mA are the same answer.
Check
A node wakes for 10 ms at 3 mA and sleeps at 3 µA. At what wake interval do the awake and sleep charge per cycle become equal (so the sleep current makes up half the budget)?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
TMP102 value at −0.5 °C?
Check
Average: awake 0.01% at 2.05 mA, 0.002 mA asleep?
Write units the way you normally would: 1.5 mA, 1500 µA and 0.0015 A are the same answer.
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in D13