NETWORKING AND COMMUNICATIONS
Networking and connecting devices, computers and controllers has been something that fascinated me from the time I started playing with electronics.
It all started with my experiments connecting my very old PENTIUM-1 100MHz PC I had with my then desktop a CELERON 433MHz Machine almost a decade and half back!! with great joy I remember the Null MODEM Cables that I made to communicate between them over SERIAL ports and the LAPLINK cables over PARALLEL ports :) I didnt had much options to document them or take photos at that time. But still the motherboards and ISA and EISA Cards should be available somewhere and ill try to take a snap and attach them here for archiving the old good stuff :-) I couldnt stop telling this though not much relevant with this weeks documentation interms of evaluations, but this is the first thing I keep remembering whenever I think about Communication and Networking.
Well moving on, while exploring the various possibilites to do networking and commuication between Microcontrollers are,
Keeping in mind about one of the probable requirement that may arise once I make my final project and deploy it, ( MY Water Quality Measuring Platform ) I will have to interconnect different Microcontrollers with sensor onboard, kept in different places in the lab wirelessly. This made me think of either choosing NRF module or ZigBee. I tried both of them, though NRF is much cheaper and less power consuming than ZigBee, I had to choose the later considering the code and hardware complexity I already have to manage with my Final project.
I will be documenting a small example for this interconnecting two the microcontroller boards I have made using ZigBee, SM_FAB PIC12F Dev Board and SM_FAB PIC16F Dev Board , containing PIC12F675 and PIC16F877A microcontrollers respectively. Since a detailed explanation on how the boards are made is documented on Input and Output devices Week, I am not repeating the fabrication process here.SM_FAB PIC12F - FABRICATION
Here is how it evolved..

 
The completed PCB

 
SM_FAB PIC16F - FABRICATION
The Schematic Design and PCB was developed using EAGLE CAD..
 
The completed board powered on using external USB connector..
 
NETWORKING WITH ZIGBEE - MY TEMPERATURE MONITOR
I have used the SM_FAB PIC12F Board to read LM35 temperture sensor during my input week , I thought to workaround that exmple and hook the ZigBee module to this board to send the temperature data. I have already programmed a software UART with this to output the temperature reading, but this had to be slightly modified to make the data packaged in a perfect PACKET so that I have a custom logic to decode this PACKET once received by the second ZigBee module in the SM_FAB PIC16F board. The logic I tried was to simply add a "$" before the temperature data and one "#" after this. This will help me to look for such a packet, for example " $22.45# " which can be decoded on the second microcontroller. This will help me to avoid the ZigBee from accidently picking up data from nearby neighbouring networks and giving incorrect outputs.
I programmed the PIC 12F accordingly and the following shows the hardware setup sending the data.

 
PIC 12F program for sending the data..

 
Serial out of this board hooked to the terminal serial monitoring software for reference on packatization.

 
Interfacing the ZigBee module with SM_FAB PIC12F.

 
Hookingup the LCD and ZigBee with the SM_FAB PIC16F Board and flashing it with the decoding software.

 

 
Unlike what I expected it wasnt a cakewalk by just replacing the serial lines with ZigBee, some configurations seems to be wrong and my Zigbee wasnt receiving the data as expected. Only the LCD seems to be working fine and no temperature data was showing up!!
TROUBLESHOOTING
I installed the XCTU configuration utility from Digi, the manufacturers of ZigBee module and here goes the story of what I did with it.
Trying to discover the ZigBee modules connected to the PC.

 
To the left side you can see the ZigBee connected to the PC, its MAC and port details, and towards the right all the parameters related to the Networking are listed, here you can find the current channel now you are using, PAN ID and lot other options.

 
Trying to discover the other ZigBee modules in range.

 
I tried to make sure that each module are working on the same channel, which was earlier causing the problem for me, after fixing this by repeating with different module, my network started working.
This shows the USB interfced 3rd ZigBee module I had which was used to initially discover the network and trouble shoot.

 
After reconfiguring all the modules, my ZigBee modules started to work flawlessly, you can see the data received being displayed in the LCD :)

The design files can be downloaded from here.