SlideShare a Scribd company logo
1 of 13
Board Schematic
Board Layout
Demo Program Result
Prototyped 3 boards already does have the proper
program inside their flash for the demonstration.
So it is recommended to just play it and monitor
it before you re-program when you are trying to
study and improve the codes, or preparing another
documentation of this project.
uServer uTerminal uPanel
IoT Solar Panel Network
uart[1]
– RS485 [A, B] Pair
uServer uTerminal
uTerminal uPanel
uart[0] – for Debug
may connect to pc
uPanel
uart[3] –
mcu to Zigbee Module
All the Baud Rate for UART
is currently 9,600 !!
Network Flow Chart – in brief
uServer counts “addr”
“addr” sent to RS485 Line. uServer waits : while(1)
Every uTerminals received “addr”
A single uTerminal (which the “addr” matched) sends ‘:’ to its Target Zigbee Pair, uPanel
Every uPanels have been collecting its data already,
so immediately returns its data when received ‘:’
uPanel indicates the end of transmission with ‘;’
uTerminal transmits the received data from uPanel to RS485 line
But all the other uTerminals DOES NOT RESPONSE as this is not “addr”
The occupancy of the line ends up with the last byte 0xFF
uServer prints out what received on UART0 (desktop-PC)
uServer uTerminal
uPanel
uServer
uTerminal uTerminal uTerminal
uTerminal
uPaneluTerminal
uServer uTerminal
uServer
Network Flow Chart – in Detail
RS485 : not(RE) & DE is hard-wired (same electrical node)
- Start of Transmission via RS485 : not(RE) = ‘1’ & DE = ‘1’
- End of Transmission via RS485 : not(RE) = ‘0’ & DE = ‘0’
- This Transmission sequence is implemented by UART1_SendByte(unsigned char Data)
- Automatically occupies and release the line controlling not(RE) & DE at the same time
1. [uServer] sends “addr” to RS485 Line and wait till the result from uTerminal (which ends with 0xFF)
- “addr” equals internal (uint)txHolder which counts from [1 to maxTerminal]
2. [uTerminal] Every uTerminals received “addr” via RS485
- But only when “addr” matches its own address configured by dip switch starts communication.
- Sends “:” to Target Zigbee Module // start of Zigbee Communication
3. [uPanel] Zigbee Module received ‘:’
- Then sends out its collected data to Zigbee Module
- Finnaly sends out ‘;’ to Zigbee Module to indicate the end of the transmission
4. [uTerminal] Received data from Zigbee which ends with ‘;’
- Then hands over this received data to RS485 Line, this string ends with 0xFF
5. [uServer] Received the data from uTerminal via RS485 Line including 0xFF at the end of stream.
- Prints out received data to UART0 (desktop-PC)
- Counts up “addr” and sends this “addr” again to RS485. Iteration.
Working Mode Selection
dip[3] dip[2] dip[1] dip[0]
Zigbee Config. [1111]
uServer [1mmm] { 0b000 ≤ 0bmmm ≤ 0b111 }
mmm == Maximum uTerminal
uTerminal [0nnn] { 0b000 ≤ 0bnnn ≤ 0b111 }
nnn == uTerminal Address
uPanel [0000]
• Operation Modes
: Router, Coordinator, End Point
• Bandwidth : 2.4GHz
• Interface : UART, USB, I2C, I2S
Zigbee Network
Zigbee Configuration dip[1111]
* Interface of Zigbee Tranceiver Module : UART(Current Baud Rate 9600, the rate can be re-configured)
- Transmit and Receive Commands, Response, Character Data via UART between IoT Board and Zigbee Module
* The Command Set is called “AT+COMMAND”
* Factory Default Mode : Router, Operation Mode (Byte Communication)
* We might only use : Point to Point Router Mode
Operation Mode @reboot… “TARGET NON” or “TARGET OK”
[1] Command Mode : Enter “+++”
[2] Set Operatin Mode : Enter “AT+SETROUTER” ( cf. “AT+SETCOORD” )
[3] Set Terget Device : Enter “AT+SETTARGETFFFFFFFFFFFFFFFF” ( IEEE Address 16bits )
[4] Restart and Operate : Enter “ATZ” ( Soft Reset )
[cf. Operation Mode >> Command Mode : +++ ][Command Mode >> Operation Mode : ATO ]
IoT Project
0 001 551 000 00C 1CC3 uServer
uTerminal uPanel
1 001 551 000 00C 1CC0 001 551 000 00C 1CC2
RS485 Communication
• Differential Signaling for Noise-Robustness
• Need Resource(Comm. Line) Distribution Policy
• Non-Crosswiring ( A to A, B to B )
(cf. in RS232, Tx to Rx, Rx to Tx)
• nRE(0) : Read Enable (Rx)
• DE (1) : Data Enable (Tx)
@uServer dip[1mmm]
• Define Maximum uTerminal Numer with dip[2 downto 0]
• Count Index++ (Idx == uTerminal Address, ex. 1, 2, 3,.. 1, 2, 3)
- then Send “addr” to RS485 Comm. Line
- Tx Access Authority turned to “addr”
• Recovers Authority to RS485 when Receiving [Byte 255]
@uTerminal dip[0mmm]
• Wait till “addr” is given over RS485 Comm. Line
• Send “:” via Zigbee - Start Zigbee Comm.
- Data Receiving “;” from Zigbee - End of Zigbee Comm.
• Send [Data received from Zigbee] over RS485 Comm. Line
- RS485 Tx Access Authority Ends with [Byte 255]
• Dormant till the next “addr” via RS485 Comm. Line
@uPanel dip[0000]
• Generate Data to Send (ex. ADC)
• Received “:” via Zigbee
- Send Data, ends with “;”
* Dormant till next “:”, gathering Data
@Zigbee Config. Mode
dip[1111]
• Type and Monitor with Hyper Terminal
• Use AT+COMMAND
• UART0 – PC
• UART3 – Zigbee
ADC
1. Power-on ADC module by setting PCONP[12]
2. Select the mode of the pin P0.23 as AD0.0 by setting PINSEL1[15:14]
3. Enable ADC module and start A/D Conversion by setting AD0CR[21] & AD0CR[26:24]
4. Check conversion DONE flag by reading ADDR0[31]
5. If DONE is set(1), ADC conversion for this channel[0] is finished.
Read the RESULT from ADDR0[15:4]
Constraint : The voltage bias (offset) and the swing-range is not optimized.
Current successfully readable DC level is [ 1.2v ~ 3.0v ]
But ADC from MCU is working fine. This is a mere problem from H/W side.
Improvements
• When additional 2 boards come, test the functionality with 5 boards ( 2 uTerminal – uPanel pairs )
• ADC : Additional example Code will be offered with the Current IoT uVision Project
- Then you might add the functionality to the current version.
• For debugging purpose, each device, and each communication waits the response forever.
- for realistic implementation, each device should recover to the next step incase of comm. failure.

