- a keychain that glows with old-fashioned animated LEDs,
- or a coin-cell powered pocket toy with a puzzle game and a tic-tac-toe game,
- or a fidget clicker cube, because it has nicely clicking tactile buttons,
- or an aide for your board games - timer, die, heads-or-tails coins mode,
- or a secret messenger.
1. I applied the solder paste to the other side and aligned LEDs (polarity!)
2. Then I aligned switches. They are having small pads, so I had to check if they got wet with the solder paste.
3. Then I heated my PCB with the hot gun the same way as in the previous log. It turns out, that I applied too much solder paste. All LEDs got bridges. So I repeated my previous exercise with flux, soldering iron, and even used a desordering pump. In the end all LED pads were separated.
4. It turns out, that I forgot one via, and one of the red LEDs left not connected. So I added a wire made from an old ethernet cable. Yes, it looks like a log, but it was the only not stranded wire I had.
BTW I fixed this via in the published gerbers.
I attached the battery and voilà. It worked.
Interesting observation. When I fried this side with a heat gun, the tin on the other side possibly melts, but the surface tension of the melted tin was enough to keep everything in place.
To solder using the generic heat gun, you need to set it to max power and min flow and remove all focusing attachments.
1. I applied solder paste (Next time I'll order a $8 stencil):
2. Then I aligned the controller.
3. I used a spare PCB and a multimeter thermometer to find a distance to my heat gun that makes it 250°C. I used my helping-hands aka third hand to hold the PCB horizontally at the measured distance and attached the thermometer.
4. Then I exposed the PCB to heat checking the temperature: 150°C (15 sec) →250°C (5 sec)→cool-down. I applied to much paste, so I got a lot of bridges:
5. To fix that I generously applied flux and heat it up with my thinnest bevel soldering tip. Result is acceptable. No bridges.
Then I soldered some temporary wires for power, reset and SPI and loaded a firmware (now I know that I should've added some M/F connectors or at least pogo pads).
I had a two layer PCB, and one of these layers is almost completely occupied by a battery holder. So I used SMD switches with four pads, which were connected in two pairs. I used these internal connections to add a virtual bridges over the PCB surface to pass wires across. Gerbers can be found here: github/alien-die/gerbers
I ordered 5 PCBs on the same site and it cost me $4 with shipping. Incredible!
I got a piece of advice from my friends to always prototype schematics on breadboards. This is the way you can connect and reconnect everything, add or remove components, change controller pins and check everything with an oscillograph".
My controller is small. It's just a 4 mm square.
In order to connect it to a breadboard I needed a QFN-20 0.5mm adapter like this.
I easily found mine on eBay and if it is not the case for your footprint you can always create it as a separate PCB. So I soldered my controller to the adapter with soldering paste and a heat gun. And then I soldered the pins headers:
So this is all breakouts I have so far:
Model
CPU
Speed MHz
RAM
Program Memory
USB
PINs
Price $
Teensy 4.0
ARM
600
1Mb
2Mb
micro
40
20
Teensy 2.0
AVR
16
2Kb
32Kb
mini
25
16
Mine
AVR
1
128 bytes
2Kb
-
17
2
I spent lots of time trying to make the Arduino-based programmer work with my microcontroller. I almost gave up but soon I found out that the factory ISP programmer is available and it's only $20. When I gave it a try, it connected to my controller in no time and made it work right at the bat.
Then I replicated my schematics on two connected breadboards:
With the help of this mesh of wires and components I managed to write and debug my firmware that can be found here.
Let's design some nice looking handy casing for Alien Die.
There's a legend that Palm Pilot creator carried around a piece of wood imitating the device and shaped it to the perfect form with a knife.
I'll make it much simpler. The device will have a grid of buttons 3x3 that's why it will have a square shape. The side of the square is defined by the battery holder's largest dimension which is about 1'' in length. And the same for thickness: battery + PCB + buttons + shell = all in all about 1/2''. And since the battery doesn't occupy all the space under the PCB, there will be a small indent for a finger.
After multiple tryouts of different CAD applications I finally chose Fusion 360. it is powerful, it has a pretty good UI and it's free for non-commercial creators like me. There are plenty of tutorials on this CAD so I quickly fixed a scale model.
You can find STLs here github/alien-die/stls (the final version a little diverges from the picture above):
So it's printed (the bottom piece was printed vertically to make it safely bend along layers and fit in grooves of the main body like a spring):
Parts cleaned of supports (the middle piece is the imitation of PCB):
And finally it's assembled:
Advice #2: Make scale models with all internals, even fake internals. This is how you can assess usability, find out all problems and all mismatches. This is how I knew and fixed the unfit locks, bad dimensions and found out that buttons poking out of the casing was a bad idea. :-)
I tried many different schematic editors, and EasyEDA turned out to be the best. At least for me. It can even be used as a web-based application.
The thing I like the most is that it's equipped with a comprehensive component library, from which I chose the AtTiny2313 microcontroller in QFN packaging. This controller has enough pins for all my matrixes. Yes, it's equipped with just 2 KiB of flash and 100 bytes of RAM but that's okay. It should be a good exercise for my skills: to fit my applications in its limitations.
I won't show how to use EasyEDA because:
it's simple,
there are lots of tutorials,
and mainly because I don't feel experienced enough to teach anyone electronics.
This is how my final schematics looks like.
Advice #1: Always add resistors to any LEDs. If you're unaware of nominal, use this online calculator. I didn't know it, that's why my LEDs will have very bright but very short life, so shame on me.
Let it be a small keychain pocket toy, something like a fidget cube. Let's make it play some sort of small games, like tic-tac-toe or puzzles. Its body should have a 3x3 button grid with two color backlit on each button. I decided to use a 3D printed body, a two-sided PCB, clicky mechanical tactile switches and a cell battery CR2335 a very small microcontroller and no additional chips, like shift registers. And this left me no other ways to conserve pins than to organize LEDs and buttons in matrices.
Hey! Oh, that's an interesting project! Got any pictures of the side with buttons looks like when soldered?