June 23, 2014

XBee Regulated Adapter Board

Some time ago I came across a project during my Master's Degree that required the use of XBee modules. They are basically 2.4GHz radio modules that make use of the standard IEEE 802.15.4, they are useful for creating low power wireless networks, however their transmission rate is a bit limited.

The thing is that they are quite easy to use and configure but from a prototyping point of view, they are a bit annoying because they don't fit into the breadboard pinout, they have a pin spacing (pitch) of 2mm, instead of the usual 2,54mm, which means you need an adapter. Of course this is not a problem, you can find a lot of them in many stores, cheap too.

But I have the bad habit of not buying what I can build, and that's what I did. I started designing an adapter for my modules. I read the XBee datasheet and started designing it according to my needs. I could have made just a simple breakout board, but since I was making it from scratch, I thought I could make it into something more.

The modules work at 3.3V and I was most likely to use them with PIC microcontrollers working at 5V, so I thought it would be a good idea to add a voltage regulator to the board.

Next thing would be converting the voltage levels for the communication pins Tx and Rx (Data out and Data in in the XBee modules). I made some communication tests between a PIC microcontroller and a XBee module and got it working fine with just a simple voltage divider made with a couple of resistors for the Data Input pin. For the Data Output pin, I just let it go straight into the microcontroller, because it would work fine with 3.3V. I was using a PIC16F88 for the tests.

I also added LEDs for the RSSI pin (signal strength) and the Associate pin. For the voltage regulator I used a LM1117-3.3 low dropout linear regulator from Texas Instruments, with an output current up to 800mA (much more than enough) and a maximum voltage input of 20V.

Then I designed the PCB in KiCad:

I made it single layer with the copper tracks on the top and used the back layer just for informative text. Since I was going to use the toner transfer method, I could take advantage of this method to make the PCB silk with the toner itself on the bottom layer.

Here is the final PCB design and 3D model:

And this was the result:

If it was now I would probably have made a few things differently, like maybe using a double layer PCB because it's hard to solder the 2mm socket array like this and it always leaves some space between them and the PCB which is not ideal. And I would probably change the level conversion for the communication pins as well, because the voltage divider might be hard to get right, depending on the values, and it might cause some communication errors every once in awhile, so it would probably be better to use a logic converter for this.

But still, it's working fine as it is, I just like to keep perfecting what I've done already.

The KiCad files for the PCB can be found at my GitHub.

No comments:

Post a Comment