Energy Consumption Project with Xbee Pro 804.15.4 : Question about data collision

Hello everyone !

I’m a student in BTS IRIS ( Information Technology ) and I have to do a project to get my degree in my last year ( 2 years ).

So my project consist to get the electricity and water consumption of each buildings of the school and store it in a database.
Once the informations stored my team-mate will execute SQL query to get the average of energy consumed in the last week, month or year.
The energy consumption will be retrieve and send using Xbee technology.

So here is my problem : I need to send the information using some Xbee Emettor ( much as Xbee, as building -> End Device ) to the Xbee Receptor ( Main Server - > Coordinator ).

The protocol I’ll use will be build like this :

$ENERGY_METER_ID|PHASE1|PHASE2|PHASE3|WATER|OFF-PEAK|FULL-HOUR#

Example : $239239|010|005|002|10.3|0000063|0000080#

Here is the situation like I see it for the future ( But I’m not sure if I’m doing in the right way ! )

What I want to know is how the data is retrieve from the Coordinator.
In class, I can connect only two Xbee device for the moment, which works fine but I don’t really know how the Coordinator will be retrieve the information of two ( And more ) Xbee End Device Emettor at the same time ?

I need to store each information ( in a array ) from the End devices in the Coordinator ( Which will be connected to a simple PC ) like this for example :

$1|010|005|002|10.3|0000063|0000080#
$2|010|005|002|10.3|0000063|0000080#

Because I need to get these informations from another client ( in TCP/IP ) in real-time !

I’m still new ( and lost ! ) about this new technology so sorry if my question is stupid.

I hope my explaination is understandable thought !

Thank you in advance for the help.

( And sorry for my english…)

konbanwa,

Please let me know.
you are trying to use the series 1 or trying to use the series 2? .

Although it seems that a star topology will be used if a figure is seen, is it a thing as which this topology may be sufficient? .

Hello.

Firstly, thank you for the reply :slight_smile:

I forgot to mention it but I use Serie 1 I think.

Well, I choose this topology because I have one server ( a PC ) where the Xbee is connected. This server will retrieve the data and save it in the database, so the data need to be retrieve by this one.
The others Xbee are located on each building which they’ll send energy information to the coordinator.
The things is that, I’ll need to connect on the server to get the information in real-time but I don’t know to get all the data from the Xbee’s emettor and store it in the server as an array or somethings ( So I can get it with TCP/IP ).
Well, I can retrieve information and store in an array but how do I know when an Xbee emettor is offline ?

It’s a bit complicated but if you have another ( simple ) solution I’ll take it for sure :slight_smile:

Here is how I see things but maybe it’s not possible ?

Edit : The energy and water meters are not connected directly with the Xbee for sure there is a FEZ Rhino board in the middle to get the data from the meters :slight_smile: This is just to simplify the system.

konbanwa,

Well, I choose this topology because I have one server ( a PC ) where the Xbee is connected. This server will retrieve the data and save it in the database, so the data need to be retrieve by this one.
The others Xbee are located on each building which they’ll send energy information to the coordinator.

I can consider the demand so that topology (Peer to Peer) of the standard of the series 1 may also be made.
And a end device goes into sleep and is a message sometimes sent to a end device by the coordinator? .

If it uses by standard Peer to Peer topology further when using series 1, common ID and CH will be set up.

Moreover, a server sets it as MY=1 as an example, and it sets the data side as MY=2 and MY=3.

If data is sent to MY=1 from MY=2 and MY=3, data will be outputted from DOUT of MY=1.

Probably, it will be better for the server side to use API mode, in order to distinguish two addressees.

The XBee take care of collissions (to some extent) internally. If you use the API mode, then you can detect if the message was not sent.

I think the greater question is, “Can every building in your school-campus even ‘see’ the coordinator?” 802.15.4 is a hub-design. Suppose you have 4 buildings, and only 2 of the 3 out-buildings have an RF line-of-sight path back to the ‘coordinator’? In that case, do you pack up and go home? Fail your project?

I think you would be far better to use either the Zigbee (as router) or DigiMesh Xbee. These would allow the lost-building to use one of the other 2 buildings to ‘route’ or mesh the messages back to your coordinator.

As for addressing, one usually uses the MAC address of the sender as the key.

konbanwa,

[quote]Well, I choose this topology because I have one server ( a PC ) where the Xbee is connected. This server will retrieve the data and save it in the database, so the data need to be retrieve by this one.
The others Xbee are located on each building which they’ll send energy information to the coordinator.

I can consider the demand so that topology (Peer to Peer) of the standard of the series 1 may also be made.
And a end device goes into sleep and is a message sometimes sent to a end device by the coordinator? . [/quote]

Mhh actually I don’t know what to do yet.
I have too options :

  • Each end device send data every seconds ( or more ) to the coordinator
  • The coordinator send a command ( example : “?” ) every seconds ( or more ) to “ask” the end devices to send the information. I think this will be realizable with the broadcast adress from the coordinator. The advantdage of this method is that I could modify the frequency of sending from the coordinator and not modify every end device.

The XBee take care of collissions (to some extent) internally. If you use the API mode, then you can detect if the message was not sent.

I think the greater question is, “Can every building in your school-campus even ‘see’ the coordinator?” 802.15.4 is a hub-design. Suppose you have 4 buildings, and only 2 of the 3 out-buildings have an RF line-of-sight path back to the ‘coordinator’? In that case, do you pack up and go home? Fail your project?

I think you would be far better to use either the Zigbee (as router) or DigiMesh Xbee. These would allow the lost-building to use one of the other 2 buildings to ‘route’ or mesh the messages back to your coordinator.

As for addressing, one usually uses the MAC address of the sender as the key.

I think you’re totally right about the routing system but I don’t know if I can configure my Xbee Pro like that, I try to configure it with X-CTU but I only saw Coordinator Enable (CE) which have two options ( Coordinator or end device I think ) but I really don’t know how to configure it as a router or as a DigiMesh Xbee.

Thank you for you propositions :wink:

ohayougozaimasu,

I think you’re totally right about the routing system but I don’t know if I can configure my Xbee Pro like that, I try to configure it with X-CTU but I only saw Coordinator Enable (CE) which have two options ( Coordinator or end device I think ) but I really don’t know how to configure it as a router or as a DigiMesh Xbee.

DigiMesh is realizable by not change of configurations but rewriting of another firmware.

and more informations in this page.

http://www.digi.com/support/kbase/kbaseresultdetl?id=3150

Thank you for the information chobichan, so if I want to make a DigiMesh network I need to update the firmware to XB24-DM or XBP24-DM ?

I’ll try this tomorrow when I’ll be able to work with the Xbee’s device :slight_smile:

Thank you for the help guys ! !

konbanwa,

XBP24-DM

Thanks for you help chobichan I just updated the firmware to DigiMesh and it works ! I just need to wait until I get a third Xbee to test with a Base Xbee and two routers.

I’ll keep you informed :wink:

Did tried this? I would like to know about your reviews on this.


Bring new Cherry Kitchen Cabinets for your kitchen

Did tried this? I would like to know about your reviews on this.

Off course yes ! But what do you to know exactly ? To update the new XBP24-DM firmware to the Xbee Pro I needed to do a Reset but I didn’t have solution because there is no reset button on my board so I checked the manual and I saw that if I rely the ground ( pin 10 ) to the RST ( Reset : pin 5 ) it’s perform an reset to the device. So when the dialog box asked me to do a reset on X-CTU I tried this and it’s worked! Hope it’s help… [:)]

I’ll inform you once I get my Base Xbee and routers.