D-Link DSL-G684T Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Vernetzung D-Link DSL-G684T herunter. D-Link DSL-G684T User manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 118
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 0
1 2 3 4 5 6 ... 117 118

Inhaltsverzeichnis

Seite 1

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

Seite 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

Seite 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

Seite 4 - Table of Contents

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

Seite 5 - Introduction

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

Seite 6

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

Seite 7

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

Seite 8

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

Seite 9

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

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

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

Seite 11 - Unit II Hardware/software

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

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

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

Seite 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

Seite 14

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

Seite 15

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

Seite 16

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

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

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

Seite 18 - Figure 8. Delphi 2009 GUI

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

Seite 19

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

Seite 20 - [source: DSL-G684T Manual]

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

Seite 21

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

Seite 22 - Figure 14. Hextronik HXT900

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

Seite 23

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

Seite 24

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

Seite 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

Seite 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

Seite 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

Seite 28 - Figure 21. Shutter mechanism

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

Seite 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

Seite 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

Seite 31

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

Seite 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

Seite 33

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

Seite 34

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

Seite 35

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

Seite 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

Seite 37

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

Seite 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

Seite 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

Seite 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

Seite 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

Seite 42

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

Seite 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

Seite 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

Seite 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

Seite 46

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

Seite 47

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

Seite 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

Seite 49

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

Seite 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

Seite 51

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

Seite 52

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

Seite 53

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

Seite 54

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

Seite 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

Seite 56

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

Seite 57 - Conclusion

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

Seite 58 - Bibliography

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

Seite 59 - Census figures

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

Seite 60

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

Seite 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

Seite 62

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

Seite 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

Seite 64

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

Seite 65

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

Seite 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

Seite 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

Seite 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

Seite 69

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

Seite 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

Seite 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.

Seite 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

Seite 73

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

Seite 74

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

Seite 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

Seite 76

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

Seite 77

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

Seite 78

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

Seite 79

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

Seite 80

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

Seite 81

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

Seite 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;

Seite 83

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

Seite 84

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

Seite 85

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

Seite 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

Seite 87

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

Seite 88

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

Seite 89

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

Seite 90

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

Seite 91

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

Seite 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

Seite 93

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

Seite 94

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

Seite 95

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

Seite 96

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

Seite 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

Seite 98

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

Seite 99

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

Seite 100

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

Seite 101

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

Seite 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++) {

Seite 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

Seite 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)

Seite 105

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

Seite 106

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

Seite 107

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

Seite 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

Seite 109

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

Seite 110

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

Seite 111

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

Seite 112

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

Seite 113

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

Seite 114

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

Seite 115

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

Seite 116

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

Seite 117

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

Seite 118

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

Kommentare zu diesen Handbüchern

Keine Kommentare