C12 Embedded systems in MicroPython and C · Practice
Project: a thermostat, in both languages
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
The room (2000 J/°C, R = 0.02 °C/W, outside 5 °C) is at 18 °C with a 1500 W heater on. How fast is it warming?
Check
A room with R = 0.01 °C/W, outside temperature 0 °C, and a 1500 W heater always on: where does it settle?
Check
A thermostat's band is ±0.5 °C; the room warms at 0.2 °C/s with the heater on and cools at 0.375 °C/s with it off. How long is one cycle?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
What's the time constant of a room with R = 0.02 °C/W and C = 2000 J/°C?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A heater cycles every 5.3 s. About how many times does it switch on in 40 s, once the room is in its band?
Check
The thermostat in MicroPython with the setpoint SP (19 °C) and a ±0.5 °C band; sample every 500 ms.
MicroPython on the course's board: machine (Pin, PWM, ADC, DAC, UART, I2C, SPI, Timer, WDT) and time. Each call into the hardware takes about 40 µs. Tab indents; press Esc and then Tab to move on.
Check
Warming rate: 1200 W, 19 °C inside, 8 °C outside, R 0.02, C 2000?
Check
Settled temperature with 800 W always on, R 0.03, outside 2 °C?
Check
Cycle time: band ±0.3, warming 0.3, cooling 0.2 °C/s?
Write units the way you normally would: 1.5 s and 1500 ms 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 C12