Change the 2 second XBee Sampling and Transmission Rate for the Tweet-a-watt

XBee projects like the adapter, xBee tutorials, tweetawatt/wattcher, etc. from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
kyleb1
 
Posts: 2
Joined: Fri Jul 12, 2013 4:14 pm

Change the 2 second XBee Sampling and Transmission Rate for the Tweet-a-watt

Post by kyleb1 »

I'm trying to collect data more frequently than once cycle every two seconds using two XBees setup as described in the Tweet-a-watt documentation. Right now the device transmits 19 samples every two seconds. Is there a way to send 19 samples twice per second? Faster is better for my application. I'm new to using XBees so any help would be greatly appreciated. Thanks!

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: Change the 2 second XBee Sampling and Transmission Rate for the Tweet-a-watt

Post by adafruit_support_bill »

Look at this page (about 3/4 of the way down) "Configure the transmitter XBee": http://www.ladyada.net/make/tweetawatt/config.html
1.Set the MY address (the identifier for the XBee) to 1 (increment this for each transmitter so you can tell them apart, we'll assume you only have one for now)
2.Set the Sleep Mode SM to 4 (Cyclic sleep)
3.Set the Sleep Time ST to 3 (3 milliseconds after wakeup to go back to sleep)
4.Set the Sleep Period SP to C8 (0xC8 hexadecimal = 200 x 10 milliseconds = 2 seconds between transmits)
In step 4, you want 500 milliseconds (1/2 second), so the sleep period needs to be 0x32 hexadecimal = 50 x 10 milliseconds = 0.5 seconds between transmits

User avatar
kyleb1
 
Posts: 2
Joined: Fri Jul 12, 2013 4:14 pm

Re: Change the 2 second XBee Sampling and Transmission Rate for the Tweet-a-watt

Post by kyleb1 »

Thank you adafruit_support_bill your suggestion worked:
In step 4, you want 500 milliseconds (1/2 second), so the sleep period needs to be 0x32 hexadecimal = 50 x 10 milliseconds = 0.5 seconds between transmits
One follow-up question - at the faster transmission rate, the voltage and current waveforms I'm reading (which were perfect sinusoids when sampling once every 2 seconds) now appear distorted and the current waveform does not change regardless of what is connected to the kill-a-watt and how much power it draws. I kept all other parameters the same as in the tweet-a-watt configuration page, and only changed the sleep period (SP) as suggested. Could this be a power supply issue where the XBee is not receiving enough power at the faster transmission rate?

Continued thanks for the help!

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: Change the 2 second XBee Sampling and Transmission Rate for the Tweet-a-watt

Post by adafruit_support_bill »

Yes. It is possible that there is a power shortage. The power supply in the Kill-A-Watt is perfectly sized to provide exactly the power needed for itself. On some units, even 2 seconds is too fast.

Locked
Please be positive and constructive with your questions and comments.

Return to “XBee products (discontinued)”