LED Strip (Angry Baby)
Devin & Estee
LED Strip (Angry Baby)
Devin & Estee
What I wanted to learn, and why it interested me: We wanted to combine our skills from Project 1 and create something fun with a thermistor + LED ring!
Final outcome: A thermistor that reads temperature (from 20° -100° C, then converts the input to a color on the LED ring. When it's cold, the LED displays as blue. As it gets hotter, it turns red.
To make the project a bit more fun (and diffuse the LED to reduce glare), we added a little baby cutout! The baby doesn't like to get very hot...
Final Output
Baby starts nice & cool (blue) and gets angrier (more red) as it gets hot.
Final product without baby
Final product with baby
Process
Left: Trying to work out the thermistor to LED connection. It was difficult to get the LED to change colors past blue to white.
Right: We extended the thermistor so that we can give it a changing temperature input more easily. We changed the range of the LED, so it turned yellow this time!
Process and reflection:
In the beginning, we experimented with the round 16 LED strip by coding a chasing rainbow pulse, where we learned to display a range of colors through the LED. We then thought of ways we would display the range of colors through an input that would be cool. We ended up going with a thermistor that would change the LED display through a range of blue to red depending on how hot the room is. In the ideation phase, we wanted to have the Arduino sketch read temperature data from the thermistor and directly translate it to display colors on the LED strip, but through some more brainstorming, we thought that for the sake of debugging and real real-world application that we would first convert the thermistor values to degrees Celsius. The first version of the code used default calibration constants, but the temperature readings were showing around 85 °C at room temperature, which was significantly off which requiring us to tweak the constants. After that, we got the LED to light up yellow instead of red when hot. At first, we thought it was just not reading hot enough inputs for it to become red based on our domain values, so we tried using a hot air gun to heat it. It was still yellow, so we tried debugging by serial printing the RGB values when it got hot. It turned out that our Green had a domain that just didn't allow the LED to turn red, which was fixed through software. Lastly, we increased our maximum heat input to around 100 degrees Celsius as the hot air gun could get it to heat up a lot. This adjustment also allowed for a smooth and gradual transition of colors instead of a rapid color change.
Technical details
Electrical Schematic: We used a 1K ohm resistor between the ground and thermistor to provide a stable voltage that helps the Arduino read the thermistor's temperature-dependent resistance.
/*
60-223 Intro to Physical Computing, fall 2025
Domain-specific Skill Building exercise: LED Strip (Angry Baby)
A thermistor reads temperature and converts the values to degrees Celsius. A round LED strip changes colors from blue when it's around 20 degrees Celsius to hot when it's around 100 degrees Celsius.
Pin mapping:
Arduino pin | role | details
------------------------------
A0 input thermistor
6 output external LED
Released to the public domain 9/29/2025
Devin Chang & Estee Teo
Code base generated by Copilot
*/
#include <Adafruit_NeoPixel.h>
#define THERMISTOR_PIN A0
#define LED_PIN 6
#define NUM_LEDS 16
Adafruit_NeoPixel strip(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
// Adjusted calibration constants
const float SERIES_RESISTOR = 1000.0; // 1kΩ resistor
const float NOMINAL_RESISTANCE = 1000.0; // 1kΩ thermistor at 25°C
const float NOMINAL_TEMPERATURE = 25.0; // °C
const float B_COEFFICIENT = 3435.0;
void setup() {
Serial.begin(9600);
strip.begin();
strip.show();
}
void loop() {
int adcValue = analogRead(THERMISTOR_PIN);
if (adcValue == 0 || adcValue == 1023) return; // avoid extremes
float resistance = SERIES_RESISTOR * (1023.0 / adcValue - 1.0);
float temperature = 1.0 / (log(resistance / NOMINAL_RESISTANCE) / B_COEFFICIENT + 1.0 / (NOMINAL_TEMPERATURE + 273.15)) - 273.15;
Serial.print("Temp: ");
Serial.print(temperature);
Serial.println(" °C");
uint32_t color = temperatureToColor(temperature);
for (int i = 0; i < NUM_LEDS; i++) {
strip.setPixelColor(i, color);
}
strip.show();
delay(50);
}
uint32_t temperatureToColor(float tempC) {
tempC = constrain(tempC, 22, 100); // Range adjusted for the hot air gun
int r = map(tempC, 22, 100, 0, 255); // Red when temp goes up
int b = map(tempC, 22, 100, 255, 0); // Blue when temp goes down
int g = map(tempC, 22, 100, 100, 0); // Green adds mid-range hue
return strip.Color(r, g, b);
}