1
\$\begingroup\$

I want an xbee to do nothing but simply send some data already programmed in the microcontroller (Atmega 168).But what I cannot figure out is how to connect the microcontroller with xbee on a breadboard.will only GND and Vcc be enough? The mc is programmed externally beforehand by ISP. Should I connect its pin out to Txd of Xbee module? Any help will be greatly appreciated.

\$\endgroup\$
  • \$\begingroup\$ Are you using an Xbee "explorer" or "adapter" board? The pins on the Xbee will not (should not) drop right into a standard breadboard. Some adapter boards ARE 5v. The 'bee runs at 3.3v - the Mega is probably at 5v but it should provide a 3.3v power line. You will need some form of level shifting to bring the Mega's 5v signal down to 3.3v (and the reverse, for the other direction if used). Of course, if your Xbee adapter board IS 5v, then all this may be built in. Pictures or part numbers will help. \$\endgroup\$ – Ron J. Jul 29 '13 at 3:24
  • \$\begingroup\$ Thanks Ron I have xbee adapter board ,that has a usb port.Can I use separate +Vcc for zigbee and atmega? with the help of some voltage regulator.Can you give me some reference I have googled a lot but still in the dark?Any more information will be great. \$\endgroup\$ – Rambo partyush Jul 30 '13 at 0:26
  • \$\begingroup\$ The Xbee needs 3.3v power - your adapter board draws juice from the USB line (5v) and regulates it (to 3.3v). Without using the USB, you would have to feed it either 5v or 3.3v via the pins - if you post the part no. or photo we'd know for sure what it is. The Dout/Din pins are PROBABLY level shifted since its a USB powered adapter (again, need to know what it is exactly). \$\endgroup\$ – Ron J. Jul 30 '13 at 12:42
  • \$\begingroup\$ This is my Xbee USB adapter board link \$\endgroup\$ – Rambo partyush Jul 31 '13 at 0:44
1
\$\begingroup\$

From the product info at the link you provided, it does not appear to have any pins available for your microcontroller. This board has a USB interface, which means it is the "PC end" of the wireless pair. What you need is the partner board, such as this one, which is designed to connect to your Mega.

From the product description:

XBee USB wireless adaptor board is used for interfacing any of the series 1 XBee wireless modules with the PC. Using this USB adaptor board for XBee wireless modules you can communicate between PC to PC, PC to robot / embedded board with ease. You can also use this module to change configuration of the XBee devices using PC via USB port using XCTU software from Digi.

On the PC side this device is treated as the Communication Device Class (CDC) of USB family and it allows the user to treat USB port as a normal serial port (Virtual COM port).

\$\endgroup\$
0
\$\begingroup\$

I assume you want to send data from your micro controller to your XBee module, which then transmits the data to the XBee coordinator which is connected to the PC?

As you already stated, you obviously have to connect the XBee module to a 3.3V power supply. Additionally, connect the "Data In" pin to the TxD pin of the desired UART from your ATMEGA. You may also want to connect "Data Out" to RxD if you require bidirectional communication in the future.

Further check what UART configuration the XBee module expects (baudrate, data bits, stop bits, start bit) and setup the UART accordingly.

Keep in mind that the logic levels between the XBee modul and your controller have to be compatible. If you power your ATMEGA from something other than 3.3V, take a look at the data sheet if the levels are within tolerances.

You also may have to configure your XBee modules accordingly, but thats another topic and it should be well documented in the manual.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.