Jan 30, 2012

LED firefly jar prototype

So I came across this instructable awhile back: Jar of firefies Basically [Keso] has soldered enamel wires to each LED and then used some neat micro alligator clip, to twist the wires neatly. I didn't have access to such micro clips so my twisting was done by hand, as a result my LEDs and their wires are very messy and uneven. Possibly on a later revision I will be able to find such connectors.

My version only uses one colour of enamel wire that I salvaged from an old clock module. Because of this I had to use my multimeter to determine the polarity of the LEDs after twisting them.
The 8bi8 hardware was over kill for this project, it is designed to drive 128 LEDs in a matrix formation, currently I am driving 16 LEDs directly from the n-chaneel sinking mosfets. Overkill? Probably, but I had the hardware on hand so it was a quick project to construct.

Unfortuantly the LEDs cannot be faded using low power tequniques, when I designed the 8bi8 board I wired in the output enable pin from the 595's this would allow for fading of the output via PWM. Unfortunately the microcontroller pin I chose for this job was not one of the hardware enabled PWM pins. So fading the outputs would require a software PWM which would significantly decrease the battery life of the device.

The code is very simple, the LEDs are flashed in sequence. I would like to set up a proper random number generator to random select a LED and randomly select a sleep interval before the next flash. I suppose this new code will be created for a new board revision.

Additionally on a new board revision I would wire in a LED to be used as a light sensor so that the LEDs would only be activated at night, just like real fireflies.

Jan 23, 2012

Making a 6 pin MSP430 value line device.

So if you have a space restricted project and you don't need the extra i/o pins that a 14 pin value line device houses, no longer do you have to abandon your dreams of using the MSP430 in your project.
Introducing the 6pin MSP430 device.
What you see above is not a new device, simply a stock MSP430G2211 cut down a tad. Using a dremel cutting tool the top and bottom of the device can be safely and easily removed with no damage to the MCU die itself.

Here is how I modified my device:
As you can see the Power input rails have been cut off from the rest of the chip. However the device can still be powered by using a neat trick. Within most semiconductors latching diode are placed on the input/output pins to aid in preventing SCR latchup. Basically when the voltage on a pin exceeds VCC by ~0.7v the extra voltage will flow through the diode into the devices VCC rail. similarly the same occurs on the GND rail.

Since I've not damaged the die programming still works like a charm and the whole device operates as expected. The next step will be doing something with it.

Jan 20, 2012

8bi8 Overview

The 8bi8 is a small self contained 8x8 bi-colour LED matrix toy. It has emerged after various prototypes. From here I want to create a new revision building on what I have learn from building this version.

 Overview video:

Soldering video:

The hardware: (BOM)

This is the bill of materials. (the prices listed here are from the sources that I used and I am not associated with them nor am I responsible if their prices change.) It's should also be noted that most of these parts could be easily substituted for similar parts based on availability.

QtyNamePrice Ea.Compound Price
1MSP430G2201IPW14R (2Kb FLASH)$1.56$1.56
147k 0402 Resistor$0.04$0.04
20.1µF 0402 Capacitor$0.04$0.08
1Dot Matrix LED 3mm 8x8 R/G CA 24 pin*$3.50$3.50
All parts here are based of digi key prices expect for the LED matrix which was sourced from ebay.

Note these prices are based on buying parts to create 1 LED matrix toy. Making a batch of 10 would reduce cost considerably per device. (for example buying 10 LED matrices reduced their indv. price to $1.49)

The PCB used for this is based on the design files below and I had mine manufactured at ITeadstudio using their 10pcs 5x5cm service. This adds $0.99 per device for the PCB cost.

CR2032 batteries can be bought cheaply online, offline or salvaged form old computer motherboards.

The Software:
The software is written in ASM and has been designed to be compiled with naken430asm the tiny open source MSP430 compiler. A simple perl script has been included to convert a simple PNG image sprite image into code the 8bi8 can prccess.

Download: 8bi8 Version 1