More Related Content

What's hot

CCNA ppt Day 7
CCNA ppt Day 7CCNA ppt Day 7
CCNA ppt Day 7VISHNU N
 
Packet Tracer Tutorial # 2
Packet Tracer Tutorial # 2Packet Tracer Tutorial # 2
Packet Tracer Tutorial # 2Abdul Basit
 
CCNA Packet Tracer 1.6.1
CCNA Packet Tracer 1.6.1CCNA Packet Tracer 1.6.1
CCNA Packet Tracer 1.6.1Rafat Khandaker
 
Serial Communication
Serial CommunicationSerial Communication
Serial CommunicationRashmi
 
Uccn1003 -may10_-_lect02b1_-_lan_basic_in_packet_tracer
Uccn1003  -may10_-_lect02b1_-_lan_basic_in_packet_tracerUccn1003  -may10_-_lect02b1_-_lan_basic_in_packet_tracer
Uccn1003 -may10_-_lect02b1_-_lan_basic_in_packet_tracerShu Shin
 
Universal asynchronous receiver-transmitter UART Dsa project report
Universal asynchronous receiver-transmitter UART Dsa project reportUniversal asynchronous receiver-transmitter UART Dsa project report
Universal asynchronous receiver-transmitter UART Dsa project reportShahrukh Javed
 
