Showing posts with label ti. Show all posts
Showing posts with label ti. Show all posts

Wednesday, 24 July 2013

Nokia 5110 Msp430 Booster Pack

Texas instruments is becoming my most used development platform.
The launchpad series is great for rapid development and did I mention the debugger is great ?
Since Ti is such a big company it is somewhat hard to gather the information you need, since they have many technical writers and thousands of documents. They also lack some kind of easy tutorial which just gets you started like the one from Embedded Artists for the Nxp line or I simply have not found it yet.

Edit:
Unbelievable there is a great tutorial site from Ti I just found it within minutes after I wrote this blog,...
http://processors.wiki.ti.com/index.php/Getting_Started_with_the_MSP430_LaunchPad_Workshop



On the other hand there is a great user community and if you have some experience with other controllers you will get used to the controller line soon.

The Nokia booster pack is designed by RobG and it is also possible to build it as a  stand alone display.
I decided to do so, but I had great difficulties to get the programmer to recognize the board.
In the end my reset controller consisting of an resistor and a capacity did not work out. After hours of head scratching guess work I removed the capacity and it did work immediately, very strange.
To program the controller I simply put the board on a launchpad with empty target controller socket.

I tried some example code from the designer and the booster pack worked great.

I usually don't like displays without a character generator,  but once you defined the character set you won't notice a difference, so no problem whatsoever.

The Nokia 5110 display is controlled via Spi bus, so update rates are fast and programming is easy once you get used to the concept. There is a nice lecture from Cornell university which helps you understand the basic concepts to use a Spi bus.

Btw. I decided to build a standalone version, because I can implement a full blown easy to use display controller module and then simply connect any circuit to it to use it, even the interface choice is flexible, from simple bit bang mode to serial or I2C anything is possible. I simply like modular approaches.

Finally some pictures:

Nokia 5110 msp430 booster pack

Bottom side

In action

On top of the launchpad to program the controller


Links:
Spi tutorial
Buy pcb from 43oh shop
Build thread

Tuesday, 23 July 2013

WS2812 RGB Led Matrix Booster Pack

The WS2812 is a highly interesting RGB led, since it already has a controller build in and supports daisy chaining.

Now how does it work ?
You can send 3 bytes of information to the led. Every byte corresponds to either the intensity of the colour red green or blue. 255 translates to highest intensity while 0 turns the corresponding colour of.
So f.e. you have 10 leds in a row and send 30 bytes to them. The first led grabs the first 3 bytes and passes the left 27 bytes down to the other leds. But the led not only passes the bytes down, it also reshapes the signal and amplifies it.. You don't need to worry of signal integrity.

The controller also only needs one data line, so there is no clock signal needed.

There is only one problem, the signal has to be short to get reasonable update rates.
So a 1 is translated to a 1.2us long high impulse followed by a 1.3us long low impulse.
While a 0 is translated to a 0.5us long high impulse followed by a 2. us long low impulse.

So the pulses need to be so fast you cannot bit bang them any more you need a built in hardware module.
Some genius developer on the internet suggested to use the built in Spi bus protocol since it supports fast data rates.But there are still some problems waiting to be solved. In hardware Spi a bit always has the same time frame and either a high or a low pulse.

So you have to map your bit to a matching spi sequence.
So first program the bus speed to 2 mhz. Every bit is now 0,5 us long.
A bit with value 1 now translates roughly into 11000
A bit with value 0 translates exactly into 10000

The bit with the value 1 is not exactly mapped but the processor has a tolerance of +-150 nS so we should be fine.

I tested the code with a WS2812 led light strip I built and it worked.

This is a great example of a developers ingenuity, there is a big problem but thinking out of the box and using an hardware bus protocol which has completely different specs but is fast enough saved the day.

I plan to use the led matrix  as a moodlight, but most importantly I wanted to learn how to use this leds.
I want to use them to display sensor data like temperature and humidity. Blue would translate to below comfortable, green ok and red above comfortable level.

RobG Led Matrix Msp430 Booster Pack


Backside JP1 powers module from launchpad

Booster pack in action
 Links:
Buy pcb
Designers forum thread

Thursday, 18 July 2013

Embedded Wifi

More sooner than later even simple electronic products will have to support wifi.
The electronic industry finally has recognised the demand and started to deliver easy to use solutions.

To send some data to a server I am not interested to study osi layers and literally thousands of pages from different rfc papers. I simply want to connect open a socket and send the data somewhere.

Available and affordable solutions: 

TI CC3000 module 

A great pitfall today is to connection to the wifi. Until now you needed a pretty serious gui interface just for that one time operation. Texas Instruments created a very nice solution, they added to their CC3000 wifi interface a program where you can set up your wifi client with your handy.
Their api  called Simple Link is easy to understand and helps you to get everything up and running in a second.
You can buy the CC3000 directly from Ti for 35$ including s&h

