Presentation is loading. Please wait.

Presentation is loading. Please wait.

CCN CCN Central Control Network Part A presentation Winter & Spring 2002/03 Student : Kormas Tal Guide : Gerber Alex.

Similar presentations


Presentation on theme: "CCN CCN Central Control Network Part A presentation Winter & Spring 2002/03 Student : Kormas Tal Guide : Gerber Alex."— Presentation transcript:

1 CCN CCN Central Control Network Part A presentation Winter & Spring 2002/03 Student : Kormas Tal Guide : Gerber Alex

2 CCN CCN - motivation Many systems around the world use central computer for security devices (such as entrance and security cameras). Most of the devices are low resource requires and so many could be connected to one computer. We would like to take advantage of the USB port speed and availability, and implement multiple area network (a separate bus for each area) connected to it.

3 3 CCN - functional Devices Data base Internet Users Future

4 USB HUB תור FIFO עם זכרון CAN BUS CAN to USB & Can Master CCN CCN – block diagram view אלמנט תקשורת ושליטה Nice for a future project Future

5 CCN CCN – main idea Each device uses bus interface to connect a CAN bus. Each level/area have it’s own bus. All buses controlled by a master device, which also convert the CAN protocol into USB protocol. All the Can Masters outputs (USB) are connected to a USB Hub (which is power supplied, so the net will keep working when communication to the computer N/A). The hub connected to a memory unit for keeping the data in a FIFO line if the computer is down.

6 6 CCN – main idea (cont) The data from the devices is inserted to a Database on the computer side. The users connect to the computer and login. Each user have links to is devices. The user can look on the data received from his device and configure them, according to his permissions. As a conclusion : The project is a very interconnected with other devices, both networked (CAN/TCP/USB) and both functionality (door opener/cameras and etc.)

7 7 CCN - Interfaces There are 3 main interfaces on this project: 1) devices interface with the network bus using CAN protocol (ISO/IS 11898-2 ) 2) buses interface with the PC using USB protocol. 3) users interface with the PC and data using TCP/IP protocol.

8 8 CNN – spec Since CAN bus can support 1024 devices, and it’s throughput is 125KB/sec. And Since USB 1.1 (slow) can support 12MB/sec. And Since there is no limit to hub usage. We could support up to about 100 full buses (or more if it’s not full). TCP/IP rates are network based (since each user could be connected in a different speed).

9 9 CCN - Software התוכנה הבסיסית כוללת 2 תהליכונים: אחד הוא הראשי והמאתחל, השני הוא המאזין על ה USB. עבור כל הודעה שמתקבלת נפתח תהליכון חדש, לטיפול בהודעה הזו. אותו תהליך בודק את המידע שהתקבל ומבצע את הפעולות שהוגדרות עבור קבלת המידע ע"י אותו רכיב (ע"י קריאה ממסד הנתונים).

10 10 CCN – Devices 1.Input : CAN packet p (this will be done one thread for 1 packet) 2.IF p.data.cont then 3. Act recording to the data(add/remove). 4.ELSE 5. db.(p.dev).data(time) = p.data 6. if(irreg(db.(p.dev))) do db.(p.dev).irlist 7. else if(ok(db.(p.dev))) do db.(p.dev).oklist 8. else do db.(p.dev).failist 9.End if 10.return

11 11 CCN – Devices database Database for device contains the following data for each: 1.device name 2.Device type 3.configures (i.e. good time, legal users list) 4.list of devices for irregularities. 5.list of devices for legal operations 6.list of devices for illegal operations. 7.What data is considered good.

12 12 CCN – log Database Each line at the log has: Device ID Device name Time Irregularly flag OK flag

13 13 CCN – implementation notes The computer OS: windows 2000 I’m using C# to implement the software, and Microsoft SQL Server for the database. I’ll use the SQL server to also log the operation made by the users for the administration side. NOTE : there is special user “admin” which will have a different kind of page, and could control all users and devices. He is the manager of the system.

14 14 CCN – course of development First I had to verify that the master device works properly. It took some time to understand it’s demo program. Then developing the software on C# was needed, and this was problematic. Connected the bus with the SQL. Wrote a program for simulating 2 clients on the bus. Connected a PIC device to the bus and check working with it. Developing CANopen layer for the program (only PDO). This is done with Konstantin, and not yet completed.

15 15 CCN – Test Spec The project was checked using a know working devices. One CAN bus was used. It had 2 devices connected to the bus. Data was received and translated correctly. The data received from the package, is causing a correct data fetch for the device who sent it, and followed by a correct sequence (O.K / Fail / Irregularity)

16 16 CCN – Software checks I’ve checked my software as follow: 1)Devices work : checked that I get the messages on the bus from a debugger connected to the bus. 2)Database insertion work: checked that when a device message receive, it’s inserted to the right place on the database. 3)Data decision work : checking correct time, check if the data correct. I’ve checked 2 different devices, with all the possibility groups (OK / Fail / Irregularity)

17 17 CCN – what already done הפרוייקט אופיין תיאור התוכנה הושלם צבירת ידע בשפת התכנות ורקע בנושא מסדי נתונים. הוכנו מצבורי ידע בנושאי התוכנה (כמו הגנת אתרים וכו'). נכתבה ונבדקה התוכנה עבור Can Bus יחיד (עם מספר אלמנטים) וללא משתמשים.

18 18 מה למדתי ראשית למדתי להשתמש ב C# ובסביבת פיתוח.Net למדתי להמיר קוד משפת C++ לשפת C#. למדתי כיצד עובד קישור ספריה דינמית עבור פונקציות להעתקת classes או זכרון. למדתי כיצד לכתוב שאילתות ב SQL, כיצד להגדיר ולשנות הגדרות של טבלה. למדתי ליישם את החומר הנלמד לגבי transactions ו concurrency. השתמשתי בחומר התאורתי לצורך יישום וחשיבה על פרוטוקול התקשורת על ה bus (פרוטוקול דמוי PCI לעומת פרוטוקול CANopen וכו).

19 19 CCN – why not… Why not single user? Single user cannot secure a large site, we want to allow more users, each securing a smaller area. Why not single bus? Single bus won’t allow large number of devices, and we’ll be limited by CAN max throughput.

20 20 CCN – why not…(cont) Why using hub? since we are limited on the number of USB’s connectors to a single computer -> HUB.

21 21 CCN – Next Step יש לסיים את מימוש הפרוטוקול (CANopen) יש להזמין USB Hub. יש להוסיף עוד buses למערכת ולהרחיב את התוכנה לתמוך בכולם. יש לכתוב את התוכנה עבור משתמשים. יש לבדוק את המערכת השלמה ולהוסיף עליה הגנות (נגד פריצה).

22 CCN – part 2 timetable סיום מימוש הפרוטוקול : 10.4.03 הוספת Hub ו Buses : 31.4.03 כתיבת התוכנה עבור המשתמשים : 31.5.03 סיום של כל הבדיקות, הוספת ההגנות וכו': 31.6.03 הגשת הפרוייקט : עד ה 20.7.03


Download ppt "CCN CCN Central Control Network Part A presentation Winter & Spring 2002/03 Student : Kormas Tal Guide : Gerber Alex."

Similar presentations


Ads by Google