Asynchronous Serial Communication and standards
Asynchronous Serial Communication and standardsAsynchronous Serial Communication and standards
Asynchronous Serial Communication and standardsMathivanan Natarajan
 
Cpu224 xp eth-ethernet_interface
Cpu224 xp eth-ethernet_interfaceCpu224 xp eth-ethernet_interface
Cpu224 xp eth-ethernet_interfacearco zhang
 
UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )Tarun Khaneja
 
arm complete detail part 2
arm complete detail part 2arm complete detail part 2
arm complete detail part 2NOWAY
 
119163798 icnd1-practice-questions-9tut
119163798 icnd1-practice-questions-9tut119163798 icnd1-practice-questions-9tut
119163798 icnd1-practice-questions-9tutnicolelemmimg
 
UART Communication
UART CommunicationUART Communication
UART Communicationdattatraya1
 
Mridul_Verma_Intern_Tech_Adityaa_UART
Mridul_Verma_Intern_Tech_Adityaa_UARTMridul_Verma_Intern_Tech_Adityaa_UART
Mridul_Verma_Intern_Tech_Adityaa_UARTMridul Verma
 

What's hot (20)

CCNA ppt Day 7
CCNA ppt Day 7CCNA ppt Day 7
CCNA ppt Day 7
 
Packet Tracer Tutorial # 2
Packet Tracer Tutorial # 2Packet Tracer Tutorial # 2
Packet Tracer Tutorial # 2
 
1 egp
1 egp1 egp
1 egp
 
lab1
lab1lab1
lab1
 
CCNA Packet Tracer 1.6.1
CCNA Packet Tracer 1.6.1CCNA Packet Tracer 1.6.1
CCNA Packet Tracer 1.6.1
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
Uccn1003 -may10_-_lect02b1_-_lan_basic_in_packet_tracer
Uccn1003  -may10_-_lect02b1_-_lan_basic_in_packet_tracerUccn1003  -may10_-_lect02b1_-_lan_basic_in_packet_tracer
Uccn1003 -may10_-_lect02b1_-_lan_basic_in_packet_tracer
 
Universal asynchronous receiver-transmitter UART Dsa project report
Universal asynchronous receiver-transmitter UART Dsa project reportUniversal asynchronous receiver-transmitter UART Dsa project report
Universal asynchronous receiver-transmitter UART Dsa project report
 
Uart
UartUart
Uart
 
Networking basics
Networking basicsNetworking basics
Networking basics
 
USART
USARTUSART
USART
 
Asynchronous Serial Communication and standards
Asynchronous Serial Communication and standardsAsynchronous Serial Communication and standards
Asynchronous Serial Communication and standards
 
Uart
UartUart
Uart
 
Cpu224 xp eth-ethernet_interface
Cpu224 xp eth-ethernet_interfaceCpu224 xp eth-ethernet_interface
Cpu224 xp eth-ethernet_interface
 
UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )UART project report by Tarun Khaneja ( 09034406598 )
UART project report by Tarun Khaneja ( 09034406598 )
 
arm complete detail part 2
arm complete detail part 2arm complete detail part 2
arm complete detail part 2
 
UART
UARTUART
UART
 
119163798 icnd1-practice-questions-9tut
119163798 icnd1-practice-questions-9tut119163798 icnd1-practice-questions-9tut
119163798 icnd1-practice-questions-9tut
 
UART Communication
UART CommunicationUART Communication
UART Communication
 