The Design:

The design is made in eagle and was designed to fit as much as I could onto the limited space. After soldering up 2 prototypes the only issue I have is the very small space that you have between the mosfet channel drivers.

Download: Eagle files (v6),  PDF schematic, Gerber files

Jan 16, 2012

Various prototypes leading to 8bi8

I've always been fascinated with LEDs and toys that use LEDs. In a previous post I revisted my first custom fabricated PCB project that used 3 5x7 5mm LED bi colour modules. After that I set out to make a 8x8 version. Here are some revisions I went through. This youtube video pretty much covers most of this post:

Rev1 populated base pcb and bare top pcb (Notice the wire re-enforcing the micro b connector.)
Revision 1:
I first built a small 8x8 LED backpack for a set of small 20mmx20mm red LED modules I bought from ebay. In that first design I used a micro controller and 6 0.1" headers to connect to base board that would contain a battery and wireless transceiver. the battery was going to be charged by a usb lipo charging circuit. and the wireless would enable the device to talk with other devices. lets just say the design was far to complicated and never really took off. I did however get the LED "daughter board" working from incoming SPI signals and independently, the only issue with that was the lack of user input (buttons) and the absence of a battery or power switch.

Rev2 populated base board and bare screen pcb
Revision 2:
After seeing this I decided to design my new revision with this capability, to use an AVRs internal ADC to sample voltage outputted by the LEDs allowing a 2D matrix input. This design still used the small 20x20mm red LED devices. it featured 6 0.1" headers on the back to again connect to a base board. this was mainly due to small size not being big enough to house a proper battery. The base board was redesigned to incorporate a USB enabled AVR IC. This also never really took off the ground. Probably because I'm more of a hardware guy than a software guy and high level libraries such as USB scare me, or at least give me nightmares. Just like the first I was able to get the display board functioning independently to the base board. However just like the first revision he display board had no extra room for user input or a battery pack only the 6 pin interface connector. The light input does work however since the display is very very small compared to a standard 3mm LED display or even a huge 5mm LED display it is very hard to aim a laser pointer at an individual pixel.

8bi8 and the larger 16bi8 version
Revision 3??: (8bi8 0.9)
This technically shouldn't be called a revision from the last two as it was practically a whole new project. In fact I haven't called it revision 3 I labeled it as the 8bi8 as it's a 8x8 bi-colour LED toy. The basic design was to use a MSP430 combines with a coin cell battery and a few buttons. basically it was a reproduction of the original design without the interface header and featuring on-board battery and inputs. For this design I was very very lazy and decided to give eagle auto router a try. This re-ignited my frustration with auto routers but did finally yield a result. After waiting ~30 days for my boards to arrive (a standard time from laen's PCB service to Australia). I discovered after soldering up a whole prototype that half of the display connection had been reversed. I managed to fix up the dodgy wiring with an even dodgier software job. The frame rate was serverly reduced due to this hack job and development on this platform stopped and development into a new revision began.

8bi8 1.0
After the experience with the first 8b8 revision I decided to spend more time designing this board. adding in current sinking mosfet from the shift register outputs in order to maintain a reasonable constant brightness across screen refreshes and maybe being able to push more current than the standard 74hct595 IC (current supply to LEDs is probably limited more by the coin cell) This revision will be covered fully in a later blog post.

Jan 12, 2012

Resistor board. (how-to store thousands of T/H resistors.)

Great for shipping, but a bit impractical to store this way. Especially after using in breadboarded prototypes.
Recently I purchased a bulk pack of through hole resistors. The pack included 50 parts of 50 values, 2500 total resistors. They are 1% 1/4W type and were packaged as 50 "strips" each labeled with the corresponding values. All in all the pack was good, especially for the price, however there was 1 unlabelled strip and two 33k sets. After some testing I discovered it was a 33k and a 330k.

