D-Link DSL-G684T Instrukcja Użytkownika

Przeglądaj online lub pobierz Instrukcja Użytkownika dla Networking D-Link DSL-G684T. D-Link DSL-G684T User manual Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 118
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 0
AGH University of Science and Technology
Faculty of Electrical Engineering, Automatics, Computer Science and
Electronics
Department of Electrical Machines
Name: Jakub Wójcik
Faculty: Electrical Engineering
Specialization: Computer Engineering In Electrical Systems
The conception and the implementation of control
system for servomotor with application of wireless
network
Master’s thesis written
under the direction of
prof. dr hab. i
Zygfryd Głowacz
Kraków 2011
Przeglądanie stron 0
1 2 3 4 5 6 ... 117 118

Podsumowanie treści

Strona 1

AGH University of Science and Technology Faculty of Electrical Engineering, Automatics, Computer Science and Electronics Department of Electrical Mac

Strona 2 - STATEMENT OF ORIGINALITY

10 2Mbps. The third generation which we use nowadays operates on the same band as the second generation, 2,4GHz. The world first official standard I

Strona 3 - Sincere thanks to

100 var i,Size: Integer; begin Result:=0; Size:=Length(Value); for i:=0 to Size-1 do begin if Copy(Value,Size-i,1)='1' then

Strona 4 - Table of Contents

101 photo:=1; end; wait(2000); IdTelnet1.IOHandler.WriteLn('servo=1'); if (not checkbox1.Checked) then servo := 1 else se

Strona 5 - Introduction

102 else panel_login.Visible := true; end; procedure TForm1.Timer1Timer(Sender: TObject); begin if label56.Visible then label56.Visible := false

Strona 6

