// Cambridge, MA

week 9: input devices

this week, my assignment was to measure something by adding and reading a sensor to a microcontroller board of my design.
i am continuing to take small steps in my learning; i decided to go from electronics production week, where i had a board with three components (rp2040 + resistor + LED) to a board with an unprecedented FOUR components (rp2040 + resistor + thermistor + OLED).
i figure that a more advanced version of this project could involve a device that you put in hot water, and based on the temperature of the water, it displays the optimal type of tea to use. but for this initial week, i wanted to do a simple board that measures the temperature and displays it (so that I can kill two boards with one stone between this week and output week).
as a first step, i designed v1 of my schematic, which would involve the OLED going into a 1x4 connector and a voltage divider with my NTC thermistor, represented here by just a simple resistor (since it has the same footprint):
i then learned that routing is a thing. on my previous board i didn't have to do any routing since the layout was so simple, but this time i did. i'm told some people find it therapeutic but i simply do not believe that. i successfully got a layout that worked, though:
... only to run design rules and realize i had 31 errors. fixing these took another bit of work:
>:-)
i then engaged in a contentious battle with the REEF roland machine. i successfully milled the board, but the 1/32 bits kept breaking as i tried to mill the outline. i finally grew frustrated and deployed the Manual Roland (aka me with an exact-o knife carving my board out by hand):
i soddered my board with all the relevant components--unfortunately though i had a bit of the trace break on one of the connections to the OLED, so i'll have to reprint the board or figure out a way to do surgery for output week.
i then hooked the board up to my computer and wrote the code to read temperature. i actually thought this was the most interesting part, doing the math to go from voltage to temperature (and the fact that it worked) blew my mind.
(i didn't know what a datasheet was five weeks ago, but now i am reading them and know exactly what value to look for to do these calculations. feels good.)
setting everything up on the serial plotter, i learned the room was about 24.3 degrees C, which seemed reasonable; and when i blew on the thermistor, its temperature dropped a few degrees, which seemed logical.
on to output week!