• Done

    Andrey Kalmatskiy08/29/2022 at 19:27 0 comments

    Firmware is here: main.c

  • Casing V2

    Andrey Kalmatskiy02/11/2022 at 03:23 0 comments

    I redesigned the casing, Now it has switches covered with buttons "caps". And also this time I printed it with translucent PLA. As usual STLs are here https://github.com/karol11/alien-die/tree/main/stls

    On the back side it's visible not only battery, but also a controller.

  • LEDs and Switches

    Andrey Kalmatskiy02/04/2022 at 03:43 0 comments

    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.

  • Soldering

    Andrey Kalmatskiy01/30/2022 at 16:53 0 comments

    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).

    Next is - other side soldering.

  • PCB and components

    Andrey Kalmatskiy01/30/2022 at 03:22 0 comments

    To design this PCB I used the same EasyEDA site.

    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 also ordered on mouser.com / digikey.com:

    • controller - ATTINY2313-20MU
    • red-green LEDs - LTSTC195TBJRKT
    • switches - EVQ-P2402W
    • battery holder - BAT-HLD-001-THM

    And when it all comes at once, I realized how hard it will be to solder it all together using my heat gun from Home Depot :-)

  • Prototyping

    Andrey Kalmatskiy01/15/2022 at 18:31 0 comments

    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:

    ModelCPUSpeed
    MHz
    RAM
    Program
    Memory
     USB PINsPrice
    $
    Teensy 4.0ARM6001Mb2Mbmicro4020
    Teensy 2.0AVR162Kb32Kbmini2516
    MineAVR1128 bytes2Kb-172

    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.

  • Casing

    Andrey Kalmatskiy01/12/2022 at 03:36 0 comments

    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. :-)

  • Schematics

    Andrey Kalmatskiy01/12/2022 at 00:51 0 comments

    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.

  • Highlevel design

    Andrey Kalmatskiy01/11/2022 at 04:01 0 comments

    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.

  • For experience

    Andrey Kalmatskiy01/11/2022 at 03:57 0 comments

    Usually I write code, but this time I decided to make something new:

    • make a PCB from scratch,
    • design a device equipped with just a naked microcontroller (no breakout boards, no Arduino, no comprehensive bootloaders - just bare metal),
    • manually solder a set of SMD components,
    • and drive all this stuff with a coin cell battery.
    For me this is a completely new life experience.