Mridul_Verma_Intern_Tech_Adityaa_UART
Mridul_Verma_Intern_Tech_Adityaa_UARTMridul_Verma_Intern_Tech_Adityaa_UART
Mridul_Verma_Intern_Tech_Adityaa_UART
 

Similar to Cortex M3 LPC176x NXP

Cataloge ge 3.control and_automation-26_vat300_e_c6-12_rev_b
Cataloge ge 3.control and_automation-26_vat300_e_c6-12_rev_bCataloge ge 3.control and_automation-26_vat300_e_c6-12_rev_b
Cataloge ge 3.control and_automation-26_vat300_e_c6-12_rev_bDien Ha The
 
Internet Technology Practical (Mumbai University) -2017
Internet Technology Practical  (Mumbai University) -2017Internet Technology Practical  (Mumbai University) -2017
Internet Technology Practical (Mumbai University) -2017Satyendra Singh
 
The presentation is about USART and serial communication
The presentation is about USART and serial communicationThe presentation is about USART and serial communication
The presentation is about USART and serial communicationsinaankhalil
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and RoboticsNIT Raipur
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptxnaveen088888
 
8051 serial communication1
8051 serial communication1 8051 serial communication1
8051 serial communication1 vijaydeepakg
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded systemram avtar
 
Universal Asynchronous Receive and transmit IP core
Universal Asynchronous Receive and transmit IP coreUniversal Asynchronous Receive and transmit IP core
Universal Asynchronous Receive and transmit IP coreAneesh Raveendran
 
acn-practical_manual-19-20-1 final.pdf
acn-practical_manual-19-20-1 final.pdfacn-practical_manual-19-20-1 final.pdf
acn-practical_manual-19-20-1 final.pdfQual4
 
serial-200505101453.pdf
serial-200505101453.pdfserial-200505101453.pdf
serial-200505101453.pdfKiranG731731
 
Serial Communication
Serial CommunicationSerial Communication
Serial CommunicationUshaRani289
 
Hands On Data Communications, Networking and TCP/IP Troubleshooting
Hands On Data Communications, Networking and TCP/IP TroubleshootingHands On Data Communications, Networking and TCP/IP Troubleshooting
Hands On Data Communications, Networking and TCP/IP TroubleshootingLiving Online
 
Micro c lab8(serial communication)
Micro c lab8(serial communication)Micro c lab8(serial communication)
Micro c lab8(serial communication)Mashood
 

Similar to Cortex M3 LPC176x NXP (20)

Cataloge ge 3.control and_automation-26_vat300_e_c6-12_rev_b
Cataloge ge 3.control and_automation-26_vat300_e_c6-12_rev_bCataloge ge 3.control and_automation-26_vat300_e_c6-12_rev_b
Cataloge ge 3.control and_automation-26_vat300_e_c6-12_rev_b
 
Internet Technology Practical (Mumbai University) -2017
Internet Technology Practical  (Mumbai University) -2017Internet Technology Practical  (Mumbai University) -2017
Internet Technology Practical (Mumbai University) -2017
 
The presentation is about USART and serial communication
The presentation is about USART and serial communicationThe presentation is about USART and serial communication
The presentation is about USART and serial communication
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 
Commisioning.pptx
Commisioning.pptxCommisioning.pptx
Commisioning.pptx
 
Chapter5 dek3133
Chapter5 dek3133Chapter5 dek3133
Chapter5 dek3133
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
 
8051 serial communication1
8051 serial communication1 8051 serial communication1
8051 serial communication1
 
Ju2416921695
Ju2416921695Ju2416921695
Ju2416921695
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded system
 
Universal Asynchronous Receive and transmit IP core
Universal Asynchronous Receive and transmit IP coreUniversal Asynchronous Receive and transmit IP core
Universal Asynchronous Receive and transmit IP core
 
project 3 full report
project 3 full reportproject 3 full report
project 3 full report
 
