xbee pro and minum power levels to work.

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.
User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

xbee pro and minum power levels to work.

Post by richms »

I have scored the use of a pair of xbee dev kits for a while which I will be using to check that I can get the other power meter I have working as a tweetawatt.

But they have the pro modules in them. Since I will be wanting to test as close to real world as possible, I was just wondering how low the transmit power can go and still get across a room etc...

Also any other settings then the power to change to make them like a non-pro model?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: xbee pro and minum power levels to work.

Post by adafruit »

you could try setting them to the lowest transmission power
but i still think they'd take too much power

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: xbee pro and minum power levels to work.

Post by richms »

I will try powering them externally first, having a different power meter makes it enough variables to worry about at this stage. If it works I will get some of the low power ones. But its not looking good for the range on them, the pro ones are barely making it from one end of the house to the other, so either my friend turned them down heaps (and I cant look on the meter end one now with at commands) or they are just as optimistic about their range as wifi and cordlessphone manufacturers.

Just trying to find an isolation transformer now so I dont blow myself up messing around...

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: xbee pro and minum power levels to work.

Post by richms »

I have the xbees configured and getting it into the PC after much messing around getting the kernel to compile with serial ports enabled which were disabled when I did it about 5 years ago on the firewall machine. Using the metal cased devkit unit on the computer.

Got python installed, got the simplejson installed, running wattcher.py is giving me a division by zero which I am assuming is because I have nothing going into the ADC pins yet.

Code: Select all

richms:~/wattcher# python wattcher.py -d

