This Solenoid controller has been filled with a ton of small successes. Today I’m chalking up one more success to the list. I’ve got the XBee portion of the controller working. I had been working on this for a long time now, and the more I work on it the more I see the potential in this platform.
XBee Solenoid Controller from Eightlines on Vimeo.
The issues I had getting the XBee to work appear to be common based on the message board threads I have seen:
- Upgrade your firmware. The listing on the website is not necessarily in order. I had assumed that since I had 1.0.8.4 I was one version off the most current. After reading the tech docs there were not that many features I appeared to be missing. The 1.0.A.n firmware appears to be a far more advanced stream, use it whenever possible. X-CTU appears to order this list in a more straightforward manner.
- If you don’t have a USB-TTL adapter you can run an Arduino headless (remove the ATMega168 chip) to communicate directly to the XBee. Remove the chip with an IC extractor so you don’t bend the pins. Even better, you can leave the IC in place and communicate directly with the XBee via the Software Serial library. I ended up doing all three methods.
- M. Yarza has an excellent sheild for the Diecimila. I’ve since switched over to the Arduino Nano, but I’m still using this one as a remote connection.
- Build out Tom Igoe’s XBee Terminal to communicate with the XBee. It correctly sends the “+++” Command mode initialization without a carriage return (“\r”). It also displays results on a new line making for reading the settings much easier. I had started by using the OS X Shell but this was much easier. In fact, buy the book Making Things Talk. It explains all this stuff in plain english.
- The RSSI Graphing was useful. You can see how this could be used to trangulate position of three+ Xbee’s.
- Check out the XBee API Library for Processing written by Dan Shiffman and Rob Faludi. This makes the connections to the XBee API mode simple.
- The XBee Analog Duplex script was somewhat confusing, but explains the methods used to communicate from peer to peer. Note, in all of the tutorials, I’d love to see more documentation stating which is the base XBee and which are the remotes. It gets confusing when you can’t figure out which is which.
- Mark the radios themselves with indicators. I’ve added permanent marker dots to designate which XBee I’m looking at. Write down the corresponding configuration settings somewhere you can see them. It will save you polling the chip every time you need it.
2 Comments
Hey Brent, I have seen what you did here with the XBee Modules and am impressed with your work. I myself am trying to use XBee to establish a two-way communcation system between an RF-scanner controlled by a microcontroller and the computer. I still have no idea which components I need to get the wireless portion working. Which parts do you recommend? We have a budget (it’s a course project so we’re looking at under 100 bucks)
Thanks! Lawrence
Hi Lawrence,
The minimum you can get away with on an XBee project is 2 XBee’s ($30 each — non-pro version), and 1 USB-TTL converter ($10). I also have an XBee-breakout board adapter ($6) that allows me to quickly swap out the XBee’s when I need to program them. Add in a 3.3V regulator and power supply for the remote XBee.
- http://arduino.cc/en/Main/MiniUSB
- http://www.sparkfun.com/commerce/product_info.php?products_id=8276
This wasn’t available when I got going, but it looks promising:
- http://www.sparkfun.com/commerce/product_info.php?products_id=8687
An Arduino could substitute for the USB-TTL converted but you have to remove the ATMega168 IC to enable direct access to the TX/RX pins. You can also use the Wire.h library through Processing to bypass the IC removal, but I ended never trying it.
The XBee has 8 digital I/O pins on board, and a couple PWMs (I don’t recall off the top of my head exactly how many), the API mode allows you to configure them according to your needs.
Post a Comment