Do you want to build a Stargate and DHD yourself?
You can now buy an archive of the needed files here. The archive includes the following:
- STL files for all the objects needed to put together the Stargate as seen on this site.
- Lots of audio files with sound effects and audio clips from the show.
- The gerber files for all the custom-made PCBs.
- Access to an online picture gallery containing a lot of extra WIP pictures and videos of the Stargate Project.
- Invite link to a stargate builders discord server
After publishing this Stargate project online much of the feedback I am getting are from people asking if they can buy a Stargate or if they can buy the files needed to make one themselves. Sadly, I do not have the time and capacity to be able to make and sell whole complete Stargates. It is time-consuming work. However, I have put together this page where you can buy an archive of the needed files. I think the “Making the Stargate” and “Making the DHD” pages give you a good starting point for how it is made. Together with the files, the tips, and suggestions on this page it should be possible for others to make their own Stargates. Keep in mind it is a lot of work, and I cannot give you any guarantees that you are able to make a Stargate yourself, even if you buy the files.
If you buy the files and use them for anything fun, like making a Stargate of your own. I would really like to see it. Send me an email to email@example.com and show me a picture.
To print the Stargate you will need a 3D printer. I guess any printer will do, but some of the objects are close to 20 cm across and requires a printer with a bed that is about 20×20 cm. The archive also includes alternative files with lager models for larger 3d printers. If you have a smaller print bed, you will need to split the parts before printing them. I used a Wanhao Duplicator 6 Desktop 3D printer to make this Stargate. I also used Wanhao ABS filament. Using ABS gives you strength and heat resistance. It also gives you the possibility to smooth the parts with acetone vape to give it a nice finish as you can see in my post here. I calculated the total print time to about 12-14 days total. Yes, that is a lot of printing time.
Discord community member tesseract, created this handy overview of the STL files and was kind enough to share it with everyone. It can be very useful too keep track of all the parts while printing. It is available both in Excel format and as a pdf.
Someone asked for more detailed step by step instructions of how to set up the software on the raspberry pi. I have put together the section below. I hope it helps. The stargate does not include a display and I chose to set up the raspberry in headless mode. (without a display and keyboard.) As time progresses things change. These steps were made in January 2021. They will get outdated and you will need to adapt.
- Install Raspberry Pi OS Lite to your SD card using the Raspberry Pi Imager.
- Alternately to the step above, you can take the shortcut and download my raspberry pi image already set up as described in the rest of this guide and install that image on the raspberry pi instead. There is a text document in the archive that describes how to download the raspberry pi image. Unless you have some experience running linux commands, it’s recommended using the mentioned image.
- New feature: Instead of doing the next step below. There are now a new hidden menu in the Raspberry PI Imager that lets you configure the wifi connection, activate SSH etc. Simply press Ctrl-Shift-X in to access the “hidden” menu.
- (Optional, if you didn’t use the “hidden menu” in the point above. When it is done you might need to reconnect the SD card to your computer to access the boot partition on the SD card. You can follow the instructions here, to configure the pi connect to your network when it boots up for the first time. This is very handy when we do not have a display. Also, we need to enable SSH connections to be able to connect to the pi from a computer. SSH can be enabled as described in step 3. Enable SSH on a headless Raspberry, here.
- Plug the SD card into your raspberry pi and power it up. It should automatically connect to your Wifi network and allow SSH connections. Find the IP address of the raspberry pi on your network and connect to it. There are several ways to find the IP address. A tip can be to check your router/DHCP, or use this handy app on your phone: Fing – Network Tools. Use your favorite SSH program and connect to the PI. Putty is a very popular choice. The default username is pi, and the default password is raspberry. When logged in, change the default password of the pi user.
pi@raspberrypi:~ $ passwd Changing password for pi. Current password: New password: Retype new password: passwd: password updated successfully
- (Optional) I prefer to set up my raspberries with static IP addresses. Open /etc/dhcpcd.conf in nano text editor and add IP addressing that fits within your wifi network at the end of the file. I use the following:
nano /etc/dhcpcd.conf # Kristian's static IP config: interface wlan0 static ip_address=192.168.10.129/24 static routers=192.168.10.1 static domain_name_servers=188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168
- We will add a new user to the pi (sg1) that we will use for the stargate stuff. If you need to do other configurations on the pi, you can use the default pi user. We also enable the new user to use sudo commands.
pi@raspberrypi:~ $ sudo adduser sg1 Adding user `sg1' ... Adding new group `sg1' (1001) ... Adding new user `sg1' (1001) with group `sg1' ... Creating home directory `/home/sg1' ... Copying files from `/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for sg1 Enter the new value, or press ENTER for the default Full Name : Room Number : Work Phone : Home Phone : Other : Is the information correct? [Y/n] y pi@raspberrypi:~ $ sudo nano /etc/sudoers.d/010_sg1-nopasswd #add the following line to the file sg1 ALL=(ALL) NOPASSWD: ALL
- Reboot the pi:
sudo rebootand log in with the new user. Remember to connect to the new static IP if you set one up.
- I prefer using python 3.8, but at the time i wrote this Raspberry Pi OS Lite only comes with python 2.7 and 3.7. We can install version 3.8 using the following commands. (This will take a while)
sudo apt-get update sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz tar xf Python-3.8.0.tar.xz cd Python-3.8.0 ./configure --prefix=/usr/local/opt/python-3.8.0 make -j 4 sudo make altinstall cd .. sudo rm -r Python-3.8.0 rm Python-3.8.0.tar.xz . ~/.bashrc
- Let us set up a virtual environment to use for our python programs and install the necessary python modules using the requirements.txt file from the archive. Copy the sg1 folder from the archive on your computer to the home folder of the sg1 user. There are many ways to do this as well. I prefer copying files using winscp. Make sure you use the python program from the latest update. If you do not have the sg1 folder in your archive, download the archive again to get the latest version.
sg1@raspberrypi:~ $ /usr/local/opt/python-3.8.0/bin/python3.8 -m venv sg1_venv sg1@raspberrypi:~ $ source sg1_venv/bin/activate (sg1_venv) sg1@raspberrypi:~ $ sudo apt-get install -y python3-dev libasound2-dev (sg1_venv) sg1@raspberrypi:~ $ pip install --upgrade pip (sg1_venv) sg1@raspberrypi:~ $ pip install -r sg1/requirements.txt
- Add the following to the end of the sg1 users .bashrc file. This will make the program start automatically when the sg1 user logs in. (But not if the user logs in through ssh).
(sg1_venv) sg1@raspberrypi:~ sudo nano .bashrc myt=$(tty | sed -e "s:/dev/::") if [ $myt = tty1 ]; then sudo /home/sg1/sg1_venv/bin/python /home/sg1/sg1/main.py fi
- Enable the I2C interface, the SPI interface and configure the pi to automatically log inn with the sg1 user when it boots.
sudo raspi-config 3 Interface Options P4 SPI -> Answer yes to enable P5 I2C -> Answer yes to enable 1 system Options S5 Boot / Auto Login B2 Console Autologin reboot
- By default, the raspberry pi sends the audio out the onboard audio output. If you hit buttons on the DHD quickly one after the other each button triggers a sound effect. The onboard audio does not handle running too many audio effects simultaneously and it will create an error terminating the python program. Also, using the led strip for the wormhole together with the onboard audio creates a whole lot of issues. To use the USB audio adapter instead, you need to instruct the raspberry to use the alternative audio output. We can do this by changing two lines in /usr/share/alsa/alsa.conf. Find these lines in alsa.conf and change them from 0 to 1. You can list the available cards by running the command
aplay -land change the lines according to the correct output card you want to use. More information in this nice article here.
defaults.ctl.card 1 defaults.pcm.card 1
- The speaker has an annoying feature where it turns off after 10 minutes of inactivity. There is no way to turn this feature off. But we can keep it powered on by sending it an inaudible sound every 8 or 9 minutes. Just add the following cron job. If you use a speaker that does not have this feature or one where it can be turned off, you won’t need to bother with the cron job.
sg1@raspberrypi:~/sg1/soundfx $ crontab -e no crontab for sg1 - using an empty one Select an editor. To change later, run 'select-editor'. 1. /bin/nano <---- easiest 2. /usr/bin/vim.tiny 3. /bin/ed # add this at the end of the file */8 * * * * /home/sg1/sg1_venv/bin/python3.8 /home/sg1/sg1/speakerON.py
If you want your stargate to be able to dial other stargates on the internet or receive incoming wormholes you will also need to install wireguard. You can install wireguard and download the subspace configuration file as follows:
sudo apt-get install wireguard sudo -i cd /etc/wireguard/ wget https://thestargateproject.com/subspace.conf chmod 600 subspace.conf exit
To get a stargate address and join subspace you need to follow the steps outlined in the address-book.
The archive file also includes gerber files so you can order the PCBs from a PCB manufacturer. I want to give you a heads up in regard to the power distribution PCB. I did include two connectors for power input, one barrel-jack and one micro-USB port. However, I could not find any micro-USB power supplies that was powerful enough for the Stargate. But if you do, you have the option. A power supply that can provide 3A should be enough.
The main reason for making this power distribution PCB was to eliminate the need for many power supplies. (One for the pi, one for the speaker, and one for the wormhole LEDs). I want to use as few wires as possible coming out of the back of the base. Also, this gave me the opportunity to fix the “electronic noise” that was generated by the “system” and was ruining the sounds coming from the speaker. More info in this post. Also when I first made the power PCB, I had some issues with too much power running through the B0505S-1W. (It got too hot and died) I tried fixing this with a resistor, but after a lot of frustration I found that it was a faulty wire that made the trouble. The resistor on the power distribution PCB is therefore not needed. Either use a really really small one, or just use a regular wire instead of the resistor.
Update: The old DHD PCB version is out! The DHDv2 is in! More information in the post here. first DHD version worked together with an old keyboard PCB to send keystrokes to the raspberry pi. This new version functions as a keyboard itself and can send keystrokes to the raspberry pi directly, without the extra keyboard PCB. It also controls the LEDs with commands from the raspberry pi. All this through one single micro-USB wire between the raspberry pi and the DHD PCB. This DHD PCB is a bit more complex to make and has a lot of extra components. Including an atmega32u4 microchip and a lot of resistors. I have written a separate page with more instructions on how to assemble the new DHD PCB.
PCB Schematics: DHD PCB, Power PCB, Chevron PCB.
I was asked about the wiring of the project and decided to make a wiring sketch. Because of the position of the wire screw connectors on the motor controller hats, they are hard to use when you stack the controllers. To easier detach the stargate from the base, I forwarded the connectors to the prototyping area of the top motor controller hat. There is an image of this to in the lower right corner of the sketch. Click the image for a larger view.
The wiring overview with the old DHD PCB (version 1) can still be seen here.
Assembling the sg1 Stargate
Below is a video that shows the process of how the stargate is assembled.
In addition to the 3D printed objects that makes up the Stargate, we need some motors, wires, a raspberry pi, screws, LED’s etc. Below is a list of all the things I used in this project. I cannot guarantee that I remembered it all (or that every item is an exact match for what I used), but I think the list is rather complete.
Update 18.11.2020: I just calculated an estimate price for all the hardware in the below tables. This is not including shipping and import fees. The total amount for the list below is about 520 euro.
Much of the hardware needed is also available here: https://www.etsy.com/shop/BuildAStargate
The Power PCB
|Female USB A connector (x2)||https://lcsc.com/product-detail/USB-Connectors_Jing-Extension-of-the-Electronic-Co-C42628_C42628.html|
|Barrel jack connector||https://lcsc.com/product-detail/Power-Connectors_XKB-Enterprise-DC-005-5A-2-0_C381116.html|
The Chevron PCB
|LED 3mm (x14, and perhaps a few to break)||https://www.digikey.com/en/products/detail/vishay-semiconductor-opto-division/TLHO4400/1681255?s=N4IgTCBcDaICoBkASB5ALGgDJkBdAvkA|
|LED 5mm (x7, and perhaps a few to break)||https://www.ebay.com/itm/50pcs-Orange-Round-Top-Emitting-Diode-Diffused-Water-Clear-LED-light-5mm-/223748794105?hash=item341877a6f9|
|Angled connector Female (x14)||https://lcsc.com/product-detail/Pin-Header-Female-Header_CJT-Changjiang-Connectors-A2541HWR-2P_C225510.html|
|Angled connector Male (x7)||https://lcsc.com/product-detail/Pin-Header-Female-Header_CJT-Changjiang-Connectors-A2541WR-2P_C225488.html|
|resistor 100 ohm (x7, for the chevron pcb)|