Home/Support/Support Forum/XBee Mesh Read Data from I2C Sensor

XBee Mesh Read Data from I2C Sensor

0 votes
XBee NewBe: Excuse me if some of my questions are trivial.

a)
Is it possible to read data from an i2c sensor only using an XBee (no processor).
I know the XBee Python library supports I2C, but is this library installed on the XBee, and can the XBee then act as an I2C Master?

b) My test application is as follows:

1) XBee 1 - 6 (battery) waking up every 2 minutes collecting Data from 2 I2C sensors Each
(Thought I'd use 2.4 Ghz XBee Mesh modules)

2) XBee 0 Installed in Control Panel (CP) running on Mains Power: Always on
CP also has an WiFi Access Point (AP)
Is it possible for XBee 0 to stay connectd to the AP so that a Computer can retrieve data
from XBee 1-6 over WiFi (using API or ??)


Thanks in advance for all the help I can get!
asked Feb 5, 2018 in ZigBee PRO Featureset (and legacy ZNet 2.5) by gos New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
a: No, the code is not already installed and running. Depending on which XBee module it is depends on what you need to do to make that work. For example, a cellular XBee can use Micro Python but in to create an I2C object, read that data and provide that data to the Cellular processor to be sent out over the air.

The older Programmable XBee modules use C that is installed on a secondary FreeScale processor. That C code creates the object and determines what to do with that data.

A standard XBee does not have that capability. It would need to be connected to a Processor that has a UART (Connection to the XBee) and an I2C master port.
answered Feb 6, 2018 by mvut Veteran of the Digi Community (11,755 points)
As I said, I plan to use the Mesh (DigiMesh) modules:
Can a DigiMesh use Micro Python?

Let me see if I understand this correctly:

a) When an XBee Module supports Micro Python, the XBee Python Library can be installed?

b) Using I2C API in the XBee Python Library the XBee can then Read Data from I2C Sensors (slaves)?
No, the Digi mesh modules at this time do not offer Micro Python support. That is the Programmable version currently available with Digi mesh 900 or 2.4 use a FreeScale processor with C Code.
Thanks a lot for your answer!
I have designed and implemented my own I2C to Analog Circuit Board (B1) that I use in another system: It's based around a MicroChip uP and two low power DACs used as Sample & Hold.

I think I can use this Board (B1) in Conjunction with the XBee DigiMesh as follows (provided the Digimesh can perform a few tasks)

a) I plan to let the XBee DigiMesh boards be managed by one XBee that controls sleep time:

b) Let's say they sleep for 2 minutes, wakes up and provides Power for B1 on a Output Pin. B1 draws max 2 mA.

c) The DAC output then provides the ADC on the XBee with a Value.

d) The Value from the XBee is eventually read by a PC using XBee API Commands.

Can b) and c) above be accomplished, or do you see any obstacles?
a) is incorrect. The module would use a cyclic sleep
cycle instead.
b) As long as you stay below the xbee modules hardware pins sink/source current that should be fine.
c) and d) both look fine to me.
...