First some good news: I got time with an oscilloscope to debug my problem from before and figured out what was going on. So I'm no longer roadblocked.
I went down to my local public workshop to make an acrylic faceplate to finish off the design. I laid out the faceplate in inkscape with cut lines that match the shape of the board with cutouts for bolts and room for the breakout headers that can be used for hacking.
Then I acquired some scrap 3/8" acrylic and went to Art Design Portland (ADX) in SE Portland to have them cut on their laser cutter.
I've never laser cut anything before. The people at ADX were very helpful in setting up the file for "printing" even let me make several test cuts to see how different settings affected the material. If you live in the Portland area I suggest checking them out!
The result, seen below, was really great! The circles line up perfectly over the LEDs and act as diffusers for the light.
I also wanted to make a back plate to finish off the casing. I made a very simple outline with bold holes and the website etched in the middle. This time I was able to use the laser at the brand new electronics prototyping lab at Portland State University. It also served as a nice test for their laser cutter.
I spent some time (too much time, actually) this week setting up some nice photos and putting together some video of the laser cutters in action.
Now that the hardware is built I will spend another couple of days making an "end to end" test of the prototype with a write up and possibly a video showing it in action. Then the only decision left will be whether or not to make one more test build with the minor changes mention last time, or to make the first production run!
For the past couple of months been writing the code to work each device on the board and testing it. But currently I'm stuck.
I've been spinning in place for a while because I can't get the clock to work on the board. I have limited experince with I2C bus devices and making it work on my own is turing out to be a lot harder than I thought.
I'm not 100% sure what is going on. I may have mangled the I2C library, or maybe the internal pullups on the main chip arent stong enough, though I really don't think either of those things are true. If anyone has a lot of experience with I2C devices I'd appreciate any advice. I'm making a trip soon to a friend's electronics lab to see if I can make it work with their pro tools (oscilloscope with a built in I2C decoder).
The good news is the clock is the only thing holding me back at the moment. I found a number of things that wern't working correctly, but I've got them all figured out.
From my notes, things to fix for the final version:
- Enlarge the holes for the breakout header and ISP header.
- Plate the on/off switch case holes.
- Tie VINA HIGH on the power supply.
- Bring 3.3V into the UCAP pin on the AVR. *IMPORTANT*
- Rotate battery header pins 90 degrees.
- Remove a diving trace near the power supply.
- Make push button standard size and flip to bottom of board.
- Clock ????? hardware or software or new chip?
And I think the power draw is going to be low enough to justify the work I did to add a battery. It should run for a few days at the very least not plugged into a computer, which is exactly what I wanted from the beginning. This is the trade off for not having a very expensive wireless module onboard. At least you can take it with you outside or on a trip.
USB and bootloaders
I had some of the same problems I'm having now with the clock with the USB. It turns out that running the AVR at 3.3V requires subtly different wireing and a different PLL setting (that was hardcoded, incorrectly for my case, in a USB library I'm using).
I figured all that out, and now I have simple bootloader that can update new firmware to the board over USB and I can talk with the computer via USB in the main code. Hurray!
I'm using the LUFA library, if anyone is interested. Just watch out for the pound defines for the USB init code if you need different PLL settings.
I keep thinking I'm right on the verge of gettin the clock to work. Just one more day and I'll have it figured out, just like suddently the USB stared making sense. I think "this next thing I'm trying will surly be it". But as of this moment it's still not responding on the bus corrctly.
I won't lie, I'm really, really frustrated right now. I'm so close, but I don't know how long it will take to fix.
In a week I'm going to get the laser cut acrylic put together and I'll show that off. It'll look awesome. Promise.
As I posted earlier I now have a test board in hand. I had to wait for a solder stencil to arrive as well, which I'll explain below. So now I can build one and see if months of design has paid off!
How to Build Modern Electronics
I'm pretty fascinated with the process of soldering today's insanely tiny electronics. Kickstarter always puts images down at the bottom, so I'll try to post them in order as I explain it here. Also: All the really tiny parts will come soldered in the kit, so don't panic as you read this! It's 2012 and we have robots that do this kind of work :)
Step One: Lay Out Your Parts
The solder paste doesn't stay wet long, so ideally you want everything laid out in advance for easy transferring. I only soldered up one board, so I used one of the other ones to place all the pieces (pic2 ).
Step Two: Align Stencil
Solder paste is a messy material. It has the consistency of cake icing and tends to just mush everywhere. In order to get it on the board in precision amounts a stencil is used. Since I'm only using this stencil for the test boards I had it made of kapton (a plastic), cut out with a laser cutter. (pic 3)
The trick is getting the very small holes lined up across the board. It might look good in one corner but a slight rotation or misalignment will make it completely off in the other corner. You can tell it's right when the you can't see any of the green board through the stencil holes. (pic 4-5)
Step Three: Squeegee
Now I'm all set up to lay down the solder paste. A line of it is squeezed out on one edge of the board and a small squeegee is used to pull it across the board. (pic 6) You pretty much have to get it right in one go, everything is small and the kapton is flexible so it will move around if you try and mess with it. A swift but purposeful stroke is used with even pressure across the whole thing. The result is all the wholes are filled with grey solder paste! (pic 7)
Step Four: Add the Parts
After carefully lifting the kapton stencil off I could then place all the parts on the board. Having already laid them out this was just as easy as picking them up with tweezers and dropping them onto the pasted board. Of course now I had to get the alignment exactly right. It takes a little bit of patience and a steady hand. Ideally you want to place the part straight down onto the board into the paste exactly right since lifting it back up or moving it tends to smear the solder paste that was so carefully laid out by the stencil. (pic 8)
Step Five: Bake!
So now all you have to do is heat it up so the solder melts. I carefully moved the populated board onto a nonstick hotplate -- originally made for cooking bacon, now used just for making electronics (and never used for cooking again since it's contaminated). I had a temperature probe on the hotplate as well to keep an eye one it. (pic 9)
I let it preheat at around 100 C for a minute before bringing it up to around 200 C. The board smokes alarmingly as the rosin in the solder paste burns off, and the suddenly you can see the grey paste turn silver as it melts. A few seconds later and the whole board has re-flowed and all the parts are sitting in silvery solder.
Then the hotplate is turned off and about half an hour later everything is back at room temperature and magically everything (around 60 parts total) is soldered on!
After hand soldering the large, through hole stuff (switches and headers) I have a complete test board.
Well the next step is to plug it in and see what happens. And the answer is: nothing. Well of course, nothing is programmed on the computer chip yet -- still fresh from the factory. But I should see definitely not see one thing: it should not draw more than few miliAmps, if it does then something is wrong in a bad way -- like a short circuit somewhere.
So with held breath watching the Ammeter I plugged it in a flipped the switch.
And nothing, just a tiny trickle of around 1 mA. Phew. But actually that was too little current so I think something else if wrong. Using a voltage probe I found that the switching power supply (going from 5V USB to 3.3V) on the board was off. Some more poking and the issue was found.
VINA vs EN
In order to turn off the board when the battery gets too low there is a voltage divider (see earlier post) that is tuned to the battery voltage and fed into both the "VINA" (voltage in analog )and "EN" (enable) pins on the switcher. At the time I thought these both did the same thing, and basically they do, but with one key difference. The VINA pin draws a fair amount of current to run its analog comparator. The upshot being that the pin acts like a small resistor that's in parallel with the voltage divider resistors. This threw off the math so bad that the pin is below the cutoff voltage and the power chip will not turn on. This of course is what it's designed to do, it's just doing it at the wrong voltage. So I took some much smaller resistors and replaced the ones on the board real quick. (pic 10)
It actually took two tries since it was guess and check kind of thing. But with the right resistors in place I switched it on again and now it draws 10 mA or so. Much more like what I was expecting. More probing showed that the power was on and there was 3.3V everywhere on the board! And no shorts, no mod wire, just a simple change of resistor values.
If only that were it :)
Now I had to get something programmed on the chip and see if I can get the peripherals (like the LEDs) up and running. I have a new code repository on git hub for firmware:
I used an AVR ISP programmer with the header on the board to upload a simple blinking code and nothing happened. Turns out for a couple of reasons. First I found out PORT D wont be an output until you turn off the JTAG interface -- lost a few hours to that one. And it doesn't work because there are no set resistors on the LED driver boards. Of course I knew that. I am waiting to test the brightness and color of the LEDs to color balance them before choosing resistor values. For now I soldered a 10k resistor across the red driver.
So after all that it works! I can turn on and off the red lights at least (last pic). Lots more work to be done in testing and to get the whole board up and running, but so far so good!
pledged of $6,000 goal
seconds to go
Jun 13, 2011 - Jul 20, 2011
Pledge $10 or more
6 backers Limited (34 of 40 left)
Get a nice, large NASA sticker, until I run out. Also my eternal thanks for helping this get off the ground.
Pledge $25 or more
For a pledge of $25 I will send you a thank you card and a limited edition ISS-Notify sticker. And you can be proud of helping make space commonplace!
Pledge $40 or more
If you're the hacker type, get the circuit board and all the parts you need, but not assembled. Makes for a great weekend project! I should have this ready before the finished product. If you have a soldering iron you could be the first in your block to have an ISS lamp!
Pledge $85 or more
Be the first to get a finished ISS-Notify desk light! I will also send you a thank-you card and sign the back of the lamp!
Pledge $500 or more
As a serious backer you will have my undying gratitude. You get an ISS-Notify desk lamp, but I will work with you to customize it! I'll have it laser etched or machined any way you like. It will be one of a kind.