Sunday, 22 January 2017

How to establish the communication between ZigBee(Telegesis) and Arduino UNO

The part number of this ZigBee is EXTR357 of Telegesis. 
For convenient, the development board of ZigBee (Telegesis) and Arduino UNO are going be used for testing.

According to the datasheet of Arduino UNO, whose chip number is ATmega328P, it only has one software serial and one hardware serial. For the EXTR357 of ZigBee, it only has one hardware serial also. The hardware serial of them is occupied by the USB port. At the same time, Arduino UNO cannot use software serial to communicate with the hardware serial of ZigBee.
Therefore, the communication between them can only be established by hardware serial.

The connection of the hardware serial will be the diagram below. But at this testing, the power supply of Arduino will be supplied by the battery of ZigBee. So the 3.3 Vcc of Arduino should short with the Vcc of ZigBee together as the standard voltage input of ZigBee is 3.3V. Since the USB port of both of them will occupy the hardware serial, after downloaded the program, they should be plugged out when the ‘Tx’ or ‘Rx’ is using.
Without the USB port, the ZigBee can change to battery power through changing the connection in the development board, referring the picture below.
Therefore, the code for testing the communication between ZigBee and Arduino can be written, referring the code below.
This code is going to write the value stored in the S3B register of ZigBee with increasing the number. As the register of S3B is to contain text, the text inside can be read also for checking. 

No comments:

Post a Comment