List of values I had received.
Previously I had bought a bulk pack of 5000 0402 sized SMD resistors. these were packed as 100 pieces of 50 values and were individually bagged in hot wire sealed bags. Storing these was easy, simply move the resistors into small zip-lock bags and store these in a box. Not the most elegant solution, but it works and was very easy and cheap to implement. Now with a heap of 2500 resistors on my desk I had a few problems.

Problem #1:
50 strips of resistors takes up quite a decent amount of space. It doesn't bother me if I have to look through a few strips to find the correct value, but looking through 50 is a laborious task. sorting the resistors into decade sets helped with this. eg one pile 1R - 8R2, another set might be 1K - 9K2. This helped in finding a correctly valued resistor from a batch of 50. First locate the pile with your chosen value in it. then find your value.

Problem #2:
Having used some resistors in a breadboard design (the reason I bought a bulk pack in the first place) I found myself with a few loose resistors on my desk. Not wanting to toss them into a junk bin never to be seen again I decided to create a storage system. I had a few criteria in my head while trying to work out how to store long pointy but fragile objects. I thought about a fishing tackle box approach, but having 50 compartments would be costly and large. and resistors being small would most likely be able to shift from compartment to compartment if the box was tipped.

The list turned into labels.
Eventually I settled on an idea that I had first seen in dick smiths funway into electronics. A technique not used much with SMD IC's the use of foam. I have previously used Styrofoam for this task however eventually you end up with considerably large holes in your Styrofoam from all the poking. I had some old packing foam from some computer parts that was lying around. It was about A3 sized and 5cm thick in the middle with thicker edges. After some testing to make sure the resistors could be easily poked into the foam without bending their pins I set to work writing out labels for the values I had.

No 330R!! D':
The labels could be made on a computer however if I want to add another value down the line it'll be easy from me to just quickly write up a label and it won't look out of place. Next I had to position and fix the labels onto the board. Glue could be used, but to increase flexibility in the future I created some holes in the labels and used a resistor to pin down the label to the board. I think this creates a cool effect that adds something that you wouldn't get from a plain piece of foam with paper labels attached.

Easily fits 50+ resistors.
With all the labels attached it was time to check out how much room 50 resistors would take up on my new resistor board. as you can see there is plenty of room if I ever buy more pieces of values I currently have or if I buy different values. It is quite time consuming transplanting the resistors from the strips onto the board so I think I shall leave the bulk of the resistors on the strips and only use the board for sorting resistors as the come out of my breadboard.

Final design. I like it and it's light able to be stored against a wall etc.

Jan 3, 2012

iteadstudio PCBs

Ordered my most recent batch of PCBs from itead studio, today they came in the mail. The batch I ordered was their 5x5cm double sided service. For the price of $9.90 you receive 10 peices of your board design, upto 5cm by 5cm in size. 

Slightly over 0.8mm, This measurement includes the solder-mask and copper layers as my whole board is covered.
I selected my board to be 0.8mm think, all the other options were default. Every other PCB I have ordered has been the standard 1.6mm thick, as this option didn't affect the price I decided to try it out. The PCBs are alot thinner than I thought, even though I've seen other 0.8mm boards. My boards seem fairly durable, if you had less copper fill on each side or a larger board it might be a bit fragile at 0.8mm thickness.

Overall I'm quite happy with the results from these PCBs considering they are only $0.99 each. A price you would only expect from buying higher quantities.

itead offers an opensource PCB option. For $0.10 you accept that 2 of your PCBs will be sent randomly to two other users of the system. In return you receive two random PCBs. Above are the two PCBs I recieved.

The Black pcb seems to be a simple Dallas IIC RTC breakout. Funnily enough I have 1 IC that I believe will be compatible with this board. Woo :P

The smaller green board is a 0.1" to 0.05" pinheader adapter board. I'm guessing some kind of JTAG adapter, based on how the 14pin header is connected to the 8pin 0.05". I've already got some plans for this one, gonna use to to breakout the SWB (0.05" pitch) used by TI's MSP430 FETs. Hopefully I'll be able to splice into the power rail to measure current consumption on my projects.