Tag Archives: port

Seg 6: Software settings

2.4 Software debug

You can also use computer (PC) and/or mobile phone software to debug the wifi module. After the connection among the wifi board, Arduino shield board, USB to RS232 cable, and power, then we can test the wifi module shown by the following.

一. Computer (PC) version software

(1) software setting

Open the network serial software (which can be download from the website, if cannot find, can be contact me by my skype: yichone). Firstly, we should set simply the software environment, as shown in Figure 2-6, especially for the red label.


Figure 2-6 Simple settings for the PC network serial debug software

Some notes on the settings:

  1. PortNum: can be found at “computer (or my computer)”→right click “property”→click “device manager”→click “COM and LPT”. We can get the PortNum is COM6. So, we choose “COM6″ in the software, as shown in Figure 2-7.


Figure 2-7 query of PortNum

  1. Baud rate (BauR): during the wireless communication, the rate is generally chosen as 115200. It is also the wifi transmission rate 11MHz.
  2. Protocol: during the wireless communication, we should let wifi module as TCP Client mode. In other words, let wifi as client to visit the server.
  3. ServerIP (server IP address): :in the default factory setting, please input the IP address: 192.168.16.254. Note that, in the default factory setting, the IP address is 192.168.16.254. However, if the wifi board has ever been used, the IP address maybe is not this address. So, before using it, we must confirm the default factory setting for the wifi module. The way to default factory setting is introduced at Section 2.3.
  4. ServerPort (server port): the value is 8080.

Seg 4: Experimental principle of LM35

  1. Experiment and code
    1. Experimental principle

The principle of such experiment is very simple. The voltage data is sensed by the temperature sensor LM35, which would be sent to the analog port (A0 is used in this experiment) on the Arduino board. Then the Celsius (Centigrade) temperature can be output by the linear relationship between the voltage and temperature. For example, in this experiment, we know the linear relationship for the temperature LM35 by one Celsius temperature/10mV. Thus, we can get the voltage value n from the analog port A0 connected LM35 on the Arduino board. Not that, the data n is discrete and located on the range of 0~1024. So, we should change the discrete data n into a continuous voltage to get the Celsius temperature. In fact, the computation is simple. We know that, as for the analog ports A0~A5, the value range is 0~1024, and 1024 is corresponding to 5V. Therefore, if we know the value in A0 port, then we can obtain the discrete voltage value within 0~1024; i.e., the value is n. Then, we can compute the Celsius temperature. Assume that the continue voltage in port A0 on Arduino board is denoted by U. Then, we have the following compute formula by the principle A0 and the linear relationship between Celsius temperature and the continuous voltage.

,

where vol is the Celsius temperature we should compute, n can be achieved from analog port A0 on the Arduino. Therefore, we can compute the continuous voltage in A0 by equation (1). Then, we substitute the U into equation (2), the Celsius temperature can thus be obtained. In addition, the value of vol (i.e., Celsius temperature) could display on the serial monitor on the Arduino software platform.


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.