SSN Simple Sensor Network - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

SSN Simple Sensor Network

Description:

Austrian Association for Innovative Computer Science. 2. Agenda. InnoC. ... RS232 9600 baud 8-N-1 (to Master) TTL 0/ 5 V (between SSN switch and Device) 8/31/09 ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 21
Provided by: Rol672
Category:
Tags: ssn | baud | network | sensor | simple

less

Transcript and Presenter's Notes

Title: SSN Simple Sensor Network


1
SSN Simple Sensor Network
  • R. Stelzer, K. Jafarmadar, A. Dabrowski

2
Agenda
  • InnoC.at Who are we?
  • Motivation for SSN
  • What is SSN?
  • SSN Protocol
  • SSN Hardware
  • How to Use SSN - Light Following Robot
  • Discussion

3
InnoC.at
  • Non-profit organisation
  • Support motivation of comers in innovative
    computing

4
Main Projects
Simple Sensor Network MariaTheresia
Wiki http//wiki.atrox.at RobotChallenge http//w
ww.robotchallenge.at
5
Motivation
  • Similar sensors use totally different interfaces
  • Reimplementation and testing of interfaces wastes
    a lot of time
  • Make it easier to get into robotics hardware
  • Concentrate on logic algorithms instead of
    debugging hardware

6
What is SSN?
  • SSN stands for Simple Sensor Network
  • SSN is a protocol, which provides a uniform and
    simple "language" to communicate to a large
    number of different sensor and actuator devices.
  • A few functions (getdata, setdata, ...) can be
    used to retreive values from sensors respectively
    to set values of an actuator.

7
Why SSN?
  • Simple commands (GetData, SetData)
  • ASCII mode for immediate use testing
  • Based on standards (RS232, USB cables)
  • Modular, Plug and Play
  • Easy to implement
  • Scaleable
  • Open specification
  • Cheap

8
SSN Topology
  • Direct connect One sensor/actuator directly
    connected to the master (PC)
  • Connected via SSN switch / Cascaded via Port 0xF
  • I----I I-------------I I-------------I
  • I PC I---I Switch 1 I-F-I Switch 2 I
  • I----I I-------------I I-------------I
  • I---I I---I I---I
  • I A I I B I I C I
  • I---I I---I I---I

9
SSN Reply Request Cycle
  • Master sends request to SSN switch
  • SSN switch extracts address
  • SSN switch forwards complete packet to
    appropriate port
  • SSN switch waits for reply

I----I I----------I I PC I---I Switch
I I----I I----------I
3 8 I---I
I---I I A I I B I I---I I---I
) Address 0xF indicates cascaded SSN switches
this exception is not considered in this listing.
10
SSN Request Packet
  • Address halfbyte
  • 0x0 .. 0xE (port number of SSN switch)
  • 0xF .. cascading indicator
  • Command halfbyte
  • GetInfo
  • GetData
  • SetData
  • ) 4 variations (1 byte, 2 bytes, 4 bytes,
    \0-terminated string)
  • Data dependent on variation of SetData
  • Cascading headers are additional header bytes (1
    per hop)
  • First halfbyte 0xF .. cascading indicator
    instead of address
  • Second halfbyte port, where the next SSN
    switch is connected.
  • discarded, when passing on the packet

11
SSN Commands
  • Get general Information about Device
  • 0x0 ... getinfo short
  • 0x1 ... getinfo long
  • Get sensor value / actuator status
  • 0x2 ... getdata string (\0-terminated)
  • 0x3 ... getdata byte
  • 0x4 ... getdata 2 bytes
  • 0x5 ... getdata 4 bytes
  • Set actuator value / change sensor settings
  • 0x6 ... setdata string (\0-terminated)
  • 0x7 ... setdata byte
  • 0x8 ... setdata 2 bytes
  • 0x9 ... setdata 4 bytes

12
SSN Request Example
  • I----I I----------I
  • I PC I---I Switch I
  • I----I I----------I
  • 3 8
  • I---I I---I
  • I A I I B I
  • I---I I---I

We want to set the value of device B to 9
  • Request PC -gt Switch -gt Device B
  • 1st byte - 0x87 // sensor is attached to port 8,
    setbyte()
  • 2nd byte - 0x09 // value is 9
  • Reply Device B -gt Switch -gt PC
  • 1st byte 0x87 // request header

13
SSN Request Example - Cascading
  • I----I I----------I I----------I
  • I PC I---I Switch 1 I-F-I Switch 2 I
  • I----I I----------I I----------I
  • 3 8 4
  • I---I I---I I---I
  • I A I I B I I C I
  • I---I I---I I---I

We want to read the sensor value of device C
  • PC -gt Switch 1
  • 1st byte 0xFF // cascade via port F to next
    switch
  • 2nd byte 0x43 // sensor is attached to port 4,
    getbyte()
  • Switch 1 -gt Switch 2 -gt Device C
  • 2nd byte 0x43 // sensor is attached to port 4,
    getbyte()

14
SSN Reply Packet
  • 1st byte usually identical to header of request
    (address, command)
  • Additional data bytes dependent on request data
    type
  • ) Exception in case of timeout (recongnised by
    SSN switch), the 2nd halfbyte contains 0xF
    instead of the command

15
SSN Hardware
  • SSN switch
  • Microchip PIC16F877
  • USB type A sockets
  • Sensor/actuator Modules
  • Microchip PIC12F675/683 if sufficient
  • Communication
  • RS232 9600 baud 8-N-1 (to Master)
  • TTL 0/5 V (between SSN switch and Device)

16
Light Following Robot
  • Modules
  • Master device (notebook)
  • SSN switch
  • 2-channel LDR module
  • 2 motor driver modules
  • Topology
  • Switch
  • I---I-0--2-Channel-LDR
  • Master I I
  • I----I I I-1--Motor-Driver
  • I PC I----I I
  • I----I I I-2--Motor-Driver
  • I I
  • I---I-3--

17
Master Software
  • setbyte(0,1) // activate channel 1 (left) on
    port 0
  • leftgetbyte(0) // read value on port 0
  • setbyte(0,2) // activate channel 2 (right) on
    port 0
  • rightgetbyte(0) // read value on port 0
  • if ( left lt right ) // light is left -gt go to
    left
  • setbyte(1,100) // speed 100 on port 1 (left
    motor)
  • setbyte(2,200) // speed 200 on port 2
    (right motor)
  • else // light is right -gt go to right
  • setbyte(1,200) // left motor fast
  • setbyte(2,100) // right motor slow

18
Planned SSN Modules
  • Sensors
  • 2-channel ADC
  • Distance (Infrared, Sharp)
  • Angle (potentiometer)
  • Brightness (LDR)
  • 2-axis-accelleration (ADXL202)
  • Distance (ultrasonic)
  • Infrared (RC5-Signals)
  • Compass (CMP03)
  • Temperature (DS1820)
  • GPS (NMEA-1083)
  • Pushbutton/switch
  • Dimmer
  • ...
  • Actuators
  • Motorbridge (TC4424)
  • Servo
  • Stepper
  • LCD-Display (I2C)
  • Infrared (RC5-Signals)
  • Switch (relais)
  • ...

19
Sources Information
  • SSN specification FAQ on the webwiki.atrox.at/i
    ndex.php/SSN_Protokoll
  • Kits for SSN switch and modules available
    soonwww.innoc.atwiki.atrox.at/index.php/SSN_Modu
    le
  • Dont hesitate to ask for help with implementing
    new SSN modulescontact_at_innoc.at

20
  • Thank You for Your Attention!
  • supported by
  • www.distrelec.com
Write a Comment
User Comments (0)
About PowerShow.com