PDA

View Full Version : FPP and Xbee. Can't figure it out.



IaRoadKill
12-29-2015, 11:22 AM
Maybe I'm trying to do something that will never work, but it was mentioned on the Falcon Website once and then nothing.

My 72 channel Bethlehem Star runs flawlessly with Xbee plugged into Sparkfun board plugged into USB on my laptop.

My question is, can I plug this into the Pi USB port and make it work?

If so, please help me get this set up.
If not, I need to rework my star controller, ugh, to make it work wirelessly some how and need suggestions.
Thanks

dirknerkle
12-29-2015, 04:35 PM
Yes, it'll work. I use an USB Xbee Explorer on a Pi to run a test sequence during setup. Works slick. Just make sure your power supply provides ample juice... an XBee pro needs upwards of 300ma on its own to transmit....

The Pi will recognize the Explorer as a com output device -- you just change your Pi's Renard output settings to go out that com port.

IaRoadKill
12-30-2015, 10:07 AM
Yes, it'll work. I use an USB Xbee Explorer on a Pi to run a test sequence during setup. Works slick. Just make sure your power supply provides ample juice... an XBee pro needs upwards of 300ma on its own to transmit....

The Pi will recognize the Explorer as a com output device -- you just change your Pi's Renard output settings to go out that com port.

So I need to use a powered USB hub?

dirknerkle
12-30-2015, 10:18 AM
Try what you've got and find out. I use a 2A 5vdc wall wart and it seems to work fine. But there's only a memory stick and the explorer plugged into the Pi's USB ports...

m00dawg
12-30-2015, 01:25 PM
What is the penetration like for XBee stuff? My Pi sits in my garage and I'm wanting to wireless control some floodlights in the rooms on my 2nd floor inside my house. That'd be through a few walls and I've noticed that 802.11g runs pretty poorly around here (though 802.11n runs fine). That makes me think perhaps I should try looking at the 900MHz XBee devices? Or putting a transmitter closer to the windows themselves, but then I wouldn't be able to just hook something up to my Pi. The Dirk modules can hook up to a conventional Renard network and can be setup to transmit though yeah?

dirknerkle
12-30-2015, 02:00 PM
What is the penetration like for XBee stuff? My Pi sits in my garage and I'm wanting to wireless control some floodlights in the rooms on my 2nd floor inside my house. That'd be through a few walls and I've noticed that 802.11g runs pretty poorly around here (though 802.11n runs fine). That makes me think perhaps I should try looking at the 900MHz XBee devices? Or putting a transmitter closer to the windows themselves, but then I wouldn't be able to just hook something up to my Pi. The Dirk modules can hook up to a conventional Renard network and can be setup to transmit though yeah?

Wireless communication can be affected by many, many things such as antenna type, relative orientation of the transmitting antenna to the receiving antenna, elevation, transmitting power, receiving sensitivity, attenuation caused by the proximity of the antenna to other nearby devices electronic or otherwise, and outside influences such as microwave ovens, cordless phones and even garage door openers. Sheetrock walls are a lot different than lath & plaster over wire mesh, and if you're looking for a guarantee, you won't find it.

Forget the 900mhz Xbees. Too expensive and also not fast enough besides that...

I can tell you that series 1 XBee Pros work extremely well at 57600 baud and up to about 1200 feet apart with no obstructions between them and it only costs about $100 to experiment with a pair of them....

