Professional Documents
Culture Documents
Kit Instructions
Kit Instructions
Kit Instructions
This kit is designed to have the 4x7 segment display which displays the temperature mounted directly on the Arduino board. The
3-pin wire leads connect a thermistor to an analog pin on the Arduino. Once the Arduino is programmed, a 9-volt battery can supply
the power. The thermistor can be replaced with other types of sensors and the Arduino can be reprogrammed to display those sensor
value readings.
Bill of Materials:
Step 1 - Arduino
Look at the Arduino and familiarize yourself with the orientation vocabulary used in these steps
Step 2 - Wire placement view from FRONT
Trim the red lead from the 9-volt clip, insert from the BOTTOM and solder it to the RAW hole on the arduino
Trim black leads from both the 3-pin connector and the 9-volt clip, twist the wires together, insert into the GND hole from the
BOTTOM of the Arduino and solder
Step 5 - 3-pin red
Trim red lead from 3-pin connector, insert from the BOTTOM of the Arduino into the Vcc hole and solder
Trim and insert the DATA lead from the 3-pin connector into the A5 hole on the Arduino from the BOTTOM
Wrap one end of resistor to one leg of the thermistor, solder and trim leads.
the thermistor/resistor module does not need to be soldered into the 3-pin clip. When inserted into the clip end of the 3-pin clip, the
bare thermistor leg should connect to the BLACK wire, the resistor leg should connect to the RED wire and the thermistor leg that has
the resistor soldered should connect to the DATA wire (the DATA wire could be YELLOW, WHITE or even BLUE)
Step 8 - 6-pin header
Insert the 6-pin header through the holes on the RIGHT side of the Arduino from the FRONT and solder on the BACK in place
Bend pins out flat then straight again so the footprint is wide enough to fit in the Arduino holes. you will also need to bend the #9 pin
so it fits in the GND hole on the TOP FRONT of the Arduino.
Align the 7 segment display so the pins fit the Arduino holes and confirm that the #9 pin on the 7 segment display fits in the GND hole
on the FRONT TOP of the Arduino.
Step 11 - 7 segment BOTTOM
Confirm the pins on the 7 segment display fit in the holes on the BOTTOM FRONT of the Arduino.
With the 7 segment display in place by inserting through the FRONT of the Arduino, solder the pins from the BACK of the Arduino.
Be sure to maintain clearance between the pins on the 7-segment display and surface components on the Arduino.
Connect your computer to the Arduino with your FTDI connection and upload the thermistor program (source program included here
made up of parts taken from samples online)
-----------------------------------------
#include
int Ai5 = A5;
int Value5;
boolean hb = HIGH;
int hbCNT = 0;
void setup() {
pinMode(segA, OUTPUT);
pinMode(segB, OUTPUT);
pinMode(segC, OUTPUT);
pinMode(segD, OUTPUT);
pinMode(segE, OUTPUT);
pinMode(segF, OUTPUT);
pinMode(segG, OUTPUT);
pinMode(digit1, OUTPUT);
pinMode(digit2, OUTPUT);
pinMode(digit3, OUTPUT);
pinMode(digit4, OUTPUT);
pinMode(dp3, OUTPUT);
pinMode(Ai5,INPUT);
Serial.begin(9600);
Serial.println();
}
void loop()
{
//show temp
displayNumber(Value5);
//show heartbeat
if (!(hbCNT % 100)) hb=!hb;
//query temp
if (hbCNT++ > 300)
{
hbCNT = 1;
//store thermistor resistance value
Value5 = analogRead(Ai5); //Read the value of AI1 (pin2) and write it to Value1
Serial.print(Value5);
Serial.print(" [] ");
Serial.print( 1000/(float(1023 / float(Value5)) -1));
float steinhart, average;
average = 1023 / float(Value5) - 1;
average = 10000 / average;
digitalWrite(dp3, HIGH);
digitalWrite(digit1, DIGIT_ON);
break;
case 2:
digitalWrite(digit2, DIGIT_ON);
break;
case 3:
digitalWrite(digit3, DIGIT_ON);
digitalWrite(dp3, !hb);
break;
case 4:
digitalWrite(digit4, DIGIT_ON);
break;
}
digitalWrite(dphb, !hb);
delayMicroseconds(DISPLAY_BRIGHTNESS); //Display this digit for a fraction of a second (between 1us and 5000us, 500 is pretty
good)
while( (millis() - beginTime) < 10) ; //Wait for 20ms to pass before we paint the display again
}
case 0:
digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_ON);
digitalWrite(segF, SEGMENT_ON);
digitalWrite(segG, SEGMENT_OFF);
break;
case 1:
digitalWrite(segA, SEGMENT_OFF);
digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_OFF);
digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_OFF);
digitalWrite(segG, SEGMENT_OFF);
break;
case 2:
digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_OFF);
digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_ON);
digitalWrite(segF, SEGMENT_OFF);
digitalWrite(segG, SEGMENT_ON);
break;
case 3:
digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_OFF);
digitalWrite(segG, SEGMENT_ON);
break;
case 4:
digitalWrite(segA, SEGMENT_OFF);
digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_OFF);
digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_ON);
digitalWrite(segG, SEGMENT_ON);
break;
case 5:
digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_OFF);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_ON);
digitalWrite(segG, SEGMENT_ON);
break;
case 6:
digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_OFF);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_ON);
digitalWrite(segF, SEGMENT_ON);
digitalWrite(segG, SEGMENT_ON);
break;
case 7:
digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_OFF);
digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_OFF);
digitalWrite(segG, SEGMENT_OFF);
break;
case 8:
digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_ON);
digitalWrite(segF, SEGMENT_ON);
digitalWrite(segG, SEGMENT_ON);
break;
case 9:
digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_ON);
digitalWrite(segG, SEGMENT_ON);
break;
case 10:
digitalWrite(segA, SEGMENT_OFF);
digitalWrite(segB, SEGMENT_OFF);
digitalWrite(segC, SEGMENT_OFF);
digitalWrite(segD, SEGMENT_OFF);
digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_OFF);
digitalWrite(segG, SEGMENT_OFF);
break;
}
}