Tuesday, December 6, 2011

CC2500 Project (Part 3)

Here's an even smaller update!

Since the MSP430G2452 doesn't have a hardware UART, it's not very useful in communicating with the computer. I could use the bit-banging method to get 2400baud, but I didn't feel like figuring it out.

For my thesis, I implemented a serial-to-radio repeater using the EZ430-RF2500 and a USB-to-serial converter. I was able to modify the code to get it working. It ends up being a 19200baud link. For some reason, I can't get the processor to run at 16MHz without it giving me problems. Since I don't wan't to figure those out now, I'm running it at 1MHz, which prevents me from doing the usual 115200baud. (Not that I really need that speed.)

I then wrote a quick processing sketch to capture audio and send RGB values out the serial port to the microcontroller.

In short, I can now sync the lights to the music wirelessly!

Here's a quick video demo (As you can probably tell, I'm really happy it worked!):


Sunday, December 4, 2011

CC2500 Project (Part 2)

Here is a quick update on the project's progress.

Today I was able to get the radio libraries working better and actually set up constant radio communications across a room. I also wrote an RGB led controller using PWM and combined them together.

Here's a brief video of the result:


So far it's just one microcontroller generating RGB values and sending them to another one. Now I need to work on getting the PC to talk to the first microcontroller so I can control the lights with my computer.

Here's a demo of what I want it to do later. I have it working in the video, but it's fully wired and uses an ARM Mbed for control.

Saturday, December 3, 2011

CC2500 Project (Part 1)

So I've started working on another project... This one includes microcontrollers and radios. The "goal" of the project is to have a very cheap 2.4GHz radio module and libraries to use it. I used the CC2500 radio module for my thesis project, but it was part of the EZ430-RF2500 development kit. The kit itself is nice, but at $20/device, it's not the cheapest.

My first though was to build my own board. I decided against it for several reasons. The first being that the CC2500 only comes in QFN packaging, which would make it a pain to hand solder. The second is that I have no experience designing RF circuits, which would probably result in the thing not working. The last reason is that I found a better alternative.

Turns out that the CC2500 is also used in some PS2 Guitar Hero controllers. They have the CC2500 chip on board and all the passive components (plus antenna!) I figured that would be much easier to work with. It has an SPI interface, so it can talk to most microcontrollers. The best part is that the whole thing costs less than a single CC2500 chip! I was able to get the whole thing for $1.80. (If you buy more than 1000, it only costs $1.35!) The only caveat is that the module has to be purchased from the manufacturer in China, which, at small quantities, makes the shipping a bit expensive.

CC2500 module with breakout board.
Since the header for the board has 0.05'' separation, I had to make a breakout board for testing. I decided to test the radios with an MSP430G2452 microcontroller. I chose that one because is has hardware SPI and is available in 20-DIP package. The hardware SPI is really useful when interfacing to the radio at higher speeds (instead of bit-banging) and the DIP package makes it easy to work with (and fits into the launchpad).

MSP430G2452 in Launchpad with radio.
I started writing my own radio libraries. TI provides a network stack called SimpliciTI, but it's bloated and I don't like it. For my thesis project, I wrote my own lightweight radio library, but it's all set up to work under linux and msp430-gcc. Since I want everyone to be able to use it, I'm porting it to work under TI's Code Composer Studio and putting it on github. So far I only have TI's demo code from slau144h working, but it confirms that all my wiring is ok and the radios work. Since I only have one launchpad, I replicated it on a breadboard. The code just sends a message when a button is pushed and toggles an LED when a message is received.

Breadboard with second radio and MSP430.
The next step will be to get my radio libraries working and well documented...