m00dawg
12-30-2015, 02:30 PM
Oh yeah for sure. I've already run into plenty of that with my FM antenna plus getting Wifi over to the garage rPi given my previously mentioned 802.11g speeds. On that note, I suppose if I really wanted to I could use a master/slave FFP setup instead of XBee. I think Master/Slave just sends timing info so that shouldn't require much bandwidth? I was just wanting to keep all the show stuff totally isolated as much as I could from our normal network (and also didn't trust our wifi too much given the issues I've run into if I'm not on 802.11n).

Is it possible to increase reliability of the 2.4GHz XBees (or 900MHz for that matter) by running at a lower datarate? Even with running at 25ms, 19.2k is sufficient for up to 46 channels (and I'll only need 8, 4 RGBW for each room).

dirknerkle
12-31-2015, 02:38 PM
Oh yeah for sure. I've already run into plenty of that with my FM antenna plus getting Wifi over to the garage rPi given my previously mentioned 802.11g speeds. On that note, I suppose if I really wanted to I could use a master/slave FFP setup instead of XBee. I think Master/Slave just sends timing info so that shouldn't require much bandwidth? I was just wanting to keep all the show stuff totally isolated as much as I could from our normal network (and also didn't trust our wifi too much given the issues I've run into if I'm not on 802.11n).

Is it possible to increase reliability of the 2.4GHz XBees (or 900MHz for that matter) by running at a lower datarate? Even with running at 25ms, 19.2k is sufficient for up to 46 channels (and I'll only need 8, 4 RGBW for each room).

Yes, lower data rates are always more secure. I believe that the 900mhz version runs at 9600 as its max speed.

m00dawg
12-31-2015, 03:10 PM
On the 900MHz side, I was looking at this (https://www.sparkfun.com/products/9099) guy. The datasheet (https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-900-Datasheet.pdf) indicates that, confusingly, it has an RF Data Rate of 156kbps but serial data rate of 230 kbps :) I also read the RF Data Rate is fixed though you can adjust the serial rate. I don't know, in practice, what that means for reliability though (I think Xbee has some level of error detection/correction/retransmit capability?)

All that said, from a wireless standpoint, given my bandwidth requirements, I rather like the simplicity of Xbee over Wifi. It's a shame they aren't cheaper. A Particle Photon is $19. Hard to beat that (where one can use them) but I find myself spending a lot of time setting them up and then having to deal with somewhat spotty connectivity (at least outdoors). Those issues are what also makes me leery of using 2.4GHz Xbees though. But goodness the 900MHz Xbee's are more expensive for sure.

dirknerkle
12-31-2015, 03:36 PM
That looks like an updated version of the 900, interesting. Still, I'd be suspect of the throughput capabilities.

The normal Series 1 Xbee has always been capable of 250kbps, but to achieve that rate, you must use handshaking and develop your own data control mechanisms, something that no PIC-based controllers have nor something I'd want to try to tackle simply to control lights as a hobby. Handshaking also carries with it the issue of "lag" which, for lighting control doesn't sound like a very good idea...

When I explained that our usage required raw throughput, the Xbee tech guys told me many years ago that the straight-through capability of their UART was "around 80kbps" but they didn't know exactly what it was. It's been 6 years now -- maybe they have some new tricks up their collective sleeves... certainly there are newer and faster electronic components than were available in 2009 and it makes sense that they'd incorporate them in their products.

One thing that has always been nice about the Xbee is that its communication algorithm seems to encounter less interference from Wi-Fi and other devices that also operate in the 2.4ghz spectrum. I don't know how it's different; all I know is that it works. And it is also nice that two radios will talk to one another right out of the box without any configuration whatsoever. To me, that's a big plus.

m00dawg
12-31-2015, 04:11 PM
That looks like an updated version of the 900, interesting. Still, I'd be suspect of the throughput capabilities.

You'd surely know better than I :) My concern was that I'm already using 802.11n to my FPP master (for remote access and NTP) which took some clever arranging of components and I ended up needing a beefier Wifi module for the rPi2 to get decent performance and my Xbee TX would be close to all that stuff too. Also some walls to penetrate through.



When I explained that our usage required raw throughput, the Xbee tech guys told me many years ago that the straight-through capability of their UART was "around 80kbps" but they didn't know exactly what it was. It's been 6 years now -- maybe they have some new tricks up their collective sleeves... certainly there are newer and faster electronic components than were available in 2009 and it makes sense that they'd incorporate them in their products.

One thing that has always been nice about the Xbee is that its communication algorithm seems to encounter less interference from Wi-Fi and other devices that also operate in the 2.4ghz spectrum. I don't know how it's different; all I know is that it works. And it is also nice that two radios will talk to one another right out of the box without any configuration whatsoever. To me, that's a big plus.

I tried to find information about interference as well given my struggles but I didn't come up with much. It's good to know they seem to coexist happily. From what I read, XBees use the same channels as wifi? It could be worth testing out here just to see. I've run into interference around here for Wifi and non-Wifi type stuff that makes me think it's pretty well saturated. Oddly though, 802.11n works like a champ here (near theatrical performance inside the house). 802.11g is a dirtpile. I guess it has to do with n using 80Mhz bandwidth but that'd make me think it would run into more interference, not less?

900Mhz would make that a non-issue, or so is what I was thinking. But 19.2kbps is about as low as I'd want to go on the Renard side for this. If 900Mhz can't do that reliably, it'd be a no-go for sure. That and it is indeed more expensive.

I could go wired for everything, but I'd have to change things around and it means outdoor wiring has a path to (expensive) indoor equipment (thinking of lightning and such). It'd certainly be reliable, and I could put some things (like my rPi2/FPP setup) fully inside my house in my wiring closet instead of in the garage, but I think it'd be cost prohibitive with some caveats for not all that much gain. I could VLAN everything up to keep things separate but I also want to do multicasting which, annoyingly, my main network gear doesn't support well.

m00dawg
01-01-2016, 11:02 PM
As an update, noticed Mouser has the XBee-PRO 900HP for $39 (http://www.mouser.com/ProductDetail/Digi-International/XBP9B-DMST-022/?qs=sGAEpiMZZMsDsvR9Yj%2fex2PBplLOhUEm) (or $36.56 for 2+) vs $54.95 (https://www.sparkfun.com/products/9099) on SparkFun. That's quite a difference! The product numbers seem slightly different though so not sure if there are some relevant differences to justify the higher costs. I know SparkFun is usually higher than Mouser, but geez that's quite a difference!

Amigorick
06-17-2016, 09:46 AM
Just curious....I currently control my house and my neighbors house across the street. I use two of the TTL Adapters (thanks Dirk !!) with no problems. Each adapter connects
to an Xbee Pro. I have all of my channels on one adapter and my neighbors channels on the other adapter. I currently use a desktop computer. I have a Raspberry Pi that I have
been wanting to use. Will it work with both TTL Adapters at the same time?

dirknerkle
06-17-2016, 11:18 AM
I've messed with a Pi enough to know that as long as you use a powered USB adapter with a healthy 5vdc supply, you can hang a lot of usb gizmos on it. I had one working on the bench this past spring with a 10-port USB adapter and 5A supply that had the memory stick, a Wi-Fi connection, an USB Explorer/XBee and a USB-TTL adapter with an XB, as well as an USB-RS485 serial adapter in addition to the normal wired connection. Each output was assigned to a specific controller so I could check it, and everything worked fine. It was kind of a bizarre-looking thing with all that junk plugged together, but hey, that's what a test bench is for!

Only suggestion I'd make is that because different USB ports can exhibit different behavior, once you get an adapter working, map which USB ports you plug things into so that you can reconnect it that way at a later date. BTW, this applies to your Windows computer, too...

Quick note about Windows and USB ports: Windows has this nifty feature they call "power saving" and by default, it's enabled on almost every device. This makes sense for battery-powered laptops/notebooks when they're on battery power, but it makes no sense whatsoever when the PC is powered by A/C. A couple of the more insidious power settings are the network card and all the USB Root Hubs listed in the device manager. When set to "allow windows to power off the device to save power" you'll likely find that once in awhile, a device won't work... and.... why? This happens frequently if a port has been in use and then isn't used for a while... so Windows thinks you don't need it any more and... powers it off! (How very thoughtful of Microsoft, don't you think?)

I haven't found similar problems with Linux, although I wouldn't be surprised if there's something somewhere that might do the same thing...

CaptainMurdoch
06-17-2016, 07:26 PM
I haven't found similar problems with Linux, although I wouldn't be surprised if there's something somewhere that might do the same thing...

The place I can think of off the top of my head besides the normal hard disk and monitor stuff is that some Linux WiFi drivers will turn on automatic power savings by default. In FPP, we turn this feature off so that it doesn't cause problems since a remote Pi with a WiFi dongle in power saving mode is a bit hard to reach over WiFi. :)