Tag Archives: display

Seg 6: Key notes and summaries


Figure 3-6 Data display on the Arduino serial monitor

(7) data connection at the end: if you finished the above six steps successfully, congratulations, you are successful. The temperature measured by sensor LM35 has been successfully sent to the server on the internet by wifi module, as shown in Figrue 3-7.


Figure 3-7 Data display at server

Compared the temperature data shown in Figure 3-6 (local monitor) with Figure 3-7 (server at cloud), it is can be found that, both data are the same, which shows the data is transmitted successfully. In the next section, we will show the data handling to exhibit to people.

3.5 Key notes and summaries

(1) before configuring network parameters, to ensure the successful configuration, please recovery the wifi module to the default factory settings.

(2) please ensure the exactness of data configuration, especially the settings about mobile phone and server IP address.


Seg 5: Schematic diagram and experiment of LM35

  1. Schematic circuit

By the connection diagram shown in Figure 8-2, this experimental schematics is easily draw in Figure 8-3. Note that, we should design the circuit by the pin connection of temperature sensor.


Figure 8-3 Schematic circuit


8-4 Circuit diagram

  1. Code

Run Program 8.

01 // Program 8: use sensor to measure your environmental temperature
02 
03 void setup() {
04  
05   Serial.begin(9600);         //set the baud for serial communication
06 }
07  
08 void loop() {
09  
10   int n = analogRead(A0);    //read the voltage from A0
11  
12   float vol = n * (5.0 / 1023.0*100);   //computation of temperature
13  
14   Serial.println(vol);                   //output temperature
15   delay(2000);                           //wait for 2s for display
16 }

Open the serial monitor on the Arduino software platform, we can see the Celsius temperature sensed by the temperature sensor LM35. Note that, the baud of monitor should be the same as the above code, which can be seen in Figure 8-5.


Figure 8-5 the temperature value on the Arduino monitor

From Figure 8-5, we know that the environmental temperature is about 24.44 in this experiment.

  1. Key points and summaries
  2. We should know the features about the temperature sensor. For example, in such experiment, the temperature of LM35 is linearly proportional to the voltage. By this relationship, we can get the formula about the temperature and voltage.
  3. We should the connection about the sensor logs. As for LM35 in this experiment, let the full-face having characters facing us. Then the left is connected to 5V port on the Arduino board, the right leg is a GND port, which should connect to the GND port on Arduino board, and the middle leg should connect to the analog port on the Arduino board, which can output the concrete value about temperature.
  4. The output temperature value can be seen on the serial monitor. But, the baud for the monitor should be unanimous with the baud set in the experimental code.

Seg 4: Order of the pins for the nixie tube and coding

  1. Order of the pins of the nixie tube

Similarly, why do we know the order the pin? If we do not know the order of the pins, we do not know how to connect to the pins of nixietube. For example, if we want to display the digital number 5, how can we connect the dupon lines from the pins of nixie tube to the ports on the Arduino? To connect to the Arduino board rightly, we must know the connect rules.

  1. re-know the nixie tube

We firstly know the pins of nixie tube from the followings in Figure 6-6.


Figure 6-6 Pins connection of nixie tube

  1. As shown on the left subfigure of Figure 6-6, the digital number is labeled from the lower left by the counterclockwise, and the number of point is 5. All of the number is 1~10.
  2. The letter label is marked from up to down by the clockwise. It is a~h, respectively, where the number of point is “h” as the last location.
  3. Digital number 3 and 8 is the common port, which is the common anode or cathode. Figure 6-6 is the common cathode nixie tube; that is, all of the negative pins are connected a common port 3 or 8.
    1. Coding of nixie tube

What is coding? To make the nixie tube display the designed digital number, we should let the LED to be conduction. For example, we want to display number 5 in Figure 6-6, how? Firstly, the polarity is must be right. In such experiment, the nixie tube is the common cathode. Thus, the common cathode should be connected to the GND port on the Arduino. Other pins must be corresponding to the ports on the Arduino to display the right digital number. This is coding. For example, in the letter view, if let the pins of a,c,d,f,g set as a high voltage level (or 1), and other pins is set as low level, (or 0), then, the corresponding segments would be light and digital number 5 can be displayed on the nixie tube. Since the decimal point “h” would not affect the display of digital number, it can be conducted or not. In this experiment, the decimal point is conducted. From the digital view, pins 2,4,5,7,9,10 are conducted, and the other remaining ones are not. Therefore, if we use binary code to express this segment, it can be coded as {0,1,1,1,0,1,1,1}. That is, there are two segments dark among of the eight segments in the nixie tube. Then, digital number “5″ can be displayed correctly. By this coding method, we can get other digital number coding, as shown in Table 6-2.

Table 6-2 Digital number coding scheme for the common cathode nixie tube

Arduino ports

Nixietube pins

0

1

2

3

4

5

6

7

8

9

4

1(e)

1

0

1

0

0

0

1

0

1

0

5

2(d)

1

0

1

1

0

1

1

0

1

1

6

4(c)

1

1

0

1

1

1

1

1

1

1

7

5(Dp)

1

1

1

1

1

1

1

1

1

1

8

6(b)

1

1

1

1

1

0

0

1

1

1

9

7(a)

1

0

1

1

0

1

1

1

1

1

10

9(f)

1

0

0

0

1

1

1

0

1

1

11

10(g)

0

0

1

1

1

1

1

0

1

1

Note that, to avoid the error of connection to Arduino, or convenience, we had better encode the digital number by one-defined rule. For example, in this experiment, let the digital ports on Arduino board correspond to the pins of nixietube for small to big (1~10). Certainly, there are many encoding schemes by following different ones’ habits. But the effect of display and the code is the same.