acn-practical_manual-19-20-1 final.pdf
acn-practical_manual-19-20-1 final.pdfacn-practical_manual-19-20-1 final.pdf
acn-practical_manual-19-20-1 final.pdf
 
serial-200505101453.pdf
serial-200505101453.pdfserial-200505101453.pdf
serial-200505101453.pdf
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
Hands On Data Communications, Networking and TCP/IP Troubleshooting
Hands On Data Communications, Networking and TCP/IP TroubleshootingHands On Data Communications, Networking and TCP/IP Troubleshooting
Hands On Data Communications, Networking and TCP/IP Troubleshooting
 
Intel Quark HSUART
Intel Quark HSUARTIntel Quark HSUART
Intel Quark HSUART
 
UART
UARTUART
UART
 
Micro c lab8(serial communication)
Micro c lab8(serial communication)Micro c lab8(serial communication)
Micro c lab8(serial communication)
 
Labmannual
LabmannualLabmannual
Labmannual
 

Recently uploaded

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptxNikhil Raut
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...Amil Baba Dawood bangali
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 

Recently uploaded (20)

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 

Cortex M3 LPC176x NXP

  • 3. Demo Program Result Prototyped 3 boards already does have the proper program inside their flash for the demonstration. So it is recommended to just play it and monitor it before you re-program when you are trying to study and improve the codes, or preparing another documentation of this project. uServer uTerminal uPanel
  • 4. IoT Solar Panel Network uart[1] – RS485 [A, B] Pair uServer uTerminal uTerminal uPanel uart[0] – for Debug may connect to pc uPanel uart[3] – mcu to Zigbee Module All the Baud Rate for UART is currently 9,600 !!
  • 5. Network Flow Chart – in brief uServer counts “addr” “addr” sent to RS485 Line. uServer waits : while(1) Every uTerminals received “addr” A single uTerminal (which the “addr” matched) sends ‘:’ to its Target Zigbee Pair, uPanel Every uPanels have been collecting its data already, so immediately returns its data when received ‘:’ uPanel indicates the end of transmission with ‘;’ uTerminal transmits the received data from uPanel to RS485 line But all the other uTerminals DOES NOT RESPONSE as this is not “addr” The occupancy of the line ends up with the last byte 0xFF uServer prints out what received on UART0 (desktop-PC) uServer uTerminal uPanel uServer uTerminal uTerminal uTerminal uTerminal uPaneluTerminal uServer uTerminal uServer
  • 6. Network Flow Chart – in Detail RS485 : not(RE) & DE is hard-wired (same electrical node) - Start of Transmission via RS485 : not(RE) = ‘1’ & DE = ‘1’ - End of Transmission via RS485 : not(RE) = ‘0’ & DE = ‘0’ - This Transmission sequence is implemented by UART1_SendByte(unsigned char Data) - Automatically occupies and release the line controlling not(RE) & DE at the same time 1. [uServer] sends “addr” to RS485 Line and wait till the result from uTerminal (which ends with 0xFF) - “addr” equals internal (uint)txHolder which counts from [1 to maxTerminal] 2. [uTerminal] Every uTerminals received “addr” via RS485 - But only when “addr” matches its own address configured by dip switch starts communication. - Sends “:” to Target Zigbee Module // start of Zigbee Communication 3. [uPanel] Zigbee Module received ‘:’ - Then sends out its collected data to Zigbee Module - Finnaly sends out ‘;’ to Zigbee Module to indicate the end of the transmission 4. [uTerminal] Received data from Zigbee which ends with ‘;’ - Then hands over this received data to RS485 Line, this string ends with 0xFF 5. [uServer] Received the data from uTerminal via RS485 Line including 0xFF at the end of stream. - Prints out received data to UART0 (desktop-PC) - Counts up “addr” and sends this “addr” again to RS485. Iteration.
  • 7. Working Mode Selection dip[3] dip[2] dip[1] dip[0] Zigbee Config. [1111] uServer [1mmm] { 0b000 ≤ 0bmmm ≤ 0b111 } mmm == Maximum uTerminal uTerminal [0nnn] { 0b000 ≤ 0bnnn ≤ 0b111 } nnn == uTerminal Address uPanel [0000]
  • 8. • Operation Modes : Router, Coordinator, End Point • Bandwidth : 2.4GHz • Interface : UART, USB, I2C, I2S Zigbee Network
  • 9. Zigbee Configuration dip[1111] * Interface of Zigbee Tranceiver Module : UART(Current Baud Rate 9600, the rate can be re-configured) - Transmit and Receive Commands, Response, Character Data via UART between IoT Board and Zigbee Module * The Command Set is called “AT+COMMAND” * Factory Default Mode : Router, Operation Mode (Byte Communication) * We might only use : Point to Point Router Mode Operation Mode @reboot… “TARGET NON” or “TARGET OK” [1] Command Mode : Enter “+++” [2] Set Operatin Mode : Enter “AT+SETROUTER” ( cf. “AT+SETCOORD” ) [3] Set Terget Device : Enter “AT+SETTARGETFFFFFFFFFFFFFFFF” ( IEEE Address 16bits ) [4] Restart and Operate : Enter “ATZ” ( Soft Reset ) [cf. Operation Mode >> Command Mode : +++ ][Command Mode >> Operation Mode : ATO ] IoT Project 0 001 551 000 00C 1CC3 uServer uTerminal uPanel 1 001 551 000 00C 1CC0 001 551 000 00C 1CC2
  • 10. RS485 Communication • Differential Signaling for Noise-Robustness • Need Resource(Comm. Line) Distribution Policy • Non-Crosswiring ( A to A, B to B ) (cf. in RS232, Tx to Rx, Rx to Tx) • nRE(0) : Read Enable (Rx) • DE (1) : Data Enable (Tx)
  • 11. @uServer dip[1mmm] • Define Maximum uTerminal Numer with dip[2 downto 0] • Count Index++ (Idx == uTerminal Address, ex. 1, 2, 3,.. 1, 2, 3) - then Send “addr” to RS485 Comm. Line - Tx Access Authority turned to “addr” • Recovers Authority to RS485 when Receiving [Byte 255] @uTerminal dip[0mmm] • Wait till “addr” is given over RS485 Comm. Line • Send “:” via Zigbee - Start Zigbee Comm. - Data Receiving “;” from Zigbee - End of Zigbee Comm. • Send [Data received from Zigbee] over RS485 Comm. Line - RS485 Tx Access Authority Ends with [Byte 255] • Dormant till the next “addr” via RS485 Comm. Line @uPanel dip[0000] • Generate Data to Send (ex. ADC) • Received “:” via Zigbee - Send Data, ends with “;” * Dormant till next “:”, gathering Data @Zigbee Config. Mode dip[1111] • Type and Monitor with Hyper Terminal • Use AT+COMMAND • UART0 – PC • UART3 – Zigbee
  • 12. ADC 1. Power-on ADC module by setting PCONP[12] 2. Select the mode of the pin P0.23 as AD0.0 by setting PINSEL1[15:14] 3. Enable ADC module and start A/D Conversion by setting AD0CR[21] & AD0CR[26:24] 4. Check conversion DONE flag by reading ADDR0[31] 5. If DONE is set(1), ADC conversion for this channel[0] is finished. Read the RESULT from ADDR0[15:4] Constraint : The voltage bias (offset) and the swing-range is not optimized. Current successfully readable DC level is [ 1.2v ~ 3.0v ] But ADC from MCU is working fine. This is a mere problem from H/W side.
  • 13. Improvements • When additional 2 boards come, test the functionality with 5 boards ( 2 uTerminal – uPanel pairs ) • ADC : Additional example Code will be offered with the Current IoT uVision Project - Then you might add the functionality to the current version. • For debugging purpose, each device, and each communication waits the response forever. - for realistic implementation, each device should recover to the next step incase of comm. failure.