microSD memory card + adapter for it. We'll convert microSD to SD adapter into microSD to microcontroller one. You can omit this part and just opt for an adapter board for microcontrollers (especially if you don't want to go further than a prototype) - less soldering, but maybe less fun.

Pushbutton, some jumper wires (these or these), one 4.7k resistor.

Step 2: (Optional) Parts for End Product

The list of parts in the previous step is only good for a prototype. If you want to build something you can give to other people without being scared for the life of your... device, then you'll additionally need:

Two toggle or rocker switches (both SPST - one to switch operating mode and another as a power switch)

Enclosure-mount connector for temperature sensor. I used XS9K4P: a circular polarized 4-pin connector. Just make sure it can't be plugged any other than the right way (make it polarized, in other words). This connector is pure awesomeness. It looks like the plug is locked into place after being screwed into receptacle, but it is actually self-locking. You have to pull the outer 'collar' part of a plug to unlock it, otherwise it won't budge.

Coin cell battery. How big depends on what kind of autonomous time you expect to get from this logger, I'm using the beefy-looking CR2477 (25mm diameter, 7mm height, 1Ah on average) to get as much as years. The standard CR2032 (20mm diameter, 3mm height, 220mAh on average) won't last as long, but it's encountered more frequently in daily life.

Load switch IC with at least one channel. You're going to need it to switch off your memory card to conserve power. DS18B20 consumes so little current it can be switched from IO pin. Load switch is not a part that every tinkerer has in their part bin, but luckily I had one that I ordered a long time ago as a sample from Texas Instruments (TSP22960). Well, your time to shine's finally come, little buddy, after years of laying in a dusty box! You can order one from distributor like Mouser, Farnell, etc..Miscellania like standoffs and tiny screws and 3d-printed enclosure.

I'll just leave the picture of all the parts I had (excluding the lid of the enclosure with indicator LED and mode switch associated with it) prior to assembling first revision of this device.

Step 3: Prototype

With a device as (relatively) complex as this one, you gotta prototype to make sure all this technology can integrate. Temperature logger will involve FAT filesystem access via SPI, temperature sensor access via OneWire, usage of real-time clock with battery backup.

Got to admit, I never even as much as dabbled in any of those before, at least on STM microcontrollers.

Let's cobble up something that can read temperature and write it to memory card upon a click of a pushbutton - using only jumper wires! Why solder something as impermanent as this?

Step 4: (Optional) Make a Finished Version of Your Device.

Whoo, this prototype building was really educational. Hopefully it taught you something about these little inexpensive Bluepill boards with STM32 microcontrollers, their power saving features and so on. You can stop it here, or you can build a more finished version of this device. To do that, you'll have to print out the enclosure and solder your device together. For the schematics and finished device's code, as well as STL models for the enclosure, check out my blog.

Next revision will feature a PCB, serial flash memory instead of microSD and USB configuration instead of Serial.

Thank you for reading this far, and leave your comments and suggestions on this build! Also make sure to post your builds of this simple temperature logger here!