Tag Archives: schematics

Seg 3: Experimental analysis

3.4 Experimental analysis

(1) draw the experimental schematics: According to the design idea, you can draw the experimental schematics, which is shown in Figure 3-3, and this principle of LM35 is the same as Section 8 from the Basic Part. To readers’ convenience, this figure is given here again. Compared with this experiment, it is short of Arduino shield board and wifi board. But the principle of collecting temperature by LM35 is the same as Section eight in the Basic Part.


Figure 3-3 experimental principle

(2) circuit connection: By the experimental principle, we firstly connect the circuit shown in Figure 3-4.


Figure 3-4 Experimental connection

(3) wifi network connection: when we power the wifi on the Arduino main board, we can get the wifi signal. But, note that, for the stability of wifi signal, we should power the wifi shield board by the 15V voltage adapter designed in Table 3-1. Then, after a short while, you can search a wifi signal in your compter named as HI_LINK_XXXX (which is said in Section 2) transmitted by wifi module. Here, in my computer, the wifi signal is called as HI_LINK_0021. Then double click the wifi network HI_LINK_0021wifi, and input the password ( the default password is 12345678). It is said that you have connected the wifi networks. Note that, if you use the wifi module at the first time, to ensure the exactness of data configuration, wifi module needs to recovery the default factory settings (press the button RST on the Arduino shield board for 6 seconds, then power off and reboot for the wifi module. Also can see the method in Section 2). This step is similar to open the wifi in our phone to surf the internet. It shows that the wifi module can transmit the wifi signal. Then, if wifi module connects a wifi hot spot, then we can let data send by wifi communication.

Seg 2: Arduino controls many LEDs

2.4 Experimental platform

According to Figure 2-2, we start to set up the experimental platform, as shown Figure 2-2. Oh, my god, there are so much LEDs, dupont lines, and resistors, that we are confused by the complex connection. But can we rightly connect the electrical elements? In fact, it is not difficult if we can find a technique. Then, it will be very simple to set up our such experiment.

  1. As for one LED, the long les is located left side for positive, and the other is located right side for negative. if all of these LEDs are connected by this method, it is not a problem.
  2. One end of dupont line is connected to negative polarity (by the equal voltage for each column in the brandboard). Another end is connected to GND. All of these ends are connected the same line in the narrow band (the equal voltage for each row in the narrow band).
  3. The current-limited resistors are connected to the polarities of LEDs. Similarly, they are located randomly in the same column. But for the good-looking, they had better be connected unifiedly the different columns at the same line in the brandband. It will look like neat, as shown in Figure 2-2.
  4. One end is connected to resistor at the same column, and the other is connected to the pins on the Arduino board, as shown in Figure 2-2.

OK, when you have a few techniques to connect these electronic elements on the Arduino board, you may finish this connection of this experiment successfully at a time. The circuit is not complex, but it needs your carefulness.

Wow, when we insert USB line into computer and Arduino board, the LED is blinking repeatedly at pin 8 on the Arduino board. But other LEDs are honest, and not blinking. Why? Yes, maybe, you have got it. Do you remember the previous experiment? We let LED blink located at pin 8 on the Arduino board. When the code has been burnt into the Arduino board, it can be saved in the board forever. It does not disappear with the power off of Arduino board. If we repower on the Arduino board, the LED will blink at pin 8. But, if we burn a new program into the Arduino board, the board will execute the new code.


Figure 2-3 Start to write the letter V


Figure 2-4 The letter V

2.5 Solution for code

On the basis of the last experiment on the Arduino IDE, we can give out the code in this experiment, which is exhibited in Program 2.

01 //Program 2: Arduino controls many LEDs
02 //define 9 pins for LEDs
03 int led4 = 4;
04 int led5 = 5;
05 int led6 = 6;
06 int led7 = 7;
07 int led8 = 8;
08 int led9 = 9;
09 int led10 = 10;
10 int led11 = 11;
11 int led12 = 12;
12
13 //initialize the 9 pins as OUTPUT
14 void setup()
15 {
16    for(int i=4;i<=12;i++)//define 4-12 as OUTPUT
17    pinMode(i,OUTPUT);//set i as OUTPUT
18 }
19
20 void loop()
21 {
22  mode();//display of 9 LEDs
23
24 }
25 //subfunction for mode()
26 void mode()
27 {
28  unsigned char j;
29  //let 4-12 LEDs blink one by one
30  for(j=12;j>=4;j–)
31  {
32    digitalWrite(j,HIGH);
33    delay(500);
34  }
35  //let 4-12 LEDs go out
36  for(j=12;j>=4;j–)
37  {
38    digitalWrite(j,LOW);
39  //delay(500);
40  }
41  //let 4-12 LEDs bright
42  for(j=4;j<=12;j++)
43  {
44    digitalWrite(j,HIGH);
45  }
46 }


 2.6 Key points

1) Be familiar with the polarity of LED and the features of breadboard.

2) After finishing a experiment, we should summarize some experiences from the process of experiment.

3) Arduino can realize your idea. Do it yourself.