project proposal
press fit construction kit
pcb fabrication
3D scanning and printing
electronics design
molding and casting
embedded programming
cnc machining
[05] ~ ELECTRONICS DESIGN |
This week I designed, fabricated, and programmed a circuit board with a super-flashy RGB LED. ![]() Designing the board went pretty smoothly. I started with copying the hello.ftdi board in Eagle and added an RBG LED and a button in the process. I also added the requisite resistors for the RGB LED. I could've done some digging through of the datasheet to find the apprporiate resistor values but I trusted the hello.rgb board used correct resistor values (1K, 1K, and 500 ohm for R, G, and B respectively). ![]() ![]() In preparing the board to be milled on the modela I sized my dimension layer slightly larger than the actual board I wanted. I then used the bottom (blue) layer to define the size of the board. This makes it easy to enter "display none bottom" in the eagle command line and then export the cutout image directly. Fabrication initially seemed to go smoothly (though the truth was later revealed). I milled a board, stuffed it, tried to program it and got the horrid "rc = -1" error. So I scoured the board for solder bridges. I spotted a questionable trace near the underside of the attiny. So I desoldered the chip (using the weller hot air gun while holding the part with tweezers). I fix the questionable trace and resolder the chip. I also had to add an extra wire because I had to cut a trace to fix the issue. I try to program again... still no luck. ![]() ![]() So I decide to make another board... This time, as I'm stuffing it I realize that one of the traces wasn't properly seperated from another trace from the milling. I quickly fix it with an exacto knife and keep stuffing. I try to program the board again and I get the same error. But now I suspect it's some error in my board design. As I poke around with a multimeter I detect a short under the attiny chip. So I desolder the chip AGAIN and realize that there's another trace that wasn't properly milled out. ![]() ![]() My traces in eagle I think were slightly too thick in places (16 mil) and too close to other pads. Before I originally milled the board, I ran a design rule check with fab.dru and the board passed. The clearance between pads and traces in the design rule is set to 0.2mm (which seems too small). I tried changing it to 0.4mm (the diameter of the 1/64 enmill) but it complains about many things that it will happily mill. So I'm a little confused about eagle's design rule checking. This week has taught me to trust it less. Side note: Resoldering chips is not the easiest task. Having had to do it a number of times I think I converged on a pretty good technique. First, remove the chip by reflow heating it (with a hot air gun) while holding the chip with tweezers. When the solder gets hot enough the board will fall off, seperating the chip from the board. Now what's tricky is often there's lots of solder left on the pads and pins. Sometimes you can just take wick and soak it all up... a lot of times it just doesn't want to come up though. I found adding some additional flux to the area (by dabbing with the flux-pen) and then using the wick worked amazingly well. The flux just helps the solder wet and flow so that it will very rapidly cling to your wick/braid instead of the board. You should get traces with just a very thin coating of solder (like the image below) so now soldering the chip back on is just like you did the first time. ![]() Onto the programming... The makefile was giving me errors with the "--mcu=$(MMCU)" phrase. So I ripped out that section of the Makefile and replaced it with the one that worked from last week. Instead of...
$(PROJECT).hex: $(PROJECT).out
it now reads...
$(PROJECT).hex: $(PROJECT).out
After all of that, this is the final result: The code is a hodge-podge of the hello.ftdi code and the hello.rgb code. Download at your own risk:
|