Introduction: Arduino Project - Thermometer

This project demonstrates a device that use servos to deliver required objects through detection of the current environment temperature by using a thermistor. It detects temperature display using two LEDs with the color of red and blue that indicates hot and cold. The servo read message from the thermistor to allow the servos to move.

Supplies

  1. Arduino Leonardo
  2. Breadboard
  3. Wires
  4. 10k and 2k resistors
  5. Thermistor
  6. LEDs
  7. Servo motors

Step 1: Arduino Circuit

  1. Prepare the materials listed above.
  2. Connect the positive pin on the Breadboard to 5V on the Arduino Leonardo.
  3. Connect the negative pint to the GND.
  4. Place the thermistor on the Breadboard, connect one pin to the 2k resistor.
  5. Connect the overlapping part of both thermistor and a 2k resistor to A0.
  6. Connect one pin of the thermistor to positive pin and the other pin o the resistor to the negative pin.
  7. Place a LED on the Breadboard connect its negative (shorter) pin with a 10k resistor.
  8. Connect the positive (longer) pin of the LED to a digital pin (D12/11) and the other pin of the resistor to the negative pin.
  9. Repeat 7 and 8 for the second LED.
  10. Place a servo motor on the Breadboard.
  11. Connect its pin with black wire to negative pin, red wire to positive pin, and the white wire to a digital pin (D2/3).
  12. Repeat 10 and 11 for the second servo motor.

Step 2: Code

#include

int _1_i;

Servo servo_pin_2;

int _2_i;

Servo servo_pin_3;

void setup()

{

Serial.begin(9600);

pinMode( 12 , OUTPUT);

pinMode( 11 , OUTPUT);

servo_pin_2.attach(2);

servo_pin_3.attach(3);

}

void loop()

{

Serial.print(analogRead( A0 ));

Serial.print(" ");

Serial.println();

if (( ( analogRead( A0 ) ) < ( 500.0 ) ))

{

digitalWrite( 12 , HIGH );

digitalWrite( 11 , LOW );

for (_1_i=1 ; _1_i<= ( 1.0 ) ; ++_1_i )

{

servo_pin_2.write( 20.0 );

delay( 1000.0 );

servo_pin_2.write( 160.0 );

delay( 1000.0 );

}

}

if (( ( analogRead( A0 ) ) > ( 600.0 ) ))

{

for (_2_i=1 ; _2_i<= ( 1.0 ) ; ++_2_i )

{

digitalWrite( 12 , LOW );

digitalWrite( 11 , HIGH );

servo_pin_3.write( 20.0 );

delay( 1000.0 );

servo_pin_3.write( 160.0 );

delay( 1000.0 );

}

}

if (( ( ( analogRead( A0 ) ) > ( 500.0 ) ) && ( ( analogRead( A0 ) ) < ( 600.0 ) ) ))

{

digitalWrite( 12 , LOW );

digitalWrite( 11 , LOW );

}

}

https://create.arduino.cc/editor/shannon_/a17736f9...

Step 3: Decorate You Box

  1. Find a cardboard
  2. Measure the size of your box, including length, width, and height on the cardboard.
  3. Prepare a box cutter.
  4. Use the box cutter to carefully cut the components of your box on the cardboard, be careful not to play around with the sharp box cutter.
  5. Heat the glue gun.
  6. Use the glue gun to glue to cardboards together that forms a box, be aware of the glue gun when heated.
  7. Decorate the box or wrap it with the wrapper.
  8. Cut off two areas for the servo motors that can place the servo motors with their rotary bar appear outside.
  9. Poke several holes, where the LEDs and thermistor can be placed.

Step 4: Finish

The device is a thermometer that uses a thermistor to detect the temperature around. The two LEDs are red and blue color, which indicates a different temperature. Red indicates hot and blue indicates cold. The two servo motors read the messages from the thermistor and rotate when the temperature is either too hot or too cold. They are used as hooks that can hold things on. For example, users may put a sunglass or a jacket on the two servo motors. Thus, when the thermistor detects a high temperature, the servo motor will rotate, and the sunglass will drop for the user. At last, this device can use in a different environment that can deliver objects needed for the current temperature.