Overboard Expansion Board for actuation on Wireless Sensor Networks Se´rgio Miguel Rodrigues Teixeira Dissertation submitted to obtain the Master Degree in Electronics Engineering Jury Chairman: Professor Doutor Carlos Alberto Ferreira Fernandes Supervisor: Professor Doutor Rui Manuel Rodrigues Rocha Co-Supervisor: Professor Doutor Moise´s Simo˜es Piedade Member: Professor Doutor Francisco Andre´ Correˆa Alegria June of 2012 Abstract WirelessSensorNetworks(WSN)arewidelyemployednowadaysinavarietyofareas,likeenviron- ment, agriculture, buildings monitoring, among others. These are constituted by several nodes, being the amount of nodes dependent on the application. Each node is usually composed by a processing unit, sensors, a communication device and a power source. These networks, however, are limited to sensing tasks. In order to overcome this obstacle it is necessary to equip the nodes that constitute the network with actuation abilities. This inclusion permits these networks to accomplish distributed sens- ing and actuation tasks, Wireless Sensor and Actuator Networks (WSAN), using the sensors to gather information from the physical world and using it to instruct the actuators in making specific tasks. The useofactuatorscannotbeseenasaminormodificationtotheWSN.Fromthecommunicationprotocol viewpoint, the inclusion of actuator’s demands bidirectional communication and it is usually necessary toaddressseveralnodessimultaneouslytoallowmorecomplexactions. Therequirementsofbothnet- works can also vary, in WSN the main concerns usually are power consumption, latency and network lifetime, while in WSAN, since these have the ability to interact with the physical world, other concerns havetobetakenintoconsiderationusually,real-timeactionsandcommunicationreliability. The purpose of this work is the integration of actuation functionalities in WSN. In order to achieve thisgoal,thenodes,whichconstitutethebasicelementofWSN,willbeequippedwithadaughterboard capable of actuation operations, named Overboard. The Overboard is compatible with the MoteIST, MicaZ and Iris motes. The actuation functionalities available are the result of an analysis on the most common types of actuators used in WSAN, being these electric motors, solenoids and relays. The Overboard is also capable of interacting through automation protocols, with the purpose of control the devices connected through them, the protocols compatible are the X10, KNX and CAN Bus protocols. The Overboard is supplied by the node attached to it. In order to test the Overboard functionalities, a testmodeisavailable,whichallowsthecontroloftheboardthroughaconsole. Keywords: WirelessSensorNetworks,WirelessSensorandActuatorNetworks,Actuator’scontrol, AutomationProtocol’scontrol,Overboard,MoteIST. i ii Resumo Autilizac¸a˜oderedesdesensoressemfios(RSSF)emaplicac¸o˜esdemonitorizac¸a˜oe´ actualmente umaa´reaemcrescimento. Estassa˜outilizadasnamonitorizac¸a˜oambiental,naagricultura,nascidades, nas fa´bricas, entre outras a´reas. As RSSF sa˜o constitu´ıdas por no´s, sendo o nu´mero de no´s utilizado determinadopelaaplicac¸a˜o. Cadano´ e´ normalmenteconstitu´ıdoporumaunidadedeprocessamento, umouva´riossensores,umtransceptorparacomunicareumabateria. Apesardapopularidade,asRSSFesta˜olimitadasaactividadesdemonitorizac¸a˜o. Contudo,atrave´sda integrac¸a˜o de mecanismos de actuac¸a˜o, e´ poss´ıvel realizar operac¸o˜es de monitorizac¸a˜o e actuac¸a˜o, este tipo de redes sa˜o intituladas de Redes de Sensores e Actuadores Sem Fios(RSASF), utilizando os sensores para obter informac¸o˜es e, atrave´s destas, utilizar os actuadores para realizar tarefas pre´ determinadas. Ainclusa˜odeactuadoresexigealterac¸o˜esnacomunicac¸a˜oentreno´s,poisparacontrolar os actuadores e recolher informac¸a˜o dos sensores e´ necessa´rio comunicac¸a˜o bilateral, caracter´ıstica quena˜oe´ comumnasRSSF,e,paraoperac¸o˜esmaiscomplexase´ necessa´riotambe´macomunicac¸a˜o com va´rios no´s simultaneamente, com o intuito de coordenar a actuac¸a˜o entre os no´s. Devido a´s diferenc¸asentreosdoistiposderedes,estasteˆmnormalmenterequisitosdiferentes. Enquantoqueas RSSFteˆmcomoprincipaisprioridadesoconsumodeenergiaalateˆnciaeaautonomia,asRSASFteˆm comoprioridadesacapacidadeparaactuaremtemporealeafiabilidadedascomunicac¸o˜es. O objectivo deste trabalho e´ a integrac¸a˜o de funcionalidades de actuac¸a˜o em RSSF. Para realizar este objectivo, os no´s da rede em questa˜o sera˜o equipados com uma PCB, denominada Overboard, capaz de realizar operac¸o˜es de actuac¸a˜o. A Overboard e´ compat´ıvel com os motes, MicaZ, MoteIST e Iris. Atrave´s de va´rios estudos relacionados com as RSASF foram identificados os actuadores mais uteis,eocontrolodestesintegradonaOverboard,estessa˜oosmotoresele´ctricos,solenoideserele´s. A Overboard tambe´m e´ capaz de interagir com protocolos de automac¸a˜o, permitingo o controlo dos aparelhosligadosaestes,nomeadamenteosprotocolosX10,KNXeCANBus. Aenergiautilizadapela Overboarde´ retiradadono´ emqueestaesta´ fixada. Comoobjectivodetestartodasasfuncionalidades desta,ummododetestefoiimplementado,permitindoocontrolodestaatrave´sdeumaconsola. Palavras-chave: Redes de Sensores, Redes de sensores e actuadores, Controlo de actuadores, Protocolosdeautomac¸a˜o,Overboard,MoteIST. iii iv Contents Abstract i Resumo iii ListofTables vii ListofFigures x Acronyms xii 1 Introduction 1 1.1 Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 DocumentOrganization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 StateoftheArt 3 2.1 CharacterizationoftheActuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 DriversandControllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2.1 ElectricMotors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.2 PowerLineActuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3 IndirectActuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.1 X10Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3.2 CANBus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3.3 KNXProtocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3 SystemRequirementsandArchitecture 21 3.1 Actuator’sControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2 AutomationProtocolsInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3 RFCommunication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.4 MainHiroseconnector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5 RFconnector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.6 MCUInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4 OverboardDesign 35 4.1 HardwareDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.1.1 RS-232Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.1.2 CANInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.1.3 DirectActuationInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.1.4 Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 v 4.1.5 OverboardFunctionalDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.1.6 PowerBoardDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.2 SoftwareDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.2.1 DevelopmentTools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.2.2 ProprietaryProtocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.2.3 Overboard’sApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.2.4 MoteIST-OverboardApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.2.5 CANBusBoardTestApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5 PrototypesandResults 55 5.1 DevelopmentTools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.2 Prototypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 6 Conclusions 63 7 Annexes 65 7.1 BillofMaterials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Appendix 66 A Overboard’sBillofMaterials 67 B Overboard’sSchematics 71 C PICKIT3Pinout 75 D ServomotorsInterface 77 E PhysicalExternalInterfacetypes 79 F OverboardUserManual 81 Bibliography 147 vi List of Tables 2.1 Actuator’scharacterizationtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Commondrivemodesforbrushlessmotors . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1 ACpowerline,mainswitchingdevicesfeatures . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2 KNXdevicesavailableinbus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.3 CC1101mainfeatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.4 Characteristicsfordifferentantennasolutions . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5 Communicationprotocolsavailableinthehiroseconnector . . . . . . . . . . . . . . . . . 30 3.6 RFBoardconnector,pinfunctionalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.1 MarketanalysisofControllerareanetwork (CAN)transceivers . . . . . . . . . . . . . . . 36 4.2 MarketanalysisofBipolarDrivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.3 H-bridgelogic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.4 H-bridgelogic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.5 MCUfamiliesanalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.6 MCUfamiliesanalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.7 Overboard,communicationcharacteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.8 CommonAppliances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.9 Solid-StateRelay (SSR)analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.10 Optotriacanalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.11 Triacanalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.12 Actioncommandconstitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.13 Designatedmoduleconstitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.14 Protocol’sinformationrequirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.1 OverboardelectromechanicalCharacteristics . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.2 TestsDescription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.3 Overboardpowerconsumptiontests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.4 H-bridges,drivecapacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 A.1 Overboard’sBillofMaterials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 E.1 PEItypesandencoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 vii viii List of Figures 2.1 H-bridgesControlMethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 BipolarandUnipolarDrivers,respectively . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Steppermotors-(a)tobedrivenbyabipolar,(b)tobedrivenbyaunipolar . . . . . . . . 8 2.4 Microsteppingtimmingdiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.5 Servomotorrotationanglecontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.6 Triaccharacteristiccurveandsymbol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.7 Triac,controldiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.8 Triac,phasecontrolmethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.9 Triac,integralcontrolmethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.10 ElectromechanicalRelay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.11 Solid-StateRelayusingarelaytocontroltriac . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.12 Solid-StateRelayusingaLEDtocontrolaphototriac . . . . . . . . . . . . . . . . . . . . 13 2.13 Inductiveloads,protectingmeasures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.14 Inductiveloads,protectingmeasures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.15 X10signaltransmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.16 X10protocol,RFprotocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.17 CANBusnetwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.18 CANBusprotocol,Dataratevsbuslength. . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.19 KNXBusandmainnetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1 Overboard,blockdiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2 CM11,X10device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3 RS-232communication,blockdiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.4 TM13RFtransceiverfromMarmitek . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.5 WiringDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.6 KNXsamplenetworkwithseveraldevices . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.7 CANBusInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.8 51pin,Hiroseconnectordiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 RFBoardconnector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.1 Overboard,functionaldiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.2 PowerBoard,functionaldiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.3 MSP430ProgrammingInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.4 Overboardprotocolmessageconstitution . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.5 Overboard’sapplication,blockdiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.6 SystemInitializationfunction,code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.7 MainClockconfiguration,code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 ix
Description: