If you like this project, please consider voting for it in the PCB Contest (at the bottom of the page)!
Stargate SG-1 is my favorite TV show of all time—full stop. Over the past couple of months, I've been forcing my girlfriend to watch to watch the entire series. We were around season 4 when I saw that Instructables was running a PCB Contest, and it seemed like the perfect opportunity to design my very own Stargate that I could put on my desk.
This project is what I came up with. It's a 4 inch diameter PCB Stargate, with accompanying DHD (that's Dial-Home Device for layman), that sits on your desk and lights up! Tap the capacitive touch pad on the DHD and each chevron will light up in sequence. Get to the 7th chevron, and the wormhole lights up!
The PCB is designed as a single piece, and snaps apart. The DHD is in the center, and the outer corners are supports for the Stargate and DHD. It runs on two AA batteries, and the battery holder acts as the base of the DHD.
Logic is provided by an ATtiny85, which turns on the LEDs through a 74HC595 shift register. Read on to see how I designed it, and for instructions on how to assemble it!
Step 1: Prototyping
If at all possible, you want to prototype your PCB designs on a breadboard before actually getting anything fabricated. These days, it's very affordable to have PCBs made, but you still don't want to waste your time or money.
In my case, I had never worked with a shift register before, so that was what I needed to concentrate on testing. I relied heavily on this Instructable tutorial to learn how they work: https://www.instructables.com/id/Multiplexing-with...
I actually made the mistake of ordering PCBs before thoroughly testing. My original design used WS2812B individually-addressable LEDs. Those didn't end up working well for a few reasons, and I wasted a lot of time and money. The new design is more simple and less expensive.
To prototype my shift register design for the second revision of the PCBs, I put everything out on a breadboard. The ATtiny85, shift register, resistors, and LEDs are all on there. There is also a second area for programming the ATtiny85 through an Arduino (Google how to do that, there are a lot of tutorials).
The complete parts list for this project:
- 1x ATtiny85-20PU
- 1x 74HC595 Shift Register
- 7x Red 3mm LEDs
- 1x Blue 3mm LED
- 2x 120ohm Resistor
- 1x 1P2T SPDT Switch
- 1x Battery Holder
Attached is the ATtiny85 code (flashed using an Arduino). After testing, I moved onto the PCB design.
Step 2: PCB Design
If you just want to have PCBs made using my design, you can use the StargatePlots.zip folder that's attached. It contains the Gerber files to get these fabricated.
The physical design of the PCB was very important to the final product—particularly since it snaps apart and parts of the PCB are used as supports. For that reason, I started in CAD. I used Autodesk Fusion 360 to design the PCB, including the tabs.
PCB Outline in Fusion 360
Once you have your PCB designed in CAD, you need a way to bring that into your PCB design software to add edge cuts. All you have to do in Fusion 360 is create a new sketch on the surface of the part, and project all the edges. Then just save the sketch. In the component browser area (on the left side of the window) select the new sketch and export it as a DXF. Save that for later.
I did my actual PCB design in KiCAD. I would have used Autodesk Eagle, but I was cutting it close to the contest deadline and didn't have time to learn how to use Eagle. In KiCAD, the first step is to create your PCB schematic. The schematic is a simplified block diagram of your design, and its primary purpose is to tell KiCAD which pins of components are connected together.
KiCAD had almost all of the components I was using built-in, so I simply added them and connected the pins. The big exception was the capacitive touch pad, which is completely custom. To add that, I had to create a new PCB footprint.
First, I drew the shape of the touch pad in InkScape. I then used KiCAD's Bitmap converter to turn that into a footprint for the new component. That was then added to my schematic.
Once you have your schematic finished, you can create the actual PCB layout. KiCAD will just dump all of the footprints on the sheet, and it's up to you to position them. First, however, you want to import that DXF of your PCB outline.
Switch to the Edge Cuts layer, and then choose import DXF. Select you outline DXF, and it will be placed on the sheet. Then you can position your footprints as necessary. These steps are all covered well in far more detailed guides to KiCAD. Finally, add some copper pour fills with keep-out areas to stay out of the cutouts.
No Stargate is complete without a glyphs, which means a custom silkscreen is necessary. I started by finding an illustration on Google of the Stargate that clearly showed the glyphs. Then, I used GIMP to remove all of the image except the glyphs, and made it black and white. I took that into InkScape and converted it to a vector image, and scaled it to the proper size.
From there, the process was similar to creating a custom footprint. But, instead of using the image as a footprint, I used it for the silkscreen layer. Then I just moved it into the PCB and positioned. That process was repeated for the DHD glyphs.
Step 3: Get Your PCBs Fabricated
There are a lot of fabrication services that you can use to get your PCBs made. OSH Park is a popular choice that is extremely easy to use and has great quality, but it's a little pricey—the PCBs are also purple.
For this project, I used the Seeed Studio Fusion PCB service. It was significantly more affordable, the quality was also great, and they offer a lot more customization. For instance, I was able to get these made in black, and there are several color options available.
You'll have a few options for shipping, but I chose DHL. I placed my order on January 11th, and received my boards on January 22nd. The total cost, including shipping, was $51.94 for 10 of these 101.6 x 101.6mm boards. If I had ordered the boards in the default green color, they would have been cheaper. But, $5.20 per board is pretty reasonable considering how large they are.
All of that said, you can use whatever service you want. Other popular options are JLCPCB and PCBWay. All you need to do is plot the Gerber files from KiCAD or Eagle to upload your designs to these services. If you use OSH Park, you can upload your KiCAD project directly.
Step 4: Assemble the Board
If you designed your own board, you should know how to assemble it. But, if you're using my PCB design, here's how to put it together:
All of the components are through-hole and are labeled on the board, so assembly should be easy. Each component is placed on the side of the board with the label. The ATtiny85 and 74HC595 locations are both marked with how they should be oriented. The chips have a dot marking Pin 1, which goes next to the notch in the chip outline on the board.
LEDs have a polarity, so you need to be careful when you put them in. The negative cathode (short leg) of the LEDs go through the square hole, and the positive anode (long leg) goes through the round hole. First solder the seven red LEDs for the chevrons, and then flip the board over.
The blue LED needs to be bent at a 90 degree angle pointing down towards the center of the Stargate. Only insert it about halfway, and then bend it down before soldering.
Next comes the DHD wires. Solder one side of each wire into the DHD part of the PCB, then solder the other ends into the Stargate part. It doesn't matter which wire goes into which hole, the capacitive touch pad doesn't have a polarity.
Finally, solder the battery wires. If you have the first revision of the board, it will be improperly marked and says the bottom hole is "+" for positive. That was a mistake on my part. The bottom (outer) hole is negative. So, solder the positive battery wire into the top (inner) hole, and the negative wire into the bottom (outer) hole.
Step 5: 3D Print Your Parts
This project has a total of nine 3D-printed parts: the seven chevron covers, and the front and back pieces of the wormhole LED diffuser.
The chevrons are straightforward, and are hot-glued over the chevron LEDs for extra style. Those should be printed in black or gray.
The wormhole LED diffuser is divided into two parts to make it easier to print, and to make it more effective. The front piece is printed in translucent filament so the light will shine through, and the back piece is printed in white filament to help reflect the light back out through the front.
All of these pieces can be printed without supports. I recommend using a layer height of 0.15mm, infill should be something like 20%.
Step 6: Final Assembly
To finish assembling the Stargate, you just need to put the pieces together with hot glue. First, I recommend you use sandpaper or a Dremel to smooth off the tabs on the PCB parts.
Then, use a little bit of hot glue or super glue to attach the front diffuser part to the back of the diffuser. They should be concentric (centered).
Next, fill a chevron with hot glue, and push it down onto a chevron LED. Repeat that for the other six chevron LEDs. Go ahead and use some more hot glue to mount the wormhole LED diffuser onto the PCB. There is small hole for the LED to fit into, so just insert it and use the thick portion of the diffuser as a surface to hot glue it to the PCB.
Wrap the DHD wires around the battery wires a few times to keep them tidy. The DHD PCB is intended to go on top of the battery holder, so hot glue it there (so the battery wires are on the bottom). Then use some hot glue to attach the supports (without the notches) to the sides of the battery holder to keep it upright and stable.
Finally, push the support with the notches into the corresponding notches on the Stargate PCB. Use a dab of hot glue on each to keep it in place.
And you're done! Just flip the switch on, wait a few seconds, and then you can tap the touch pad to engage each chevron and establish a wormhole!