ZigBee Calvin Choy David Kim Jason Chong Devin Galutira
Project Focus Universal switching to make Archimedes projects wireless (i.e. toys) To update and improve the previous ZigBee design i.e. Adding a sleep function, LED indicators i.e. Adding a sleep function, LED indicators Create a manual for students and non-ZigBee people and documentations.
Overall Block Diagram of System Switch Picaxe Switch Relay Encoder sleep sleep data in XBee (Transmit) XBee (Receive) Picaxe
Receive Module Schematic Relay Sw 4 Relay Sw 5 2 XBee PicAxe Sw 2 Sw 3 Sw out0crtlA out1 out2crtlB crtlC I/O A O/I A I/O B I/O C O/I C O/I B out4out3 out5 out6 UART out in7 out7 sleepCD4066BC Quad Bilateral Switch 18X
Transmit Module Schematic 3 XBee PicAxe 7 8:3 Demux Sw5/in4 Sw1/in3 Sw2/in2 Sw3/in1 Sw4/in0 A0 A2 A1 in1 in0 in7 out7 out6 UART IN sleepM74HC148 8 to 3 Priority Encoder 18X
Transmit Circuit
Receive Circuit
Design Features Programmable “Out of Box” Design Integrated Jacks Integrated Jacks Inputs on Transmitter Outputs on Receiver On/Off Switch On/Off Switch External Reset Buttons External Reset Buttons External Serial Connection External Serial Connection
Hardware Design Decisions Picaxe Microcontroller: 18X Cheap, easy to program, versatile Cheap, easy to program, versatile Zigbee Modules: Xbee chip Cheap, low power usage, Cheap, low power usage, 8:3 Priority Encoder: M74HC148 8:3 Priority Encoder: M74HC148 to accommadate a large number of inputs to a small number of pins to accommadate a large number of inputs to a small number of pins Quad Bilateral Switch: CD4066BC Quick, cmos logic Quick, cmos logic Doesn’t care about polarity of switch connected Doesn’t care about polarity of switch connectedPCBexpress Reasonably priced for professional PCBs Reasonably priced for professional PCBs
Transmitter Software Design Decisions 1 - Loop: continuosly checks to see if a switch is pressed 2 - If statements & ANDs used to determine which switch is pressed 3 - Gotrans functions used to send serial data to Zigbee Loop: high 6 if pin7=0 and pin0=1 and pin1=1 then Gotrans5'Sw5/Relay if pin7=0 and pin0=1 and pin1=0 then Gotrans4'Sw4/Relay if pin7=1 and pin0=1 and pin1=0 then Gotrans3'Cmos3 if pin7=1 and pin0=0 and pin1=1 then Gotrans2'Cmos2 if pin7=1 and pin0=0 and pin1=0 then Gotrans1'Cmos1 nap 2 goto Loop Gotrans5: low 6 pause 500 serout 7, T2400, ("5") goto Loop Puts Zigbee to sleep Picaxe takes a quick nap Wakes Zigbee up Data is sent to Zigbee
Receiver Software Design Decisions 1 – Serin receives in coming data 2 - If statements check to see contents of data and sends it to the corresponding function 3 – Switch function activates relay or bilateral switch main: let pins = % serin 7,T2400,b1 if b1 = "5" then Switch5 if b1 = "4" then Switch4 if b1 = "3" then Switch3 if b1 = "2" then Switch2 if b1 = "1" then Switch1 nap 2 goto main Switch5: let pins = % pause 100 let pins = % 'Reset pins to low pause 100 let pins = % pause 100 goto main
Old Transmit Module Protruding Output Jacks No Power Switch No Power Light No Sleep Mode PicAxe Program Port Resets Inside 4-Outputs
New Module - Outside Power Light Indicator Power Switch Integrated Outputs 5-Outputs
New Module - Outside External Resets External PicAxe Programmer