<xbee {app_id: 0x83, address_16: 1, rssi: 86, address_broadcast: False, pan_broadcast: False, total_samples: 14, digital: [[-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], analog: [[1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1], [1023, 1023, -1, -1, 1023, -1]]}>
ampdata: [1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023]
voltdata: [1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023]
Traceback (most recent call last):
  File "wattcher.py", line 300, in <module>
    update_graph(None)
  File "wattcher.py", line 158, in update_graph
    voltagedata[i] = (voltagedata[i] * MAINSVPP) / vpp
ZeroDivisionError: integer division or modulo by zero
richms:~/wattcher#
Picking up the isolation transformer I got off trademe tuesday/wednesday so I will be able to get to the opamp in the power meter safely - taking it to a friends place to put a scope on it to find which pin is which, and then its game on!

Now its going to be a challange putting it into the elto power meter - pics of it http://www.flickr.com/photos/richms/set ... 6335083728... Unlike the kill a watt there isnt much free space inside it. Cant order the kit from adafruit for a few weeks since I am now without a housemate (which was one of the drivers for wanting to watch the power usage) but I think I might ghetto-rig it into the bare devkit board in the interum to get it making some numbers so to speak and then worry about putting the xbee in the power meter at a later stage.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: xbee pro and minum power levels to work.

Post by adafruit »

yup looks like its just the ADC data screwing up my bad code. you're getting close :)
be safe and dont forget an isolation xformer will still pass current thru you if you're clumsy like me

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: xbee pro and minum power levels to work.

Post by richms »

Some progress - getting values but the code is failing

At the moment its in my garage with a 600 watt heater plugged into it - the transformers only a 1kva one so I cant load it up properly with it in its current ghetto state since I am not game to have it plugged in without it right now..

Getting this on the computer

Code: Select all

richms:~/wattcher# python wattcher.py -d

<xbee {app_id: 0x83, address_16: 1, rssi: 89, address_broadcast: False, pan_broadcast: False, total_samples: 14, digital: [[-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], analog: [[184, 158, -1, -1, 406, -1], [360, 379, -1, -1, 459, -1], [480, 497, -1, -1, 462, -1], [498, 510, -1, -1, 462, -1], [468, 480, -1, -1, 461, -1], [376, 427, -1, -1, 458, -1], [204, 333, -1, -1, 452, -1], [7, 193, -1, -1, 448, -1], [161, 132, -1, -1, 453, -1], [325, 143, -1, -1, 457, -1], [458, 202, -1, -1, 461, -1], [497, 280, -1, -1, 462, -1], [492, 328, -1, -1, 462, -1], [414, 294, -1, -1, 459, -1]]}>
ampdata: [459, 462, 462, 461, 458, 452, 448, 453, 457, 461, 462, 462, 459]
voltdata: [360, 480, 498, 468, 376, 204, 7, 161, 325, 458, 497, 492, 414]
Traceback (most recent call last):
  File "wattcher.py", line 300, in <module>
    update_graph(None)
  File "wattcher.py", line 186, in update_graph
    avgamp += abs(ampdata[i])
IndexError: list index out of range
richms:~/wattcher#
Its late now so I am going to call it a night, but somethings failing in the code there.

What was the method you used to plot the data into the charts? Im thinking of just putting them into excel to see what they look like but thats going to have to wait till tomorrow at the moment..

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: xbee pro and minum power levels to work.

Post by adafruit »

why are there 14 samples instead of 19?

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: xbee pro and minum power levels to work.

Post by richms »

ladyada wrote:why are there 14 samples instead of 19?
Hmm, good spotting - will check the programming again tomorrow once its less freezing out in the workspace.

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Working (sort of)

Post by richms »

Code: Select all

<xbee {app_id: 0x83, address_16: 1, rssi: 95, address_broadcast: False, pan_broadcast: False, total_samples: 19, digital: [[-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1], [-1, -1, -1, -1, -1, -1, -1, -1, -1]], analog: [[291, -1, -1, -1, 448, -1], [85, -1, -1, -1, 449, -1], [102, -1, -1, -1, 450, -1], [275, -1, -1, -1, 455, -1], [421, -1, -1, -1, 460, -1], [483, -1, -1, -1, 461, -1], [487, -1, -1, -1, 462, -1], [454, -1, -1, -1, 460, -1], [311, -1, -1, -1, 456, -1], [128, -1, -1, -1, 450, -1], [46, -1, -1, -1, 449, -1], [217, -1, -1, -1, 454, -1], [379, -1, -1, -1, 459, -1], [479, -1, -1, -1, 461, -1], [487, -1, -1, -1, 462, -1], [462, -1, -1, -1, 461, -1], [325, -1, -1, -1, 456, -1], [142, -1, -1, -1, 451, -1], [32, -1, -1, -1, 448, -1]]}>
ampdata: [449, 450, 455, 460, 461, 462, 460, 456, 450, 449, 454, 459, 461, 462, 461, 456, 451, 448]
voltdata: [85, 102, 275, 421, 483, 487, 454, 311, 128, 46, 217, 379, 479, 487, 462, 325, 142, 32]
1       Current draw, in amperes: 2.83975659229
        Watt draw, in VA: 696.470588235
                Wh used in last  2.03196620941  seconds:  0.393112416984
^CTraceback (most recent call last):
I had to change the value for CURRENTNORM to get sensible amp readings - its now on 2.9 which is as close as I can be bothered getting it for now. I changed it so that the MAINSVPP = 340 * 2 since we have 240 volts here - the calculated VA is within 10% of what the power meter says it should be on the heater. I think I may be able to squeese the parts into the meter so will get another one to mess with next week and order the kits from adafruit when I get some $ together.

I am a bit worried by the low volt data - I may have to change the divider that feeds that since its using a small range rather then going to close to the full scale, and the current data also has minimal deviation even tho it is pretty close to half of Vcc - not sure whats going on there but I think I could drop that divider down somewhat to get some more resolution there.

I put the voltage graph into excel to chart it and it seems that its getting a recified signal rather then a full range one - no idea what thats going to do to the calculations but its good enough for now for me to know its worth proceeding with since that can be sorted in software once I am done with some other more pressing things. So all up it seems that there is a possibility of getting the elto meter tweeting.

I am at http://twitter.com/richms_WATTS - I have changed it (hopefully) to update hourly so perhaps dont go following it ;)

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: xbee pro and minum power levels to work.

Post by adafruit »

thats great progress!

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: xbee pro and minum power levels to work.

Post by richms »

I want to have a play with powering it from the power meter before I order the nice boards from adafruit - I have scavenged a 3.3v regulator off an old USB card reader that seems to work, but the capacitor has me stumped - the only 10000µF I can find are massive ones for audio power amps which are too big and stupidly priced.

I did find an ok priced 0.047 Farad Super Capacitor - 5.5 volt - its tiny as well.

Other then longer time to get up to voltage, is there any reason that one of these wouldn't work?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: xbee pro and minum power levels to work.

Post by adafruit »

iirc supercaps dont like to be drained and charged a lot, like i think they have a limit of 10K cycles. i prefer 'standard style' caps for abusive practices

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: xbee pro and minum power levels to work.

Post by richms »

Only got to last till the visa gets a chance to recover so I will get it and see if the elto has the juice needed to run the xbee - found a place that still has them at NZ$19.99 so will grab a couple more on BANNED...

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: xbee pro and minum power levels to work.

Post by richms »

This is a pain, I killed my meter by doing something stupid I am not going to mention, so went and got another one, and its totally different.

Instead of an opamp and other stuff, it has a 5460a bsz chip which is some fancy power measuring one that does it all in the one chip.

The external difference is that the new one takes 3 watch batteries in the back rather then the 2 that the first one took.

Will get some pics later on and put them up but this is quite a annoyance... The only other chip in the board is a small 8 pin one that I am guessing is the eeprom that the datasheet mentions for auto boot mode, and then on the display board a black blob with the lcd attached.

between the 2 boards is10 wires - vdd, gnd, cs, sdo, clk, sdi, reset, scl, sda, fre.

date on the board is 2008/06/14.

Since the back is visible thru the blister pack I will see if I can get some more of the old ones if there are any around...

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: xbee pro and minum power levels to work.

Post by adafruit »

you should post a photo since your description is not clear to me

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

Return to “XBee products (discontinued)”