103 procedure TForm1.TrackBar4Change(Sender: TObject); begin label2.Caption := inttostr(trackbar4.Position); end; procedure TForm1.About1Click(Se

Strona 7

104 wait(200); IdTelnet1.IOHandler.WriteLn(''); IdTelnet1.IOHandler.WriteLn('servo=0'); end; procedure TForm1.Button13Clic

Strona 8

105 case PageControl1.ActivePageIndex of 0: begin IdTelnet1.IOHandler.Writeln('$$$'); IdTelnet1.IOHandler.Write

Strona 9

106 IdTelnet1.IOHandler.Writeln('set dns address '+edit15.Text); IdTelnet1.IOHandler.Writeln('set dns name &ap

Strona 10 - http://www.ieee802.org/

107 INI.WriteString('Main','optpswd',Encrypt(edit21.Text)); end; finally INI.Free;

Strona 11 - Unit II Hardware/software

108 end else application.MessageBox('ERROR','password and its confirmation are not the same!'); end; en

Strona 12 - http://arduino.cc/en/

109 Connected2.Enabled := true; end else application.MessageBox('ERROR','invalid login or password'); IdTel

Strona 13

11 Unit II Hardware/software 2.1. Open Source  nice, simple and free Since the beginning of the computer history the intellectual property rights

Strona 14

110 end else begin if (servo = 1)and(checkbox3.Checked) then begin IdTelnet1.IOHandler.WriteLn('servo=0')

Strona 15

111 begin if not checkbox3.Checked then begin if (serv = 0)and(checkbox1.Checked) then begin IdTelnet1.IOHandler.WriteL

Strona 16

112 else begin edit20.Visible := false; edit3.Visible := true; end; end; procedure TForm1.ComboBox4Change(Sender: TObject); be

Strona 17 - http://forum.sparkfun.com/

113 begin IdTelnet1.Connect; if ((pswd <> '') and (pswd <> '0')) then IdTelnet1.IOHandler.WriteLn(psw

Strona 18 - Figure 8. Delphi 2009 GUI

114 wait(500); IdTelnet1.IOHandler.WriteLn('servo=0'); wait(500); IdTelnet1.Disconnect(); end; application.Te

Strona 19

115 serv := 0; rst := 0; command_ok := 0; // checking if file exists if not FileExists(ExtractFilePath(Application.ExeName) + 'setup.in

Strona 20 - [source: DSL-G684T Manual]

116 memo1.Lines.Add(Buffer); if ((pos('photo=',Buffer) <> 0)and(length(Buffer) < 12)) then begin trackbar3.Position

Strona 21

117 begin panele_false(); panel_login.Visible := true; end; procedure TForm1.menu_helpClick(Sender: TObject); begin if menu_help.Caption = &ap

Strona 22 - Figure 14. Hextronik HXT900

118 Appendix E  project on CD Attached CD contains: - three formats .doc, .docx and .pdf, - WCC (WirelessControlClient) appli

Strona 23

12 2.2. Arduino Uno Arduino is an open-source electronics prototyping platform cased on flexible, easy-to-use hardware and software. I

Strona 24

13 provided mostly in wiki-like and forum form which is bothersome when meeting problems during development process. Experience shared with othe

Strona 25

14 communication over USB (available on digital pins 0 RX and 1 TX). After connecting to the PC it appears as a virtual com port to software on the c

Strona 26

15 There are many reasons for choosing this solution as base for whole project. First of all I have assumed that in this case reinventing the wheel

Strona 27 - Figure 19. BlackBox’es

16 2.3. WiFly Shield As Arduino Uno which plays role of the motherboard is very capable of talking and listening (controlling I/O), it i

Strona 28 - Figure 21. Shutter mechanism

17 - 8 - Two forums Arduino9 and SparkFun10 Overview - Fully Qualified and Wi-Fi Certified 2.4GHz IEEE 802.11

Strona 29 - Figure 24. Power.Guy battery

18 2.4 CodeGear Delphi Next decision I had to make was the way of communication from the side of the computer. As nowadays the programming lan

Strona 30 - Figure 26. BlackBox - final

19 Unit III Conception of Control System 3.1. The idea Every project begins with the idea. In this case the main idea was to control servomotor v

Strona 31

2 STATEMENT OF ORIGINALITY Aware of criminal liability for making untrue statements I declare that the following thesis was written personally by

Strona 32 - See page 61

20 Figure 10. D-Link DSL-G684T ADSL2+ 54M Wireless Router w/ 4 Port 10/100 Switch [source: DSL-G684T Manual] Technical Specifications: Picture

Strona 33

21 Picture 12. Physical and Environmental Specification [source: DSL-G684T Manual] Picture 13. Wireless Specification [source: DSL-G684T Manual]

Strona 34

22 3. As a control system I have used Arduino Uno mainboard with additional WiFly SparkFun shield. Both are described with technical specificati

Strona 35

23 5. As all new inventions without the suggestion of application are rather meaningless, 

Strona 36 - delay(1000);

24 3.2 Applications The main issue of new inventions are the applications. History of human kind is full of meaningless gadgets created without expl

Strona 37

25 subject, as well as capabilities of creating really complicated advanced projects that demands advanced knowledge for students familiar

Strona 38

26 Unit IV Implementation of Control System 4.1 Hardware Process of creation of the hardware aspect of the project was rather not c

Strona 39

27 two legs, connection pin to voltage, so that we read a HIGH. For the convenience of the user additional LED is placed into the circuit. When butto

Strona 40

28 the absence of light, its resistance increases dramatically. In this case due to the analog input photocell is connected to its range is betw

Strona 41

29 servomotor any other way will damage it. To place servomotor with blind on it I have used a stand based on three screws with spring bumpers. Whe

Strona 42

3 Sincere thanks to prof. dr hab. Inż Zygfryd Głowacz for a thematic approach and his help during the writin

Strona 43

30 Model : Portable Power Pack D.2200. Input : 5V Micro USB Output : 5-5.5V  700mA Battery Type : 3.7V  2200mAh Finished Control System After fin

Strona 44

31 4.2 Software The software prepared for the project consists of two parts. First one is the application written for control board. T

Strona 45

32 ARDUINO It all began with the installation of the Arduino board on my PC. As it is written in  11 guide all went smooth and

Strona 46

33 viod setup()the board. Third one is void loop()

Strona 47

34 At the beginning to control servomechanism it needs to be defined. To do this        

Strona 48

35 At the end of the setup section we check if the SPI-to-UART bridge is initialized successfully (SPI_Uart_Init()) and afterwards if wireless

Strona 49

36 if ((get == 1)||(post == 1)) { Serial.println("\n\rConnection opened."); HTML_print("<html>");

Strona 50

37 In the earlier version of the project communication was based on the HTTP instead of the telnet protocol. That is why in this section an example

Strona 51

38 // Exit command mode if we haven't already SPI_Uart_println(""); SPI_Uart_println("exit"); delay(500);

Strona 52

39 Serial.print("Set security phrase to "); Serial.println(auth_phrase); // Set localport to <port_listen> SPI_Uart_

Strona 53

4 Table of Contents Unit I A Little bit of theory ... 6 1.1

Strona 54

40 itoa (myservo1.read(), val2, 10); SPI_Uart_print("servo1="); SPI_Uart_print(val2); delay(90); }

Strona 55

41 Above Have_Client(void) is presented. This is the first procedure that is called in the loop section to check whether client requests something

Strona 56

42 void Parse_Request(void) { int j = 0, k = 0; String temp = ""; inc_data_all = ""; post = 0; get = 0; while(j <

Strona 57 - Conclusion

43 } else { j++; } } // if (post == 1) // check if incoming package is POST // { // inc_data_all.trim(); // //

Strona 58 - Bibliography

44 // myservo_pos = 0; // //convertion ascii to integer // for (int i = 0; i < temp.length()-1; i++) // { // myservo_p

Strona 59 - Census figures

45 temp.charAt(i) - '0'; } Serial.println(myservo_pos); myservo.write(myservo_pos); SPI_Uart_print("OK"); F

Strona 60

46 if (inc_data_all.indexOf("photo") != -1) { if (inc_data_all.indexOf("photo=1") != -1){ photo = 1; } els

Strona 61 - Appendixes

47 Parse_Request is a function that does not return any value. It is responsible for determining the syntax of incoming request/comman

Strona 62

48 - TELNET  to communicate with control system telnet protocol is used. When command sent to Arduino is not one from above it

Strona 63

49 During designing process issue with saving data that will not disappear after cutting out the power appeared. To solve this problem I have cr

Strona 64

5 Introduction World runs faster and faster everyday. New inventions appear in every corner of the world. This is the fact. B    

Strona 65

50 DELPHI (win32) In the second stage the time for pc application has come. Delphi is the object-oriented programming language base

Strona 66

51 4. Login As simple as it sounds to enter software we need to log in. This most basic protection prevents unwanted people or software

Strona 67

52 6. Settings This is the part of the program were four groups of settings can be found. Basic:  SSID  ssid of the network we want control syste

Strona 68

53  DNS Address  DNS Name  DNS Backup  Connection Password  additional security measure. When set up no one without it will be able to chang

Strona 69

54 4.3 Observations During many tests conducted in the process of projecting and creating Control System I have noticed series of pros

Strona 70

55 achievable. As always those are the values from perfect conditions. In real life range did not exceeded 100 meters outdoor in building area. Influ

Strona 71

56 Unfortunately prototype device I have prepared is not flawless. During tests I have noticed specific situations when WCS hangs up and needs reset.

Strona 72

57 Conclusion To sum up I believe that solution I have implemented to resolve the problem of the wireless control system of the servomotor h

Strona 73

58 Bibliography Literature 1.       Reilly, First Edition, October 2008, 2. Tom Igoe, Making Thi

Strona 74

59 Census figures Figure 1. Construction of the servomotor ... 6 Figure 2

Strona 75

6 Unit I A Little bit of theory 1.1. Servo  What and how To start solving the problem of wireless control system for servomotor we must be aware

Strona 76

60 Figure 31. WirelessControlClient Login screen ... 51 Figure 32. WirelessControlClie

Strona 77

61 Appendixes Appendix A  Arduino Uno Schematics ... 62 Appendix B

Strona 78

62 Appendix A  Arduino Uno Schematics Figure 34. Arduino Uno schematics [source: http://arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf]

Strona 79

63 Appendix B  WiFly SparkFun Schematics Figure 35. WiFly shield from SparkFun [source: http://arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf]

Strona 80

64 Appendix C  Arduino Source Code #include <string.h> #include <Servo.h> #include <EEPROM.h> // SC16IS750 Register Definitions

Strona 81

65 #define XON1 0x04 << 3 // Xon1 word[5] #define XON2 0x05 << 3 // Xon2 word #define XOFF1 0x06 << 3 // Xoff1 w

Strona 82

66 Servo myservo1; int myservo_pos = 0; int i = 0; int j = 0; int k = 0; int user = 0; char clr = 0; char polling = 0; int servo = 0; int photo = 0;

Strona 83

67 char auth_level[] = "4"; char auth_phrase[] = "dlink007"; char port_listen[] = "2000"; char channel[] = "6"

Strona 84

68 else{ Serial.println("Could not initialize bridge, locking up.\n\r"); while(1); } autoconnect(); } void loop() { //

Strona 85

69 HTML_print("</form>"); HTML_print("</br> "); HTML_print("this is example of use of the HT

Strona 86

7 designed to take position angle between 0 and 180 degrees. Most mechanisms have limiters that do not allow a greater swing of the shaft

Strona 87

70 current = digitalRead(inPin); if (current == HIGH && previous == LOW && millis()- firstTime > 200){ firstTime = millis(

Strona 88

71 // Set channel to <channel> SPI_Uart_print("set wlan channel "); SPI_Uart_println(channel); delay(500); Seri

Strona 89

72 if (current == LOW){ // reset the counter if the button is not pressed count = 0; } previous = current; // photocell value

Strona 90

73 myservo.write(myservo.read()-1); } } if(ph_val>val+5){ if((myservo.read()+1<=180)&&(

Strona 91

74 SPI_Uart_WriteByte(LCR, 0xBF); // access EFR register SPI_Uart_WriteByte(EFR, SPI_Uart_config.Flow); // enable enhanced registers SPI_Uart_

Strona 92

75 } long int SPI_Write(char* srcptr, long int length) // Write string to SC16IS750 { for(long int i = 0; i < length; i++) { spi_transfer

Strona 93

76 address = (address | 0x80); select(); spi_transfer(address); data = spi_transfer(0xFF); deselect(); return data; } char autoconne

Strona 94

77 Serial.println("'"); delay(100); Flush_RX(); delay(100); SPI_Uart_print("join "); SPI_Uart_println(ssid);

Strona 95

78 { int j = 0; while(j < 4000) { if((SPI_Uart_ReadByte(LSR) & 0x01)) { incoming_data = SPI_Uart_ReadByte(RHR); }

Strona 96

79 if ((inc_data_all.indexOf("GET") != -1)&&(k==0)) { post = 0; get = 1; k = 1; }

Strona 97

8 of the servos is a shaft of 1.5ms pulse length for the center position set. Deviate from this value causes the shift shaft move to the left or to t

Strona 98

80 // } // else // { // k = inc_data_all.indexOf("&", inc_data_all.indexOf("poh=")+4)+1; // Seri

Strona 99

81 if (inc_data_all.indexOf("pos=") != -1) // new position for servo from telnet { temp = ""; for (j = inc_data_all.i

Strona 100

82 } myservo_pos = 0; //convertion ascii to integer for (int i = 0; i < temp.length()-1; i++) { myservo_pos = (myse

Strona 101

83 else{ servo = 0; } inc_data_all = ""; SPI_Uart_print("command-OK"); } if (inc_data_all.indexOf(

Strona 102

84 } } void Save_To_EEPROM(String data) //saves settings to EPROM { int start = 0; byte c = 255; for (int i = 0; i < 1023; i++) {

Strona 103

85 { for (int i = 0; i < 1023 ; i++) { Serial.print(EEPROM.read(i), BYTE); } } char Wait_On_Response_Char(char num) // Wait on char num

Strona 104

86 void HTML_print(char *data) // Write <data> to THR of SC16IS750 followed by a delay { SPI_Uart_WriteArray(data,strlen(data)); delay(30)

Strona 105

87 Appendix D  Delphi Source Code unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialo

Strona 106

88 Memo1: TMemo; Label1: TLabel; Panel_settings: TPanel; Button2: TButton; Button3: TButton; Label10: TLabel; Panel_about

Strona 107

89 ComboBox3: TComboBox; ComboBox2: TComboBox; Label22: TLabel; Label23: TLabel; Edit11: TEdit; Edit6: TEdit; Label7: TLa

Strona 108

9 1.2. Wireless Network  802.11 Since the beginning wires were the main restriction of every control mechanism. Due to this limitation human f

Strona 109

90 Edit21: TEdit; Label37: TLabel; TrackBar1: TTrackBar; Label50: TLabel; Label51: TLabel; TrackBar2: TTrackBar; TrackBar

Strona 110

91 CheckBox3: TCheckBox; Edit7: TEdit; Label9: TLabel; procedure Button1Click(Sender: TObject); procedure IdTelnet1DataAvailable(

Strona 111

92 procedure CheckBox2Click(Sender: TObject); procedure Button10Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); proce

Strona 112

93 begin while command_ok = 0 do begin Application.ProcessMessages; end; wait(200); end; procedure TForm1.panele_false(); begin

Strona 113

94 edit13.Text := Decrypt(INI.ReadString('Main','login','')); edit14.Text := Decrypt(INI.ReadString(&ap

Strona 114

95 else if auth = 'AUTO' then ComboBox1.ItemIndex := 5; if ComboBox1.ItemHeight = 1 then begin edit20.Vis

Strona 115

96 Edit11.Text := copy(find_str('IP=', memo2.Lines.Text), 0 ,length(find_str('IP=', memo2.Lines.Text))-5); Edit5.Text := copy

Strona 116

97 label31.Caption := 'Conncected'; end; 2: begin label31.Font.Color := clRed;

Strona 117

98 begin label28.Font.Color := clWindowText; label28.Caption := 'Contracted'; end else be

Strona 118

99 wait(3000); application.MessageBox('Servo information turned off','OK', MB_OK); IdTelnet1.IOHandler.WriteLn(

Komentarze do niniejszej Instrukcji

Brak uwag