Home
wireless lan based infrared remote control - USQ ePrints
Contents
1. 75 Bes IVP Mo COCO LO Oy 76 2 Resource 76 E Project Gant Chart t dbi ed oai tum i d vet 78 12273 421501 l 1G E uuu yuuk 79 APPENDIX Tee Source ma S hu 80 FNC ode Modification NOU essed 81 mer IM IVC u unun u 81 T ICT 81 2 25 MO 95 pP Apple iPhone iu ens 117 Maiti Storyboard un 0 00542 92500 117 VADP DGC Sale kuu a un pa 118 uu RE 118 VIS WC OMOEA u y a uy 2 120 121 APPENDIX G Data 126 Gl 2 casa Aad EU act aad hla 127 5 2 Microphone Sound Input Module 135 GO ullead seu us Sau Sua ui a ua eo 138 G 4 Arduino compatible Uno Freetronics Eleven 139 G 5 Arduino compatible Uno Freetronics EtherTen 140 U O sires asec tutelae cand 141 MEGA 25005 u
2. In Digital Digital Out R4 2 3 R4 2 2 Figure 3 1 System Requirements Block Diagram 14 The Prototype hardware design Includes Wi Fi Infrared receive store and transmit microphone a control MCU with Web Server and a battery The final stages of the software design includes IR code learning and sending Wi Fi connected Web Server with HTML Web Pages an iPhone or iPad Application factory software reset user settings and a software controlled microphone gain A discussion group and user testing was performed to provide feedback on the design Security needs to be implemented Overall this project uses a number of relatively mature technologies that are integrated into the Prototype solution 3 2 Microcontroller MCU and IDE The Microcontroller MCU selected for Prototype 1 is the Arduino Atmel AVR328p It is an 8 bit 16 MHz MCU with 2 k SRAM 32 k Program memory and just enough I O to test concept The Arduino board contains a power regulator and an onboard USB to serial programmer The Arduino platform has been designed for rapid prototyping Arduino has set a standard for its header pin out which has been used with pluggable boards called Shields to add functionality to the project See Figure 3 2 Arduino Freetronics Eleven board Figure 3 2 Arduino Freetronics Eleven board 15 After initi
3. K K K K K K K K K K K K K K K K K K K K K K K K K gt K k gt K K K K K K K K K K K K K K K K K K K K K vold gURLdecode leave Just In case need to do performance testing again comment out to save memory jmp WPS E 0 so do not call again and again from main loop will reset to 0 in sendMyPage serial printIn gURLdecode if stremp gURL 0 home page i serial printIn gURL digitalWrite LEDpin HIGH digitalWrite pin IRMimic2 LRNRQ LOW reset any lockups should not need digitalWrite pin IRMimic2 SNDRQ LOW reset any lockups should not need else if stremp gURL L 0 LEARN home page serial printIn gURL L beep 50 PROMPT select button to learn SEND BUTTONS else if stremp gURL S1 0 SEND button 1 serial printIn gURL S 1 WiServer server task IR CSEL 1 WiServer server task IR SENDO WiServer server task CSEL 0 LEARN BUTTONS else if stremp gURL L1 0 LEARN button 1 Serial printiIn gURL L1 WiServer server task IR CSEL 1 WiServer server task IR LEARN WiServer server task IR CSEL 0 WPS S 0 dont need TODO Serial println pURLdecode WPS 5 0 j gt K K K K K K K K K K K K K K K K K gt K
4. 146 APPENDIX Fie Test u 151 Apple aun a au 152 MECU TIDE a u a 152 153 IR Controlling 154 ELO ed 155 H 6 Sound Pressure Level SPL Sensor ssiri 159 Power 161 APPENDIX T Desom uu aaa Sasa 162 1 1 Sub System Components and Tools 163 1 2 Project C halleuges and Delay yuy 2 u ee 163 1 3 MCU and Tesini ug D 163 14 IR Communications Testine ru ua Sy RO b l 163 I5 DPRObOE BID assqa Q mau huyu sa U 165 1 6 Web Server software library testing 166 L7 User Interface desten and testing uu u u u 166 1 6 Apple Xcode and iPhone Application 166 1 9 USB to RS232 Serial communications Ink 166 MOLD BOAEUS u et EE ete ei ipa 168 145 Basic IR
5. Distributor Login 137 www freetronics com mic 41272 Ne BaD uS L H5 THO mmm esusadr uadp eui Japun nua A eed me p Pid aod ATW un SATU nn rIL BL TIBZ33 g Ln JIH AAS 389 308 08 indu punog punog ABT png 01 272 indu AT T8 HE ANE E TUNS Wh BDIH 89055 ffedil ESO JL indinp BTH punog 5J s Hun PUNOG 21 Ju T m OWS L AriT XE Or 23 T2 Sue OG xg ou LIT 343 84155444 punog 52514 inding 795 um ay utd STU adut purus 119 H B TTS 208 B rez punas au 2 rodde urg nding SIH 138 G 3 Wi Fi CuHead Shield V2 www cutedigi com wireless wifi linksprite cuhead wifi shield v2 0 for arduino html then schematic link 8218 gee lal nm gt e
6. reg Li y 6 ROHS COMPLIANT m r FOOTPRINT 5 IMPATTO 2680 3 Arduino Uno R3 Front Arduino Una R3 Back Arduino Uno R2 Front Arduino Uno SMD Arduino Uno Front Arduino Uno Back Buy From Buy Arduino Store Distributors Overview The Arduino Uno is a microcontroller board based on the ATmega328 datasheet It has 14 digital input output pins of which 6 can be used as PWM outputs 6 analog inputs a 16 MHz crystal oscillator a USB connection power jack an ICSP header a reset button It contains everything needed to support the microcontroller simply connect it to a computer with a USB cable or power it with AC to DC adapter or battery to get started The Uno differs from all preceding boards in that it does not use the FTDI USB to serial driver chip Instead it features http arduina ccfen Main ArduinoBoardUno 19 10 2012 12 01 55 PM 142 Arduino ArduinoBoardUno the 16172 AtmegaSU2 up to version Ra programmed as USB to serial converter Revision 2 of the Uno board has a resistor pulling the 802 HWE line to ground making it easier to put into DFU mode Revision a of the board has the following new features 1 0 pinout added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin the IOREF that allow the shields to adapt to the voltage provided
7. 169 APPENDIX a ien 173 SOI Il e 174 List of Figures vel ptu sa 1 Pigure 25 y 622146 5 Figure 2 2 A Universal Infrared Remote Control Logitech Harmony 600 6 Figure 2 3 Vishay IR Receiver Block Diagram Vishay 2003 10 Figure 3 1 System Requirements Block Diagram 13 Figure 3 2 Arduino Freetronics Eleven boatrd 14 Figure 3 3 Arduino 2560 Mega board 15 Figure 3 4 Web Pase Navigation Flowchart 17 Pacure eb tuba Te usss amasaban 18 Web Page 18 Pigure 37 W D 49621500 0 eo 19 Figure 3 8 URL decode Error Web Page 19 Figure 3 9 iPhone Application User Interface 20 Figure 3 10 LinkSprite Copperhead Wi Fi shield V2 23 Figure 3 11 iPhone Ad Hoc connection SettIlngs
8. SEND button 4 if strcmp URL S4 0 i webpHOMEY return true j SEND button 5 if strcmp URL S5 0 i webpHOME return true SEND button if strcmp URL S6 0 i return true j SEND button 7 if strcmp URL S7 0 105 106 1 webpHOME return true LEARN button 1 if strcmp URL L1 0 WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print P web Learnl W1Server print lt b gt LEARN 1 lt b gt WiServer print P webBTN_ EXIT WiServer print P webB TN VER 33 WiServer print local str VER 33 WiServer print P webB TN EXIT2 VER 33 WiServer print P web END return true LEARN button 2 if stremp URL L2 0 WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print P web Learn2 WiServer print P webB TN EXIT WiServer print P webB TN VER 33 WiServer print local str VER 33 WiServer print P webB TN EXIT2 VER 33 WiServer print P web END return true j LEARN button 3 if stremp URL L3 0 WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print P web Learn3 WiServer print P webBTN_ EXIT WiServer print P webB TN VER 33 WiServer
9. 41 5 6 Automatic Volume Control Algorlthm 41 5 7 Power System and Energy 88 tates ti 41 Chapter 6 Conclusion and Further WoIrk 42 42 42 43 46 APPENDIX A SPCC UIC ALON 46 APPENDIX D S 48 Bl System Block DIIS FATULa c uy uuu u 49 2 System Requirements oe u uyu 50 System Requirements and Verification MatrIX 51 APPENDIX a 54 C P RiSKkuA 5252 06015 55 C 2 Assessment of Consequential Effects 56 APPENDIX D Focus Group Research auqa ua a e Ot e 57 D 1 Human Ethics Committee Application 58 13 2 Human Ethics Committee Approval uu ecu nte 70 D 3 Focus Group questions and user testing requirements 7 D 4 Results from Focus Grou u ua oe h s ben 72 Propress UM 73 APPENDIX E Project Management Plan PMP
10. IRMimic2 Zdefine IRMimic2 LRNRQ LOW Zdefine IRMimic2 SNDRQ LOW Zdefine pin LED PIEZO 9 define pin TEMP HUMIDITY 14 now use for reset factory default Zdefine pin MIC SPL 15 Zdefine pin IRMimic2 LRNERR 16 INPUT High level an error while learning Zdefine pin IRMimic2 RDY 17 INPUT Hign level chip 1s finished previous operation Zdefine pin IRMimic2 SNDRQ 18 OUTPUT define pin IRMimic2 LRNRQ 19 OUTPUT check if LRNERR is HIGH if it is make LRNRQ HIGH learn then RDY LOW LED will light define pin IRMimic2 CSEL 0 8 2 LSB least significant bit Zdefine pin IRMimic2 CSEL 1 3 3 Zdefine IRMimic2 CSEL 2 4 4 Zdefine pin IRMimic2 CSEL 3 5 5 Zdefine pin IRMimic2 CSEL 4 6 6 90 define pin IRMimic2 CSEL 5 7 7 MSB most siginificent bit int CSEL 0 memory 0 56 char cmd S S send default L learn HTML web page code web page constants in AVR flash memory const prog char web 5 PROGMEM lt DOCTYPE html gt lt html gt const prog char web blue PROGMEM lt body bgcolor Z00FFFF j blue const prog char web PROGMEM lt body bgcolor FF9900 gt orange const prog char web PROGMEM 4 lt bgcolor 00FFOO gt green const prog char web Awidth PROGMEM name viewport content width device width gt const prog char web SEND PROGMEM
11. NSURLRequest NSURLRequest requestWithURL NSURL URLWithString request 123 cachePolicy NSURLRequestUseProtocoICachePolicy timeoutlnterval 10 0 NSURLConnection connection NSURLConnection alloc initWithRequest request delegate self if connection Connect label text Connecting else Error P added th NSURLRequest NSURLRequest requestWithURL NSURL URLWithString cachePolicy NSURLRequestUseProtocolCachePolicy 10 0 request NSURLConnection connection INSURL Connection alloc initWithRequest request delegate self if connection Connect label text g Connecting else Error kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ff M P added th NSURLRequest NSURLRequest requestWithURL NSURL URLWithString cachePolicy NSURLRequestUseProtocolCachePolicy 10 0 request NSURLConnection connection NSURLConnection alloc initWithRequest request delegate self if connection Connect else Error http www youtube com watch v FXQiEfjiYns void connection NSURLConnection connection didReceiveData NSData data response NSString alloc i
12. command sent only once each time the button 13 pressed While learning a command the IR Mimic2 device tries to determine the correct way to repeat the sequence For common protocols it will be successful If it can t figure out how to repeat the command it will simply repeat the entire sequence captured during learning or about 650 mSec of the command sequence If the command was not repeated during learning it won t be repeated when IRMimic2 sends it IR Sensor power control The IR sensor module requires a small amount of operating current whenever it 15 powered For good battery life it is necessary to power down the IR sensor module except when learning The IR Mimic chip handles this automatically 131 3 Operating Voltage and Current 3 1 Detailed hardware specs on the chip Because this device 18 implemented using a Microchip 181 2420 chip the data sheet for that device available at www microchip com should be consulted if more information is needed 3 2 Operating voltage range PIC18LF2420 can operate at VDD VSS voltages over a range of 3 0 to 5 5 volts The Vishay sensor used on the PC board can also operate over this range 3 3 Current In order to achieve good transmitting range it 1 necessary to drive the IR LED with more current than the PIC chip can handle directly This is why an external transistor is used on the IRM2 pc board The IR LED current is applied in bursts so the average
13. Serial printIn int uip_conn gt appstate sentCount Serial print g URL Serial printIn gURL CALL gURLdecode in gURLdecode set jmp WPS 1 in the first line 5 gURLdecode Serial print sendMyPage Serial printIn int sendMyPage Serial println a sound feedback automatic volume hnt vol timeout 20 wait time before adjusting the volume hnt vol timeout 0 counter NNOLUME DOWN Q INNOLUME or using vol position counter VOLUME DOWN2 check and turn volume down now if vol timeout c gt vol timeout only check to turn volume up every few seconds VER37 VOLUME UP2 vol timeout 0 reset vol timeout vol timeout 1 Serial println vol_position debug delay 100 50 is good 116 117 F 3 Apple iPhone iPad F 3 1 Main Storyboard Build IRMCU Succeniiad 14 07 12 at 7 46 c ecc 8 2 Project i2 2 _____ Y Referencing Storyboard Segues Push 4 Referencing OL u New Referencing Outlet Volume UP Volume DOWN ncil 4 ect 2115 New Referencing Outlet Collection r Received Actions Button gt gt Touch 2 ERR 118 3 2 AppDelegate h AppDelegate h IRMCU
14. PIN irsend decode results results void setup Serial begin 9600 oerial printlmn Started 2 4 2012 04 15 6 29 50 added irrecv enableIRIn Start the receiver pinMode BUTTON PIN INPUT pinMode STATUS PIN OUIPUT hf Storage the recorded code int codeType 1 The type of code unsigned long codeValue The code value if not raw unsigned int rawCodes RAWBUF The durations if raw int codeLen The length of the code int 77 The RO5 6 toggle state Stores the code for later playback Most of this code is just logging void storeCode decode results results 4 codeType results decode type KR KK KK KK KK KK KK KK KK KK IK KK KK KK I KK KK KK IK KOK KOK KC K kc k ck ck kk kk kck K K ck kk kk codeType 1 JMP 2012 04 15 19 45 SUN added debug FORCE RAW KR KK KK KK KK KK KK kk kk kck kck KOK int count results gt rawlen if UNKNOWN 1 83 Serial println Received unknown code saving raw Serial sprintin IMP saving as 4 JMEP 2012 04 15 0190 39 9UN added codeLen gt 1 To store raw codes Drop first value gap Convert from ticks to microseconds Tweak marks shorter and spaces longer to cancel out IR receiver distortion for int i 1 1 lt codeLen i LE a
15. lt b gt LEARN 1 lt b gt const prog char web Learn2 PROGMEM lt b gt LEARN 2 lt b gt const prog char web Learn3 PROGMEM lt b gt LEARN 3 lt b gt const prog char web Learn4 PROGMEM lt b gt LEARN 4 lt b gt const prog char web Learn5 PROGMEM lt b gt LEARN 5 lt b gt const prog char web Learn6 PROGMEM lt b gt LEARN 6 lt b gt const prog char web Learn7 PROGMEM lt b gt LEARN 7 lt b gt const prog char webBTN PROGMEM lt p gt lt a href http 192 168 1 2 HELP gt HELP lt a gt lt p gt const prog char webBTN HELPa PROGMEM lt p gt lt a href http V const prog char webBTN PROGMEM HELP gt HELP lt a gt lt p gt const prog char webBTN DEFAULT PROGMEM lt gt lt type button value RESET TO DEFAULT VALUES onclick location href http 192 168 1 2 DEF gt lt p gt const prog char webBTN DEFAULTa PROGMEM lt p gt lt input type button value RESET TO DEFAULT VALUES onclick location href http V 94 const prog char webBTN DEFAULTb PROGMEM DEF gt lt p gt const prog char webBTN SAVE PROGMEM lt p gt lt INPUT type submit name SAVE SETTINGS gt lt gt const prog char web ERROR PROGMEM lt b gt URL ERROR lt b gt lt input type button
16. resume receiver digitalWrite STATUS PIN LOW lastButtonState buttonState 2 2 Main Arduino Note the font has been changed to fit more code per line File pde SServer v ersion number IDE Arduino 0023 needs this for the CuHead WiFi Shield NOTE unsuccessful testing In IDE 1 0 MCU Arduino Uno AVR328p 16MHz Shield 1 CuHead version 2 WiFi Shield 2 IRMimic2 IR Learning remote control 57 channel Project Name Wireless LAN Infrared Remote Control Author John Palmer john palmer eng gmail com Date 2012 38 This software controls the Wireless LAN Universal Infrared Remote Control The webserver uses the ASYNCLABS WiServer h Library Program overv1ew 15 Hardware I O setup Settings read from Factory settings ad hoc mode server started web page served URL decoded IR actions performed edit settings T return URL error MIC auto volume levels adjusted VER 0 Initial web server work done on EtherTen LAN Arduino board for learning and basic URL string decoding done Look at different example Included with WiFi module Determine which exapmle 15 best to work design from need server and client capability not all examples indicate this all examples tested and include file modified to sute VER 1
17. 25 Feur te IR Vie 2 Mosi odd 26 Figure 3 13 Freetronics microphone module with gain feedback resistor 28 Figure 3 14 DC power low pass filter and changed gain resistor 29 Figure 3 15 DC power low pass 1 i ER D e us 29 Figure 3 16 Software controlled microphone circuit 30 Figure 3 17 Assembled software controlled mticrophone 31 Figure 3 18 4 x 1 2 Volt NiMH size AA Rechargeable 32 Figure 3 19 Prototype 1 pin assignment 33 Figure 5 20 Prot otype 2 pin assignment oiin E NOU 34 Figure 3 21 Arduino Eleven IR development pin out 35 4 1 Prototype l assembled 36 Ligure 4 7 gt 2 u a u deed Sus 36 Figure 1 1 Measured IR wave forms using PC sound card 165 Figure I 2 DFRobot Arduino WIZnet Wi Fi Shield DFRobot 165 Figure I 3 Prolific USB to Serial RS232 converter 167 Figure I 4 PCMCIA Express Serial RS232 and Parallel card 167 Figu
18. FORM action http 192 168 1 2 method post gt const prog char web FORM end PROGMEM lt form gt const prog char web END PROGMEM lt body gt lt html gt void webpSET WiServer print P web START WiServer print P web green WiServer print P web Awidth WiServer print SETTINGS WiServer print SETTINGSI VER 30 WiServer print local str 30 WiServer print P web SETTINGS2 VER 30 WiServer print P web IPV WiServer print P web WiServer print local str VER 32 WiServer print P web IP2 WiServer print P web box0 N ER 32 95 WiServer print P web 1 WiServer print P web box2 WiServer print P web box3 WiServer print P web box4 WiServer print P web_ WLANmode WiServer print P web SECURITY WiServer print P web KEY WiServer print P webBTN HELPa WiServer print local str VER 38M WiServer print P webBTN WiServer print P webBTN DEFAULTa WiServer print local str VER 38M WiServer print Pe webBTN DEFAULTD WiServer print P webBTN SAVE WiServer print P web END void webpHOME t WiServer print P web START WiServer print P web blue WiServer print P web Awidth WiServer print P web SEND WiServer print P web SENDI WiServer print local str VER 31 WiServer print P web SEND2 WiServer print P web SEND3 WiServer print
19. time out as intermittent terminal connection drops out manufactures documentation poor not current power tried USB and 2 1 mm jack Wi Fi Shield indicator LEDs OK Wi Fi Shield connected after about 30 attempts but limited Results Very poor Wi Fi connection Pass Fail Follow up Action More testing required 156 TEST SHEET Test number Wi Fi 2 System Component Wi Fi shield type Wi Fi Shield V2 1 name Little Bird Electronics retailer DFRobot manufacture WlIZnet onboard Wi Fi module Arduino code library Arduino board Eleven Uno compatible Jaycar retailer Freetronics manufacture Notes Continue from Wi Fi test 1 e find faults trace circuit schematic measure power rails percussion test replace jumper pins replace USB cable flash firmware WIZnet program e use WIZnet configuration terminal e Use AT modem commands to configure 5 set IP address 10 0 0 61 set subnet mask 255 255 255 0 set gateway 10 0 0 138 set SSID WLANname set WPA WLANpassword set security type 2 for WPA mode Note WPA takes 30 seconds to start up where WEP takes 1 second wireless mode Infrastructure e lookat WLAN connectivity e Ping OK Not useful Web page connection Pass Fail Works but Fails requirements Follow up Action Try to buy a Wi Fi shield from a different Wi Fi module manufacturer who has support for a different library 157 Wi Fi 3
20. value EXIT onclick location href http 192 168 1 2 2 const prog char web PROGMEM lt b gt URL ERROR lt b gt lt input type button name cmd value EXIT onclick location href http V const prog char web PROGMEM gt const prog char webBTN PROGMEM lt p gt lt input type button value M1 TV onclick location href http 192 168 1 2 M1 gt lt p gt const prog char webBTN M2 PROGMEM lt p gt lt input type button value M2 DVD onclick location href http 192 168 1 2 M2 gt lt p gt const prog char webBTN PROGMEM lt gt type button value M3 PVR onclick location href http 192 168 1 2 M3 gt lt p gt const prog char webBTN M4 PROGMEM lt p gt lt input type button value M4 AMP onclick location href http 192 168 1 2 M4 gt lt p gt const prog char webBTN M5 PROGMEM lt p gt lt input type button value M5 LIGHT onclick location href http 192 168 1 2 M5 gt lt p gt const prog char webBTN M6 PROGMEM lt p gt lt input type button value M6 A CON onclick location href http 192 168 1 2 M6 gt lt p gt const prog char webBTN 7 PROGMEM lt p gt lt input type button value M7 WII onclick location href http 192 168 1 2 M7 gt lt p gt const prog char web FORM action PROGMEM
21. 121 F 3 5 ViewController m ViewController m IRMCU Created by John on 14 07 12 Copyright c 2012 _ __ rights reserved import ViewController h implementation ViewController synthesize label JMP synthesize response JMP implementation NetworkConnector JMP SimpleURL Connections Moss http developer apple com library ios samplecode SimpleURLConnections Introduc tion Intro html IBAction BTN IRMCU Fa IMI SACS tjus 77 http www youtube com watch v YY0iJ2MspYs amp feature related add code IBAction Link 51 10 ViewController h IRMCU URL with action S1 to IBAction here add single URL to button UP Tis II added Th l NSString post S1 NSData post dataUsingEncoding NSASCIIStringEncoding allowLossyConversion Y ES l NSString postLength NSString stringWithFormat d postData length NSMutableURLRequest request NSMutableURLRequest alloc init autorelease http www youtube com watch v F XQiEfjiYns NSURLRequest request NSURLRequest requestWithURL NSURL URLWithString 122 cachePolicy NSURLRequestUseProtocolCachePolicy 10 0 N
22. 127 IRMimic2 Leaming Infrared Remote Control Transmitter Updated 10 4 2011 1 General Description The IRMimic device is used in conjunction with an sensor module and IR LED to learn command sequences from standard consumer remote controls and retransmit them on command It is trainable so it can be used with remotes from many manufacturers It offers low power consumption and incorporates several features that add to its flexibility 11 Applications This device can be used either to make a custom remote control or to add remote control of some other equipment to device 1 2 Device Pinout 1 3 signal Description VDD 20 Vas 8 19 IRIN 12 ECN EFWE 24 28021 9 OBCZ 10 VISLED 15 14 ESVLD 11 13 16 17 CSEL ROYD 2 CSEL ROT 3 CSEL ROW2 4 CSEL ROWS3 5 CSEL ROW4 6 MCLE 1 21 LRNERR COL3 27 RDY COL2 26 SNDEQ COLI 251 LENRO COLO 24 RCVEPWE 231 MDE LENKY CSEL ROWS 22 ROW6 211 ROW 1 9 20 YDD OSC2 110 19 V552 RSYD 11 181 ESVD IRIN 12 17 ESVD RSYD 13 16 ESYD 14 151 VISLED Supply supply Bi dir Output Output Output Output Output Positive power supply voltage input Negative power supply voltage input Ground Demodulated signal trom detector low when IR signal 1s present Driven low as output when detector 1 powered down Power to detector receiver module High ON Crystal oscillator pi
23. N Md WWW N Md oon N Md oon N Md oon N Md oon N Md oon Md oon Md oon Md oon Md oon Md oon Md oon Md oon Md oon Md oon Md oon Md oon 00 MMA Ws 00 MMA Ws 00 MAX MAX MAX MAX MAX SS SSS S SSS N N 5 S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S S 5 5 S S 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N APPENDIX C Safety and Ethics 54 55 C 1 Risk Assessment There are a number of Hazards identified with the construction of this project Electrical Power Mains via DC adaptor and batteries and their charging Battery explosion fire Heat Soldering RF energy from the WiFi Module Electrostatic discharge Chemical solder fumes paint plastics Eating or chocking of packaging materials and small parts by chil
24. Originally IDE 1 0 was Installed and tested ok Then older example code would not compile Used IDE 0023 Version compatibility problems 153 Pass Fail Follow up Action Always check IDE and code versions H 3 Web Server TEST SHEET EtherTen Using Freetronics EtherTen board load test TCP IP program that uses HTML web address commands to toggle a LED ON OFF from a web page address string compile error cannot find string functions search internet for string libraries including AVR studio import and test other string functions limited improvement read through library header code use Arduino IDE 0019 Success difference between Arduino 1 0 latest and older versions to 0023 not documented on Arduino web site change file extensions naming not documented on Arduino web site need to change include lt Arduino h gt for string functions DFRobot Could not figure itout 0 WiShield V2 After having a lot of trouble with AsyncLabs files they were and Web Server worked Pass Fail Pass Follow up Action Extend WiShield AsyncLabs Web Server processing 154 H 4 Controlling Devices TEST SHEET Test number System Component IR Tx Rx subsystem Requirement Date Various 2012 Tester John Palmer Task Test basic IR Tx Rx Notes Install IR library Print receive codes in Serial Terminal ok Re transmit codes fail check circuit IR LED currents ok Use IR camera LED Is
25. These advanced methods are not designed for microcontrollers however they may work with the Microsoft embedded Operating System and needs to be researched further Protecting product design patents and market share 1s very important Codan 2012 Protecting the code inside the MCU from being copied is of concern Correct MCU selection can guard against copy protection attacks and competitors reverse engineering the design by ripping firmware Skorobogatov 2000 2004 MCUs contain a fuse bit that when burnt out or set prevents the flashed code from being read out This can overcome by copiers by dissolving the package and reading the memory optically direct from the surface of the IC chip Here the MCU manufacture Atmel backs up this claim Robust data security 15 absolutely essential today s information critical business environments But standard memories and conventional storage often don t provide enough protection Atmel 2012 Atmel MCUS are now available with a metal guard over the memory at the silicon level to stop memory contents being read optically As part of the Deployment of an Apple Application that connects to a remote device authentication between the Apple iDevice and the WLAN Infrared Remote Control hardware is required as a condition to the iDevice Application entering the Apple store Apple 2012 8 Atmel offers a hardware chip set for authentication the 985 10 5 1025 devices The 885
26. digitalWrite pin IRMimic2 LRNRQ HIGH CSEL 2 IR LEARNO else if strcmp URL L3 0 LEARN button 3 104 Serial println URL L3 digitalWrite pin IRMimic2 LRNRQ HIGH IR CSEL 3 IR LEARNO j else if strcmp URL L4 0 LEARN button 3 Serial println URL L4 digitalWrite pin RMimic2 LRNRQ HIGH IR CSEL 4 IR LEARNO j else if strcmp URL L5 0 LEARN button 3 t Serial println URL L5 digitalWrite pin IRMimic2 LRNRQ HIGH IR CSEL 5 IR 1 else if strcmp URL L6 0 LEARN button 3 t Serial println URL L6 digitalWrite pin IRMimic2 LRNRQ HIGH IR CSEL 6 IR LEARNO else if strcmp URL L7 0 LEARN button 3 Serial println URL L 7 digitalWrite pin IRMimic2 LRNRQ HIGH IR CSEL 7 IR 1 j finish URL calls serial printIn send web page pkt JMP Home web page if stremp URL 0 write page content from flash memory webpHOME return true SETTINGS if stremp URL ST 0 webpSET return true 1 LEARN home page if stremp URL L 0 webpLEARN return true SEND button 1 if stremp URL SI 0 i webpHOME return true SEND button 2 if stremp URL S2 0 i webpHOME return true SEND button 3 if strcmp URL S3 0 i webpHOME return true
27. pause trial 20 mS SEND SEND VOLUME DOWN AGAIN IR SEND called 0 void VOLUME UP2 RESTORE VOLUME int v MIC SPL analogRead pin MIC SPL if 100 gt v MIC SPL same as v SPL lt 0 VER35 increase to 100 if vol max gt vol position vol position lt vol max i vol position vol position 1 Serial printin v SPL call VOLUME DOWN with some smarts or toggle state variables if 0 IR SEND called IR SEND called 1 Serial printIn MIC VOLUME UP CSEL 1 SEND VOLUME UP IR SENDO delay 20 pause trial 20 mS SEND SEND VOLUME UP AGAIN IR SEND called 0 113 uQ uu sta void setup pinMode pin buttonl INPUT useded to reset to factory defaults pinMode pin MIC SPL INPUT 1nt IRMimic2 pins pinMode pin IRMimic2 RDY INPUT pinMode pin IRMimic2 LRNERR INPUT pinMode pin IRMimic2 LRNRQ OUTPUT pinMode pin IRMimic2 SNDRQ OUTPUT pinMode pin IRMimic2 CSEL 0 0UTPUT pinMode pin IRMimic2 CSEL 1 pinMode pin IRMimic2 CSEL 2 0UTPUT pinMode pin IRMimic2 CSEL 3 0UTPUT pinMode pin IRMimic2 CSEL 4 0UTPUT pinMode pin IRMimic2 CSEL 5 0UTPUT delay 200 rest digitalWrite pin IRMimic2 LRNRQ LOW digitalWrite pin IRMimic2 SNDRQ LOW delay 200 try to stop IRMimic2 from being in LEARN
28. Crossing the development chasm Electronics News Apr pp 14 17 Logitech 2012 Logitech Harmony Link Logitech Newark USA viewed 13 May 2012 lt http www logitech com en us 1225 8439 gt Microchip 2012 Home Page Chandler Arizona viewed 21st May 2012 lt http www microchip com gt 45 Neamen D 2007 Microelectronics Circuit Analysis and Design 3rd edn Mc Graw New York Shirriff K 2009 Ken Shirriff s blog viewed 18 March 2012 lt http www arcfn com search q IR gt Skorobogatov S 2000 Copy Protection in Modern Microcontrollers University of Cambridge Computer Laboratory viewed 11 2012 lt http www cl cam ac uk sps32 mcu_lock html gt Skorobogatov S 2004 Semi invasive attacks A new approach to hardware security analysis University of Cambridge Computer Laboratory viewed 11 May 2012 lt http www cl cam ac uk techreports UCAM CL TR 630 pdf gt STMicroelectronics 2012 Limiting MCU power consumption Electronics News Apr pp 20 21 Taitron 2007 Taitron Components 5 mm Infrared LED Valencia lt http taitroncomponents com gt ThinkFlood 2012a About ThinkFlood ThinkFlood Needham USA viewed 19 May 2012 lt http thinkflood com company about gt ThinkFlood 2012b RedEye Products ThinkFlood Needham USA viewed 19 May 2012 lt http thinkflood com products gt Thomas T 2004 Network Security first step Cisco Indianapolis USQ 2012 Human
29. Mark rawCodes i 1 1 gt 1 MARK_EXCESS oerral pruznc 3 J else rawCodes i 1 results rawbuf i USECPERTICK MARK EXCESS Serial prank s Serial print rawCodes i 1 DEC Serial orien else if 1 Serial print Received NEC if results value REPEAT Don t record a NEC repeat value as that s useless Serial println repeat ignoring return j else if codeType SONY Serial print Received SONY else if codeType RC5 Serial print Received RC5 else if codeType RC6 1 Serial print Received RC6 else Serial print Unexpected codeType Serial print codeType DEC Serial println results gt value HEX codeValue results gt value codeLen results bits void sendCode int repeat if codeType 1 if repeat 1 irsend sendNEC REPEAT codeLen Serial println Sent NEC repeat else irsend sendNEC codeValue codeLen 94 Serial print Jy Serial printin codeValue HEX else if codeType SONY 1 irsend sendSony codeValue codeLen Serial print Sent Sony Serial println codeValue HEX else if codeType RC5 RC6 if repeat 1 Flip the toggle bit for a new button press toggle 1 toggle Put the toggle bit into the cod
30. Rc Other Integrated U USB programming and communication port Many other one e wire multi wire wire LCD and expansion devices supported by free code and libraries Freetronics is an Australian company created by Jonathan Oxer and Marc Alexander to provide cheap and easy access to hardware parts and products related to Arduino projects and the Practical Arduino book Learn more at www freetronics cam Follow us on Twitter at twitter com freetronics 140 G 5 Arduino compatible Uno Freetronics EtherTen 8 2 USB MCU Digital 1 0 TX RX LEDs PM Reset button Power LED D13 LED ATmega328 primary ATmega328 ICSP header 4 w USB socket for host connection 1 ZI DIS 3 a k gt ii _ masa ATmegaBu2 7 E ICSP header EE LAN jack ibrh papt A6 A7 analog pins micro5D socket PoE header Analog input pins Power pins The Freetranics EtherTen is a microcontroller board which is 100 compatible with the popular Arduino Uno reference design while incorporating several updates and improvements and the addition of Ethernet networxing compatible with the Arduino Ethernet Shield reference design 2 1mm power input 7 12Vdc It provides a balanced combination of general purpose digital pins ana
31. 0 01 OV Status LED i Allows for higher 220 Q current Status LED 180 Q NPN BC549 100 5 V Push Button V out Normally Low O Push V out Button 10 5 V D Vishay IR Receiver With DC filter from Vishay Data Sheet IR 4 7 Receiver V out Figure I 7 IR circuit design and calculations 170 IR current limit resistor calculation R 5 0 7 1 2 0 080 38 750 Choose 39 Q 16 5 0 7 180 0 024 mA IR current limit resistor calculation 5 0 7 1 2 0 015 206 7 Q Choose 220 Q Each component will be tested before being soldered into circuit prototype shield 171 Figure 1 8 IR Tx Rx hardware Arduino EtherTen PROJECT pin assignment vsd Version 1 Date 2012 03 31 08 40 SAT 13 LAN SD LED 12 LAN SD 11 LAN SD 10 LAN select 1711 11171 Hot T 16 3 to 3 22 7 IR status LED 6 IR Button 111111 5 IR Rx 38 2 4 SD select 3 IR Tx 1 WiFi Tx 1 0 WiFi Rx Board Photo from Manufactures website www freetronics com Figure 1 9 Freetronics EtherTen IR Pin assignments 172 In initial testing of the IRremote h library not all bits in the signal were correctly decoded and transmitted This was verified using the PC audio card scope Zelscope software and Photodiode Trans impedance amplifier common circuit schematic is from Neamen 200
32. 01 283904 NPN transistor 92 2N3904F5 D1 IR LED QED234 234 512 0 234 02 LED 5mm Hi Eff Red LTL 307E 160 1705 Xl 6 5 MHz HC 49 Crystal 415 520 HCU650 20 R1 100 ohm 1 4 W resistor 1000 R2 RS 470 1 4 W resistor 47 R3 22 ohm 1 4 W resistor 220BK 240 ohm 1 4 W resistor 2400 R6 R7 Install both only if volt reg not used 0 00BK RB 10 ohm 1 4 W resistor 10 CA 4 7 50V electrolytic capacitor 25177 2 6 7 0 1 uF ceramic cap 0 1 leads 399 2127 C3 C4 22 pF ceramic cap 0 1 leads BC1005CT CS 1000 uF 16V electrolytic capacitor 25142 Jl Fin header 52011 36 Female connector for dl AsC20H Ribbon Cable P O MC20G 25 2 IC socket optional other sockets too ED332B 575 193328 Notes If voltage regulator is installed then install R6 to supply LED from 57 or install RT to supply IR LED from unrequlated voltage If regulator is not installed install both and to connect 5 to V and feed in a DC voltage that board can use directly To select keypad mode do not install Bs To select mode install R5 IEM II Parts Diagr aru TLDS Jl Ohm Lor DIELE 11213914 D2 Red LED http wuww tauntek con TR Mimi partz nlacersent 21 04 2012 2 29 11 100 RS 470 CT Aida 240 FA 470 RS 22 134 135 G 2 Microphone Sound
33. 1025 15 designed to be embedded in the product with an embedded 265bit key It uses SHA 256 and responds with a unique response when sent a challenge Atmel 2012b As encryption and security Is a large complex area of knowledge this will be implemented last 1f time permits 2 5 Wi Fi IEEE 802 11 Connectivity A Wireless Local Area Network WLAN allows connection and data transfer between computing devices The different IEEE 802 11 standards ensure different devices can connect without problems This project is concerned only with the 802 11 b g n modes that the iPhone 4 Apple 2012b and iPad 2 Apple 2012c can both support The MCU needs to support 802 11 b g n connectivity It is anticipated that only small amounts of data will need to be sent so the throughput speed 15 not critical There will need to be a balance of data throughput and power consumption with a power sleep mode to maximise battery life There are a number of different manufactures for Arduino Wi Fi Shield modules with Wi Fi connectivity they are DFRobot 802 116 11 5 5 2 1 Mbps DFRobot 2012 CuHead Wi Fi Shield 802 11b 1 2Mbit s CuteDigi 2012 There 1s a software library AsyncLabs 2012a and examples AsyncLabs 2012b Connection Mode can be either e AdHoc point to point e Infrastructure through a network Wi Fi Security modes No security WEP Wired Equivalent Privacy WPA Wi Fi Protected Access WPA2 Wi Fi Protected Access 2 For
34. PASS OK VER 35 automatic volume down tested VER 36 automatic volume down and up hysteresis loop testing OK VER 37 try delay on volume up VER 37M BRANCH CODE RUN ON MEGA2560 VER 38M uncomment soft IP for setting menu test on 8k SRAM MEGA2560 known bugs IRMImic2 starts up in learn mode sometimes have reset lines in home web page call but this is not a real fix need to determine startup states web server sometimes does not perform recompile and upload need to migrate code to AVR studio 6 and check SRAM usage TODO finish factory settings writeSettings remove unused variables Zinclude lt gt include lt EEPROM h gt JMP used to store settings define WIRELESS MODE INFRA 1 JMP define WIRELESS MODE ADHOC 2 JMP Wireless configuration parameters unsigned char local ip 192 168 1 2 IP address of WiShield unsigned char gateway 1 192 168 1 1 router or gateway IP address unsigned char subnet 255 255 255 0 subnet mask for the local network const prog char 8814 PROGMEM IRMCU max 32 bytes const prog char 5514 PROGMEM ASYNCLABS max 32 bytes unsigned char security type 0 0 open 2 3 WPA2 added by JOHN PALMER adhoc settings on iphon
35. Research Activity has been undertaken see results the Appendix D Key outcomes from the discussion group on interfaces indicated that users e like simple interfaces that they can see and read at night in low light levels e require prompting to navigate more complex navigation e like all in one universal remotes but don t like programming them most frequently use the volume and channel changing functions don t like dealing with batteries don t like obstacles blocking the Infrared beam have trouble finding their Remotes have difficulties with WLAN and computer networking This project will use an Apple iPhone or iPad as the control interface to the WLAN Infrared Remote Control and these user interface considerations will enter into the design 2 4 Security Security encompasses the access and the control of the system It also deals with protecting the integrity of the system from modifications and counterfeiters There are many areas and levels of security technology Access to the system can be controlled with user authentication using a login to stop any unauthorised control of equipment This could also allow for the use of ciphertext for network communications Thomas T 2004 simple method of encryption is to use the logic XOR function with a key to produce ciphertext ELE3305 2009 Higher level software methods use built m mature security modules like Microsoft DotNet that bind to Event controls Freeman amp Jones 2003
36. WiServer print PCwebBTN 1 20 WiServer print PCwebBTN L3a WiServer print local str VER 38M WiServer print P webBTN 1 30 WiServer print PCwebBTN L4a WiServer print local 38M WiServer print P webBTN 10 WiServer print PCwebBTN L5a WiServer print local str VER 38M WiServer print P webBTN 1 50 WiServer print PCwebBTN WiServer print local str VER 38M WiServer print 1 60 97 WiServer print P webBTN_L7a WiServer print local_1p_str VER 38M WiServer print P webBTN 176 WiServer print P web END J SUCHE Se USE IRMimic2 void IR CSEL int CSELset IRMimic2 select command location delay 5 used for pre learn request NG serial print IR gt serial printIn CSELset RESET CSELset 0 digitalWrite pin IRMimic2 CSEL 0 LOW digitalWrite pin IRMimic2 CSEL digitalWrite pin IRMimic2 CSEL 2 LOW digitalWrite pin IRMimic2 CSEL 3 LOW digitalWrite pin IRMimic2 CSEL 4 LOW digitalWrite pin IRMimic2 CSEL 5 LOW delay 5 select range CSELset 0 56 convert DEC gt BIN Af CSELset 1 error THIS IS THE WRONG SYNTAX if O CSELset i Sertal printIn 0 CSE
37. investivagte design web site structure VER 2 investivagte extend web site structure VER 3 investigate number of packets sent to serve a web page VER 4 explore PWM sound blink LED from function IRcmd 96 VER 5 trial web page submit design VER 6 infrastructure mode try HTTP submitt POST and FORM bugs VER 7 reset back to a simple HTML web page fit web pages to native IPhone resolution VER 8 background colours test HTML buttons and WiServer variables VER 9 digital Write LED HIGH testing SEND amp LEARN web page VER 10 test SEND amp LEARN on test visiable LEDS VER 11 expand URL decode functionality add URL decode ERROR web page VER 12 test return types on sendMyPage VER 13 troubble with adding more URL links system unstable VER 14 testing URL buttons VER 15 move HTML to PROGMEM stability restored VER 16 try global gURL and string usage fix bug doubble blink which is multiple page sends http asynclabs com forums viewtopic php f 19 amp t 263 amp start 10 if 0 int uip_conn gt appstate ackedCount amp amp 0 int uip conn gt appstate sentCount test WiServer isActive sendInProgress etc VER 17 Need to improve performace try gULR decode outside sendMyPage in loop VER 18 add Serial printlIn send webpage pkt helps debug alot VER 19 add hardware add beep add IRMImic2
38. there 1s possibility of adding extra functionality or making useability simpler 2 3 User Interface It 1 no use putting a heap of clever features into a device if the user 15 not comfortable with it Billingsley 2006 Interfaces do require lot of design work and consumers have grown accustom to the way devices are controlled based on local standards and previous equipment controls Ultimately the consumer through their purchasing decision determines part of the user Interface design When consumers purchase devices they do not usually read the Instruction manual before making a purchase and so the Interface needs to be Intuttive In order for the user to like and select the product Billingsley 2006 A User Interface can have many functions Some Infrared Remote Controls are simple and others are more complex Looking over some Infrared Remote Controls in Figure 2 1 IR Remote Controls there are common controls layouts and themes Figure 2 1 IR Remote Controls Interesting points of interest that can be used in the design are power on off is at the top ideally red in colour a circular up down left right with a centre select button is common larger linked button for volume up down mute larger linked button for channel up down media play stop pause forward backwards record a numeric keypad four coloured macro function buttons the background case colour to button colour or contrast for ease of viewin
39. 050 and will not be destroyed Give details of the arrangements for safe storage of data e g locked filing cabinet password protected computer Page 9 of 12 67 during the study Password protected computer b after completion of the study Excess files and information deleted T 8 For physiological studies are provisions made for the participant s and his her usual medical attendant to be informed of information obtained throughout the research What steps will be taken to ensure that the relationships between participant s and their usual medical attendants are not adversely affected by the research and confidential relationship s between doctor s and patient s are preserved 8 PRIVACY without prior consent from the participant s or their legal quardian s 8 2 Will the research involve access to identifiable personal information e g contact lists Yes held by another agency body subject to the Privacy Act 1988 Cth or Public Health Act 7 2005 QLD 8 1 Does this project involve obtaining identifiable information data from a third party Yes Ho EJ E If YES outline the measures to obtain prior consent from the identified individuals or the procedures to address the regulatory privacy considerations please contact the Ethics Officer for guidance If the exemption under 8985 5354 of the Privacy Act is to be sought please contact the Ethics Officer 9 CHECKLIS
40. 2 in the revision 1 and revision 2 boards programmed as a USB to serial converter Revision 2 of the Mega2560 board has a resistor pulling the 802 line to ground making it easier to put into DFU mode Revision 3 of the board has the following new features 1 0 pinout added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET http www arduino cc en Main ArduinoBoardMega2560 19 10 2012 11 58 58 147 ArduinoBoardMega2560 pin the IOREF that allow the shields to adapt to the voltage provided from the board future shields will be compatible both with the board that use the AVR which operate with 5V and with the Arduino Due that operate with 3 3V The second one is not connected pin that is reserved for future purposes Stronger RESET circuit 1602 replace the 802 Schematic Reference Design amp Pin Mapping EAGLE files arduino mega2560_R3 reference design zip Schematic arduino mega2560_R5 schematic pdf Pin Mapping PinMap2560 page summary Microcontroller 5 Operating Voltage SV Input Voltage recommended 7 12 Input Voltage limits 20V Digital 1 Pins 54 of which 15 provide PWM output Analog Input Pins 16 DC Current per I O Pin 40 DC Current for 3 3 Pin 50 mA Flash Memory 256 KB of which 8 KB used bv bootloader SRAM 8 KE 4 Clock Speed 16 MHz Power The Ardui
41. 3 char local 5 192 168 001 002 used for HTML webpage links using the overload method for string concat will convert int to str local str local str local 1 str al local str local 1 str local str local str a2 local str local ip str local str local str a3 local str local 1 str local str local str a4 local str 15 now build and can be used in web page HTML serial print local ip serial printIn local 1 str int bl gateway 1 0 int b2 gateway ip 1 int b3 gateway 1 2 int b4 gateway 1 3 Serial print gateway 1 serial print b1 Serial print serial print b2 Serial print Serial print b3 Serial print serial printIn b4 int cl subnet mask 0 int c2 subnet mask 1 int c3 subnet mask 2 int c4 subnet mask 3 serial print subnet mask serial print c1 serial print serial print c2 serial print Serial print c3 serial print serial printIn c4 serial printIn js 111 void VOLUME DOWN i sound feedback automatic volume down tested l Serial println analogRead pin SPL DEC int v MIC SPL analogRead pin MIC SPL if 100 lt v MIC SPL same as v MIC SPL gt 0 VER33T increase to 100 serial p
42. Connect the GND and VCC headers to your microcontroller as appropriate and connect LCD amp Keypad Shield the SPL output to an analog input In this example we ve connected it to The Mic output doesn t need to be connected for this application The following sketch reads the SPL value fram Microphone Sound Input Module five times per second and outputs it to the serial console in the Arduino IDE HUMID Humidity and const int splSensor 0 ff the SPL output is connected to Temperature Sensor analog pin 0 Module void setupi 4 Serial begin 38400 http www fr etr onics com pages mia ophone s aund input rnodule quickstart guide 8 05 2012 8 09 37 136 Parts amp Kits for Arduino Online Buy Microcontroller Boards Electronic Components for Arduino Mia ophone Sound Input Module Quickstart Guide Freetronics void 100 4 Serial println analogRead spl ensor DEC delay 200 delay to avoid overloading the serial port buffer and paste the code above into the Arduino IDE upload it to your Arduino and open the serial console at 384000 You will see a stream of readings scroll down the console showing the current sound pressure level Copyright 2012 Freetronics Pty Ltd Privacy Policy Tems amp Conditions All prices are in AUD PAYMENT METHODS WE ACCEPT v Atigi Pawanwa fr eni cs com pages mic aphane s eunc input moadule quickstart guide S 05 2012 8 08 37
43. SETTINGSI PROGMEM lt b gt WiFi IR MCU SETTINGS lt b gt lt input type button value EXIT onclick location href http const prog char web SETTINGS2 PROGMEM gt const prog char web PROGMEM lt p gt lt b gt IPV4 lt b gt IPV6 lt p gt const prog char web IPI PROGMEM lt gt old IP WiServer print local str N ER 32 const prog char web IP2 PROGMEM 1 lt gt t const prog char web 0 PROGMEM lt p gt new IP 3 const prog char web 1 PROGMEM xxx const prog char web_box2 PROGMEM xxx const prog char web_box3 PROGMEM xxx const prog char web box4 PROGMEM xxx lt p gt const prog char web WLANmode PROGMEM lt p gt lt b gt AD HOC lt b gt INFRASTRUCTURE lt p gt const prog char web SECURITY PROGMEM lt p gt SECURITY lt b gt 0 lt b gt 1 2 3 lt p gt const prog char web KEY PROGMEM lt p gt KEY 123456 p V const prog char webBTN EXIT PROGMEM lt input type button value EXIT onclick location href http 192 168 1 2 gt const prog char webBTN EXITI PROGMEM type button value EXIT onclick location href http const prog char webBTN EXIT2 PROGMEM gt const prog char webBTN 51 PROGMEM lt p gt lt input type button value S1 VOL UP onclick location href http
44. VOL DOWN onclick location href http 192 168 1 2 S2 gt lt p gt const prog char webBTN S2a PROGMEM lt p gt lt input type button value S2 VOL DOWN onclick location href http const prog char webBTN 5251 PROGMEM 1 52 gt lt gt const prog char webBTN 53 PROGMEM lt p gt lt input type button value S3 PLAY STOP onclick location href http 192 168 1 2 S3 gt lt p gt 92 const prog char webBTN S3a PROGMEM lt p gt lt input type button value S3 PLAY STOP onclick location href http const prog char webBTN 5351 PROGMEM S3 gt lt p gt const prog char webBTN 541 PROGMEM lt p gt lt input type button value S4 FORWARD onclick location href http 192 168 1 2 S4 gt lt p gt const prog char webBTN S4a PROGMEM lt p gt lt input type button value S4 FORWARD onclick location href http V const prog char webBTN 5451 PROGMEM 5 4 gt lt gt const prog char webBTN S5 PROGMEM lt p gt lt input type button value S5 BACK onclick location href http 192 168 1 2 SS gt lt p gt const prog char webBTN 554 PROGMEM lt p gt lt input type button value S5 BACK onclick location href http V const prog char webBTN S5b PROGMEM 55 gt lt gt const prog char webBTN S6 PROGMEM lt p gt lt input type b
45. anything besides an upload of new code it will intercept the first few bytes of data sent to the board after connection is opened If a sketch running on the board receives one time configuration or other data when it first starts make sure that the software with which it communicates waits a second after opening the connection and before sending this data The Uno contains a trace that can be cut to disable the auto reset The pads on either side of the trace can be soldered together to re enable it It s labeled You may also be able to disable the auto reset by connecting a 110 ohm resistor from to the reset line see this forum thread for details USB Overcurrent Protection The Arduino Uno has a resettable polyfuse that protects your computer s USB ports from shorts and overcurrent Although most computers provide their own internal protection the fuse provides an extra laver of protection If more than 500 mA 15 applied to the USB port the fuse will automatically break the connection until the short or overload 15 http www arduino cc en Main Ard uinoBoardUno 19 10 2012 12 01 55 PM 145 Arduino ArduinoBoardUno removed Physical Characteristics The maximum length and width of the Uno PCB are 2 7 and 2 1 inches respectively with the USB connector and power jack extending beyond the former dimension Four screw holes allow the board to be attached to a surface or ease Note that the distance
46. arduino cc en Main ArduinoBoardMega2560 19 10 2012 11 58 58 AM 148 Arduino ArduinoBoardMega2560 Memory The ATmega2560 has 256 KB of flash memory for storing code of which 8 KB is used for the bootloader 8 KB of SRAM and 4 KB of EEPROM which can be read and written with the EEPROM library Input and Output Each of the 54 digital pins on the Mega can be used as an input or output using pinMode digitalWrite and digitalRead functions They operate at 5 valts Each pin can provide or receive a maximum of 40 mA and has an internal pull up resistor disconnected by default of 20 50 kOhms In addition some pins have specialized functions Serial RX and i TX Serial i 19 RX and 18 TX Serial 2 17 RX and 16 TX Serial 3 15 RX and 14 TX Used to receive RX and transmit TX TTL serial data Pins o and 1 are also connected to the corresponding pins of the ATmega15U2 USB to TTL Serial chip External Interrupts z interrupt 3 interrupt 1 13 interrupt 5 19 interrupt 4 20 interrupt 3 and 21 interrupt 2 These pins can be configured to trigger an interrupt on low value a rising or falling edge or a change in value See the nterrupt function for details PWM 2 to13 and 44 to 46 Provide 8 bit PWM output with the analogWrite function SPI 50 MISO 51 MOSI 52 SCR 53 SS These pins support SPI communication using the SPI library The SPI pins are also brok
47. between digital pins 7 and 8 is 160 mil 0 16 not an even multiple of the 100 mil spacing of the other pins JD 50 Arduino Edit Page Page History Printable View Recent Site Changes http www arduino cc en Main ArduinoBoardUno 19 10 2012 12 01 55 PM 146 G 7 Arduino MEGA 2560 Arduino ArduinoBoardMega2 560 ARDUINO CC ed Buy Download Getting Started Learning Reference Products FAQ Contact Us Arduino Mega 2560 11171 ARDUINO mio IN Arduino Mega 2560 Front Mega 2560 Back Buy From Buy Fro Arduino Store Distributors Overview The Arduino Mega 2560 is a microcontroller board based on the ATmega2560 datasheet It has 54 digital input output pins of which 14 can be used as PWM outputs 16 analog inputs 4 hardware serial ports 16 MHz crystal oscillator a USB connection a power jack an ICSP header and a reset button It contains everything needed to support the microcontroller simply connect it to a computer with a USB cable or power it with a AC to DC adapter or battery to get started The Mega is compatible with most shields designed forthe Arduino Duemilanove or Diecimila The Mega 2560 is an update to the Arduino Mega which it replaces The Mega2560 differs from all preceding boards in that it does not use the FTDI USB to serial driver chip Instead it features the ATmega16U2
48. by the Univerzity of Southem Queensland Human Research Ethics Commrittee _ Jonh M Palmer Signed Frint name Date Prntname u lt s m i Supervisor declaration if applicable 1 have been involved in the preparation of this appli Signed Print name Date Page 12 of 12 70 D 2 Human Ethics Committee Approval AUSTRALIA University of Southern Queensland TOOWOOMBA QUEENSLAND 4350 CRICOS QLD 002448 NEW 02225 AUSTRALIA TELEPHONE 61 7 4831 2300 www usq edu au OFFICE OF RESEARCH AND HIGHER DEGREES Ethics Committee Support Officer PHONE 07 4631 2690 FAX D7 4631 1995 EMAIL au Wednesday 25 July 2012 John Palmer Email CC Alexander Kist Supervisor Dear Jahn The Chair of the USO Fast Track Human Research Ethics Committee FTHREC recently reviewed your responses to FTHREC s conditions placed upon Da ethical approval for the below project Your proposal now meels the requirements of the National Statement Ethical Conduct in Human Research 2007 and full ethics approval has been granted ______ 25 102012 FTHREC Decision Approved The standard conditions of this approval 8 conduct the project strictly in accordance wah tha proposal submitted and granted ethics approval including any amendments made to the proposal require
49. c 54 580011 97 2 68 2 64 27 addy z S24 e gsn NW SIOQ 22 08 ZZ Z Su ZL Z SH cub s juauudo s ap SJEAJOS C GM L 63 lt 4 i yo 14611 20 13 9 24 uo 14811 15 15 Oy Jo 2 20 18 uo 2v bP bY dois Z E LuH QAQ 16 18 uue AIL 50 18 AL Z L M ajnu AL 68 18 A ZZY dn eun AL be bk 140811 Paes 4 L L3 HOD jspstL LH Peles 21 14 AL LLL 185 0 4 7 74 C um 4D p oc 0 Ped auougi ejddy zu Jes LM asepa Zu 50 B 2 Main System Requirements Table 1 System Requirements with Sub Requirement descriptions Number Investigate remote control user Interaction 2 Interface Investigate remote control interfaces Design an interface for the user to input a command to the controller Propose a new interface that enhances the user experience 3 WLAN Investigate WLAN protocols and hardware Network 4 Controller The embedded hardware and software system design includes l Main MCU 2 IR communications 3 Power system 4 WIFI hardware 5 Volume automatic control 5 Development Environment the tools required to build the system prototype l Hardware 2 Apple platform 3 Microsoft platform Contro
50. common controls and their layout a user Interface design be created Feedback from the user discussion group including control usage patterns suggests a simple design 15 a good starting point Based on these considerations a simple basic test interface to control a portable DVD player will contain volume up e volume down e play stop e forward e back e on off red e other blue The Web Page interface will be driven by the MCU Web Server that can post simple HTML text strings and get HTTP URL requests for commands Some nicer simple web page design be managed by using HTML CSS and picture icons Lemay 2003 A full icon driven interface can be used instead of text with an advantage of being user language independent The structure and navigation of the Web Page interface 1s in Figure 3 4 Web Page Navigation Flowchart flowed by Figures 3 5 3 6 3 7 and 3 8 for the Web Pages To get the Prototype working correctly the menu navigation had to be scaled down and the web pages made very simple see MCU code in Appendix F It seems the AVR328p MCU 2 k SRAM struggled to stay stable Removing debug serial output prints helped and all string constants for the HTML text were placed into program memory The Arduino IDE does not have any memory management or in system debugging tools It is only through trial and error that this simple menu of Web Pages has produced a satisfactory result Further adjustments to the Web Server may
51. digitalWrite pin IRMimic2 SNDRQ LOW delay 200 void loop 1 Run WiServer WiServer server task K K K K K K K K testing object states and variables Serial println WiServer connection up Serial println WiServer isActive NO Serial printlIn WiServer isActive sendMyPage NO Serial println sendMyPage isActive NO Serial printlIn WiServer zg_ get conn state NO Serial printIn WiServer printTime NO int z WiServer sendInProgress int z WiServer getConnectionStatus sendMyPage sendInProgress NO Serial print CS Senial println z Serial print sendMyPage START Serial printlIn sendMyPage START Serial print sendMyPage END 115 Serial printlIn sendMyPage END jmp_ WPS 1 no URL decoding jmp WPS 0 yes decode gURL now 1f O int uip_conn gt appstate ackedCount amp amp 0 int uip conn gt appstate sentCount if O int uip_conn gt appstate ackedCount 42 0 4 0 conn gt appstate sentCount 4 Senal print jmp WPS Senal println mp WPS 55 if 1 jmp WPS E 55 1 Serial print decode URL Serial print jmp_WPS Serial println int jmp WPS 1 START 0 STOP Serial print ackedCount Serial printIn int uip_conn gt appstate ackedCount Senal print sentCount
52. disability or mental illness Ch 4 8 people involved in illegal activities Ch 4 6 Aboriginal and Torres Strait Islander peoples Ch 4 7 people in other countries Ch 4 8 other cultural and ethnic groups Researchers are obliged to ensure they protect the interests of these groups if they are in any way involved in a project and are therefore advised to investigate thoroughly how these special groups may or may not be involved in or represented in the project and to consider if there might be an adverse effect on members of these groups if they are involved in or represented in the project rimari of any of the rm is a focus of your research your ethics application will not qualify 3 1 Participants Please provide detail on the group and source of potential participants Male and female adult family and friends of the researcher John Palmer 3 2 Expected age s of participant s please mark one or more Children under 14 C Young people 14 18 MI Adults gt 18 Page 3 of 12 61 3 3 Expected number of participant s the research has several stages and or groups of participants please provide the total number of participants expected as well as the number and participant group involved in each stage mix of people about 6 adults both male and female 3 4 How will potential participants in your research be recruited Please provide detail how contact will be made with participants Le personal approa
53. doc8663 pdf Atmel 2012 Home Page Atmel San Jose viewed 21st May 2012 lt http www atmel com gt AVRFreaks 2012 Home Page viewed 21st May 2012 http www avrfreaks net Bergmans 5 2012 SB Projects IR Control Oisterwijk Netherlands updated 22 2011 viewed 10th May 2012 lt http www sbprojects com projects ircontrol index php gt Billingsley J 2006 Essentials of Mechatronics Ch 14 The Human element Wiley USA Breen C 2010 iPhone IR remotes compared Five remotes compared MacWorld Jul 2010 viewed 22nd May 2012 http www macworld com article 1151573 1phone ir remotes html Codan 2012 Codan fights Chinese counterfeits Electronics News Apr p 6 Craft C amp McElveen J 2010 iPhone Game Development Wiley Indianapolis CuteDigi 2012 LinkSprite Cuhead Wi Fi Shield V2 0 for Arduino cutedigi Lognmont viewed 4th May 2012 http www cutedigi com wireless Wi Fi linksprite cuhead Wi Fi shield v2 0 for arduino html gt 44 Delabs 2005 Schematics of delabs Digital gain control of viewed 5th Jul 2012 lt http schematics dap com 2005 01 digital gain control of opamp html gt DFRobot 2012 Wi Fi Shield V2 1 For Arduino 802 11 b g n Pudong China viewed 19 May 2012 lt http www dfrobot com index php route product product amp product_1d 548 gt ELE3305 Computer systems and communications protocols Faculty of Engineering and Surveying 2009 Uni
54. esaet e ar eT 9 2 6 Infrared IR Communications and Codes 9 2 7 Automatic Volume Control uy uu tbs 10 2 SAVITeEDCODEEOLGES ME Des sace n una Odette o ad u awa S Qua Ru 11 2 9 Integrated Development Environments IDE 12 2 10 Availability of System Components 12 Chapter S System 54805 5 13 BOT M ALS RR RE E T T 13 9 2 Microcontroller MC U and Lau u u vot a esee 14 16 git 21 J Shi kna 23 y uu na Saa ash 25 Vol me CONTO 21 31 3 MCU System Pin 32 Chapter 4 limp ades 36 AL Cr 36 a 27 Chapter 5 System and Functional TestIng 39 Del User ten 39 2 2 WASET 39 5 3 2 8 Web Set Vel 40 2 IR Learning and Seni uy uy n uuu p k au n e ice io dic conus 40 55 SPL Microphone Hardware aiio e
55. ethics clearance University of Southern Queensland viewed 18th May 2012 lt http www usq edu au research ethics human clearance gt Vishay 2003 IR Receiver Module for Remote Control Systems viewed 24 Mar 2012 lt http www vishay com ir receiver modules list product 82 1 35 7 Wang C 2001 Infrared Remote Room Light Switch Ch 2 1 University of Queensland Brisbane viewed 14 Oct 2012 http innovexpo 1itee uq edu au 2001 projects s369729 thesis pdf WHO 2012 Media centre Electromagnetic fields and public health viewed 19th Oct 2012 lt http www who int mediacentre factsheets fs304 en index html gt WIZnet 2012 Home Page Korea viewed 6th March 2012 lt http www wiznet co kr gt Yoshida J 1012 Talk from the hip at Microchip EETimes News amp Analysis viewed 13 May 2012 lt http www eetimes com electronics news 4372400 Talk from the hip at Microchip cid NL_EETimesDaily gt Zeldovich K 2012 Zelscope Oscilloscope and spectrum analyser viewed 21st May 2012 lt http www zelscope com gt APPENDICES APPENDIX Specification 46 47 University of Southern Queensland FACULTY OF ENGINEERING AND SURVEYING ENG4111 ENG4112 Research Project PROJECT SPECIFICATION FOR John Palmer TOPIC WIRELESS LAN BASED INFRARED REMOTE CONTROL SUPERVISOR Dr Alexander A Kist ENROLMENT ENG4111 SI EXT 2012 ENG4112 52 EXT 2012 PROJECT AIM Practically all consumer electronic devices in a
56. from the board In future shields will be compatible both with the board that use the AVR which operate with 5V and with the Arduino Due that operate with 3 3V The second one is a not connected pin that is reserved for future purposes Stronger RESET circuit Atmega 1602 replace the 802 Uno means one in Italian and is named to mark the upcoming release of Arduino 1 0 The Uno and version 1 0 will be the reference versions of Arduino moving forward The Uno is the latest in a series of USB Arduino boards and the reference model for the Arduino platform for a comparison with previous versions see the index of Arduino boards Summary Microcontroller ATmega328 Operating Voltage 5V Input Voltage recommended 7 12V Input Voltage limits 6 20V Digital L O Pins 14 Cof which 6 provide PWM output Analog Input Pins 6 DC Current per I O Pin 4o mA DC Current for 3V Pin sO Flash Memory 32 KB ATmega328 of which 0 5 KB used by bootloader SRAM 2 KB ATmega328 EEPROM ATmegas28 Clock Speed 16 MHz Schematic amp Reference Design EAGLE files arduino uno Rev3 reference design zip NOTE works with Eagle 6 0 and newer Schematic arduino uno Rev3 schematic pdf Note The Arduino reference design can use an Atmegad 168 or 328 Current models use an ATmega328 but an 8 is shown in the schematic for reference The pin configuration is identical
57. household controlled via infrared remote controls The aim of this project 1s to design and build a device with which can act as a stationary remote control The device itself 1s controlled via a Web interface or iPad 1Phone application PROGRAMME Issue C 4th April 2012 9 Research Infrared remote control communication WLAN communication protocols and hardware 10 Evaluate alternatives and propose an overall system design 11 Design a basic prototype proof of concept and implement individual building blocks infrared interface WLAN hardware Web interface and an iPad 1Phone application As time permits 12 Investigate remote control interfaces and user interaction 13 Propose a new interface that enhances the user experience 14 Evaluate the usability of the prototype device 15 Design and implement an automatic volume gain control 16 Optimise hardware power consumption AGREED Date 2012 2012 John Palmer student Dr Alexander Kist supervisor APPENDIX B Requirements 48 49 B 1 System Block Diasram 94 aude Z JoS5220Jd0J21Ul NON tH 8 GAY bH Fapa XL 3 1M 19104409 FY 2 K 9 L EH NW JAA wasis Eusi AOMISN ta wes OL CLOC S HAA NZI Sc
58. kit called Web server In a Box supplied by Silicon Chip Grassi 2009 This kit has been built and tested by the Dissertation Author It contains a PIC MCU running a TCP IP wired LAN interface and Web Server Performance 15 not the same as a PC however it 1s a low power solution and a proof of concept that a MCU can be used for this project Microcontroller selection will consider a number of important factors e Hardware specification o Number of Inputs Outputs and type Analogue Digital PWM Internal timers Register sizes UARTs Memory size and speed Operations optimization Availability Environmental like vibration and temperature ranges o Low power requirements sleep modes Cost of both hardware and firmware development Reliability and life span Programming IDE and firmware programmer Operating system boot loader Security of embedded firmware Power requirements Environmental product support CA 9 Xu There 15 a lot of 8 16 32 bit Microcontroller manufactures A number of development boards are available from some of the manufactures along with examples that are generally optimised for specific applications The 8 bit MCUS for consideration are Atmel AVR Atmel 2012 and Microchip PIC Microchip 2012 based on cost availability and the support tools required Further analysis of other MCU brands and type has not been performed 12 2 9 Integrated Development Environments IDE Both Atmel AVR Studio 5 Atmel 20
59. mode on startup digitalWrite pin IRMimic2 CSEL 0 LOW digitalWrite pin IRMimic2 CSEL 1 LOW digitalWrite pin IRMimic2 CSEL 2 LOW digitalWrite pin IRMimic2 CSEL 3 LOW digitalWrite pin IRMimic2 CSEL 4 LOW digitalWrite pin IRMimic2 CSEL 5 LOW delay 5 rest enable serial serial begin 57600 serial printIn serial printIn IR MCU VER 37 beep 50 HHHHHH settings are default to start with check 1f reset button has been pressed button digitalRead pin buttonl if HIGH buttonl 1 HIGH reset button pressed on startup write to EEPROM i serial printIn button pressed write default settings to EEPROM serial printIn write to EEPROM writeDefault 114 readSettings from now ready to go will writeSettings from settings web page j else LOW i serial printIn read from EEPROM CAUTION all data will read 255 on first run and will need a factory reset readSettings from EEPROM now ready to go printStuff debug serial printIn settings LOADED Enable Serial output and ask WIServer to generate log messages optional WiServer enableVerboseMode true Initialize WiServer and have it use the sendMyPage function to serve pages WiServer init sendMyPage WiServer init NULL STOP IRMimic2 starting up in wrong mode delay 200 digitalWrite pin IRMimic2 LRNRQ LOW
60. o Apple iPhone or iPad Application e Wi Fi connectivity o Adhoc point to point o Infrastructure WLAN Network o Security modes e Web Server on a low power Microcontroller e Infrared o Receive O Store o Transmit e Microphone e Battery power The objectives have been broken down into major system requirements and sub system elements to satisfy a solution These lower sub systems can be evaluated and alternatives proposed for the overall system design and Prototype detailed System Requirements Block Diagram 15 presented in Chapter 3 System Design These Requirements are also linked to a System Requirements and Verification Matrix SRVM for full system testing which 1 listed Appendix Requirements 1 3 Objectives The main objectives accomplished this project include 1 Research Infrared remote control communication WLAN communication protocols and hardware 2 Evaluate alternatives and propose an overall system design 3 Design a basic Prototype for proof of concept and implement individual building blocks that include an infrared interface WLAN hardware Web interface and an iPhone or iPad application As time permits Investigate Remote Control interfaces and user interaction Propose a new interface that enhances the user experience Evaluate the usability of the Prototype device Design and implement an automatic volume gain control Ve god Uv 28 Optimise hardware power consumption Over
61. ok Test HP NEC SONY all failing Use 2nd Arduino to Rx works but wrong Tx signal This confirms that the Arduino library is not always decoding correctly but the author notes that Build and used IR detector to look at IR waveforms Testing on HP Notebook computer failed Maybe the IR port Is set to IR Data or as later found out the number of pulses may be too many Mainly Testing Play Stop and volume Command Received and decoded signals from NEC ok Panasonic ok SONY ok Xbox360 fail Using Raw Mode in the MCU code was better at sending the captured IR signals 26 6 2012 Tested the IRMimic2 Chip successfully on SONY amp ok SONY TV ok Portable DVD player ok conditioner ok Xbox360 fail Note The portable DVD player s battery expanded while charging breaking its case and then failed Results Pass Fail Follow up Action Was able to Receive store and Send a IR signal Pass On going to store longer IR signals 155 H 5 Wi Fi Shield TEST SHEET System Component Wi Fi Shield type DFRobot Little Bird Electronics retailer DFRobot manufacture WIZnet onboard Wi Fi module Arduino code library Arduino board Eleven Uno compatible Jaycar retailer Freetronics manufacture use Arduino IDE 1 0 install on Arduino board test program blink serial terminal OK Install WIZnet software version 1 WIZnet software not fully functional some features freeze
62. p gt const prog char webBTN L6 PROGMEM lt p gt lt input type button value L6 RED onclick location href http 192 168 1 2 L6 gt lt p gt const prog char webBTN L7 PROGMEM lt p gt lt input type button value L7 BLUE onclick location href http 192 168 1 2 L7 gt lt p gt const prog char webBTN LI PROGMEM lt p gt lt input type button value L1 VOL UP onclick location href http 192 168 1 2 L1 gt lt p gt const prog char webBTN Lla PROGMEM j lt p gt lt input type button value L1 VOL UP onclick7 location href http V const prog char webBTN 1 10 PROGMEM L1 gt lt p gt const prog char webBTN L2 PROGMEM lt p gt lt input type button value L2 VOL DOWN onclick location href http 192 168 1 2 L2 gt lt p gt 93 const prog char webBTN L2a PROGMEM lt p gt lt input type button value L2 VOL DOWN onclick location href http const prog char webBTN L2b PROGMEM L2 gt lt p gt const prog char webBTN L3 PROGMEM lt p gt lt input type button value L3 PLAY STOP onclick location href http 192 168 1 2 L3 gt lt p gt const prog char webBTN L3a PROGMEM lt p gt lt input type button value L3 PLAY STOP onclick location href http V const prog char webBTN L3b PROGMEM L3 gt lt p gt const prog ch
63. provide 10 bits of resolution Le 1024 different values By default they measure from ground to 5 volts though is it possible to change the upper end of their range using the AREF pin and the analogReference function Additionally some pins have specialized functionality TWI A4 or SDA pin and A5 or SCL pin Support TWI communication using the Wire library There are a couple of other pins on the board AREF Reference voltage for the analog inputs Used with analogReference Reset Bring this line LOW to reset the microcontroller Typically used to add a reset button to shields which block the one on the board Sce also the mapping between Arduino pins and ATmega328 ports The mapping for the Atmega8 168 and 328 is identical Communication The Arduino Uno has a number of facilities for communicating with a computer another Arduino or other microcontrollers The ATmega328 provides UART TTL 5V serial communication which is available on digital pins o RX and 1 TX ATmega16U2 on the board channels this serial communication over USB and appears as virtual com port to software on the computer The 16U2 firmware uses the standard USB COM drivers and no external driver is needed However on Windows a inf file is required The Arduino software includes serial monitor which allows simple http www arduino cc en Main ArduinoBoardUno 19 10 2012 12 01 55 144 Arduino ArduinoBoardUnao textual data
64. the MCU This can be a problem as newer computers especially Notebook PCs as many do not have a serial RS232 Port This can be overcome by using a USB to Serial RS232 converter Arduino development boards contain a built In converter however during use connectivity problems were frequent as the development PC operating system kept changing virtual port COM allocations 167 After some Investigation 1t was discovered that the Prolific chip set and driver worked correctly see Figure 1 3 Prolific USB to Serial RS232 converter Figure 1 3 Prolific USB to Serial RS232 converter Figure 4 PCMCIA Express Serial RS232 and Parallel card The PCMCIA card was found to be plug and play in Microsoft Windows XP However it required a driver for Microsoft Windows 7 and crashed the Notebook PC if inserted or removed while the PC was powered up but not in Windows XP see Figure I 4 PCMCIA Express Serial RS232 and Parallel card The AVR MCU can use In System Programming ISP There are a number of programmers available but after problems during testing it may be better to use the IDE manufactures programmer and debugger See Figure 1 5 AVR ISP Serial 5232 programmer 168 AVR ISP SERIAL PROGRAMMER a a lt tu o Figure I 5 AVR ISP Serial RS232 programmer 1 10 Other boards Futurlec AVR and PIC Boards were looked at but not used The professional IDEs MPLAB and AVR Studio were inst
65. were able to be viewed on a networked computer iPad and iPhone through a Web Browser By keeping the design to only send simple HTML text strings there were no problems in rendering the Web Pages and performance was good both through Adhoc and Infrastructure Wi Fi connection modes The Web Page reads the screen resolution and correctly sets the pixel width of iPhone so the Web Page text 15 large enough to read on large and small screens Each button was pressed and worked Entering other URL commands that were not in the URL decode code produced the URL Error Web Page as expected and allowed the user to navigate back to the Send Home page sometimes the Web Server was a little delayed In processing URL commands but once a command was processed the following commands were quick iPhone Application Touching the Application Icon successfully launched the program Each button on the simple interface was tapped and worked To access the other areas of the system a button In the lower left corner opened the Web Browser and allowed the system to be programmed through the Web Pages The Application gave a more seamless integration look and feel to the system as with the Web Browser the user could see the processing activity 5 2 Wi Fi Connectivity The CuHead WiShield V2 was successful and maintained a reliable Wi Fi connection The Security modes tested were None and WAP2 The connection was nearly instant using no security however it took a
66. will light Apply the IR signal using your remote positioned as noted in the previous section The MCU should wait for the RDY signal to go high again to indicate that learning has finished Before taking LRNRQ low the MCU should check for LRNERR high then take LRNRO low to end the learn operation and reset LRNERR if it was asserted If LRNERR was asserted repeat learning for this key After adjusting the position of the remote relative to the sensor Wait at least 60 mSec after dropping LRNRQ before re asserting it 22 29 130 As of 10 29 07 it is now possible to abort the learning process when in MCU mode Normally the SNDRQ input would not be used while learning and would be sitting low When learning has been initiated but before the start of the command has been detected 1f SNDRO 1s brought high for at least 5 uSec learning that command will be aborted SNDRQ must be brought low again to resume normal operation Commands are stored m non volatile internal memory and will be preserved even 1f power 1s removed from the device Each command 18 captured and stored independent of the other commands so each command can be a different format 1f necessary Macros are not supported in mode Each key maps to one stored command Macros can be implemented using code m the controlling MCU Sending commands Keypad mode To send a command press the same key that was used to learn the command Do not press the learn key In k
67. 0096 successful Two identical back to back IR receive store transmit systems were setup It was found that problems were mainly in reliably decoding and transmitting IR signals Even though the library displayed consistent decoding results the output waveforms varied The same system that decoded and transmitted a signal could not then do the same back see Appendix Test results Receiving storing and transmitting the raw IR signal was successful The next design problem was to store even longer IR signals as used with the Microsoft Xbox 360 At this stage the project time was extended and ran out This further work was left to time availability on Prototype 2 To overcome the time restrictions the use of a single purpose designed MCU was sought The IRMimic2 from TaunTek is a pre programmed Microchip PIC MCU with 57 channels that are trainable Grieb B 2012 see Figure 3 12 IRMimic2 One big design advantage for the main Prototype 1 MCU was the separation of the IR functions and the Web Server load aiding code debugging 26 Figure 3 12 IRMimic2 Grieb B 2012 The MCU mode is set by setting pin 23 MDE low with a 470 ohm resistor on power start up The IRMimic2 MCU control lines are CSEL 0 5 0 56 command memory locations LRNRQ learn request LRNERR learn error SNDRQ send request RDY ready Data Sheet and circuit diagram 15 in Appendix G Arduino MCU code example for learning an IR signal select a channel
68. 1 Arduino Eleven IR development pin out The pin out is arranged like this so the IR MCU code can also be used with the Freetronics EtherTen LAN board Arduino MEGA 2560 Pin Out Reset MCU Battery Reset Settings N Oo NOILVOINQWINOO DIGITAL c 5364 em 52 em IHAA 519 e 50 gt GND SS 145 145 V 145 ISOIN Id AA Figure 3 20 Prototype 2 pin assignment WiFi Status LED WiFi INT 0 34 35 Arduino Eleven IR Pin Out Reset MCU Battery I g o gt IR Status LED IR Button IR Rx IR Tx Figure 3 21 Arduino Eleven IR development pin out 36 Chapter 4 Implementation 4 1 Prototype 1 The sub system elements of the design are implemented in the first functional Prototype 1 The Hardware and Software components are listed below Hardware boards and Shields have been stacked together and consist of Infrared IRmimic2 MCU with Learn Store Send Factory Settings Reset Button Wi Fi
69. 12c and Microchip MPLAB v8 66 Microchip 2012 are professional MCU IDEs which are free to use Optional optimising C compilers and programming modules for in system debugging are available at extra cost The Arduino MCU IDE version 1 0 is more simplified with only the most basic features suited mainly for hobbyists It supports the AVR MCU and supports a large number of plug in modules from many different manufactures using a common header pin out Arduino 2012 There is also an Arduino based board with a PIC MCU available Arduino boards mostly contain the AVR MCU and the code can also be written and compiled using Atmel AVR Studio EngBlaze 2012 The Apple iDevice IDE Xcode can be downloaded and used on an iMac A developer fee of 99 per year is required and the developer must be registered iDevices are linked to the developers registration and software can only be deployed to the registered 1Devices Apple 2012a 2 10 Availability of System Components The supply and availability of components required to build a Prototype at low cost can be restrictive Integrated Circuit and MCU Chip manufactures take minimum orders by the 1000 s The Atmel and Microchip PIC MCU manufactures produce development kits that support their parts Other single purchase of components may be available through retailers at added cost Companies and part availability can come and go in months A large company Microchip was ranked No 4 after Atmel whic
70. 192 168 1 2 S1 gt lt p gt 3 const prog char webBTN S2 PROGMEM lt p gt lt input type button value S2 VOL DOWN onclick location href http 192 168 1 2 S2 gt lt p gt const prog char webBTN 53 PROGMEM lt p gt lt input type button value S3 PLAY STOP onclick location href http 192 168 1 2 S3 gt lt p gt const prog char webBTN S4 PROGMEM lt p gt lt input type button value S4 FORWARD onclick location href http 192 168 1 2 S4 gt lt p gt const prog char webBTN 55 PROGMEM lt p gt lt input type button value S5 BACK onclick location href http 192 168 1 2 SS gt lt p gt const prog char webBTN 56 PROGMEM lt p gt lt input type button value S6 RED onclick location href http 192 168 1 2 S6 gt lt p gt const prog char webBTN S7 PROGMEM lt p gt lt input type button value S7 BLUE onclick location href http 192 168 1 2 S7 gt lt p gt const prog char webBTN 51 PROGMEM lt p gt lt input type button value S1 VOL UP onclick location href http 192 168 1 2 S1 gt lt p gt 3 const prog char webBTN Sla PROGMEM lt p gt lt input type button value S1 VOL UP onclick location href http const prog char webBTN S1b PROGMEM S1 gt lt p gt const prog char webBTN 521 PROGMEM lt p gt lt input type button value 2 S2
71. 192 168 2 61 Self Reflection discussion date 25 2012 After much reading of updated documentation for WiShield from Asynclabs Wiki and GitHub repository the clues of the puzzle came together That 1s what to do and what to expect For example for the CuHead Wi Fi shield I was expecting to see the connection on the WLAN and a green LED on the shield to indicate status OK there was only a red LED and the WLAN could not see the shield On the Asynclabs Wiki it does say a red LED will turn on after it makes the WLAN connection The DFRobot Wi Fi Shield did have green red yellow LED indicators and the WLAN could see it However I was not able to find this information until I went searching again and again This is because of all the inconsistent broken and outdated URL links from the retailers and manufactures Since the DFRobot Wi Fi shield was purchased a lot of information has been updated making things easier The final truth was found by doing a Google search on Asynclabs WiShield Success web page displays Hello World response Pass Fail Follow up Action Keep going TEST SHEET System Component shield type CuHead Version 2 CuteDigi retailer LinkSprite manufacture Microchip onboard Wi Fi module AsyncLabs Arduino code library pre IDE 1 0 pde examples Arduino board Uno compatible Jaycar retailer Freetronics manufacture 6 2012 John Palmer Task e now write sketch HTML CSS to use HTTP to toggle L
72. 7 page 641 and was constructed on prototyping board see Figure I 20 Photodiode Trans impedance amplifier Figure I 10 Photodiode Trans impedance amplifier As there were a lot of problems decoding the IR signals correctly and time was running out for this phase of the project Raw mode was used where the whole bit stream was recorded and then played back Raw mode was successful It was tested on a portable DVD player and could correctly reproduce IR signals APPENDIX J Self Reflection 173 174 1 1 Self Reflection In the beginning I did not know anything of the Apple Hardware and Software systems I had only programmed microcontrollers with basic tasks In assembly language and done some high level Microsoft DotNet coding I had no idea how I was I going to fill the gap in putting a Web Server into a microcontroller and handling Wi Fi WLAN communications At the end of the day I just did not know or could not find information so I had to make some educated guesses buy some stuff and do some testing The previous USQ Engineering problem solving courses helped me to plan and brake down the task into requirements Although it would seem that most tasks were straight forward things went wrong that were unexpected and just should not have happened However I was able to take a step back and reassess what I was trying to do and when I had used too much time on one element of the project I did a redesign and moved on Ordering part
73. Created by John on 14 07 12 Copyright c 2012 _ __ rights reserved import UIKit UIKit h interface AppDelegate UlResponder UlApplicationDelegate strong nonatomic UlWindow window F 3 3 AppDelegate m AppDelegate m IRMCU Created by John 14 07 12 Copyright c 2012 _ MyCompanyName All rights reserved import AppDelegate h implementation AppDelegate synthesize window window BOOL application UlApplication application didEinishi aunehi ayithOptions NSDictionary launchOptions Override point for customization after application launch return YES 119 void applicationWillResignActive UlApplication application y Sent when the application is about to move from active to inactive state This can occur for certain types of temporary interruptions such as an incoming phone call or SMS message or when the user quits the application and it begins the transition to the background state Use this method to pause ongoing tasks disable timers and throttle down OpenGL ES frame rates Games should use this method to pause the game void applicationDidEnterBackground UlApplication application this method to release shared resources save user data invalidate timers and store enough application state information to restore your application to its current st
74. DUE rom I also tested a SONY amplifier SONY TV Xbox360 but did not work 27 can see IR LED Tx in video camera ok FI Check circuit details LE LED current about 94mA 5V 1 2V IRled 0 7V TRvce 33ohm Using photodiode and transimpedance with 1 V output and Zelscope on MS XP this code is not decoding the Rx stream Corectly into HEX 82 LY TRY look at A D sampling time in IRRemote h IRRemoteInt h IRRemote cpp TRY changing pulse length and tolerance constants Lf ARY adjusting the Ix LR LED carrier frequency IK ME ZOIZSUT 15 19245 95UN raw Ix godelype st works good result 2012 04 15 20 04 50 when set to 36 kHz pulses later in the Fr IMP 2012 worked at 40 exact match to wavetorm JMP SO 12 5 202224 SUN Sucessful start 27 stop MS Win media player gt IMP ke 16 074 23 MON Gode TOIDE LO 7 move 20 L Zolderss po path to Shorted length of compile error messages change include lt WProgram h gt to include lt Arduino h gt in IRRemoteInct nh f compiles OK ans 0 include rRremote h int RECV PIN 5 JMP 2012 04 15 16 33 SUN updated int BUTTON 6 JMP 2012 04 15 16 33 SUN updated int STATUS PIN 7 JMP 2012 04 15 16 34 SUN updated IRIOGOY Trrecv
75. E Project Management Plan PMP 79 76 PMP Methodology Project planning assists in the full completion of the project by managing time resources and activities Early Resource planning helps manage time and mitigate risks Parts have been ordered early as availability and delivery times are a risk e Hardware 15 to be validated and ordered 30 days In advance e Software testing and licensing 15 to be paid and activated early Timeline management is planned via a project Gantt chart indicating approximately when and how much time 15 required for Tasks Time for testing fault analysis fixing hardware and MCU code and documenting could take up a large amount of the timeline Project risks are identified and risk mitigation and actions are noted E 2 Resource Planning R5 1 Hardware CRO DSO or PC audio scope Zelscope on Microsoft Windows XP multimeter soldering iron hand tools Arduino prototyping boards and Shields components 4 AA battery holder and batteries solder exhaust extraction lamp magnifying glass R5 2 Apple 1 platform iDevice user interface e Objective C syntax text iPhone game development text Apple 1 with Xcode IDE and certificate keys iPhone iPad USB software transfer cable 77 R5 3 Microsoft Windows XP W7 Platform Arduino MCU board MS Windows PC XP W7 AVR studio 5 5 1 6 needs Microsoft Windows and Microsoft Visual Studio Arduino Microsoft Windows ID
76. E 1 0 Serial terminal Putty USB to mini USB software transfer cable Arduino WiFi Shield setup and Serial programming link requires Arduino board running sample code file Blink containing serial UART code USB to mini USB cable Serial link header pins 0 RX and TX availability jumper pins on WiFi Shield WiFi Shield configuration program running on Microsoft Windows and manual 78 E 3 Project Gantt Chart Table E 1 Project Gantt Chart maa Project Plan Gantt Chart LLL a LLL 4 2 Ethical resp WISE 2111 1111 1 111 211 111 11111111 _ _ EEN ower _ _ Present Paper _ E 4 Project Risks Project risks in not completing or delaying project 1 Table E 2 Project Risks and Mitigation Actions Risk Description Personal Lost Time illness Failure of Hardware Software Skills shortfall Parts availability problems Spend more time on task than allocated Impact Likelihood Mitigation Actions Action Low Medium High Delay Low Schedule slack Contact examiner if bad Delay Medium Backup data Reassess alternatives Have hardware spare Delay Medium Research well Seek help from Seek help from supervisor Supervisor Delay High Order early Schedule Reassess alternatives hardware design early Delay Medium Reassess Ta
77. ED ON OFF DO 13 159 Used example MCU code Results t works Pass Fail Pass Follow up Action Can now start using for main design H 6 Sound Pressure Level SPL Sensor TEST SHEET Requirement Extended Functionality Task Power up microphone module and sample output using Arduino A D converter displaying readings to serial terminal Results Module works but seems too sensitive as green SPL LED blinks randomly and frequently with no sound in the room Result not as expected Pass Fail Follow up Action TEST SHEET Task After adding a DC power filter Power up module and check voltage levels and voltage referencing Check microphone sampled output using Arduino A D converter displaying readings to serial terminal A better result The SPL LED was not as active but still seemed to be wrong Increased resistance to DC power low pass filter and added a ferrite bead rechecked power rail voltages and result 1s excellent SPI LED output stable with no sound input Pass Fail Follow up Action Reduce the gain to decrease sensitivity 160 mms Test number SPL 3 System Component Automatic Volume Gain Control Extended Functionality 7 2012 John Palmer Task Identify and find surface mount feedback resistor de solder it and measure its value Do some gain calculations then solder in a new resistance value Check microphone sampled output using Arduino A D converter displaying readings to seri
78. Input Module Parts amp Kits for Arduino Online Buy Microcontroller Boards Electronic Components for Arduino Mia ophone Sound Input Module Quickstart Guide Freetrcnics Microphone Sound Input Module Quickstart All Products Gu ide Forum Arduino Tutorials Books The Microphone Sound Input Module provides both audio waveform and sound pressure Support level outputs with an inbuilt preamplifier Cables Become a Distributor Displays Module Pinout EtherTen 100 Arduino F eatured compatible with onboard Ethernet Kits Modules Practical Arduino ProtoShields Shields LeoStick Arduino GND Compatible SSS SPL Output About Us Payment amp Shipping x DMD Dot Matrix Display 32x16 Red Mic Output Provides amplified raw audio waveform Connect to an analog input on your microcontroller if you want to process the audio signal SPL Output Provides amplified sound pressure level SPL Connect to an analog input on your microcontroller if you want to process the SPL signal Every 100th Free Distributors GND Connect to GND on your microcontroller Distributor Login Eleven 100 Arduino Uno Compatible Connect to 5 on your microcontroller Measuring SPL The SPL Sound Pressure Level output provides a voltage proportional to the audio level currently being detected SPL 15 also displayed visually using the DETECT LED near the top right of the module
79. Inter Integrated Circuit two wire communication bus Integrated Circuit Integrated Development Environment Institute of Electrical and Electronic Engineers Infrared Infrared Data Association Local Area Network Microcontroller National Association of Testing Authorities Nickel Metal Hydride rechargeable battery Microchip MCU Power over Ethernet Pulse Width Modulation Restriction of Hazardous Substances Directive European Union Arduino stackable board Arduino code file serial Peripheral Interface programming MCU Sound Pressure Level Requirements and Verification Matrix Transmission Control Protocol Internet Protocol Universal Synchronous Asynchronous Receiver Transmitter Universal Serial Bus Wi Fi encryption Wi Fi encryption Wi Fi a trademark of Wi Fi Alliance is used to connect to WLAN Wireless Local Area Network Wireless communication protocol Chapter 1 Introduction 1 1 Backeround Practically all consumer electronic devices household are controlled via Infrared remote controls In particular media entertainment systems have a large number of functions that are able to be controlled remotely Consumers may have many devices and a number of Remote Controls having various functions and layouts ThinkFlood the makers of RedEye suggest that deep down everyone loves technology or would if it wasn t so darn frustrating sometimes and unreliable and hard to use ThinkFlood 2012 ease consu
80. Lset digitalWrite pin IRMimic2 CSEL 0 LOW digitalWrite pin IRMimic2 CSEL 1 LOW digitalWrite pin IRMimic2 CSEL 2 LOW hf CSELset 1 if 1 CSELset Serial printin 1 CSELset digitalWrite pin IRMimic2 CSEL 0 HIGH digitalWrite pin IRMimic2 CSEL 1 LOW digitalWrite pin IRMimic2 CSEL 2 LOW if 2 CSELset i Serial println 2 CSELset digitalWrite pin IRMimic2 CSEL 0 LOW digitalWrite pin IRMimic2 CSEL 1 HIGH digitalWrite pin IRMimic2 CSEL 2 LOW if 3 CSELset t Serial println 3 CSELset digitalWrite pin IRMimic2 CSEL digitalWrite pin IRMimic2 CSEL 1 HIGH digitalWrite pin IRMimic2 CSEL 2 if 4 CSELset i Serial printIn 3 CSELset digitalWrite pin IRMimic2 CSEL 0 LOW digitalWrite pin IRMimic2 CSEL 1 LOW digitalWrite pin IRMimic2 CSEL 2 HIGH if S CSELset i serial printIn 3 CS ELset digitalWrite pin IRMimic2 CSEL 0 HIGH digitalWrite pin IRMimic2 CSEL 1 LOW digitalWrite pin IRMimic2 CSEL 2 HIGH if 6 CSELset i Serial printIn 3 CSELset digitalWrite pin IRMimic2 CSEL 0 LOW digitalWrite pin IRMimic2 CSEL 1 HIGH digitalWrite pin 2 CSEL 2 HIGH if 7 CSELset i Serial println 3 CSELset digitalWrite pin IRMimic2 CSEL 0 HIGH digitalWrite pin_ IRMimic2 CSEL 1 HIGH digitalWrite pin IRMimic2 CSEL 2 HIGH delay 5 Stablise data lines void IR LEARNO i serial p
81. OM write 12 32 4 char 4 109 EEPROM write 12 32 5 5 EEPROM write 12 32 6 char 6 EEPROM write 12 32 7 char 7 EEPROM write 12 32 8 char 8 j void writeSettings TODO write SRAM variables to EEPROM local_1p 192 168 1 2 EEPROM write 0 192 write local ip byte local ip E 4 192 168 1 2 Nocal 1 12 9 local 13 8 char a byte b B10010 is the binary formatter B10010 18 decimal void readSettings i The 8 bit byte 0 255 1s compatiable to the unsigned char ipl variables for ASYNCLABS WiServer h Library local 1p 198 168 1 2 local 1p 0 EEPROM read 0 local 1 1 EEPROM read 1 local 1p 2 EEPROM read 2 local 1p 3 EEPROM read 3 gateway_ip 192 168 1 1 gateway _1p 0 EEPROM read 4 gateway 1 1 EEPROM read 5 gateway 1 2 EEPROM read 6 gateway 1 3 EEPROM read 7 subnet_mask 255 255 255 0 subnet mask 0 EEPROM read subnet mask 1 EEPROM read 9 subnet mask 2 EEPROM read 10 subnet mask 3 EEPROM read 11 void printStuff 110 Serial printIn program variables byte al local 1 0 type byte will fail String al local 1p 0 type String will fail int al local 1 0 int a2 local 1 1 int local 1 2 int a4 local 1p
82. SURLConnection connection NSURLConnection alloc initWithRequest request delegate self if connection Connect label text Connecting else Error request setURL NSURL URLWithString http 192 168 1 2 request setHT TPMethod POST request setValue postLength forHT TPHeaderField Content Length request setValue application x www form urlencoded forHT TPHeaderField Content Type request setHT TPBody postData J M added th s sn asna p i nn NSURLRequest request NSURLRequest requestWithURL NSURL URLWithString http 192 168 1 2 S2 cachePolicy NSURLRequestUseProtocolCachePolicy timeoutlnterval 10 0 NSURLConnection connection NSURLConnection alloc initWithRequest request delegate self if connection I Connect label text g Connecting else Error JO Ya E Y TY Y Y P RESTE Isa M p added th Ec cen n l ENEMIES PE TE NSURLRequest request NSURLRequest requestWithURL NSURL URLWithString cachePolicy NSURLRequestUseProtocolCachePolicy timeoutlnterval 10 0 NSURLConnection connection NSURLConnection alloc initWithRequest request delegate self if connection Connect label text g Connecting else Error kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk P added th
83. T Have the following where applicable been attached to this application irticinant mation Sheet Identified survey Survey Participant Information Sheet Consent Form Interview focus groups Sample questions in project Aim section 2 1 Participant Information Sheet Consent Form Other method where applicable Participant Information Sheet Consent Form Advertisements letters of invitation where applicable Evidence of permission from extemal organisation to conduct research and or recruit participants e g Currently being sought School or Hospital E Evidence of permission from 050 to recruit 050 Yes students Currently being sought Page 10 of 12 68 Other please describe SUBMISSION 1 Please forward the finalised application including supporting documentation via email to ethics Pusq edu au You do not need to forward a hard copy 2 Print the signatures page last page arrange signatures and forward to Ethics Officer USO West St Toowoomba 4350 QLD Australia Page 11 of 12 69 SIGNATURES PAGE Title of project Wireless LAN Based Infrared Remote Control Applicant declaration I the undersigned confirm that the information contained in this application accurate conduct will not commence unti ethical contained in the Natonal Statement on Ethical Conduct in Human Research 2007 wil comply with any other condition laid down
84. University of Southern Queensland FACULTY OF ENGINEERING AND SURVEYING WIRELESS LAN BASED INFRARED REMOTE CONTROL A dissertation submitted by John Michael Palmer BTEng in the fulfilment of the requirements of Course ENG4111 and ENG4112 Research Project towards the degree of Bachelor of Engineering Electrical amp Electronic Submitted October 2012 ll Abstract Practically all consumer electronic devices a household are controlled via Infrared Remote Controls A Number of these consumer devices can be controlled using one Universal Infrared Remote Control A Smart Phone or Tablet PC with a Web Browser or an Application can be used to provide a new control interface to the Universal Infrared Remote Control This 15 accomplished using WLAN communications and a Web Server built into a Universal Infrared Remote Control An Arduino based Prototype has been designed and built that successfully demonstrates Wi Fi enabled Smart Phone controlling consumer home media appliances It also has an extra feature that provides automatic volume control 111 Disclaimer University of Southern Queensland Faculty of Engineering and Surveying ENG4111 Research Project Part 1 amp ENG4112 Research Project Part 2 Limitations of Use The Council of the University of Southern Queensland its Faculty of Engineering and Surveying and the staff of the University of Southern Queensland do not accept any responsibility for the tru
85. W QA GQ W6W QA GQ W6W 11111 111119 AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW AQ GQ WW Tested Pass 1 1 USB cable 22 5 V Tijj yy Wei 7722222272 722272 222222222 _ n522 5 __ 85223 __ 5224 i __ n5222 22 Z 2 YY 77 2 I 2 2 2 2 2 E Z 2 SS Z 2 Z sss XG QV GQ IN QO AA MW GQ 3 3 30 33 QQ S RC GQ OQ SPSS GG QQ OMA AAA WW A CQ A qq w QQ MA QA AMA gt WW w GQ QAAAAAAQAQAQAMCAQA WW A QQ QA QA QA AA QA YQ A MW QA A A A QA QA WM SPSS QA AA QQ QQ QA QA MA WW AAA MYO AQ WW SSSSSPSS GC GQ QQ QA AAA A AM QA AQ QQANYMQ A WM SS SS SS N GQ Md 01 N Md N MW N Mv N Md wn N 01 N Md MW N Md wn N 0 N 0 N 0 N 0 N 0 N 0 N 0 N 0 N N Md N MW N N
86. al terminal Notes Resistor identified correctly Photos in design section Results Resistor ranges tried from 470k ohm to 150 k ohm Module 15 working well Pass Fail Follow up Action Investigate changing gain in MCU software TEST SHEET Notes Fixed a wiring mistake Input with no connection to SPL amplifier Just resistance measurement only Resistance k Ohms Connected to SPL amplifier and works well Added a default gain resistor Pass Fail 161 Follow up Action Some slight adjustment of feedback resisters might provide better range of gain H 7 Power Consumption Test number MCU Power 1 System Component Requirement Date Tester Task Notes Note Voltage and Current meter was not NATA calibrated Alkaline battery 6 V after regulator 5 0 V NiMH battery 5 1 V after regulator 4 6 V Startup idle 143 mA at 5V to 135 mA at 4 6V Microphone triggered 3 mA Wi Fi Tx 160 mA 170 mA at 5V Wi Fi Tx 150 mA at 4 6V No Wi Fi sleep 45 mA at 5V to 38 mA at 4 6V Battery capacity 2450 mAH Battery life 2450 mAH 150 mA 16 3 hours Battery life 2450 mAH 135 mA 18 hours Results Pass Fail Follow up Action Future work to reduce power consumption APPENDIX I Design Evaluations 162 163 1 1 Sub System Components and Tools Through the research it has been found that up to date manufactures instruction material and specifications has been difficult t
87. al testing it has been determined that the Web Server needs more SRAM for its runtime variables Without making too many changes to the initial design second board 15 still being worked on for Prototype 2 to extend the base functionality The Arduino 2560 Mega has 8 k SRAM and a further 256 k Program memory with more I O It is the next higher equipped Arduino development board see Figure 3 3 Arduino 2560 Mega board 3 Figure 3 3 Arduino 2560 board Both the Arduino hardware MCU boards are supported by the Arduino Integrated Development Environment IDE for writing of the software code and downloading the compiled files into the MCU The code is written in C and uses Arduino variables and functions The higher level C programming language 15 a better choice to code higher levels of functionality and software complexity for the project The Arduino platform supports many hardware shields with corresponding libraries extending purpose fit functionality The Arduino IDE works on both the Microsoft Windows and Apple Operating Systems The project has used the Microsoft Windows Arduino IDE version Migration of MCU code from Arduino IDE to AVR Studio IDE 15 possible but has not been done The Arduino platform advantages include local MCU board parts and shield availability various Wi Fi modules available code examples IDE includes USB on board programming low cost 16 3 3 User Interface From the research of
88. all a Prototype has been built and demonstrated showing functionality covering the objectives A second Prototype 15 part of further work using a larger MCU to extend functionality Security has been researched but not implemented due to time constraints 1 4 Dissertation Outline Chapter 1 Introduction to the background of the project its requirements and objectives Chapter 2 Background and Literature Review relates to the information required to design the subsystems of the Prototype Chapter 3 System Design describes the subsystem components that need to be integrated Into a functioning Prototype Chapter 4 Implementation presents the working Prototype and further work on a second Prototype Chapter 5 System and Functional Testing discusses testing of the Prototype Chapter 6 Conclusion and Further Work concludes the dissertation and summarises the achievements of the project with a discussion on further work required to extend functionality Appendix provides further information into the overall initial investigations and evaluations of subsystem components in producing the Prototype not documented in the body of the Dissertation Chapter 2 Backeround and Literature Review 2 1 History of Remote Controls Remote control technology has developed over time using mechanical wired light ultrasonics wireless and infrared transmissions links Wang 2001 Some devices can also be controlled with the TCP IP p
89. alled and investigated but not used The newer versions of the professional IDEs seemed to require their proprietary programmers and associated branded development kits Tool chain setup was problematic The Arduino Freetronics EtherTen board needs a special USB driver that is a bit hard to locate on the internet and instructions were vague Once the USB driver is installed the board worked with the LED Blink test file The Web Server functions worked ok See Figure I 6 Arduino Freetronics EtherTen LAN board with 2 G SD card 169 Figure 1 6 Arduino Freetronics EtherTen LAN board with 2 G SD card 11 Basic IR hardware setup EtherTen board was first use to do IR testing The Arduino Library IRremote h by Shirriff 2009 is well documented and the example code was used The author specifies limitations to the brands the library has been tested on The Linux community is referenced by the Arduino IR Library IRremote h by Shirriff 2009 for extra IR codes An IR hardware design circuit was designed as per Figure I 7 IR circuit design and calculations The components were soldered onto a stackable prototyping shield see Figure 1 6 IR Tx Rx hardware The control lines were connected to the MCU as per Figure 1 19 Freetronics EtherTen IR Pin assignments A Tx IR LED driver Allows for higher current with close discharge capacitors to reduce DC noise 180 Q 39 Q IR LED NPN BC337 800mA
90. also help Main Menu Send Sub Menus Command Buttons NM Hardware Control 4 SendlIR 2 Learning Timeout Figure 3 4 Web Page Navigation Flowchart 17 Figure 3 5 Web Page Telstra Figure 3 6 Learn Web Page 9 11 18 Telstra 911 92 59 192 168 1 2 5 Figure 3 7 Settings Web Page a Telstra 9 12 92 192 168 1 2 test lt Figure 3 8 URL decode Error Web Page 19 20 Applications for the Apple iPhone iPad are written in Apple Objective C syntax DeVoe 2011 using the Apple Xcode IDE The setup development and application Installation process is well described by iPhone Game Development Craft amp McElveen 2010 with further information on the Apple Developer web site The registration process requires acceptance of the licence agreement with Apple To use the IDE a yearly fee 15 required and the developed software can only run on apple devices registered to the developer s key The key has to be backed up on a USB drive There are different levels of developer contract with Apple based on software functions and services used In order to have the application submitted the Apple App store the hardware needs to be submitted to Apple and kept by Apple at cost to the developer Any change to the hardware or software means the device has to be resubmitted to Apple A simple Application writ
91. and Verification Matrix SRVM also listed in Appendix B IR WLAN Remote Control Requirements Block Diagram VER 5 2012 10 22 11 22 R1 Input Key R2 Interface Hardware R1 User commands Software R2 Apple iPhone iPad R1 1 1 Select TV Link R1 1 2 Select DVD R3 Network R1 1 3 Select Air Con Existing System R1 1 4 Select Light R1 2 1 TV volume up R1 2 2 TV volume down R1 2 3 TV volume mute R2 2 web browser R1 2 3 TV channel up R1 2 3 TV channel down R1 3 1 DVD play R1 3 2 DVD stop R1 4 1 A C on R1 4 2 A C off R1 5 1 Light on R2 5 USB R1 5 2 Light off R4 Controller Q E SG F Q N 6 Controlled R4 4 Wi Fi Rx Tx R5 Development V Devices Environment N 5 gt r 1 Q 4 t 2 Serial link to WiFi shield 4 0 4 R4 1 microprocessor 1 8 Arduino ATMEL AVR i z z 2 z 4 1 1 R4 1 4 Arduino OS Microphone R5 1 1 Tools R5 2 1 1 R5 2 1 2 R5 2 2 2 R5 2 2 1 R5 2 2 1 1 cL USB LAN WiFi USB lt UART v R5 2 2 Microsoft R5 2 1 Apple R5 1 2 Test R5 2 2 3 Arduino R4 1 3 MCU interface Equipment R4 2 microprocessor 2 R5 2 1 3 R5 2 2 4 Terminal IRMimic Microchip PIC R5 2 1 4 iTunes R5 2 2 5 WizNet R5 1 R5 2 Hardware Software development R4 3 Battery
92. ank my supervisor Dr Alexander Kist for his guidance and advice in supporting the project I am very grateful to the USQ Engineering Team for their support that they have given and providing an external mode of study Thank you to the Arduino microcontroller platform with its widely available parts product support and information from the Arduino community V1 Table of Contents uuu E namna nus ites Gates DYES 111 cesar ven wa oM Et i d puts b M Ext V RES 1001 SETTE NN LET OU Elo IX 0 uya x r q 1 sata eee MM LL 1 SCO i n ma 2 53915 apuyasqa 2 14 2185 ERR Saa veo e 3 Chapter 2 Background and Literature RevIew 4 Remote ceo ee E tna odes 4 2 2 Current Commercial PrOQUCIS 4 2 9 USeI IHIGEIQC eu et ee 4 23 35 es 7 2 5 1 802 E COnDIIeCUVID sees iato eee
93. ar webBTN L4 PROGMEM lt p gt lt input type button value L4 FORWARD onclick location href http 192 168 1 2 L4 gt lt p gt const prog char webBTN L4a PROGMEM lt p gt lt input type button value L4 FORWARD onclick location href http const prog char webBTN L4b PROGMEM L4 gt lt p gt const prog char webBTN L5 PROGMEM lt p gt lt input type button value L5 BACK onclick location href http 192 168 1 2 L5 gt lt p gt const prog char webBTN L5a PROGMEM lt p gt lt input type button value L5 BACK onclick location href http const prog char webBTN L5b PROGMEM L5 gt lt p gt const prog char webBTN L6 PROGMEM lt p gt lt input type button value L6 RED onclick location href http 192 168 1 2 L6 gt lt p gt const prog char webBTN L a PROGMEM j lt p gt lt input type button value L6 RED onclick location href http V const prog char webBTN L b PROGMEM L6 gt lt p gt const prog char webBTN L7 PROGMEM lt p gt lt input type button value L7 BLUE onclick location href http 192 168 1 2 L7 gt lt p gt const prog char webBTN L7a PROGMEM lt p gt lt input type button value L7 BLUE onclick location href http M const prog char webBTN L7b PROGMEM L7 gt lt p gt const prog char web Learnl PROGMEM
94. are seen on a Television screen Some Televisions may be able to turn off the animated on screen volume bars and the Prototype could directly control the Television volume unit The design concept 15 to only increase the volume up to 3 times and then lower it down to 3 times while keeping track of the volume position The sound levels are not measured in any calibrated way It 1 just met to increase and decrease around what the individual user would consider their personal average volume listening level The hardware listens and if the SPL 1s above a threshold code immediately decreases the volume one time The algorithm listens again and reduces the volume one more time if the measured SPL is above the set threshold To increase the volume the system listens and if the room sound level is quieter with the SPL below the threshold for about six seconds an IR signal 1s sent to increase the volume SPL threshold level is set by adjusting the gain on the microphone R4 1 Initially the gain was set manually by some rough op amp gain calculations and then by trial and error Finally a gain feedback resistor of 220 kO proved a good value for testing and can be seen hand soldered in place of the surface mount resistor in Figure 3 14 DC power low pass filter and changed gain resistor See Figure 3 13 Freetronics microphone module with gain feedback surface mount resistor The SPL output 1 used and has a small RC time constant see Freetronic
95. ate in case it is terminated later If your application supports background execution this method is called instead of applicationWillTerminate when the user quits void applicationWillEnterForeground U Application application Called as part of the transition from the background to the inactive state here you can undo many of the changes made on entering the background void applicationDidBecomeActive UlApplication application Restart any tasks that were paused not yet started while the application was inactive If the application was previously in the background optionally refresh the user interface d void applicationWill Terminate UlApplication application Called when the application is about to terminate Save data if appropriate See also applicationDidEnterBackground 4 120 F 3 4 ViewController h ViewController h IRMCU Created by John on 14 07 12 Copyright c 2012 _ __ All rights reserved import lt UIKit UIKit h gt interface PostController UlViewController interface ViewController UlViewController property nonatomic retain IBOutlet UlLabel label nonatomic retain NSString response IBAction BTN IRMCU IBAction BTN 1 IBAction BTN 52 IBAction BTN 53 IBAction BTN 54 IBAction BTN S5 IBAction BTN 56 end
96. back to this is more memory 15 needed in the MCU Shirriff 2009 deicated IC that can store up to 57 codes waveforms and play them back 15 IRMimic2 PIC IC by Tauntek Grieb B 2012 and identified by AVRFreaks as a reliable solution AVRFreaks 2012 Carrier Frequency There are a number of different carrier frequencies In use If the carrier frequency 15 not matched between the transmitter and receiver the link will be degraded or just not work Carrier frequencies are mostly set by crystals Sometimes crystals of the correct frequency were hard to get and manufactures used what they could get This resulted in slightly different carrier frequencies being used A common carrier frequency range 15 about 38 kHz Vishay 2003 10 Infrared Transmission An Infrared IR Light Emitting Diode LED look like a common LED but their output wavelength 15 invisible to humans Some have a clear or blue moulded casing with a lens The spectral wavelength required 15 940 nm known as Far Infrared IR LEDs have expected bandwidth of 50 nm and beam angle 30 degrees with power levels of 100mW Jaycar 2010 datasheets Everlight 2004 Taitron 2007 For hardware testing purposes the IR spectral emission can be seen by a camera Shirriff 2009 Infrared Reception An Infrared IR Photodiode detects and receives Infrared energy levels The device has some capacitance and its output 15 a current To overcome this and to look at faster signals a
97. bout 30 seconds to establish a connection using WAP2 Both Adhoc and Infrastructure connection modes both work ok as the IP addressing and settings could all be changed The module did not get hot The red on board LED correctly indicated when it was working 40 5 3 AsyncLabs Web Server Keeping the Web Pages and Menu simple as well as limiting the amount of URL string decoding kept the Web Server stable After setting up the AsyncLabs Library and using the Arduino IDE 0023 the Web Server was successfully implemented If any more system variables were used the Web Server was unstable Even though the MCU code compiled and downloaded correctly no warnings were given Much functionality was rolled back to make the Web Server stable To process URL commands the code needed to test when the server response had finished Supporting documentation indicating how to do this did not work and when the Library was opened the code had a comment noting that it was unfinished and not coded This may have been a regression bug in the Library as other online sources indicated that it does work The Library was the only version available on GitHub This needs further investigation It 1s critical that the Web Server be sorted out for further functionality to be extended as the whole system relies on it 5 4 IRMimic2 IR Learning and Sending Testing of the IRMimic2 chip was successful on all the home media devices and air conditioner except for the XBox360 T
98. cally The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board The R and TX LEDs onthe board will flash when data is being transmitted via the ATmega8U2 ATmega16U2 chip and USB connection to the computer but not for serial communication on pins o and 1 SoftwareSerial library allows for serial communication on any of the Mega2560 s digital pins The ATmega2560 also supports TWI and SPI communication The Arduino software includes a Wire library to simplify use of the TWI bus see the documentation for details For SPI communication use the SPI library http www arduino cc en Main ArduinoBoardMega2560 19 10 2012 11 58 58 AM 149 Arduino ArduinoBoardMega2560 Programming The Arduino Mega can be programmed with the Arduino software download For details see the reference and tutorials The ATmega2560 on the Arduino Mega comes preburned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer It communicates using the original STK500 protocol reference header files You can also bypass the bootloader and program the microcontroller through the ICSP In Circuit Serial Programming header see these instruetions for details ATmega16U2 or 802 in the revi and reva boards firmware source code is available in the Arduino repository The ATmega16U2 8U2 is loaded with a DFU bootloader which can be activat
99. ch email through an organisation advertisements mall out who will be involved in the recruitment of participants gate keeper approvals and evidence of same ie approval or permission from a person representing an organisation which gives permission for the researcher to access participants under their authonty For eg a Principal of a particular school may be an authorised person from Education Qld providing authority for Contact will be made by phone call to family and friends of the researcher John Palmer asking if they would like to participate in the research activities The Researcher John Palmer will contact the participants 3 5 List the location s where the data will be collected The data is to be collected at the residence of John Palmer This site has been selected for the testing and demonstration of the calibrated control of John Palmers personal home audio visual equipment that includes television sound system D VD player and an air conditioner The media presented that will be controlled will be free to air commercial television commercial radio and PG DYD content 3 6 Does this research involve recruitment through an organisation other than USO If YES please list the organisations and specify whether you have obtained written permission from the organisation to recruit the participants 3 7 Does this research involve 050 staff students or data If YES please list the relevant faculties school sectio
100. cond or so the bootloader is running on the Mega2560 While it is programmed to ignore malformed data ie anything besides an upload of new eade it will intercept the first few bytes of data sent to the board after a connection is opened If a sketch running on the board receives one time configuration or other data when it first starts make sure that the software with which it communicates waits a second after opening the connection and before sending this data Mega2560 contains a trace that be cut to disable the auto reset The pads on either side of the trace can be soldered together to re enable it It s labeled You may also be able to disable the auto reset by connecting 110 ohm resistor from 5V to the reset line see this forum thread for details USB Overcurrent Protection The Arduino Mega2560 has a resettable polyfuse that protects your computer s USB ports from shorts and overcurrent Although most computers provide their own internal protection the fuse provides an extra layer of protection If more than 500 is applied to the USB port the fuse will automatically break the connection until the short or overload is removed Physical Characteristics and Shield Compatibility The maximum length and width of the Mega2560 PCB are 4 and 2 1 inches respectively with the USB connector and power jack extending beyond the former dimension Three screw holes allow the board to be attached to a su
101. connectivity CuHead WiShield V2 Main MCU with Web Server Fixed gain Microphone with DC power filter Battery Pack See Figure 4 1 Prototype 1 assembled Figure 4 1 Prototype 1 assembled 37 MCU Software components constst 01 AsyncLabs Web Server simple Web Pages Factory W1 F1 configuration settings simple Factory Reset of IP address only simple display of Settings limit of seven IR channels stored and learnt max 1s 57 all seven IR channels can be Sent Automatic volume enabled serial print out for debugging and program status Note Software features are limited but functional due to the 2k SRAM limit of the AVR328p MCU affecting the Web Server performance Further design work has continued on the Arduino Mega2560 MCU board that has increased resources User interface is functional with both the Web Browser WebPages and the iPhone Application From user input in the Focus Group discussion research a simple interface was delivered to enhance the user experience Web Pages are simple and there layout 1s exactly as described In Chapter 3 System Design e Send e earn e Settings e Error iPhone Application 1s also displayed in Chapter 3 System Design e one page simple buttons e one button to open Web Browser for command Learning and Settings 4 2 Prototype 2 Further work continues on with Prototype 2 it 15 not fully operational It uses the Arduino Mega 2560 with Sk SRAM and more digital I O This allows for e
102. cupperhead uifi shield ci ci z n n Document Number TITLE m u 2 2 C n mti Li ci PM oo 80 11 CHI Ay t3VS I gt MIX 3 Co SOIC YEI 1223 29 GHO 2G TX 5 401018 24 55 22 21 ag GND 15 47k Ll GND F gt GND 3 aL al al al alc ao am snm w my 1 P a 3 nr LJ m lt 2 1 1 Sheet Date 3 23 2011 10 00 33 139 G 4 Arduino compatible Uno Freetronics Eleven Used for Prototype 1 www freetronics com 2 USB MCU Prototyping area Reset button C T WV P PS 2 1 ceed 257 USB socket for I E host connection 1 1 2 l1 l1 1 l DM LJ 2 1mm power 4 input 7 12 MCU Power pins Analog input pins Freetronics Eleven is a microcontroller board which is 100 compatible with the popular Arduino Uno reference design while incorporating several updates and improvements It provides a balanced combination of general purpose digital I O pins analog inputs pulse width modulated PWM outputs and communica
103. d by the HREC 0 advise edu au immediately of complaints or other issues in relation fo the which may warrant review of the ethical approval of the project c make submission for aporoval of amendments to the approved project before implementing such changes d provide progress report for every year of approval e provide a final report when the project is completa f advise in writing If the project has been discontinued For c to forms are avaiable on the USO ethics website httpuiwww usq edu au research ethicsbia human Please note that failure to comply with the conditions of approval and the National Statement 2007 may result in withdrawal of approval for the project You may now commence your project wish you all tha best for the conduct of the project Melissa Ethics Commattee Support Officer Office of Research and Higher Dagrees Toowoomba Springfield Fraser Coast usq edu au 71 D 3 Focus Group questions and user testing requirements University of Southern Oueensland Faculty of Engineering and Surveying Wireless LAN Based Infrared Remote Control Ethics Approval No H12REA143 Researcher John M Palmer Date 29 08 2012 1 Discussion group General discussion of the topics The number of remote controls users have and what devices they control The use of all in one remotes their setting up and purchase costs Any problem
104. d input voltage The Atmel AVR 328p MCU output pin rating is 5 V at 40 mA Power usage 15 important The Arduino main MCU has a low power sleep mode Parts of the circuit should be switched off when not in use The Wi Fi Shield is power hungry however it supports a power saving sleep mode Power saving actions also includes managing unused pins and circuit functions STMicroelectronics 2012 Power saving features have not been enabled it is further work for Prototype 2 52 IR sensor module requires small amount of operating current whenever it 15 powered For good battery life 1 15 necessary to power down the IR sensor module except when learning IR Mimic2 chip handles this automatically Grieb 2012 CuHead Wi Fi shield power consumption specifications o Sleep mode 250 uA o Transmit 230 mA o Receive 85 mA The systems total average current will be measured in the results section and will give an indication of battery life A 6 volt 4 x 1 5 Volt size AA Alkaline battery connected directly to the 2 1 mm power socket will under power the MCU This battery will need to be connected through a silicon power diode to the 5 0 Volt power header pin To keep the voltage down Prototype 1 will use 4 x 1 2 Volt NiMH cells with the total supplied voltage about 4 8 Volts This will drop as the battery loses its charge Figure 3 18 4 1 2 Volt NiMH size AA Rechargeable Batteries Figure 3 18 4 x 1 2 Volt NiMH
105. dministration of substances e g drugs alcohol food Physical examination of participants e g blood glucose blood pressure and temperature monitoring surgical O00000 S0 OHO00 Fage 2 of 12 60 Recordings audio Other 2 3 Research Methodology Outline the proposed method including data collection techniques and instruments tasks participants wil be asked fo complete estimated fime commitment required of them and how data will be analysed 300 words max ACTIVITY 1 Discussion group Questions will be asked as stated in the project aim to stimulate discussion and results recorded with pen and paper DURATION TIME 1 HOUR ACTIVITY 2 User product testin Tasks to be told to the user as stated in the project aim instruction sheet will be given User questions answered and responses noted with pen paper DURATION TIME 20 minutes DATA ANALYSIS The data will be used to refine design hardware functionality and user software interface 3 PARTICIPANTS AND RECRUITMEHT section 4 of the National Statement on Ethical Conduct in Human Research has identified particular groups of research participants which require special ethical consideration These groups include pregnant women the foetus Ch 4 1 children and young people Ch 4 2 people in dependent or unequal relationships Ch 4 3 people highly dependent on medical care Ch 4 4 people with cognitive impairment intellectual
106. dren Asphyxiation so plastic packaging bags needs holes Soft tissue damage from cutting and drilling Repetitive strain from typing and using hand tools These have been evaluated with controls the table below Table C 1 Hazard Risk Identification Evaluation and Risk Controls likelihood Exposure Consequence Control Very Very Gloves Skin and eye Isolation injury Gloves Protective eyewear RF cell co Shock and Anti static mat discharge Component amp wrist strap damage Chemical Slight Occasionally Skin and eye Good ventilation Solder and injury Gloves cleaners Protective eyewear Drill Slight Occasionally Skin and eye Isolation injury use guards Gloves Protective eyewear injury Protective eyewear Chocking Very slight Very rarely Possible death or Reduce and brain damage eliminate small parts bags Give Warnings Asphyxiation Very slight Very rarely Possible death All bags need brain damage holes and Warning labels 56 C 2 Assessment of Consequential Effects Consequential effects some possible effects could be e Lowering level of physical exercise increasing the risk of weight gain and associated health problems e Repetitive muscular strain from overuse e The changing of TV viewing content and volume by station owners e Security issues of unauthorised access to control equipment WLAN RF exposure
107. e used to access settings web page 1p address static address 192 168 1 3 sun net mask 255 255 255 0 router DNS Search Domains HTTP Proxy 99 WPA WPA2 passphrase const prog char security passphrase PROGMEM 12345678 max 64 characters WEP 128 bit keys sample HEX keys prog uchar wep 8 PROGMEM 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a OxOb 0x0c OxOd Key 0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Key 1 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Key 2 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Key 3 setup the wireless mode infrastructure connect to AP adhoc connect to another WiFi device unsigned char wireless mode WIRELESS MODE INFRA unsigned char wireless mode WIRELESS MODE ADHOC unsigned char wireless mode 1 WIRELESS MODE INFRA unsigned char wireless mode 2 WIRELESS MODE ADHOC JMP unsigned char ssid len unsigned char security passphrase len End of wireless configuration parameters locations that have not been written have a value of 255 size for Uno ATmega328p 16 IK EEPROM size for Mega526 is 4K reset to factory default on star
108. e to send codeValue codeValue amp 1 lt lt codeLen 1 codeValue codeValue toggle lt lt codeLen 1 if RC5 14 SerraL print Sent RES y Serial println codeValue HEX irsend sendRC5 codeValue codeLen else irsend sendRC6 codeValue codeLen Serial print Sent REG 795 Serial println codeValue HEX J else if UNKNOWN i e raw Assume 38 KHz irsend sendRaw rawCodes codeLen 38 irsend sendRaw rawCodes codeLen 40 JMP 201204 15420202 SUN modify JMP 2012 04 15 20 04 50 when set to 36 kHz pulses later the train fail FX OMP 2012 04 15 20204 SUN worked at 40 kHz exact match to waveform Ff JMP 2012 04 15 201244 8UN sucesstul start stop Win media player Serial println Sent raw int lastButtonState Loop 4 If button pressed send the code int buttonState digitalRead BUTTON PIN if lastButtonState HIGH amp amp buttonState LOW Serial println Released Serial 2022204 5526405 SUN 4 added irrecv enableIRIn Re enable receiver if buttonState Serial println Pressed sending digitalWrite STATUS PIN HIGH sendCode lastButtonState buttonState digitalWrite STATUS PIN LOW delay 50 Wait a bit between retransmissions else if irrecv decode amp results 85 digitalWrite STATUS PIN HIGH storeCode amp results irrecv resume
109. ed 0 De identified 57 personal information will be collected Additional information provide here 7 3 Publication reporting of data Please indicate in what form personal information will be published reported Identified Re identifiable coded De identified 57 No personal information will be published Additional information provide here 7 4 Describe the procedures that will be adopted to ensure confidentiality of participant s during the collection of the data in the storage of the data and in the publication of results In the recorded data there will be no identifiable information linked to participants The data will be recorded in written form and in its storage there will be no identifiable information linked to participants Results will be published In the dissertation and its appendix with no identifiable information linked to participants T 5 Will a recording audio video photograph or other of participants be made If so what purpose will this recording used for Will it be retained and used beyond the initial transcription analysis or will it be erased following transcription Ho T 6 Will the data be stored for the requisite 5 years or 15 years for clinical research and Yes Ho then destroyed O 51 If NO please justify The only storage of the data will be in the dissertation and its appendix The data will live the of the dissertation The dissertation will be submitted to the
110. ed by On Revi boards connecting the solder jumper on the back of the board near the map of Italy and then resetting the 802 On Reva or later boards there is resistor that pulling the 8102 1602 HWE line to ground making it easier to put into DFU mode You can then use Atmel s FLIP software Windows or the DFU programmer OS X and Linux to load a new firmware Or you can use the ISP header with an external programmer overwriting the DFU bootloader See this user contributed tutorial for more information Automatic Software Reset Rather then requiring physical press of the reset button before an upload the Arduino Mega2560 is designed in way that allows it to be reset by software running on a connected computer One of the hardware flow control lines DTR of the ATmegaBU is connected to the reset line of the ATmega2560 via a 100 nanofarad capacitor When this line is asserted taken low the reset line drops long enough to reset the chip The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment This means that the bootloader can have a shorter timeout as the lowering of can be well coordinated with the start of the upload This setup has other implications When the Megaz560 is connected to either a computer running OS X or Linux it resets each time a connection is made to it from software via USB For the following half se
111. employer 2 Press enfer to add more investigators 3 Proposed dates of data collection Start some time after End 25 October 2012 This wil be the dates clearance is 1 July 2012 as soon as project submission date given for inclusive Clearance cleared to start by Ethics Committee provided for a max 3 yearz Status of funding support for the F Unfunded Funding pending Funding received project If the project iz funded briefly describe the name of the funding organisation and the Page 1 of 12 59 PROJECT DETAILS 2 1 Plain language statement of project Using language provide a brief summary of fhe project 300 words outlining the project s broad aims participant groupis and possible outcomes AIM The aim is to improve or extend the functionality of a consumer electronic product called the Universal Infrared Remote Control This device removes multiple Infrared Remote Control interfaces by combining functions into one This project is to design and build a Wireless Universal Infrared Remote Control to provide a single point of remote control This access point is controlled via a web page in a web browser or an application on a smart phone or a tablet personal computing device These smart devices have a common WiFi communications link that can access this central control point HUMAN RESEARCH COMPONENT 1 Discussion group will have a general discussion of the top
112. en out on the ICSP header which is physically compatible with the Uno Duemilanove and Diecimila LED 13 There is a built in LED connected to digital pin 13 When the pin is HIGH value the LED is on when the pin is LOW it s off TWI 20 SDA and 21 SCL Support TWI communication using the Wire library Note that these pins are not in the same location as the TWI pins on the Duemilanove or Diecimila The Mega2560 has 16 analog inputs each of which provide 10 bits of resolution i e 1024 different values By default they measure from ground to 5 volts though is it possible to change the upper end of their range using the pin and analogReference function There are a couple of other pins on the board AREF Reference voltage for the analog inputs Used with analogReference Reset Bring this line LOW to reset the microcontroller Typically used to add a reset button to shields which block the one on the board Communication The Arduino Mega2560 has a number of facilites for communicating with a computer another Arduino or other microcontrollers The ATmega2560 provides four hardware UARTs for TTL 5V serial communication ATmega16U2 ATmega 802 on the revision 1 and revision 2 boards on the board channels one of these over USB and provides a virtual com port to software on the computer Windows machines will need a inf file but OSX and Linux machines will recognize the board as a COM port automati
113. ere were problems with receiving IR codes Results were not as expected using the example Arduino IR library and example code Different brand and device IR remote control signals were analysed Results were inconsistent The Rx and Tx circuit was checked and component values recalculated and LED currents re checked The IR beam from the LED was not able to be viewed by the camera in the iPhone More checking of the circuit followed After some more research a different camera was used and the Tx LED was viewed as working by an electronic digital SONY camera A test system using two Arduino MCUS was setup and the learnt IR codes could not be resent as same This needed further analysis The IR signals were measured directly using a Trans impedance amplifier with a Photodiode The Photodiode 15 a current device and has capacitance so it needs to be part of a Trans impedance amplifier or a Current to Voltage Converter Neamen 2007 p 641 The output was viewed using the PC sound card provides a cheap low bandwidth way to inspect received Infrared signals ZelScope 1s a PC sound card scope Zeldovich K 2012 see Figure 1 1 Measured IR wave forms using PC sound card 165 Figure I 1 Measured IR wave forms using PC sound card The Arduino mfrared library does not work perfectly and was unable to decode and send the same codes Only Raw signal recording and play back seemed to work Raw mode tests using a simpler protocol from a portable DVD
114. eypad mode commands are repeated as long as the key 1s held down See more on command repeating below If a key has not been trained yet when you press it no command will be sent Keys are not repeated within macros When a sequence of commands 1s recorded for a single key a one second pause 1s inserted between commands on playback This allows controlled equipment to react before the next command is sent MCU mode Select the number of the command 0 56 to send using the six CSEL inputs Assert the SNDRO mput and hold it high After the CPU wakes up and starts executing instructions 2 mSec the RDY signal will go low The command will be transmitted next then the RD Y signal will go high after transmission 1s fimshed After seeing RD Y high the MCU should take SNDRO low to end the operation In MCU mode the command is sent just once for each SNDRQ sequence Tt is not repeated Ifthe selected command has not been trained yet no command will be sent Command repeating There are many different formats and protocols used for IR remote control Some remotes send sequences that look like 1 ARRRRR repeat until button is released is the command code and R 1s a shorter code that signals the button 1s still pressed NEC code works like this 2 AAAAAA repeat until buton is released Panasonic Sony and some others work this way 3 ABABAB repeat until button 1s released some Denon HT recvr and DVD players work this way 4
115. f second of IR activity for each trained command This may contain multiple copies of the command The exact number depends on the protocol 1n use When you play back the command in either mode the entire half second sequence 18 replayed In some cases this may be long enough to cause repeated operations in the controlled equipment such as increasing the volume by two steps for instance when you only wanted one To avoid this when learning a command that displays this behavior do not hold the button on the remote until the red LED goes out but instead press the button for a shorter amount of time IRMimic2 will still capture the full one half second but the latter part of the recording will be empty so you will play back a shorter burst of the IR command sequence 132 n abe 40 1 4 ch NEA IDE MI T unm zuniqnaulne ace 1 1 ATLA ST MOE qM 1 1 huaggganau aus ZLATI WEE au Bugu aq yA lun BUTT 80340 133 IR Mimic2 PC board parts list updated 1 03 09 Ref Des Description Digi Key Parti Mouser Part 51 Vishay 50 34838 IR Receiver Module 7TBZ T5SOP34B38 01 IRMimic2 chip PIC18LF2420 I EB E U2 SV Linear Regulator TO 92 LM78L05ACZN amp S 512 LM78L05ACZ
116. ferent remote key to record it Again the LED will blink off after the command 1 learned Continue until all remote keys desired for that key have been learned then press the learn key to stop learning Keys can be re tramed as many times as you like If the LED blinks for four seconds when you press the button on the remote during training please wait until it stops and try If this happens make sure the remote 15 pointing at the IR sensor and about 1 away from it If this happens in the middle of recording a multi command sequence you should be able to re record just the key that caused the flashing Tf that doesn t seem to work just re record the whole sequence If the LED blinks for ten seconds during the learning process it means that the 57 command storage area 18 full You ll need to erase some commands order to record any new ones To erase all of the commands associated with a particular key press and hold the learn key then press the key you want to erase The LED should come on All commands previously assigned to that key have been erased Now press the learn key again to exit learn mode mode Select the number of the command 0 56 to learn using the six CSEL inputs Whichever number you select will be the same number you use later to send the command Assert the LRNRQ input and hold it high After the CPU wakes up and starts executing instructions 2 mSec the RD Y signal will go low and the Learn LED
117. g text size colour and contrast These common controls are found on Universal Infrared Remote Controls see Figure 2 2 This controller is mid range there are more complex touch screen ones and much simpler ones Figure 2 2 A Universal Infrared Remote Control Logitech Harmony 600 One disturbance 18 to look at and read a button label before an action 15 selected Poor lighting on passive remote interfaces are a problem whereas an iPhone or iPad is backlit One problem with touch screen devices is they lack tactile response Breen 2010 The user 15 unable to feel around the controls while keeping their eyes on the viewing screen to select an action With the popularity of the internet smart phones and tablets now ingrained into the lives of many technology conscious consumers an interface using these devices can now be an application Craft amp McElveen 2010 or a Web Page A Web Page use HTML Cascading Style Sheet CSS to format and make the Web Page interface more appealing Lemay 2003 To produce Web Pages the MCU needs to include a Web Server that can serve HTML using the HTTP protocol So why do some controls have different shapes sizes surfaces and colours How does this affect the user and what do they think about different interfaces And what would be the best features to put into an interface To gain more specific information about Infrared Remote Controls and how they are used a Focus Group Discussion
118. ge your board We don t advise it 3V3 3 3 volt supply generated by the on board regulator Maximum current draw is mA GND Ground pins Memory The ATmega328 has 32 KB with 0 5 KB used for the bootloader It also has 2 KB of SRAM and 1 KB of EEPROM which can be read and written with the EEPROM library Input and Output Each of the 14 digital pins on the Uno be used as an input or output using pinMode digitalWrite and digitalRead functions They operate at 5 volts Each pin can provide or receive a maximum of 40 mA and has an internal pull up resistor disconnected by default of 20 50 kOhms In addition some pins have specialized functions Serial o RX and 1 TX Used to receive RX and transmit TX TTL serial data These pins are connected to the corresponding pins of the USB to TTL Serial chip External Interrupts 2 and 3 These pins can be configured to trigger an interrupt on a low value a rising or falling edge or a change in value See the attachInterrupt function for details PWM 3 5 6 9 10 and 11 Provide 8 bit PWM output with the analogWrite function SPI 10 SS 11 MOSI 12 MISO 13 SCK These pins support SPI communication using the SPI library LED 13 There is a built in LED connected to digital pin 13 When the pin is HIGH value the LED is on when the pin is LOW it s off The Uno has 6 analog inputs labeled Ao through each of which
119. gn 4 4 Please justify the study in terms of the risk to participants Give your assessment of how the potential benefits fo the participants or contributions to fhe general body of Risk There is low exposure to using the test device The test device uses mature technologies found commonly within a house environment The design has considered safety aspects This lowers risk to participants To outweigh Potential benefits to participants and Contributions to the general body of knowledge As potential device users can provide feedback to the design of the device the device has a greater level of design success to providing a useful user interface with correct functionality and controls correct design is expected to make the users life simpler and easer when controlling televisions DVD players and other Infrared control equipment Getting the design right minimises electronic waste to the environment and saves on resources 4 5 How will any potential risks be minimised and or managed Potential risk will be managed through the safe design of the Wireless Infrared Remote Control and the user interface The researcher John Palmer will use and test the Infrared remote control before anyone else The researcher John Palmer will provide direct supervision of the use of the Infrared remote control and monitor the equipment being controlled for safety The researcher John Palmer may assist the user if they request assistance The participa
120. green LED indicating the SPL threshold was being reached A louder volume of sound was adjusted coming from a Television and then a music player The SPL threshold was triggered and gain was about right 5 6 Automatic Volume Control Algorithm Prototype 1 was left running for about two hours listening to room SPL from commercial Television showing advertising and also movie content The volume up command was sent allowing the volume to increase to the SPL threshold Then the volume down command was sent for sound levels above the SPL threshold When people entered the room to make conversation the volume automatically lowered as people tried to talk above the sound of the Television The volume lowered automatically and conversations were at a more pleasant volume Once the person left the room the volume had to be manually increased Overall the algorithm works well 5 7 Power System and Energy Usage Power saving measures have not been implemented The IRMimic2 has a built in power saving mode enabled Measured current was about 135 mA on average with currents exceeding 160 mA when the Wi Fi was communicating The Battery voltage is different based on cell chemistry either Alkaline 6 Volts or NiMHi 5 Volts Voltage to the positive power rail was slightly increased above 5 Volts but the positive supply rail did not increase This may be due to the regulator having some Zenner type protection also the 3 3 Volt rail was ok With the voltage and c
121. h climbed to No 3 from No 5 and Steve Sanghi Microchip CEO recently bought Roving Networks a Calif based company providing Bluetooth and Wi Fi modules and solutions as of 7th May 2012 Yoshida J 1012 This may have affected the supply of some types of Arduino Wi Fi Shields Parts also include software systems and libraries Software changes and updates are not always backward compatible to previous components The Arduino and MCU open source community along with forums 1 rich with applied knowledge that solves these problems Arduino 2012 AVRFreaks 2012 This information suggests that parts for system components need to be ordered in advance with some thought as to their continued availability and delivery times 13 Chapter 3 System Design 3 1 System Overview The design 15 broken into modules Modules that pass testing form the Prototype The production of an embedded system MCU Design and methodology 18 discussed by Leung 2012 The overall design for the Prototype 15 best managed by defining each requirement that Is easily referenced These requirements are modelled into a system block diagram for a system overview Each subsection has been designated a requirement number with sub requirements This 1s mostly fine grained with a lot of detail see Figure 3 1 System Requirements Block Diagram Or for a larger view see Appendix B This has been done for full system testing and is tracked using a System Requirements
122. hard to read especially in low light The most frequently used commands are volume and channel functions with generally 2 3 other special functions Users don t like dealing with batteries Users don t like things getting in the way blocking the IR beam for example people and cabinet glass doors Users have trouble finding their remote controls Users have a mixed experience in WLAN computer networking They have common connection problems like the connection 15 saying it 15 connected but the connection Is not working They want a single button fix and a connected not connected indicator User testing results Users said the Prototype was a bit big and users requested a smaller size It was explained that a final version would be a similar size to current Remote Controls and they were happy with that The setup and connection through the iPhone was demonstrated and users were happy with the simple WLAN connection Users liked the simple and easy Infrared code learning function for single commands Users liked the simple iPhone interface and found the web page text a bit small It was explained to the users that the web page should be like the iPhone app but 15 a limitation of the Microcontroller MCU and would be enhanced in a final design 73 D 5 Progress and Final Report University of Southern Queensland USQ Human Research Ethics Committee AUSTRALIA Progress Final Report Where an electronic signature has been provided o
123. harm to the user The user will be using an Apple iPhone and iPad These devices a consumer item designed to be safe The sound system being tested will not deliver extremely large sound levels and will only be used for a few minutes So sound exposure is low and will not damage the human ear Infrared signals being used will not injure the human eye The Infrared Remote Control being used uses the same existing and mature technology used in home wireless LAN computer networking and consumer Infrared Remote Controls that control existing television sets and DVD players So these technologies are mature and safe Batteries contain chemicals and are a shock hazard The Infrared Remote Control has batteries common to small electronic devices in the home The batteries are low voltage and secured into a case by a locking screw to prevent them coming out Ethical considerations To make people s lives and their environment safe Consider safety issues Assist people with mobility problems Manage the end of life disposal of electronics on the environment Fage 5 of 12 63 Consequential effects The user only using the device for short time so long term effects such as lowering physical activity which may cause weight gain and associated health problems or conditions like repetitive muscular strain from is considered a low risk for this in this research However these considerations will enter into the final desi
124. hield had to have its firmware re flashed Only serial RS232 URL PORT connectivity mode was working The manufactures documentation was outdated and had photos of different hardware in it After having extended problems with this Wi Fi Shield it was discarded and a different Shield and manufacturer was sourced for a fresh start 1 6 Web Server software library testing Two Web Servers were evaluated Before the WLAN Web Server the LAN Web Server was tested on the Freetronics EtherTen board Initially it would not work on the Arduino IDE 1 0 and was rolled back to IDE 0023 This was ok because knowledge gained here with decoding URL text strings was helpful In producing Prototype 1 1 7 User Interface design and testing Overall the user interface was scaled back to fix performance problems had to simplify the HTML CSS code had to put HTML text strings into program memory had to read and set pixel width of iPhone web page had to simplify menu structure had to rollback settings functionality as MCU was overloaded had to rollback full functionality of factory reset as MCU was overloaded had to reduce serial print usage to stabilise performance I 8 Apple Xcode and iPhone Application e The Xcode IDE needed to be up to date and all versions of the iDevice OS had to be current to do software development work this added delays 1 9 USB to RS232 Serial communications link This 1s needed for the MCU IDE to download compiled code into
125. his Xbox360 results 1s supported by Shirriff 2009 The length of IR codes for an Xbox360 15 longer than the codes for the tested sony Amplifier and TV The IRMimic2 chip cannot store the longer Xbox360 IR codes and this part of the project will need further work The IRMimic2 chip easily learnt IR signals The LED indicator helped the user know when the IR code had been learnt There were a few minor attempts to improve the learning of the volume commands as they were repeat codes The user had to press the sending volume code quickly and not hold the button down that s all This learning setup information would have to be added to the user manual Overall the IRMimic2 chip worked very well On power up some times the IRMimic2 chip would start up in learning mode and overwrite a memory location The possible cause 15 the SRAM limit on the Arduino because when functionality was reduced by reducing program variables the problem seemed to disappear Further investigation of the start up states of the Arduino pins 15 required along with using some professional MCU IDE tools During testing the IR beam from the LED was not able to be viewed by the camera in the iPhone After some more research a different camera was used and the Tx LED was viewed as working by an electronic digital SONY camera 41 5 5 SPL Microphone Hardware The added DC low pass filter stops the digital noise and the analogue circuit works well Tapping the microphone lit the
126. ics The number of remote controls users have and what devices they control The use of all in one remotes their setting up and purchase costs Any problems of frustration in using remote controls The commands buttons or actions that are used the most Any experience in the use of Wireless LAN or computer networking 2 Testing of the final device design by end users This is to include the use of an iPhone and an iPad with the following activities Unboxing of device Setup of device Teaching the device to learn commands General use af the programed device and user experience OUTCOME To use this information in refining the design and user interface that provides the Remote Control action 2 2 Research Categories Please mark as many categories as are relevant fo the proposed research Anonymous questionnaire survey Participants are not personally identified and cannot be from collected data Coded potentially identifiable questionnaire survey Identified questionnaire survey Examination of student work educational instructional techniques etc Examination of medical education personnel or other confidential records Observation overt with participant s knowledge Observation covert without participant s knowledge Focus groups Interviews structured or unstructured Telephone interviews Procedures involving physical experiments e g exercise Procedures involving a
127. imic2 RDY is LOW digitalWrite pin IRMimic2 LRNRQ LOW serial printlIn IR LEARN finished timeout r 0 disable timeout VER33T comment out void IR SEND boolean IR SENDY serial printIn IR SEND SEND called 1 VER35 removed digitalWrite pin IRMimic2 LRNRQ LOW just to make sure not needed digitalWrite pin IRMimic2 SNDRQ HIGH 100 delay 3 wait for IRMimic2 to be ready about 2 ms RDY will go LOW command is being transmitted serial printlIn IR SEND TX wait for RDY to go HIGH finished while LOW digitalRead pin IRMimic2 RDY timeout handles no IRMimic circuit connected OR fault IR timeout c IR timeout c 1 VER33T increment timout counter if IR timeout c gt IR timeout VER33T serial printlIn IR SEND timeOut gt 4 seconds V ER33T TODO send error as web page IR timeout c 0 VER33T break while VER33T or make pin IRMimic2 HIGH VER33T Sertal printIn IR SEND not finished delay 50 delay 100 VER33T finished timeout 0 VER34 incase exit while from pin IRMimic2 RDY is LOW digitalWrite pin IRMimic2 SNDRQ LOW serial printIn IR SEND finished SEND called 0 VER35 removed return true H K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K
128. in IRMimic2 MCU memory set channel pins if 2 CSELset Serial printin 2 2CSELset digitalWrite pin IRMimic2 CSEL 0 LOW digitalWrite pin IRMimic2 CSEL 1 HIGH digitalWrite pin IRMimic2 CSEL 2 10 27 void IR LEARN Manage IRMimic2 LearnErrors make LRNRQ HIGH learn then RDY LOW and IRMimic2 LED will light digitalWrite pin IRMimic2 LRNRQ HIGH using Timer O wait for IRMimic to be ready about 2 ms delay 3 Hold IR remote to Vishay receiver and push button to be learned Manage a Timeout digitalWrite pin IRMimic2 LRNRQ LOW Serial println IR LEARN finished Arduino MCU code example for Sending an IR signal 1s similar select a channel in IRMimic2 MCU memory digitalWrite pin IRMimic2 SNDRQ HIGH Manage a Timeout for hardware errors digitalWrite pin IRMimic2 SNDRQ LOW Serial println IR SEND finished This presents the IR design 3 7 Automatic Volume Control The user focus group research has indicated that one of the most frequent adjustments using a remote control 15 volume 28 By including into the design a microphone an average Sound Pressure Level SPL can be measured and used as part of a feedback loop to control volume This 15 like Automatic Gain Control AGC system This automated adjusting of the volume 1s planned for use on a separate sound amplifier for a Television media centre In this way no animated volume bars
129. in IRMimic2 SNDRQ LOW reset any lockups else if stremp URL L 0 LEARN home page Serial println URL L beep 50 PROMPT select button to learn j SEND BUTTONS VOLUME UP else if strcmp URL S1 0 SEND button 1 Serial printlIn URL S1 VOL UP CSEL 1 SENDO delay 20 trial IR SEND SEND VOULME UP AGAIN SEND j VOLUME DOWN else if strcmp URL S2 0 SEND button 2 Sserial printIn URL S2 VOL DOWN IR CSEL 2 SENDO delay 20 trial IR SEND SEND VOLUME DOWN AGAIN SEND 103 else if stremp URL S3 0 SEND button 3 Serial println URL S3 IR_CSEL 3 IR SENDO else if strcmp URL S4 0 SEND button 3 Serial printIn URL S4 CSEL 4 SENDO j else if stremp URL S5 0 SEND button 3 Serial printiIn URL S5 IR CSEL 5 SENDO j else if stremp URL S6 0 SEND button 3 i Serial printiIn URL S6 IR_CSEL 6 IR SENDO j else if stremp URL S7 0 SEND button 3 Serial printiIn URL S7 IR CSEL 7 SENDO LEARN BUTTONS else if strcmp URL L1 0 LEARN button 1 Serial println URL L 1 digitalWrite pin IRMimic2 LRNRQ HIGH IR CSEL 1 IR LEARNO j else if strcmp URL L2 0 LEARN button 2 t Serial println URL L2
130. ion and return of survey only for anonymous surveys other consent not being sought explain why Writen 5 2 15 it anticipated that all participants will have the capacity to consent to their participation in the research If HO please explain why not e g children incompetent participants etc and explain how proxy or substitute consent will be obtained from the person with legal authority to consent on behalf of the participant 5 3 Does the research specifically target the following groups of participants minors under 18 years Aboriginal and Torres Strait Islander Peoples people from non English speaking backgrounds people with an intellectual impairment or a mental illness prisoners people who may be involved in illegal activites people in dependent relationships with the researcher institution or funding body He researcher s clinical clients or students employees of the institution recipients of services provided by the funding body any other vulnerable group of participants 5 4 If you have answered yes in question 5 3 please provide details of the group of participants how the research participants rights will be protected how you will be sensitive to cultural backgrounds if applicable 5 5 How does the consent process ensure that informed consent is freely obtained from participants Please detail Potential participants will be told of the content of the activities Tor the focus group discussio
131. ived any complaints or concerns about the ethical conduct af YIN this project yes provide a summary of the issues and the action taken by the research team B Unexpected ethical issue management Have you become aware of any adverse events or other harms to research YIN participants not anticipated in the approved protocol If YES provide a summary of the issues the action taken by the research team and a justification for why the protocol should be allowed ta continue 7 Security of data Please confirm the security of the data collected and the conditions governing access to this data The results are in the Appendix of the Dissertation B Results of the research Has the research achieved to date the results anticipated in the approved Yn Please provide a brief summary of the results achieved to date Include any publications or other outputs arising fram the research project Results attached to report 8 Other ethical issues Are there any other issues about the conduct af this project that you would like YN to bring t the attention of the HREC If yes provide details 10 Declaration 1 eoram fhe niama ieeluded im mis repart i accurate aieo confirm rat ive research has been conducted accordance wilt approved proadoco and with the principles contained the Mational Statement ca Mb _____ 2212 Signed APPENDIX
132. k gt gt k K K K K K K K K K K K K K K K K K K K K K K K K K i K K K K K K K K K K K K K K K K K K K K K K K K K K K 1 K K K K K K K K K K K K K K K K K K K K K K This is our page serving function that generates web pages boolean sendMyPage char URL strcpy gURL URL MP works as a global variable serial printIn sendMyPage jmp WPS S 1 ho URL decoding JMP can have problems if web page 18 sent over multiple packets 101 JMP if MCU 18 processing too much and large delay commands cannot be processed 1 WiServer sendInProgress 102 1 Serial printIn Send in progress 1 else REF http asynclabs com forums viewtopic php f 19 amp t 263 amp start 10 if 0 1nt uip conn appstate ackedCount amp amp 0 int uip conn gt appstate sentCount if O int uip_conn gt appstate ackedCount amp amp 0 int uip conn gt appstate sentCount need to do this to break out of the Object Timmeing Lifespan because if done here large delays cause unpredictable results Serial printin sendMyPage WPS_E 1 jmp WPS E 1 yes decode gURL now from main loop if stremp URL 0 home page Serial printlIn URL digitalWrite LEDpin HIGH digital Write pin IRMimic2 LRNRQ LOW reset any lockups digital Write p
133. limits Considering the very low exposure levels and research results collected to date there 1s no convincing scientific evidence that the weak RF signals from base stations and wireless networks cause adverse health effects WHO 2012 Ethical responsibility To perform any user surveys or observations requires approval from the USQ Ethics Committee USQ 2012 This ensures approval by participates their safety and a level of separation such that no links to any persons involved In users surveys can be made Using Engineers Australia code of ethics Engineers Australia 2012 and being responsible and of benefit to the community and produce a safe design which leads to considerations for this project like Make people s lives and the environment safe Assist people with mobility problems Consider safety issues like Risk of fire from battery recharging Eliminate Chemical exposure plastics Lead free and look for RoHS compliance e Take care in the final product shape Remove sharp edges or any figure jamming resulting in soft tissue damage e Manage small part safety s like case screws and batteries e Reduce any eye strain when viewing the controls e Manage end of life disposal of electronics on the environment so choose recyclable components APPENDIX D Focus Group Research 57 58 D 1 Human Ethics Committee Application USQ University of Southern Queensland The University of Southern Queensla
134. lled Any Infrared Remote Controllable components of the consumers Device home media system or other device B 3 System Requirements and Verification Matrix Table B 2 System Requirements and Verification Matrix __ gt nern ES E RI 2 Select DVD 2 a on N A _________ REI pein NA _________ win NA IL 42 4 Imspection Tested ok Pee wam mus _ 2 Wes s He HTTP Te 0000 120 _ E kamus R3 Network ZZ 2 2 e ML Lea Ren E ight EMI am microprocessor B ion 22 c T Serial link to WiFi shield Testing _ 2 T o mm O RN RN 5222 4 EN s 22 are developm 2 5 __________ 4 ES Software developm Lus 2 ma O C P P ff n 53 1 121 222222222222222222222222 2777 Z QQ WG JU WN QQ QQ Gf AGG QU MN QA GQ W6W 111 A GG W QA GQ W6W SN QA GG AG q W QI Gy W QA GQ W6W QA GQ W6W QA GQ W6W QA GQ W6W QA GQ W6
135. local str VER 31 WiServer print P web SEND4 WiServer print P webB TN S1a VER 38M WiServer print local str VER 38M WiServer print P webB TN 510 38M WiServer print PewebBTN S2a VER 38M WiServer print local _str VER 38M WiServer print P webB TN S2b VER 38M WiServer print P webBTN_S3a VER 38M WiServer print local _str VER 38M WiServer print P webB TN S3b VER 38M WiServer print TN S4a VER 38M WIServer print local _str VER 38M 96 WiServer print P webB TN S4b VER 38M WiServer print PewebBTN 55 38M WiServer print local str VER 38M WiServer print P webB TN S5b VER 38M WiServer print P webBTN_S6a VER 38M WiServer print local str VER 38M WiServer print P webB TN S6b VER 38M WiServer print P webBTN_S7a VER 38M WiServer print local str VER 38M WiServer print P webB TN S7b VER 38M WiServer print P web END void webpLEARN t WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print P web LEARN WiServer print P web LEARNI WiServer print local str VER 31 WiServer print LEARN2 WiServer print PCwebBTN Lla WiServer print local str VER 38M WiServer print P webBTN 1 10 WiServer print P webBTN_L2a WiServer print local str VER 38M
136. log inputs pulse width modulated outputs and communications support to allow it to directly control read and communicate with sensors drive servos and other external devices WiFi ZigBee LCD and hundreds of other expansion shields and devices are also available to operate with it All pins and power rails are brought out to convenient headers allowing you to either connect Individual pins to a breadboard using standard jumper wires or to plug in shield daughter boards for versatile expansion Ge neral purpose prototyping shields are also available which provide extensive space for you to create your own add on circuits The board can be powered via the LAN using Power over Ethernet For more information see freetronics com pos E MCU Atmel ATmega328P Operating Voltage 5 MCU Clock Speed 16 MHz EtherTen Input Voltage 7 12 DC recommended 6 20V DC maximum m Digital I O pins 14 6providePWMoutput Analog Input Pins 8 analog input pins also support digital 1 0 giving 22 digital 1 0 total if required Analog Resolution 10 bits 0 1023 at SV AREF Is approx 0 00488V 4 88mV per step Current Pin __ m ka Total Current For Pins 00 SUA maximum Current For 3 3V Output 40 mA maximum 50 maximum e inns Flash Me
137. lt b gt WiFi IR MCU SEND lt b gt lt input type button value LEARN onclick location href http 192 168 1 2 L gt lt input type button value SET onclick location href http 192 168 1 2 8 T 2 const prog char web SENDI PROGMEM lt b gt WiFi IR MCU SEND lt b gt lt input type button value LEARN onclick location href http const prog char web SEND2 PROGMEM L gt const prog char web SEND3 PROGMEM lt input type button value SET onclick location href http const prog char web SEND4 PROGMEM ST gt CANNOT USE 5 as this is a web browser variable const prog char web PROGMEM lt b gt WiFi IR MCU LEARN lt b gt lt input type button value EXIT onclick location href http 192 168 1 2 2 const prog char web LEARNI PROGMEM lt b gt WiFi MCU LEARN lt b gt lt input value EXIT onclick location href http V const prog char web LEARN2 PROGMEM gt const prog char web PROGMEM lt b gt WiFi IR MCU MODE lt b gt lt input type button value SETTINGS onclick location href http 192 168 1 2 ST gt const prog char web SETTINGS PROGMEM lt b gt WiFi IR MCU SETTINGS lt b gt lt input type button value EXIT onclick location href http 192 168 1 2 2 const prog char web
138. mer s frustration and to make remote controls simpler consumers are able to use a Universal Infrared Remote Control that combines a number of remotes into one The use of home wireless networks Smart Phones and Tablets enabled with Wi Fi has grown Wi Fi communications can provide a control link to a Universal Infrared Remote Control By combining these technologies a single control interface on an iPhone or iPad then provides a new control interface to consumer s home entertainment systems Or any other devices that are capable of being Infrared Remote Controlled See Figure 1 1 System Overview User Interface Smart Phone Z 1 Application WiFi User WLAN Access Point Controller e TV lt Sound Microphone bi Infrared IRB DVD Player Figure 1 1 System Overview 1 2 Requirements The idea 18 to Improve or extend the functionality of a consumer electronic product called the Universal Infrared Remote Control It is extended by adding Wi Fi connectivity and automatic volume control The user interface is a Web Page in a Web Browser or an Application on an iPhone or iPad User commands are sent via URL strings using standard TCP IP HTTP protocols See Figure 1 1 System Overview The aim 1s to design and build a Prototype as proof of concept The requirements are e Interface o Design with user input from research activity o Web Pages delivered to a Web Browser
139. more professional IDE AVR Studio 6 Where memory usage can be tracked and debugging features can be utilised with the use of an Atmel hardware programmer and debugger Once the hardware functionality is acceptable the Apple application can also be enhanced to include icons and swipe controls with more advanced menus 43 References Apple 2012a Developer Apple Cupertino viewed 21st 2012 lt https developer apple com gt Apple 20120 iPhone 4 Tech Specs Apple Cupertino viewed 14th Oct 2012 lt http www apple com iphone iphone 4 specs html gt Apple 2012c iPad 2 Technical Specifications Apple Cupertino viewed 14th Oct 2012 lt http www apple com ipad ipad 2 specs html gt Arduino 2012 Arduino home web site Arduino Cocos Keeling Islands viewed 19 2012 lt http www arduino cc gt AsyncLabs 2012a AsyncLabs WiShield Library AsyncLabs viewed 2nd May 2012 http asynclabs com wiki index php title2 WiShield library AsyncLabs 2012 AsyncLabs Wiki AsyncLabs viewed 14nd Oct 2012 http asynclabs com wiki index php title AsyncLabsWiki Atmel 2012a Home Products More Products Hardware Security Solutions Safeguarding Secrets at the Silicon Level Atmel San Jose viewed 4th Sep 2012 lt http www atmel com products other default aspx gt Atmel 20120 Home gt CryptoAuthentication Product Uses Atmel San Jose viewed 4th Sep 2012 http www atmel com Images
140. mory 32 KB Flash Memory of which less than 1 KB is used by bootloader SRAM EEPROM 2 KB SRAM 1 KB EEPROM Communications Serial 1 x hardware USART SPI Serial Peripheral Interface I2C _ Ethernet 1 x 10 100 LAN port using the Wiznet W5100 chipset Uses pins 010 D11 012 013 Other Integrated USB programming and communication port Many other one wire multi wire LCD and expansion devices supported b free code and libraries Freetronics is an Australlan company created by Jonathan and Marc Alexander to provide cheap and easy 55 0 hardware parts and products related to Arduino projects and the book Practical Arduino Learn more at www freetronics com Follow us on Twitter at twitter com freetronics 141 G 6 Arduino Uno Arduino ArduinaBoardlna gr VHS HHIH ia pH inne t dis S ARDUINO Dl un 3T 2 T REF HEH E a Buy Download Getting Started Learning Reference Products FAQ Contact Us Arduino Uno seeeeeee M M ON EM 11 i h BOARD MODEL E DIGITAL PwWM E UNO m OPENSOURCE ELEC Teo IC PROTOTYPING PLATFORM c i saRDUINO 0 709 FADE IN ITALY dI ARDUINO 8 x LI
141. n Crystal oscillator pin Visible LED drive signal Low TR LED base drive signal High Reserved for future expansion Do not connect to anything Reserved future expansion Do not connect to anything Signal Description cont Keypad Mode LRNKEY ROWO ROW ROW2 ROW3 ROW4 ROWS ROW6 ROW COLO COLI COL2 COL3 MCU Mode MDE CSELO CSELI CSEL2 CSBLS CSEL4 LRNRQ SNDRQ RDY LRNERR Input Output Output Output Output Output Output Output Output Input Input Input Input Input Input Input Input Input Input Input Input Input Output High level indicates chip is finshed previous operation Output High level indicates an error condition while learning a command High at power up to select keypad mode pulled low after this to enter learn mode Keyboard row driver Keyboard row driver Keyboard row driver Keyboard row driver Keyboard row driver Keyboard row driver Keyboard row driver Keyboard row driver Keyboard column input Keyboard column input Keyboard column input Keyboard column input Low at power up to select MCU mode Code Select LSB Code Select bit Code Select bit Code Select bit Code Select bit Code Select MSB Initiates learning a command Initiates sending a command 128 129 2 Device Operation There two basic modes of operation keypad mode MCU mode In keypad mode the chip will scan an attached matrix of key
142. n and specify whether you have obtained written permission to recruit 050 students and provide documentary evidence of the approval given Page 4 of 12 62 4 RISKS AND BEHEFITS 4 1 Please indicate any potential risks to participants researchers and or others connected with the proposed project Please tick the appropriate risk category and elaborate in 4 3 4 5 risk is a potential form of harm discomfort or inconvenience Physical risks to the participant s to the researcher s Social risks Time imposition Other risks please explain in the space provided below Ho risks 4 2 Indicate what you think is the overall level of risk for prospective participants lextreme risk high risk some risk risk foreseeable risk associated with the project Explain why have you indicated this level of risk Time for discussion group and user testing The device to be tested is battery operated and simular to commercial Infrared Remote Controls 4 3 Please explain your assessment of the risks associated with the research giving details of the ethical considerations attached to the proposed project The user is at distance from the controlled equipment and will not come into contact with it The equipment being controlled is secured and does not move So this removes chances of physical injury The Infrared Remote Control being used will have no sharp edges or spikes that could cause
143. n and user testing of the device The potential participants will be given the two forms Participant Information Sheet Consent Page 7 of 12 65 Discussion questions and user testing tasks to read and understand the requirements where they can ask questions and are free to agree or disagree to participate in the research as participation is voluntary 5 5 How does the project address the participant s freedom to discontinue participation Will there be any adverse effects on participants if they withdraw their consent Please detail The participants are free to discontinue participation and stop any activity at any time There will be no adverse effects on participants if they withdraw their consent and cease the research activity 5 7 Will participants be able to withdraw data concerning themselves if they withdraw their consent to participate Please detail Participants are not able to withdraw data information from the focus group discussion as it influences the group discussion However the content if any that was provided by the participant withdrawing their consent will not become the focus of the discussion user device testing is an individual activity participants can withdraw data and the activity will be considered invalid and data deleted 5 8 Does the project involve withholding relevant information from participants or deceiving them about some aspect of the research lf YES please justify 5 9 Will par
144. n resetting the 802 On Rev2 or later boards there is resistor that pulling the 802 1602 HWE line to ground making easier to put into DFU mode You can then use Atmel s FLIP software Windows or the DFU programmer OS X and Linux to load a new firmware Or you can use the ISP header with an external programmer overwriting the DFU bootloader See this user contributed tutorial for more information Automatic Software Reset Rather than requiring a physical press of the reset button before an upload the Arduino Uno is designed in a way that allows it to be reset by software running on a connected computer One of the hardware flow control lines DTR af the ATmegasUe 16U2 is connected to the reset line of the ATmega328 via 100 nanofarad capacitor When this line is asserted taken low the reset line drops long enough to reset the chip The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment This means that the bootloader have a shorter timeout as the lowering of DTR can be well coordinated with the start of the upload This setup has other implications When the Uno 15 connected to either a computer running Mac OS X or Linux it resets each time a connection is made to it from software via USB For the following half second or so the bootloader is running on the Uno While it is programmed to ignore malformed data i e
145. nd 2 4 Human Research Ethics Application Form AUSTRALIA To complete this form The form should be completed electronically Answers should be given in plain language Click the check boxes were appropriate Fill in text frames by typing your answers the space provided underneath the question The frame will expand to accommodate the text Do not remove alter formatting Submission Please forward the finalised application including supporting documentation via email to ethicsiusq edu au You do not need to Forward a hard copy Print the signatures page last page signatures and Forward to Ethics Officer ORHD USG West St Toowoomba 4350 OLD Australia NOTE RESEARCH MUST COMMENCE UNTIL THE APPLICATION HAS BEEN GRANTED ETHICS APPROVAL BY THE UNIVERSITY OF SOUTHERN QUEENSLAND US HUMAN RESEARCH ETHICS COMMITTEE HREC 1 GENERAL INFORMATION Title of project Wireless LAN Based Infrared Remote Control Applicant details 7 Jjohnpalmer eng amp gmail com Purpose of Research 050 staff research MI Student research please name the degree s the research will Supervisor details if applicable DR Alexander Kist Facult ISchool Section ine Campus Campus Postal Address ib Alexander 07 4631 5419 Additional research team members if applicable Please name the investigator and 1 their organisation
146. nitWithData data encoding NSUTF8StringEncoding 124 http www youtube com watch v F XQiEfjiYns void connectionDidFinishLoading NSURLConnection connection if response isEqualToString 1 label text 1 on web page velse label text other web text connection nil JMP void didReceiveMemoryWarning super didReceiveMemoryWarning Release any cached data images etc that aren t in use pragma mark View lifecycle void viewDidLoad super viewDidLoad Do any additional setup after loading the view typically from a nib void viewDidUnload super viewDidUnload Release any retained subviews of the main view e g self myOutlet nil void viewWillAppear BOOL animated super viewWillAppear animated JMP connect to IRMCU NSURLRequest request NSURLRequest j void viewDidAppear BOOL animated super viewDidAppear animated void viewWillDisappear BOOL animated super viewWillDisappear animated void viewDidDisappear BOOL animated super viewDidDisappear animated 125 BOOL shouldAutorotateTolnterfaceOrientation UllnterfaceOrientation interfaceOrie ntation Return YES for supported orientations return interfaceOrientation UllnterfaceOrientationPortraitUpsideDown end APPENDIX G Data Sheets 126 1 IRMimic2 www tauntek com
147. nly email an electronic copy af this report to 50 edu au Otherwise please provide both an electronic copy and a hard copy tn ethics iuso edu and Ethics Officer 5 Black Principal Researcher John Palmer Address for correspondence 1 Soudan St Booval OLD 4304 Name of Project WIRELESS LAN BASED INFRARED REMOTE CONTROL Ethics Approval No 12 143 1 Type raport Please tick tne relevant report category Annual sl Final 2 Current status of the project 4 Data collection phase of project completed 29 9 2012 Data collection has not commenced but will in the future Date Data collection phase af project ongaing until Extension of ethical clearance sought until O LJ Project commence but abandoned on Date Project not commenced and no longer required Date 3 Conducted as per the approved protocol Has the research been conducted in accordance with the approved protacol LE Y have the variations been previously submitted for approval TENTHS If provide the details of the variations and the reason why this has not previously been submitted for prior approval 4 Request for amendment Would you like to submit a request for amendment to this YIN If YES please fill out the renuss for amendmen form found an the ethics website and attach 74 5 Complaints or concerns about ethical conduct Have you rece
148. no Mega can be powered via the USB connection or with an external power supply The power source is selected automatically External non USB power can come either from an AC to DC adapter wall wart or battery The adapter can be connected by plugging 2 1mm center positive plug into the board s power jack Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector The board can operate on an external supply of 6 to 20 volts If supplied with less than 7V however the 5V pin may supply less than five volts and the board may be unstable If using more than 12V the voltage regulator may overheat and damage the board The recommended range is 7 to 12 volts The power pins are as follows VIN The input voltage to the Arduino board when it s using an external power source as opposed to 5 volts from the USB connection or other regulated power source You can supply voltage through this pin or if supplying voltage via the power jack access it through this pin 5V This pin outputs a regulated 5V from the regulator on the board The board can be supplied with power either from the DC power jack 7 12V the USB connector or the VIN pin of the board 7 12V Supplying voltage via the 5V ar 3 3V pins bypasses the regulator and can damage your board We don t advise it 3V3 4 3 3 volt supply generated by the on board regulator Maximum current draw is 50 mA GND Ground pins http www
149. nt can stop the activity at any time without any problems The researcher John Palmer may stop the activity if amy problems arise This will remove and minimise potential risks to the user or equipment 4 6 For physiological studies is exposure to bodily fluids e g blood likely to occur Please also provide detail on the precautions to avoid exposure and the measures to be undertaken if exposure occurs Consult the Guidelines for the prevention of transmission of infectious diseases for more information Devices and Remote Controls wiped with cleaning cloth after use 4 7 Detail the expected benefits of the study to the participants and or the wider community As potential device users can provide feedback to the design of the device the device has a much higher level of providing a useful user interface with correct functionality and controls Page B of 12 64 correct design is expected to make the users life simpler and easer when controlling televisions DVD players and other Infrared control equipment Getting the design right minimises electronic waste to the environment and saves on resources The expected benefit is getting the design correct from the users prospective 5 CONSENT PROCESS 5 1 How will consent for participation be obtained For each of the research categories identified in Question 2 2 please indicate whether consent will be obtained by writing verbally tacit e g indicated by complet
150. o find This has been problematic and as such initial testing for the selection of components has been necessary to start the embedded design I 2 Project Challenges and Delays e Numerous Windows 7 PC crashes e Portable DVD battery expansion and failure e file downloads from GitHub repository need for the Wi Fi Shields would not download through Microsoft Internet explorer but will using Firefox web browser This was found to be a Microsoft Internet explorer setting which was changed by a Microsoft Update e Legacy Arduino C code and Libraries were not forward compatible to IDE 1 0 This made handling of Strings a major problem with compile errors At the time these incompatibilities were not documented on the Arduino Web Site They are now documented 1 3 MCU and IDE Testing Futurlec AVR board PC USB to Parallel and RS232 PCMCIA express card to Parallel and RS232 AVR Studio 5 IDE tool chain problems AVR studio 4 IDE tool chain ok PIC MPLAB IDE tool chain problems Futurlec PIC board AV Rdude Putty Serial terminal Arduino IDE 1 0 Arduino IDE 0019 to 0023 compile and download to target MCU Attempts to migrate MCU code that is dependent the Wi Fi Server library from IDE 0023 to IDE 1 0 have not been successful The Arduino Hardware Software and IDE has had successful results and 1s being used however a move to a more professional IDE would help refine the design I 4 IR Communications Testing 164 Th
151. ocess volume send command The command 15 sent twice In the Arduino MCU code and works well There 15 a need for the user to be able to adjust this This can be done through the user interface by using software to control the Microphone gain and set a SPL threshold The hardware implementation 15 performed with a 4051 Multiplexer Demultiplexer being a digitally controlled analogue switch See Figure 3 16 Software controlled microphone circuit schematic Vin Vout 2 feedback 150 kO 47 kQ 4051 47 5 Vol EON 47 A 47 47 47 47 Figure 3 16 Software controlled microphone circuit schematic The assembled software controlled microphone is shown in Figure 3 17 It has been tested and Is working correctly ready for inclusion into Prototype 2 With the inclusion of the 4051 Multiplexer Demultiplexer IC a larger 2200 uF capacitor 15 being trialled in the DC power filter 31 Figure 3 17 Assembled software controlled microphone 3 8 Power System The Arduino standard has 2 1 mm power socket that accepts DC input of 7 to 12 volts which can be powered from a mains AC power plug pack The board can also be powered from the USB 5 volt serial cable USB power is used during software development The inputs are regulated by an onboard power converter supplying the common power header with e 5 0 V 200 mA e 3 3 V 50 mA e unregulate
152. on all three processors Power The Arduino Uno be powered via the USB connection or with an external power supply The power source is selected automatically External non USB power can come either from an AC to DC adapter wall wart or battery The adapter can be connected by plugging 2 1mm center positive plug into the board s power jack Leads from a battery can be inserted the Gnd and Vin pin headers of the POWER connector The board can operate on an external supply of 6 to 20 volts If supplied with less than 7V however the 5V pin may supply less than five volts and the board may be unstable If using more than 12V the voltage regulator may overheat and damage the board The recommended range is 7 to 12 volts The power pins are as follows VIN The input voltage to the Arduino board when it s using an external power source as opposed to 5 volts from the http www arduino cc en Main ArduinoBoardUno 19 10 2012 12 01 55 PM 143 Arduino ArduinoBoardUno USB connection or other regulated power source You can supply voltage through this or if supplying voltage via the power jack access it through this pin SV This pin outputs a regulated 5V from the regulator on the board The board can be supplied with power either from the DC power jack 7 12V the USB connector 5V or the VIN pin of the board 7 12V Supplying voltage via the 5V or 3 3V pins bypasses the regulator and can dama
153. player worked Time ran out and this part of the project was handled by a dedicated universal learning IR MCU called IRMimic2 Testing of the IRMimic2 chip found the length of IR codes for an Xbox 15 longer than the Sony Amplifier and TV The IRMimic2 chip cannot store the longer IR codes and this part of the project will need further work I 5 DFRobot Wi Fi Shield Shield DFRobot Arduino WIZnet Wi Fi Shield and specifications DFRobot 2012 Wi Fi module WIZnet module on the DFRobot Shield WIZnet 2012 OF Robot com J Hiti shield 2 1 HEF I USB RUN ae 121246 FPO EN we M 10011208000 CLINE Oo 95217 223 8 T DIZHI MAN 208 01220 E 1 sg 4 li 07 NTTNTEN TEF pa 29296 Ji Ji Figure I 2 DFRobot Arduino WIZnet Wi Fi Shield DFRobot Originally this Shield had Wi Fi connection and configuration problems see Figure I 2 DFRobot Arduino WIZnet Wi Fi Shield DFRobot The problems were found to be intermittent The fault was located as the Wi Fi USB header jumper had a physical defect of moulded plastic on what should have been a conductor The jumpers were replaced from an old scrap computer board and the Shield worked 166 successfully One of the simplest components to fix took weeks of testing to rectify The S
154. print local str VER 33 WiServer print P webB TN 2 VER 33 WiServer print P web END return true LEARN button 4 if stremp URL L4 0 107 WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print P web Learn4 WiServer print P webB TN EXIT WiServer print P webBTN_ EXIT VER 33 WiServer print local str VER 33 WiServer print P webB TN 2 VER 33 WiServer print P web END return true LEARN button 5 if stremp URL L5 0 WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print P web Learn5 WiServer print P webB TN EXIT WiServer print PCWwebBTN EXIT VER 33 WiServer print local str VER 33 WiServer print P webB TN EXIT2 VER 33 WiServer print P web END return true LEARN button 6 if stremp URL L6 0 WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print P web Learn6 WiServer print P webB TN EXIT WiServer print P webB TN VER 33 WiServer print local str VER 33 WiServer print P webBTN_ EXIT2 VER 33 WiServer print P web END return true LEARN button 7 if stremp URL L7 0 WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print P
155. re I 5 AVR ISP Serial 5232 programmetr 168 Figure 1 6 Arduino Freetronics EtherTen LAN board with 2 G SD card 169 Figure I 7 IR circuit design and calculations 170 Figure 8 IR Tx RX quel dn v 171 Figure 1 9 Freetronics EtherTen IR Pin assignments 171 Figure I 10 Photodiode Trans impedance ampllfter 172 List of Tables Table Major System Requirements with Sub Requirement descriptions 50 Table 2 System Requirements and Verification 51 Table Hazard Risk Identification Evaluation and Risk Controls 55 Table B I Ptojeot aa Pa e bu odd s bus 78 Table E 2 Project Risks and Mitigation Actions 79 Abbreviations The following abbreviations have been used throughout the text AC AGC AVR CIR DC DVD HTTP I2C IC IDE IEEE IR IrDA LAN MCU NATA NiMH PIC POE PWM RoHS Shield Sketch SPI SPL SRVM TCP IP USART USB WAP WEP Wi Fi WLAN ZigBee Alternating Current Automatic Gain Control Atmel MCU Consumer Infrared Direct Current Digital Video Disk Hypertext Transfer Protocol
156. rface or case Note that the distance between digital pins 7 and 8 is 160 mil 0 167 not an even multiple of the 100 mil spacing of the other pins The Mega2560 is designed to be compatible with most shields designed for the Uno Diecimila or Duermilanove Digital pins o to 13 and the adjacent AREF and GND pins analog inputs o to 5 the power header and ICSP header are all in equivalent locations Further the main UART serial port is located on the same pins 0 and 1 as are external interrupts o and 1 pins 2 and 3 respectively SPI is available through the ICSP header on both the Mega2560 and Duemilanove http www arduino cc en Main ArduinoBoardMega2560 19 10 2012 11 58 58 AM 150 Arduino ArduinoBoardMega2 560 Diecimila Please note that is not located on the same pins on the Mega 20 and 21 as the Duemilanove Diecimila analog inputs 4 and 5 share goeg Arduino Edit Page Page History Printable View Recent Site Changes hitp www arduino cc en Main ArduinoBoardMega2560 19 10 2012 11 58 58 APPENDIX H Test Results 151 152 1 Apple IDE TEST SHEET Apple IDE 1 System Component iPhone iPad Application Requirement 5 Task Write simple test programme to test Apple IDE on 1 TEST SHEET Update Xcode Application version Create 5 button control Application Pass Fail Pass Fail Pass Follow up Action H 2 TEST SHEET
157. rintlIn IR LEARN IR timeout r 1 enable timeout VER33T comment out digital Write pin IRMimic2 SNDRQ LOW just to make sure check 1f LRNERR 1s HIGH if it 1s reset learning mode if HIGH digitalRead pin IRMimic2 LRNERR i 98 99 serial printlIn LRNERR 1 digitalWrite pin IRMimic2 LRNRQ LOW delay 60 documented 60 ms requirement learning 1s now reset make LRNRQ HIGH learn then LOW and IRMImic2 LED will light digitalWrite pin IRMimic2 LRNRQ HIGH delay 3 using Timer 0 wait for IRMimic to be ready about 2 ms RDY will go LOW ready to learn apply IR signal serial printlIn IR LEARN apply IR signal wait for RDY to go HIGH finished while LOW digitalRead pin IRMimic2 RDY i IR timeout IR timeout 1 VER32T increment timout counter if IR timeout c gt IR timeout V ER32T i Sertal printin IR LEARN timeOut gt 4 seconds VER32T TODO send error as a web page IR timeout c 0 VER32T break while VER32T or make pin IRMimic2 HIGH VER32T serial printIn learning if HIGH digitalRead pin IRMimic2 LRNERR serial printIn LRNERR 2 reset learning mode digitalWrite pin IRMimic2 LRNRQ LOW delay 60 documented 60 ms requirement break while VER34 fix logic bug delay 100 finished timeout c 0 VER34 incase exit while from pin IRM
158. rintln v SPL debug comment out later if 0 IR SEND called dont do request if already doing it IR SEND called 1 Serial printIn MIC VOLUME DOWN IR CSEL 2 SEND VOLUME DOWN IR SENDO delay 20 pause trial 20 mS tested OK SENDO SEND VOLUME DOWN AGAIN needs this IR SEND called 0 j j j void VOLUME sound feedback automatic volume down Serial printIn analogRead pin SPL DEC int v MIC SPL analogRead pin SPL if 100 gt v SPL same as v SPL lt 100 Serial printlin v SPL debug comment out later If 0 IR SEND called dont do request if already doing it i IR SEND called 1 Serial printIn MIC VOLUME UP IR CSEL 1 SEND VOLUME UP SENDO delay 20 pause SEND SEND VOLUME UP AGAIN needs this IR SEND called 0 void VOLUME DOWN2 Serial printIn analogRead pin SPL DEC int v SPL analogRead pin SPL if 100 lt v MIC SPL same as v SPL gt 0 VER33T increase to 100 112 if 0 lt vol position vol position gt 0 t Sertal printin v SPL vol position vol position 1 call VOLUME DOWN with some smarts or toggle state variables if 0 IR SEND called SEND called 1 serial printIn MIC VOLUME DOWN CSEL 2 SEND VOLUME DOWN SENDO delay 20
159. rog char ssid PROGMEM IRMCU max 32 bytes unsigned char security type 0 0 open 1 2 WPA 3 WPA2 WPA WPA2 passphrase const prog char security passphrase PROGMEM 12345678 max64 characters WEP 128 bit keys sample HEX keys prog uchar keys PROGMEM 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x09 OxOb OxOc OxOd Key 0 0x00 0x00 0x00 0x00 0x00 0x00 0 00 0x00 0x00 0x00 0x00 0x00 Key 1 0x00 0x00 0x00 0 00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Key 2 0x00 0x00 0 00 0 00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0 00 Key 3 jj setup the wireless mode infrastructure connect to AP adhoc connect to another Wi Fi device unsigned char wireless mode 2 WIRELESS MODE ADHOC unsigned char ssid len unsigned char security passphrase len End of wireless configuration parameters The Settings for the iPhone to make the Ad Hoc mode connection 1s given in Figure 3 11 iPhone Ad Hoc connection settings 25 u Telstra 3G IP Address DHCP BootP Address 192 168 1 3 Subnet Mask 255 255 255 0 Router 192 168 1 1 DNS Search Domains HTTP Proxy Figure 3 11 iPhone Ad Hoc connection Settings This part of the design provides the Wi Fi connectivity 3 6 Infrared Communications Initial design evaluation testing using an Arduino IR Library Vishay receiver and an IR Tx LED was not 1
160. rotocol that is used with computer networking Infrared remote controls are cheap and simple a result they are a common component used to control consumer electronic devices There are two main types of infrared communication protocols e Consumer Infrared CIR for device control For example remote control of Televisions DVD players Air conditioners and lights e Infrared Data IrDA for high speed data transfer For example pictures and video transfer between smart phones or digital cameras This project 1s only focusing on using CIR 2 2 Current Commercial Products At the start of this project topic selection there were no obvious similar commercially available products on the local market There were hardware plug ins for the iPhone available through online retailers One plugged into the headphone port at the top of the iPhone called RedEye ThinkFlood 2012b and others Breen 2010 that plug into the large port at the bottom of the iPhone At the time of this project appreciation report the RedEye Wi Fi Infrared Remote Control ThinkFlood 20125 and the Logitech Harmony Link Logitech 2012 have released a full WLAN Infrared Universal Remote Control with connectivity with iPhone iPad and Android devices in the marketplace The consumer electronics industry 1s constantly producing new products Although some WLAN IR remote controls are m the market there Is room for improvement Based on consumer feedback Logitech 2012
161. s which can be used to control learning and sending commands Each key corresponds to either a single command or a sequence of commands In MCU mode the chip can be controlled directly by a microcontroller for both learning and sending commands The device can be trained in one mode and used in a different mode if needed Do not train with macros in keyboard mode and then attempt to play them back using MCU mode however as it won t work Macros are not supported in MCU mode To select the desired mode either float pin 23 at power up keypad mode or pull it low MCU mode at power up with a 470 ohm resistor 2 1 the device Note When training avoid shining light directly onto the front of the IR sensor to avoid false signals Keypad mode Press and hold the learn key then momentarily press one of the 32 possible keypad matrix keys The visible LED should light Release the learn key Now hold the remote approx 1 away from the sensor aimed directly at it and press and hold the desired remote key After about one half second the LED should go out for one second then come again Release the key on the remote as soon as the LED goes out If you only want to associate a single command with that key press the learn key at this point to stop recording The LED should go out If you want to record a second command for that same key do not press the learn key after the LED flashes off and on but instead press and hold a dif
162. s Microphone circuit schematic in the Appendix G Data Sheets Gain Feedback Resistor Figure 3 13 Freetronics microphone module with gain feedback resistor A large amount of digital noise 15 present on the DC power rail This interferes with the microphones analogue circuit To overcome this low pass filter added The largest practical capacitor was used to get the resistance down so that minimal voltage drop on the positive supply was achieved because it 15 important to maintain output voltage levels for interfacing with the analogue to digital converter on the MCU See Figure 3 14 DC power low pass filter and changed gain resistor Once the Prototype is Working successfully further work would include reducing the size of the capacitor 29 Figure 3 14 DC power low pass filter and changed gain resistor The filter uses a low Q ferrite bead inductor 220 ohm resistor 470 uF 25 V capacitor This produces a measured 0 28 Volt drop on the supply rail for the Microphone circuit The RC time constant 15 103 ms and the ferrite bead should reduce high frequency components as it shouldn t be saturated with current This circuit could be refined with further analysis and measurements as future works Overall the DC power filter works well see Figure 3 15 DC power low pass filter Low Q Ferrite bead Vi V out 1 470 1 Figure 3 15 DC power low pass filter 30 Due to a longer overall response time taken to pr
163. s early and evaluation testing was a big win My daily log was also a reflection exercise that helped me keep the project on track Documentation was equally as important as doing the design work and I personally found it hard going And sometimes the documentation slipped as I tried to manage the project This was a huge learning activity researching planning and putting it all together The project has changed me and I am thankful for it END
164. s or frustration 1n using remote controls The commands buttons or actions that are used the most Any experience in the use of Wireless LAN or computer networking Questions other points of interest 2 User testing User testing of the device design by end users This 1s to include the use of an iPhone and an iPad with the following activities Un boxing of device setup of the device connectivity Teaching the device to learn commands General use of the programmed device and user experience Questions and feedback OUTCOME Action points to refine and improve the designs user interface and functionality 72 0 4 Results from Focus Group Wireless LAN based Infrared remote Control Ethics Approval No 2 143 Date 29 08 2012 Response to Questions Users generally have a few Remote Controls and are usually controlling a TV amplifier and content Most users have heard of all in one universal remote controls Some liked them others hated them and gave them away The problem was that they were too hard to program and have too many buttons or functions Users expect the cost of Remote Controls to be less than 100 to 40 AUS based on features Users find media Infrared Remote Controls have too many buttons generally causing confusion when trying to quickly find a function like Stop Users however still want to access all the features of their consumer devices some buttons cannot be seen at night or are
165. select code CSEL IR LEARNO IR SENDO setup VER 20 remove sendMyPage URL decode calls and put them function call from loop VER 21 move hardware pin 2 CSEL to pin 8 as cuHead INTO uses pin 2 server connection now closes correctly VER 22 remove gURLdecode call from loop use URL decode In sendMyPage makes difference cannot SCEL IRMImic2 location VER 24 extend more functionality 3 button VER 25 add capacity for 7 buttons to test extra load MCU load tested and works on portable DVD player SONY TV SONY AMP PVR not working with XBOX 360 HP W7 notebook this might be IR data not CIR standards VER 26 EXTRA BACKUP VER 27 URL POST NG VER 28 add SETTINGS page not finished add delay and second function to VOLUME IR SEND VER 29 Add EEPROM reset to factory settings limited functionality iPhone cannot see wifi must be a data type bug VER 30 integrate basic MIC code VER 31 extend global Ip address into HTML code VER 32 extend global 1 address into HTML code for SEND page VER 33 FAILS web server crashes VER 32T REGRESSION back from ver 33 seems global ip for LERN has consumed 1 too much SRAM comment out global ip HTML from LEARN adding timeout code for LEARN tested 87 VER 33T add timeout code for SEND tested VER 34 FULL SYSTEM TESTING WEB and iPhone app
166. shield type CuHead Ver 2 copper Head product name CuteDigi retailer LinkSprite manufacture Microchip onboard Wi Fi module AsyncLabs Arduino code library pre IDE 1 0 Test number System Component Requirement Date Tester Task pde examples Arduino board Uno compatible Jaycar retailer Freetronics manufacture Google asynclabs wishield wiki goto Asynclabs Wishield Wiki within page click link to Wishield 2 0 download at GitHub Download may need Firefox WiShield zip version 1 3 2012 and extract may need Zipeg for W7 Rename extracted folder to WiShield add it copy and paste to IDE example Arduino OMibraries WiShield IDE menu File example WiShield server log into WLAN and check for a free IP addresses to use in IDE sketch o set IP address 10 0 0 61 set subnet mask 255 255 255 0 set gateway 10 0 0 138 set SSID WLANname set WPA WLANpassword set security type 2 for WPA mode Note WPA takes 30 seconds to start up where WEP takes 1 second wireless mode infrastructure set IDE board type Uno set COM port 8 e verify compile o Failed compile errors is it wrong library version YES NO 2012 has the library been linked into IDE correctly YES should it be In IDE 0023 YES clue example file extension 15 pde note Asynclabs states this has been updated to work in IDE 1 0 move library to IDE 0023 compile OK 158 e cnter IP address In web browser
167. simplicity UDP will be controlled via a C Library Serial RS232 with a port allocation will not be used This will allow for the use of the higher level TCP IP connection layer The Wi Fi MCU connection 15 different than a standard connection Packets are smaller due to the processing capabilities of the MCU The code will be in C language and functions depend on the choice of Wi Fi Shield type 2 6 Infrared IR Communications and Codes Codes For the WLAN IR Remote Control to control multiple electronic consumer devices 1t needs to use CIR Standards The big problem is there is no real common standard for CIR This 1 because the CIR control of devices has evolved over time from early days and it was not until interference between devices became a problem that something was done Big name manufactures have implemented their own Standards Adding to the complexity each manufacture has varying code types that have evolved over time There is a large variety of IR modulation signals associated with commands They are well documented by Bergmans 2012 and Shirriff 2009 This adds some decoding and algorithm complexity to the project IR codes include Vishay 2003 Phillips RC5 NEC SONY Toshiba Micom Format Sharp RCMM R 2000 RECS 80 Raw waveform One way to overcome the decoding of the modulation signals 1s to store the captured signal as a raw waveform and then retransmit it when required One draw
168. size AA Rechargeable Batteries 3 9 MCU System Pin Assignments A number of sub systems have been combined summary of the pin connections on the Arduino Eleven for Prototype 1 is in Figure 3 19 Prototype 1 pin assignment Arduino Pin Out 33 AREF GND LED 13 WiFi SCK 12 WiFi MISO Reset MCU RESET PWM11 WiFi MOSI 3 3 2 PWM 10 WiFi SS 5V 2 PWM 9 WiFi Status LED Battery m GND Z 5 8 IR CSEL 0 LSB GND 9 VIN 2 7 IR CSEL 5 MSB 6 IR CSEL 4 Reset Settings 0 PWM 5 IR CSEL 3 Microphone SPL 1 5 4 IR CSEL 2 IR LRNERR 2 PWM 3 IR CSEL_1 IR RDY 3 8 2 WiFi INT 0 IR SNDRQ 4 m TX 1 IR LRNRQ 5 Figure 3 19 Prototype 1 pin assignment For Prototype 2 the MCU pin allocations are different see Data Sheets in Appendix Not all pins have been assigned The Wi Fi shield 1 not handling interrupts correctly and needs further investigation Until then only the software controlled Microphone with three pins A B and C have been added See Figure 3 20 Prototype 2 pin assignment The pin out for IRMimic2 connection has not been added as further work needs to continue on storing the longer IR signals for the Xbox360 This further work 15 being done on a separate MCU the Arduino Eleven The Header pins have been removed and replaced with stackable header pins so it can then be added to the top of the PCB stack see Figure 3 2
169. sk and Adjust other task Reduced time look for possible times budget alternatives APPENDIX Source Code 80 81 1 Code Modification Note Code has been updated with the Authors initials JMP such that existing example code 15 used that comes with the IDE s or Libraries and its content Is property of the original author or IDE To assist in debugging in the Arduino MCU code later changes for each line of code has been marked with a Version number to help locate bugs In the Apple code listing some changes have been highlighted F 2 Main Arduino MCU F 2 1 IR Testing 7 IRrecord record and play back IR signals as a minimal An IR detector demodulator must be connected to the input RECV PIN An IR LED must be connected to the output PWM pin 3 A button must be connected to the input BUTTON PIN this is the send button A visible LED can be connected to STATUS PIN to provide status Ihe logic is If the button is pressed send the IR code Dr n 1R SOS To received ecord Version 0 11 September 2009 Copyright 2009 Ken Shirriff httprJJ4bcrm ocom 2 X X X x Code modified by john palmer eng gmail com with date time stamp and comments I Have had to use 023 to get libraries to work and code to compile 04 5 bos ne Rx and Ix tor WHE media player remote The system is not working and displaye RC6 800 046 for play
170. ten for the iPhone 4 15 in Figure 3 9 iPhone Application User Interface aL Telstra 19 16 67 ma Volume UP Play Stop Volume DOWN Figure 3 9 iPhone Application User Interface Further work would include using images to replace the buttons and the use of swipe controls Also security by user authentication needs to be implemented and would form part of the Settings Web Page asking the user for a password to access the system The iPhone code is in the appendix and is basically a drag and drop of buttons on the form where a URL path has been added to the on click event of the control buttons displayed on screen 21 3 4 MCU Web Server The Web Server 15 central to the design as it provides the interface It 1s an integrated component of Wi Fi hardware The Wi Fi AsyncLabs Web Server Library is used It has a different Library and has different functionality than the tested Freetronics EtherTen LAN Web Server The Library files are downloaded from GitHub repository For the WiShield AsyncLabs has to abide by the terms in the license for the driver code 22100 for the Wi Fi module which is provided by ZeroG Wireless Inc The files are then installed by performing a copy and paste of the WiShield folder into the Arduino IDE libraries folder The MCU Code for the Web Server calls is examined in the next few blocks of text with example code fragments On start up the Web Server needs to be initialised and told
171. th accuracy or completeness of material contained within or associated with this dissertation Persons using all or any part of this material do so at their own risk and not at the risk of the Council of the University of Southern Queensland its Faculty of Engineering and Surveying or the staff of the University of Southern Queensland This dissertation reports an educational exercise and has no purpose or validity beyond this exercise The sole purpose of the course pair entitled Research Project is to contribute to the overall education within the student s chosen degree program This document the associated hardware software drawings and other material set out in the associated appendices should not be used for any other purpose 1f they are so used it 1s entirely at the risk of the user D Professor Frank Bullen Dean Faculty of Engineering and Surveying Certification I certify that the ideas design and experimental work results analyses and conclusion set out in this dissertation are entirely my own effort except where otherwise indicated and acknowledged I further certify that the work 15 original and has not been previously submitted for assessment in any other course or institution except where specifically stated John Palmer Student number 0018840451 AM Signature 25 10 2016 Date Acknowledements Thank you to my family for their continuing support throughout my degree I would like to th
172. ticipants be offered reimbursements payments or incentives to participate in the research If YES what is the amount benefit and the justification for this Free food to be provided This is to attract participants to the discussion and testing location of the researcher John Palmer s place of residence 6 DEBRIEF AND FEEDBACK 6 1 Will participant s be debriefed at the completion of the research Please also include details of agencies to which participants may be referred if they become distressed by the procedures if applicable Mo 5 2 Will feedback summary of results be made available to participant s If feedback is available please explain the process for providing the information and how participant confidentiality will be maintained Page 8 of 12 66 T CONFIDENTIALITY AND STORAGE T 1 Collection of data Please indicate in what form personal information will be collected Personal information means information or an opinion that can be part of a database whether true or and whether recorded in a material form or not about an individual whose identity is apparent or can reasonably be ascertained from the information or opinion Identified 0 Re identifiable coded De identified 57 No personal information will be collected Additional information provide here T 2 Storage of data Please indicate in what form personal information will be stored Identified Re identifiable cod
173. tions support to allow it to directly control read and communicate with sensors drive servos and other external devices Ethernet WIFI ZigBee and hundreds of other expansion shields and devices are also available to operate with it All pins and power rails are brought out to convenient headers allowing you to either connect individual pins to a breadboard using standard jumper wires or to plug shield daughter boards for versatile expansion General purpose prototyping shields are also available which provide extensive space for you to create your own add on circuits _ Microcontroller MCU _ lAtmel ATmega328P Operating Voltage 5V i Clock Speed 16 MHz Eleven Input Voltage 7 12 DC recommended 6 20V DC maximum Digital 1 VO pins 14 6 provide PWM output Analog Input Pins 61 analog input pins also support digital Uo igiving 20 digital 1 0 total if required _ Analog J Resolution 10 bits 0 1023 at 5V AREF is approx 0 00488V 4 88mV per r step Current Per Total Current For Pins Current For 3 3 3V Output Memory Flash Memory 32 KB Flash Memory of which less than 1 KB is used by bootloader SRAM EEPROM 2 KB SRAM 1 KB EEPROM 40 mA maximum 400 maximum S0mA maximum uidi Communications puma MES TU ix x x hardware USART SPI Serial Peripheral Interface
174. to be sent to and from the Arduino board The RX and TX LEDs on the board will flash when data is being transmitted via the USB to serial chip and USB connection to the computer but not for serial communication on pins 1 SoftwareSerial library allows for serial communication on any of the Uno s digital pins The ATmega328 also supports I2C TWI and SPI communication The Arduino software includes a Wire library to simplify use of the I2C bus see the documentation for details For SPI communication use the SPI library Programming The Arduino Uno can be programmed with the Arduino software download Select Arduino Uno from the Tools gt Board menu according to the microcontroller on your board For details see the reference and tutorials The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer It communicates using the original STK500 protocol reference C header files You can also bypass the bootloader and program the microcontroller through the ICSP In Circuit Serial Programming header see these instructions for details The ATmega16U2 8U2 in the revi and reva boards firmware source code is available The ATmega16U2 8U2 15 loaded with a DFU bootloader which can be activated by On Revi boards connecting the solder jumper on the back of the board near the map of Italy and the
175. trans impedance or current to voltage converter is needed Neamen 2007 Infrared receiving detectors can be interfered with or receive IR energy from other sources like sun light fluorescent lamps and heating points To overcome false readings of signals the bursts or pulses of IR are modulated by the transmitter The modulation carrier frequency is commonly 38 kHz An Integrated Circuit IC with a combined converter amplifier filter and demodulator is available like the Vishay TSOP41 xx Vishay 2003 A block diagram of this IR receiver IC is In Figure 2 3 Vishay IR Receiver Block Diagram AGCH dulator Control Circuit Figure 2 3 Vishay IR Receiver Block Diagram Vishay 2003 2 7 Automatic Volume Control Automatic Control AGC 15 often implemented in electronics to normalise signal level In radios this may be the volume 11 By the inclusion of a microphone that can pick up the sound pressure level in the room the MCU software can then send volume down and up commands based on a hysteresis type algorithm It 1s intended that this optimisation of the algorithm will require some trial and error testing A microphone hardware module by Freetronics is available and could be adapted for the Prototype Freetronics 2012 By using an channel analogue multiplexer demultiplexer 4051 IC the gain can be digitally controlled through software delabs 2005 2 8 Microcontrollers MCU A
176. tup int pin buttonl 14 JMP int button 0 JMP button 0 not pressed used for HTML webpage links string local str 192 168 001 002 char itoa buf 12 size 12 32bit 2147483648 0 int to ascii standard Arduino function hitoa number to convert buffer basel0 usage timeout SEND n LEARN int IR timeout 40 40 100 4000 mS try about 4 Seconds int IR timeout c 0 counter boolean IR timeout r 0 1s running automatic volume 99 int IR SEND called 0 int vol max 3 this 1s the number of automatic voumle downs and ups alouded int vol position vol max volume position set to try 3 int vol timeout 60 wait time before adjusting the volume int vol timeout 0 counter test variables char datatype 1t encodes numbers from 128 to 127 unsigned char datatype encodes numbers from 0 to 255 byte stores an 8 bit unsigned number from 0 to 255 int stores 2 byte value 32768 to 32767 int LEDpin 9 JMP hint Gpin 5 int Rpin 7 char buffer 30 GET cmd parl par2 HTTP 1 1 gURL 1 123456789 MP globalURL hint sendMyPage START 0 JMP int sendMyPage END 0 JMP hnt jmp WPS 1 MP jmp WPS 1 ho URL decoding int jmp WPS S 0 MP start hntjmp WPS 0 MP end hnt 0 JMP hnt last SEL 0 JMP
177. turn true ASYNCLABS apps conf h Library needs to be edited to define the variable APP_WISERVER Filename apps conf h Description Web application configuration file define APP_WISERVER This presents the core of the Web Server design 23 3 5 Wi Fi Shield After initial evaluation testing of the DFRobot Wi Fi Shield the Copperhead Version 2 Wi Fi Shield was selected See Figure 3 10 LinkSprite Copperhead Wi Fi shield V2 The Copperhead Version 2 Wi Fi Shield meets the design requirements of Wi Fi mode 802 11b 2 4 GHz Connectivity modes of Adhoc and Infrastructure Security options none WEP WAP WAP2 Data communication using the TCP IP layer Software Library Other specifications include CuteDigi 2012 rechargeable battery circuit 16 Mbit serial flash good for storing Web Pages IMbps and 2Mbps throughput speeds Low power usage Sleep mode 250 Transmit 230mA Receive 85mA Microchip Wi Fi module Figure 3 10 LinkSprite Copperhead Wi Fi shield V2 MCU code software setup settings that contain IP addresses connection modes and security options 24 define WIRELESS MODE INFRA 1 define WIRELESS MODE ADHOC 2 Wireless configuration parameters unsigned char local ip 192 168 1 2 IP address of WiShield unsigned char gateway ip 192 168 1 1 router or gateway IP address unsigned char subnet mask 255 255 255 0 subnet mask for the local network const p
178. urrent measurements rough battery life calculations of 2450 mAh 135 mA about 18 hours With the inclusion of sleep modes for both the MCU and the Wi Fi Shield this time could be greatly extended 42 Chapter 6 Conclusion and Further Work 6 1 Conclusion Prototype 1 achieves the objectives with limited functionality In each area due to Web Sever processing times and MCU 2K SRAM limit Achievement of Objectives User interface both Web browser and iPhone Application User research undertaken Wi Fi connectivity connection modes security modes Web Server IR code learning and sending Automatic volume control Battery powered Successful Testing demonstration The outcomes of the objectives for the project have successfully proved concept and further works continue to extend functionality User testing and demonstration of Prototype 1 has showed that consumer IR electronic devices can be controlled by a web page or an application running on an iPhone or iPad 6 2 Future Work It 1s critical that the Web Server be sorted out for further functionality to be extended as the whole system relies on it To extend functionality the Arduino Mega 2560 is being used It has SKSRAM and more digital I O This MCU upgrade should be enough to extend all functionality Development of the MCU software using the Arduino IDE version 023 1 1 15 increasingly difficult for this large project Further MCU software development needs to be in the
179. utton value S6 RED onclick location href http 192 168 1 2 S6 gt lt p gt const prog char webBTN S a PROGMEM lt p gt lt input type button value S6 RED onclick location href http const prog char webBTN 5661 PROGMEM 6 gt lt gt const prog char webBTN 57 PROGMEM lt p gt lt input type button value S7 BLUE onclick location href http 192 168 1 2 S7 gt lt p gt const prog char webBTN 57 PROGMEM lt p gt lt input type button value S7 BLUE onclick location href http const prog char webBTN 570 PROGMEM S7 gt lt p gt const prog char webBTN 1 PROGMEM lt p gt lt input type button value L1 VOL UP onclick location href http 192 168 1 2 L1 gt lt p gt const prog char webBTN L2 PROGMEM lt p gt lt input type button value L2 VOL DOWN onclick location href http 192 168 1 2 L2 gt lt p gt const prog char webBTN L3 PROGMEM lt p gt lt input type button value L3 PLAY STOP onclick location href http 192 168 1 2 L3 gt lt p gt const prog char webBTN L4 PROGMEM lt p gt lt input type button value L4 FORWARD onclick location href http 192 168 1 2 L4 gt lt p gt const prog char webBTN L5 PROGMEM lt p gt lt input type button value L5 BACK onclick location href http 192 168 1 2 L5 gt lt
180. value during transmission 13 less than 100 mA but the peak values are higher AA or even AAA batteries should be able to handle the required current 1f applied properly 3 4 Things to watch out for The example schematic shows a 1000 uF capacitor connected across the power supply This capacitor helps the voltage regulator to keep its output constant despite the large current pulses being drawn by the IR diode when transmitting One down side to having a large capacitor across VDD 1s that even when power 1s removed from the circuit this capacitor may take a long time to discharge so 1f power is only removed for a short time the IRMimic2 chip may not see its supply drop enough to trigger the internal reset circuit One way to make sure that the IRMimic2 chip resets properly is to momentarily short the capacitor leads with power removed before re applying power to the circuit When learning the IRMimi1c2 chip starts recording IR activity with the first low pulse it sees from the IR detector Most IR receivers put out a low level when they sense the correct IR input signal The Vishay IR receiver shown the sample schematics is relatively insensitive to room light and works well for learning Some other IR receivers may put out short noise pulses even when no IR command is being received These noise pulses will trigger learning and the IRMimic2 will learn the noise and quickly exit learn mode The IRMimic2 chip captures roughly one hal
181. versity of Southern Queensland EngBlaze 2012 Tutorial Using AVR Studio 5 with Arduino projects EngBlaze viewed 09th May 2012 lt http www engblaze com tutorial using avr studio 5 with arduino projects gt Engineers Australia 2012 Code of Ethics Engineers Australia viewed 18th May 2012 lt http www engineersaustralia org au sites default files shado About Us Overview Governance CodeOfEthics2000 pdf Everlight 2004 Technical Data Sheet 5 mm Infrared LED Everhght Electronics www everlight com Freeman A amp Jones A 2003 Programming NET Security O Reilly Sebastopol Freetronics 2012 Home Page Freetronics Croydon Hills viewed 21st May 2012 lt http www freetronics com gt Grassi M 2009 Web server In a Box part 1 Silicon Chip Nov pp 24 36 Grassi M 2009b Web server In a Box part 2 Silicon Chip Dec pp 82 95 Grassi M 2010 Web server In a Box part 3 Silicon Chip Jan pp 85 87 Grassi 20106 WIB Web server In a Box part 4 Silicon Chip Apr 20 25 Grieb B 2012 IRMimic2 Trainable IR Remote Control Transmitter with Macros Tauntek San Diego viewed 21st May 2012 lt http www tauntek com irmimic2 learning ir remote control transmitter htm gt Jaycar 2010 Jaycar Electronics Catalogue 2010 p 73 Rydalmere Lemay L 2003 Sams Teach Yourself Web Publishing with HTML and XHTML in 21 Days 4th edn Sams Indianapolis Leung L 2012
182. web 7 WiServer print P webB TN EXIT WiServer print P webB TN VER 33 WiServer print local str VER 33 WiServer print P webB TN 2 VER 33 108 WiServer print P web END return true URL not found WiServer print P web START WiServer print P web orange WiServer print P web Awidth WiServer print ERROR WiServer print P web ERRORa 33 WiServer print local str VER 33 WiServer print P web ERRORb VER 33 WiServer print P web END return true void writeDefault local 1p 192 168 1 2 EEPROM write 0 192 EEPROM write 1 168 EEPROM write 2 1 EEPROM write 3 2 gateway 1 192 168 1 1 EEPROM write 4 192 EEPROM write 5 168 EEPROM write 6 1 EEPROM write 7 1 subnet mask 255 255 255 0 EEPROM write 8 255 EEPROM write 9 255 10 255 EEPROM write 11 0 ssid PROGMEM IRMCU max 32 bytes EEPROM write 12 char 1 EEPROM write 13 char R EEPROM write 14 char M EEPROM write 15 char C EEPROM write 16 char U security type 0 0 open 2 WPA 3 WPA2 EEPROM write 127 32 0 security passphrase PROGMEM 12345678 max 64 characters 12 32 1 char 1 12 32 2 2 12 32 3 3 EEPR
183. where to find the Web Page to send to the Web Browser void setup Enable Serial output and ask WiServer to generate log messages optional WiServer enableVerboseMode true Initialize WiServer and have it use the sendMyPage function to serve pages WiServer init sendMyPage The main MCU code loop has to call the Web Server to keep starting as it will not be running after it has done its processing The loop delay also needs to be increased to cater for more URL decoding but not too much void loop WiServer server_task WiServer delay 100 22 The Web page HTML strings printed from program memory and processing of received URL commands after a number of packets has finished being sent See the next example code fragment boolean sendMyPage char URL check if Web Page has been sent as it is number of packets if 0 2 int uip conn appstate ackedCount amp amp 0 int uip conn gt appstate sentCount is ready VOLUME UP command else if strcmp URL S1 0 SEND button 1 Serial println URL S 1 VOL UP IR CSEL 1 select memory location number 1 IR SEND send IR pulse train finish URL processing calls now send web pages Home web page if strcmp URL 0 just IP address of home page write page content from flash memory webpHOME WiServer print P flash memory HTML text string re
184. xtending the functionality of the user interface and software controlled features Hardware boards and Shields stack consist of e Infrared Transmit Receive status LED command button e Arduino AVR MCU Infrared with Learn Store Send e Factory Settings Reset Button 36 Wi Fi connectivity CuHead WiShield V2 Arduino MEGA 2560 with Web Server Fixed gain Microphone with DC power filter Battery Pack to be added may use battery circuit on CuHead WiShield V2 See Figure 4 2 Prototype 2 assembled Figure 4 2 Prototype 2 assembled The MCU Software 15 the same as Prototype 1 except for pin out changes to allow for the different MCU connections The Web Server 15 not fully operational and that 15 the final state of the project 39 Chapter 5 System and Functional Testing This section gives details of the testing and evaluation of system components and functions of Prototype 1 Further test and evaluation results are in the Appendix Testing of the full system has been marked on the SRVM in Appendix B Requirements Appendix H Test Results includes pre testing and evaluation testing leading to Prototype 1 Testing A Serial Terminal program was also used to check and validate correct MCU program execution Prorotype 1 was demonstrated during the Focus Group discussion research activity and to the project Supervisor successfully 5 1 User Interface Web Browser and Web Pages The designed Web Pages all worked and
Download Pdf Manuals
Related Search
Related Contents
1 - Novatherm Klimageräte MTP850/MTP850 S/MTP850 FuG TETRA Portable Terminal – Basic RAID Arreglo Redundante de Disco Independiente Garges le Mag - Garges-lès Operating Instructions 1-800-4-D W A L T • www .dewalt.com Wayne-Dalton IDRIVE 9100 User's Manual LA MESURE D`ETOILES DOUBLES AVEC UN Copyright © All rights reserved.
Failed to retrieve file