Problem Statement

The temperature of breastmilk or formula is a touchy and complicated subject. Babies are used to the milk being at roughly the temperature of their Mom (98.6 degrees Fahrenheit). Some need it to be exact, others will take it at room temperature or up to 100 degrees F. Most bottle warming solutions use boiling water to heat the contents of the bottle by the user turning a timer knob and waiting. The problem is, some formula will start at room temperature, some milk is refrigerated or frozen, and the volume of milk can change each time. This becomes a guessing game for the caretaker and can lead to taking the bottle out of the warmer many times to test it on their wrist or hand. This process is frustrating and time-consuming.


My goal was to create a sensor and output device that allows temperature information of a bottle that is being warmed to be understood at a glance. Ideally, the user puts the bottle in the warmer with the sensor in the liquid and waits until the light turns green. Once it is green, they know the temperature is within a safe and acceptable range for the baby. This saves time and effort and allows them to tend to the baby or do other activities while the bottle warms.


I started the process by researching some similar devices online and identifying some components that I would like to use. I found a sealed DS18B20 sensor and started building around that.

I used my professor's tutorial on the DS18B20 as my starting point. This involved creating a circuit on the breadboard, as well as downloading some libraries for the code to pull from and writing some preliminary code. By the end of this step, I had my sensor working and was able to see the temperature in Fahrenheit and Celsius register as cloud variables.


Next, I added the RGB LED to my breadboard and added the appropriate resistors and jumpers. It took me quite a long time to get it working and wrote some code to test it, instructing it to constantly power on with a white light. I then found a precedent to change the color of the LED and used the code to run the light through the different colors to make sure it worked.

I then, with the help of my classmate, wrote an "if" and "if-else statement" to set the LED to Blue for temperatures less than 95 F (too cold), Green for 95 to 105 F (just right), and red for over 105 F (too hot). Finally, I added a switch and a few lines of code to make it illuminate yellow when pressed and print the temperature to the serial log. This was added in case the perfect temperature was found and the user wanted to remember the exact number.


The project was successful overall. The breadboard is wired up successfully and the temperature sensor works and writes the correct colors. The pushbutton works as intended, printing the temperature and lighting the LED yellow when pushed. When turned on, the light glows blue and continues to do so until the temperature sensor reaches 95 degrees Fahrenheit. The LED turns green at this stage and will stay that way while within the 95-105 F range. If the temperature range is exceeded, the light turns red. This product creates an easy, at-a-glance solution for caretakers of babies that want to heat the bottle and don't want to check on it constantly.

 Bill of materials

  • Photon Particle
  • Breadboard
  • (12) jumper wires
  • (3) 220 Ohm resistors
  • (1) 1k Ohm resistor
  • (1) RGB LED
  • (1) S1 pushbutton switch
  • (1) DS18B20 sealed temperature sensor
  • (1) Ping Pong ball