Thursday, July 25, 2013

Cassette is not dead inspired Raspberry Pi case

This idea for a Raspberry Pi case came a couple of months ago when I saw this
 - it's from OOO My Design.
Other than a cassette tape all you need to make it is a few nylon standoffs, or spacers.  I used nylon bolts too.  On the base I added an extra bolt to create a third foot for it to stand on.
A short length of leader tape is used to keep the case square.  Tie one end and use one of the cassette screws to fix the other end.
An extra bolt to the right provides a third foot.

Tuesday, July 23, 2013

8 pin MSP430 microcontroller - MSP430G2230

In earlier posts I've covered some experiments with NFC and UV sensors. I'm keen to take both these projects a little further and develop them into wearable devices.  The Raspberry Pi and Ardunio are great for prototyping such things, but to make something the size of a button will require a surface mount microcontroller.  At the weekend I came across the TI MSP430G2230, like the other MSP430 "value line" range these are very cheap low power 16 bit microcontrollers. Unlike the 14 and 20 DIL devices that are supplied with TI's incredibly cheap Launchpad these can't be plugged straight in. You'll need to either connect the programming lines to the SOIC chip somehow, or as I've done, build a couple of adaptors.  The first adaptor makes the MSP430G2230 into an 8 pin DIL device, and the second makes the 8 pin devices match the pins of the typical 14 pin DIL MSP430.

In pictures -

As simple as that!
I've found that it can be programmed in CCS as either MSP430G2230 or MSP430G2231 - it's the same device, but with some of its pins not exposed to the outside world.  The internal temperature sensor works fine,  so I reckon my first project will be to use the I2C interface to log temperature measurements to an M24LR dual interface (NFC/I2C) EEPROM.

Sunday, July 14, 2013

Building a UV Index recorder for MSP430, Arduino, Raspberry Pi. Part 1 - the sensor

A couple of weeks ago I found this is Lidl.

I did what any right minded person would do - took it apart to see how it works.


OK, so modern electronic gadgets aren't easy to disassemble and reassemble. Thankfully I had no great desire to put it all back together again. One nice thing was that the UV photodiode was on its own board. One interesting thing is that there's a skeleton potentiometer so presumably these things are calibrated/adjusted at the factory.

Google led me to this manufacturer as the likely source of the photodiode http://www.eoc-inc.com/UV-detector-GaN.htm and here's the datasheet for a device designed for UV Index monitoring http://www.eoc-inc.com/genicom/GUVB-S11SD.pdf
Good news is that device current increases linearly with UV Index,  bad news is it's measured in nano amperes.  Well I suppose that does mean the resulting device could be very low current; given the application it might as well be solar powered!
First things first,  I'm going to need an amplifier, so I went for a low power device I bought a few of a while ago but lacked the frequency response I needed, the TLV2252. Hooking this up on a breadboard with a circuit based on this one from http://www.ti.com/lit/an/sboa035/sboa035.pdf  I used 10M resistors and a 3.3V supply.


Covering and exposing the photodiode did nothing, so I started thinking I'd damaged it or the circuit wasn't right.  I swapped the UV photodiode for an LED and it worked like magic throwing the output to max when I directed a bright torch at it, so I swapped back the UV photodiode and went outside.  Yes it worked giving about 20mV per UVI.  OK, that's not a lot, but there's a second OP amp in the package so I used a 10K and 100K resistor to give extra gain of 10 and hey presto it's ready to interface to a ADC.   As it is the circuit draws less than 0.2 mA.