Wiznet WizFi220 

The Wiznet devices are around for some time now. The WizFi220 low power "Serial to WiFi” module with additional power amplifier is also easy to use. You even don't need an api to run it, you simply send serial commands from your application to the module and the module does all the magic.
There is also a big user community and many examples are available on the internet.
You can buy the WizFi220 for about 25$ but unfortunately s&h to Europe from Wiznet or their resellers is pretty expensive.

TP-Link TL-WR703N 

The hackers choice. The WR703N is a small router whit an available open wrt port.
Unfortunately this device was until recently only available in China and therefore has a chinese user interface. To find the correct firmware update page is not an easy task.

Once you have taken this hurdle you have a nice little wifi enabled Linux computer.
The unit also provides a serial interface on the pcb, you just have to solder some wires to the pcb and a connector. Then you can talk to the device with an micro controller and run some python scripts on the router side to send your data over wifi.

You can buy this device from Ebay for under 20$

I like all three modules and will soon post about my experiences using them.

Links
Ti CC3000 wiki
Wiznet WizFi220
TP Link TL-WR703N Open Wrt page

Pictures:

From left to right: CC300 Booster Pack, Wizfi220 and Antenna, TP Link TL-W703N

TP Link router inside case



Friday, 12 July 2013

How to solder QFN chips like the MSP430FR5739

The new MSP430FR chip line has interesting features like embedded non volatile fram and ultra low power consumption. The chip is available in TSSOP38 or QFN40 package.I simply had to try them out.

Usually hobbyists  are repelled by the very small case and the missing pins.
But once you get used to work with the QFN package you start to prefer it over any other packaging.
Since they have no visible pins, they cannot suck the solder up via capillary suction and create ugly shorts.

To solder a qfn chip you buy a breakout board and put a small amount of solder paste at the pcb.
Beside the solder paste you add some solder flux (very important).
Then you place the chip on the board and roughly align it.
With an heat gun you slowly heat the chip and board until the flux starts to melt.
This is a very important phase because the chip will swim on the fluid and align itself correctly.
Now heat it up until the solder past melts and you are done.

The next problem you will face is how to check the correct alignment and if all pins are correctly connected to the board.I use a multimeter for that purpose. Usually the pins have a certain resistance around 5k to 1mega ohm. Measure all pins and if there are shorts suck them away using some solder wick.

Once you get used to Qfn packages and are able to solder the chip  correctly it will only require about two minutes of your precious spare time. Soon you will start to enjoy working with Qfn packages.

MSP430 in QFN package compared to a Dil20 chip

Links
MSP430FR5739
Fram
Demo video

Thursday, 11 July 2013

Meet the Powerscope

Since Ti announced the Launchpad I was very excited to play with this awesome development tool.
It is like a Arduino on steroids, mostly because of it's 16 bit capability and most important it has a debugger.
When your code does not work nothing is more useful than a debugger, maybe  with the exception of a razor sharp brain and years of development experience might not hurt either.

Since the Msp430 line supports low energy consumption and have many different feature sets it is important to verify if the consumption is really as good as it could be. To see exactly what is going on, a scope is the tool of choice, but for a quick estimation the Powerscope is much more comfortable and easier to use.

When measuring very low power devices I would not recommend to use a multimeter, because of their usualy high burden voltage. To circumvent this problem, David Jones from EEVBlog designed the uCurrent , also a great tool.
The Superprobe is a somehow similar device, but it has it's own display so you don't need to connect it to a multimeter.

I also built an usb adapter to attach the Powerscope to a Usb device and measure it's power consumption.
In the attached example pictures I connected the Powersope to an Launchpad which drove a CC2500 radio device.It does not make much sense, because the attached debugger also has a unknown power consumption but it gives an idea of usage and it also shows that the TX mode consumes about 17 mA more than the RX mode .Btw. the code in the moment has no power optimisations what so ever, I was more than happy to get the CC2500 up and running,...

The programming of the Powerscope also was more than easy.
You can either use the Launchpads programmer by removing all the jumpers and insert a programmer cable or you can like me use a Goodfet programmer designed by Travis Goodspeed.
Since I don't like to solder headers just for one time programming, I made a small programming cable with pogo pins. You can use this kind of connection even for debugging.

You can buy an empty pcb at the 43oh store.

Powerscope front side


Powerscope back side

Powerscope connected to Lauchpad in TX mode

Powerscope connected to Launchpad in RX mode

Goodfet 4_1 programmer and programming cable with pogo pins


Links:

Buy Powerscope pcb
Designer thread
Powerscope Code and Info page
Goodfet programmer