Thursday, July 20, 2017

CryptoCurrency Mining Rig - Building a Stackable, Open Air Mining Case

There are many options available to those who want to build a mining rig. You could use a normal PC Case if you only have 2-3 GPUs.  Even then the heat and space restraints make traditional cases not a great choice for mining.  Some are very simple, consisting of shelving or even milk cartons, modified to hold the required hardware.  These will work, but honestly look a bit ghetto.  Others are more elaborate cases built specifically for Crypto Mining.  These look great, but are a bit expensive coming in around 200-300 dollars.  I settled somewhere in the middle, decided to make my own open air case, but add a few aesthetic upgrades so it still looks somewhat nice.

For those that have been on my Project Blog before, you know that I take pride in my custom PC builds, and that I have a thing for black cases with blue highlights.

Design choices for this system were based upon 3 main requirements:

  1. Open Air design allowing us to easily configure the hardware in a way that it will provide adequate spacing for airflow, and maintenance when needed. When looking at 6x GPUs in one system, you must take heat into consideration. 
  2. Modular in nature, allowing it to work with a variety of GPUs, Power Supplies, and Mother Boards
  3. Stackable design to allow for minimum footprint if building multiple systems. I plan on building 2 systems in my home, so had to make sure this was an option as I don’t have a ton of extra space to have multiply systems lying around. 

So let us begin with some basic dimensions. There are plenty of DYI sites and forums with people showing their builds, but there is very little consistency between design and sizes. So instead of following someone’s, I designed mine from the ground up.  Here are the basic dimensions

The frame of this case will be built using 3/4in Angled Aluminum from a local hardware store. Its thickness is 3/16th in and they come in lengths of 36in. The various fasteners will be listed below. Also using 3in x 3/4in finished wood planks to serve as the bottom of the case, and the GPU resting plate.  Full material list below, came to around $45, including matte black spray paint.

  • 3/4in x 3/16in x 36in Angled Aluminum  (x5)
  • 3/4in x 3in x 96in Sanded Wood Plank (x1)
  • #6-32 x 1/2in Machine Screws & Nuts  (x12)
  • #6 Flat Washers  (x12)
  • #6 Lock Washers  (x12)
  • #8 x 1in Flat Phillips Wood Screws  (x12)
  • #8 Finish Washers  (X12)
  • Matte Black Spray Paint (x1)

Additional parts that will allow for an easier build, and make things look better.

  • PC thumb screws for GPU plates and Motherboard  (x12)
  • Motherboard Standoffs  (x6)
  • Plastic Corner Brace for PSU  (x2)
  • Rubber Feet / Standoffs  (x4)
  • Illuminated PC Power Button  (x1)

After acquiring all of the parts, the first step is to cut your aluminum lengths. From the 5 longer pieces listed above you will need to cut 4x 20in, 4x 16in, and 4x 10in lengths.  Measure everything out before cutting and you should have plenty to work with.

Next are the wood plants.  Cut 4x 16in, and 1x 20in lengths.  You may need to shave a tiny bit more off each cut depending on how you cut. My 10in chop saw was just about perfect cutting right down the middle of the line, allowing the wood to drop in snug but not so tight that it would warp the frame.

With the cuts all made, its time to start assembling the frame. Starting with the front bottom section, hold them together and drill a hole through both pieces of angled aluminum with a 1/8in drill bit.  Once the hole is drilled, thread in your screw along with washers and nut to secure the parts together.

Screw [] Flat Washer [] Angled Aluminum [] Angled Aluminum [] Lock Washer [] Nut

With the two bottom front corners are assembled, start on the top front corners. Once you have the front “box” assembled, time to add the wood plants to the outside edges.  As before we will line them up and then drill using the 1/8in bit. Then thread the wood screw through the finish washer, and into the aluminum with the wood behind it.

With the two outside planks installed, time to repeat the process and build the back of the frame just was we did with the front. Once that is done, the frame should be pretty solid.  Now we add the GPU support brackets. I measured 9cm from the bottom of the case to where the GPU support bracket would be mounted. Attached the 2 supports as shown in the picture below, and then place the 20in wood plant between them, roughly 15cm from the front of the case.  With that completed, the frame is assembled, and technically could be used at this point.

From this point on, most of what I am showing is aesthetic in nature or meant to keep things more tidy.  Not required, but will make things look better and help with cable management.

Some people chose to secure the GPU plate to the case using Zip Ties.  I don’t like the look of that and would prefer to use Thumb Screws to secure them better. I measured out spacing for 6x holes to go on the top front bracket, and used my drill press to punch through, first covering it with some painters tape.  Her you can see that I did more than just the required 6x holes to give me a bit of flexibility when placing cards, just in case I have one that needs a bit more space due to heat issues.

Here is an example of how a GPU will sit both on the top frame with the thumbscrew securing it, and the GPU bracket we added to the case, where the PCIe Riser card connects to the GPU

Next I used some plastic Corner Braces to secure the PSU (Power Supply) to the case.  One on the side and one in the front was enough to keep it secure, but still easy to remove if needed.

I also drilled a larger hole to be used with a latching Illuminated PC power button. Not necessary, but I prefer to the look and function to this over the jumper cable method. (Note, I did use a wider piece of aluminum for the front side of the case to accommodate the button. If you have a smaller button, this won’t be an issue).

With the case construction completed, on to paint.  Although not necessary, I prefer the look of matte black over the scratched up aluminum and bare wood. Easiest way to paint something like this is to hand it from a wire, and spraypaint while suspended.

Give it a light coat making sure to not apply so thick as to have run lines. Allow for appropriate dry time, then apply a second coat.  After final drying stage, the case is done!

Next post will cover building a stand with rollers/castors, and then on adding the components.  As a final “extra” step, I added some carbon fiber vinyl to the GPU mounting bar, to keep the metal GPU plates from scratching off the paint.  Here is the final result, ready to accept the hardware!

CryptoCurrency Mining Rig - Intro

If anyone has been following the ups and downs of Bitcoin, you know that Cryptocurrency is very volatile. With that volatility, comes the opportunity to make (or lose) some pretty good money.  I have been following the news on these markets for a while and with Ethereum starting to gain significant value, decided to throw my hat into the ring and build my own Cryptocurrency Mining Rig.

I will break out the full build into a few different posts to keep things from getting too long and wordy, and as always, will include good pictures and even video of the build process. Over the next few days, look for the following posts to hit.

  • Building a Stackable, Open Air Mining Case
  • Building a Mining Rig Stand / Rack with Wheels
  • Assembling a Crypto Mining Rig
  • Performance Tweaks to Maximize profitability
  • Cryptocurrency Mining Rig Build – Video Overview 

With the intro out of the way, let’s get started with a quick project rundown.  When considering building a system of this type, be aware there is risk involved as with any investment. When I first started putting the parts together for this project, the price of Ethereum was around $240 USD (June 27th). At that level, you could build a system within a price range of $1,800-2,400 and expect a complete payback within 80-90 days.

That is a pretty good ROI, and the rig will continue to mine well beyond that point producing some pretty good profits. So good in fact, that there was a rush of system builders trying to get in on the game, and the availability of Computer Graphics Cards (GPUs) which are normally used for PC gaming began to plummet. GPUs are very effective at mining various cryptocurrencies, and the rush of people putting together systems with 5-8 GPUs hit the market hard. Finding a good midrange GPU was almost impossible, and the  ones you could find were being sold at 2-3x their MSRP by scalpers also trying to make a quick buck off of the surge.

Since then Cryptocurrency has dipped, and Ethererum went as low as $143 (July 16th).  A lot of people who thought they were going to get rich overnight saw their mining profits drop significantly, and eBay soon saw a flood of second hand GPUs, from scrapped systems. For those of us that believe in CryptoCurrency, and are in it for longer than just a quick turn around, this meant we could finally start getting a hold of GPUs again. Here is a picture of the stock issues that have been pretty common, along with the price hikes in GPUs, $279 card selling for over $700.

Even though I was able to finally secure 6x GTX 1060 GPUs, they are from 3 different manufacturers as most sits would not let you purchase more than 1 or 2 cards at a time. So I have a bit of a “Frankenstien” looking build, but they have mostly the same specs, so work well together. Now that I have all the hardware I need, we can start the building process. Stay tuned for the upcoming posts!

Sunday, March 26, 2017

3D Printing - OctoPi Setup with 7in PiTFT Touchscreen LCD

OctoPrint is a great companion for any 3D printer.  I used it with my Monoprice Mini, and now with the Original Prusa i3 MK2. The web based interface works great, but I wanted a way to monitor the prints both when I am away from the house, and a way to just check on the status on the print in passing. I will show both the physical assembly process and how I set up all the settings within the Pi and OctoPrint to work for me.  Also working on a video walkthrough that I will post at the end of this post when completed. 

I had seen a few examples on of the OctoPrint interface running on a 3.5in TFT display.  I already had one of those screens, so I gave it a try.  

I got it working, but found the touch display too small to really be of much use, so decided to jump to a larger version.  Went with the official Raspberry Pi 7in TFT display.  Here is an Amazon link

There are plenty of enclosures available for this screen that also allow you to mount the Pi on the back, but I found some 3D printed plans that looked a bit nicer, and the fact that I could make my own with customized colors was a plus!  Here is the link to the one I made, and some pictures of the assembly process. 

Now that everything is put together, here is the step by step guide that I made to get everything up and running. I pieced this together from various sets "how-to" documentation, as they all seemed to not have all the info I needed, or missing some step that was causing the setup to not work for me. 

OctoPi Setup with 7in PiTFT Touchscreen LCD

Part 1: Install & Setup OctoPi
  • Download Image and burn to MicroSD Card using Win32 Disk Imager or Etcher
  • Once image is burnt to card access the following files in the boot directory to modify configuration of the OctoPi
    • octopi-network.txt
      • Remove the "#" from the follwoing 3 lines, and add your network info
      • ## WPA/WPA2 secured
        iface wlan0-octopi inet manual
            wpa-ssid "put SSID here"
            wpa-psk "put password here
    • octopi.txt
      • Modify these settings for your specific webcam. These settings for for the Logitech C615
      • Remove the "#" from the following line and change settings to match your camera
      • camera_usb_options="-r 1280x720 -f 25"
    • config.txt
      • An update has been pushed to Raspbian to flip the screen ( rotate it by 180 degrees ) for a better desktop viewing angle. This makes it upside-down in our stand and the official Pi stand, so you'll need to change a setting to flip it back. To do this, open /boot/config.txt in your favourite editor and add the line:
      • lcd_rotate=2
      • This will rotate both the LCD and the touch coordinates back to the right rotation for our display stand
  • Assemble the Raspberry Pi
    • Insert MicroSD card into Pi, Connect TFT Display, Keyboard, and HDMI Display, then boot up device
    • Once device boots up and launches the Console, enter default user credentials
      • Username: pi
      • Password: raspberry
    • obtain IP address
      • ifconfig

  • Enter the IP address found with ifconfig into your web browser to launch the OctoPrint web Interface
  • Complete Setup Wizard on Web Interface and establish log-in credentials
    • Username: XXXXXXXXX
    • Password: XXXXXXXXX
  • Import CURA slicing profile if desired, for the Prusa i3 MK2 I am using, head here:
  • Install Plugins
    • Settings > Plugin Manager
      • Automatic Shutdown
      • STL Viewer
      • TouchUI
  • Add the Prusa i3 as the Default printer with the following parameters 

    • Settings > Serial Connection
      • Serial Port > Auto (
      • Baudrate > 115200
    • Save Settings
  • Verify WebCam feed is working
    • Go to "Control" tab to verify you see the streaming image from your webcam
    • Go to Settings > Webcam & Timelapse > Stream URL
      • Use the "Test" button to verify everything is working properly
      • Also test the "Snapshot URL" 
      • Save Settings
  • Update the instance of OctoPi if update is available
    • Reboot the system once update is complete

Part 2: Configure PiTFT Touchscreen LCD
  • You may need to provide yourself root access first
    • sudo passwd
    • change root password to something you will remember
    • To gain SuperUser access
    • su
  • From the Command line, update the database of available software
    • sudo apt-get update
      sudo apt-get upgrade
  • Once update is complete, shutdown system
    • sudo shutdown -h now
    • Power on sytem and verify the the Touchscreen is working and the display is the correct orientation
  • If desired, access the Raspberry Pi Configuration screen and change the default password to something more secure
    • sudo raspi-config

Part 3: Setup: Boot to Browser (for OctoPi or Jessie Light)
  • **NOTE** This section will be easier to complete if you access your PI via SSH using Putty
  • From the piTFT screen, enter in user credentials and elevate to SU if needed
    • sudo apt-get update
      sudo apt-get install --no-install-recommends xinit xinput xserver-xorg xserver-xorg-video-fbdev x11-xserver-utils matchbox unclutter chromium-browser
      sudo nano /usr/share/X11/xorg.conf.d/99-fbdev.conf
  • Enter this information into the file if using an offical Pi Touchscreen
    • Section "Device"
       Identifier "touchscreen"
       Driver "fbdev"
       Option "fbdev" "/dev/fb0"
    • If using an HDMI display, chang to "fb1"
  • Save and exit (CTR-O, Enter, and CTR-X)
  • Allow X11 to run as anybody
    • sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
      git clone ~/TouchUI-autostart/
  • Copy Service File and Register
    • sudo cp ~/TouchUI-autostart/touchui.init /etc/init.d/touchui
      sudo chmod +x /etc/init.d/touchui
      sudo cp ~/TouchUI-autostart/touchui.default /etc/default/touchui
      sudo update-rc.d touchui defaults
  • Test Kernel
    • chromium-browser
  • If browser doesn't launch we need to upgrade the Kernel and the Chromium Install
    • Only Do this if Launching Browser didn't work
    • Update Chromium
      • sudo apt-get update
        wget -qO - | sudo apt-key add -
        echo "deb jessie main" | sudo tee -a /etc/apt/sources.list
        sudo apt-get update

        sudo apt-get install chromium-browser
    • Update Kernel
      • sudo apt-get upgrade
        sudo apt-get install rpi-update
        sudo rpi-update
        sudo reboot
  • You may have to run the steps before updating Chromium and Kernel again for TouchUI to AutoBoot
  • System should now  boot automatically to the TouchUI web interface of OctoPrint

Part 4: Setup Remote Print Access
  • Reserve (These steps are for my ASUS Router, but should be similar for most brands)
    • From Router UI go to LAN > DHCP Server
      • Reserve the desired Local IP address for the Raspberry Pi
    • Head to WAN > Virtual Server / Port Forwarding
      • Enable port forwarding for both OctoPrint and SSH
        • Octoprint Port: 80
        • SSH Port: 22
        • Both will use the OctoPi's IP Address

  • No-IP
    • Set up your Dynamic DDNS
      • 97.117.XXX.XXX
    • Open the Console or SSH and type the following
      • mkdir /home/pi/noip
        cd /home/pi/noip
    • AfterAfter creating the folders for the DUC it is time to download the software.
    • Within the Terminal window type the following. After each entry you will press “Enter”.
      • wget
        tar vzxf noip-duc-linux.tar.gz
    • Next navigate to the directory you created to locate the downloaded files.
      • cd noip-2.1.9-1
    • Now install the program
      • sudo make
        sudo make install
    • After typing “sudo make install” you will be prompted to login with your No-IP account username and password.
      • UserName
      • Password
    • After logging into the DUC answer the questions to proceed. When asked how often you want the update to happen you must choose 5 or more. The interval is listed in minutes, if you choose 5 the update interval will be 5 minutes. If you choose 30 the interval will be 30 minutes.
      • sudo /usr/local/bin/noip2
    • To confirm that the service is working properly you can run the following command.
      • sudo noip2 -S
        • Must be a Capital "S"

    • To ensure that it will run on Start Up
      • sudo noip2 -S
      • Add the following below the "fi" line and above "exit 0"
        • /usr/local/bin/noip2

      • Save and exit the file
      • Now check to see if the process is already running or not
        • sudo /usr/local/bin/noip2 -S
      • Upon reboot, it should run the service
  • Setup /  Upkeep
    • Make sure passwords on all devices and routers are secure
    • If you don't want to update the NoIP every month, pay $25 for an annual setup

Here is a video I put together showing the TouchUI in action along with a companion app for Android called "Printoid" that has a nicer UI, but still works off of OctoPrint. 

Friday, March 3, 2017

TekPower TP3016M Switching DC Power Supply Mod & Review

I have been using various DC power supplies for projects on my workbench for some time now, but recently decided I need the flexibility of a true variable supply, vs a wall adapter that has 4-5 voltage choices.  In my search, I found that most workbench power supplies were very large and bulky, which wasn't ideal.  Then I came across this geam, the TekPower TP3016M Switching DC Power Supply.  It is a fairly new product, and can be found on Amazon.

This unit fits my needs perfectly having an output range of 0.3V-12V @ 0-3.75A, and it can even jump up to 30V@ 1.6A.  The other perk was the size, which is about the same as a multi-meter.  The unit is portable, and small enough for me to mount on the wall above the workbench.

I have already used it for a few projects, and it performed flawlessly.  Backlit display is a nice touch, as are the dedicated USB ports for output at 5.1V @ 2.5A.  The only downside to this unit, is that is has no dedicated power button.  To turn it off, you have to remove the power cord.  Not ideal, especially for my plan to wall mount it.  So I set off to MOD the device, to remove this "negative" from the feature list. So I opened the unit up and took a peek inside to see what I could do.

Turns out the is ample room in the upper right of the device for a dedicated power switch.  I found a fairly small rocker switch (pictured below) that could take up to 6A, and began preparations to add it to the power supply. First thing I did was remove the solder from the post on the right of the 2 pin power input/plug.  Once the solder was removed (from only the right post), I bent the post up and away from the circuit board.

With the prep work done, I drilled a starter hole where I decided the switch would go, and then used a small file to shape the opening to fit the switch.

Lowered the switch into place, and then connected it to the power input pin I had previously bent upwards.  The other jumper was then soldered back to the board to complete the connection. It is a pretty tight area to work in, and I also chose to use some heat-shrink tube just in case the contacts got too close.

I plugged the cable back in, and gave it a quick test... WORKS!  Then proceeded to put the unit back together, which was as simple as snapping it back together and screwing in 3 screws.  The unit was then attached to my tool wall, where it is easily accessible to power future projects.

Overall a pretty simple MOD, but made this unit a lot easier to work with.  Here is a video I put together which is more of an overview of the power supply's operation.  Thanks for visiting.

Friday, February 10, 2017

Raspberry Pi (RetroPie) Old Skool Case LED Mod

As is apparent with my TableTop Arcade build, I really like turning Raspberry Pi micro computers into Retro Gaming systems.  I also have some smaller systems that just plug directly into a TV.  Recently found a case that is a perfect fit for these types of systems.

Old Skool NES case for Raspberry Pi 3

Its a really nice looking case, and fits with the Retro Gaming theme perfectly.  Very simple install, and everything lines up as it should. The only gripe I had,  was there is a small hole next to the fake power buttons, that would typically be a power indicator.  The case has the hole, but no LED. So... time to MOD!

I have a bunch of small Red LEDs, so set to work figuring out how to connect it to the Pi, so it will light up when the system is powered on.  Here is the pin layout of a Pi 3. I decided to tie into the 5v & GND locations to power the LED. 

I first tested on a breadboard to verify which resistor I would need.  The  LED I am using requires input of 1.5-2v so I went with a 100 Ω + 5% resistor to step it down from 5v.  If you want the LED to be less bright, just use a larger resistor. I then used a hot glue gun to secure the LED to the case. 

With that done, powered it up, and it looks Great! Really pleased with how well it turned out.

Here is a quick video showing the boot up process, and the initial "Boot Video" I have setup on my system.

Saturday, January 14, 2017

PC Upgrade - Mounted System Stats Display

I have been running my current Custom PC setup for about 6 months, and for the most part, have been very pleased with everything.  The only issue I have faced, is the small display I mounted to show system stats has very poor viewing angles, making it hard to see from where I sit/stand.

I also have received more questions about that particular part of my system than any other post both on this blog and my YouTube channel. So I decided to upgrade that particular component, and archive the entire process.  In addition to the info on this post, I will also make an overview video and posts it at the bottom.

The previous display was a 9in LCD panel. The new one, is a Toguard 10.1 Inch IPS display.  Here is the Amazon Link.  It is almost twice the cost of the 9in one, but the panel quality is a LOT better, so worth it in my opinion.

Here is a picture from the back.  The 9in was a bit easier to mount as it had a camera/tripod mounting hole, that I secured it to the GPU bracket with.  This new display has no such mount, but does have 4 mounting holes on the back of the display.

From the bottom you can see the various connectors.  All I am concerned with are the 12V DC power port, and the HDMI input.

The front plastic made to look like brushed aluminum. I probably would have left it as is, if it weren't for the TOGUARD logo. So I covered just the front bezel with my Carbon Fiber Vinyl wrap.

I gave it a quick test before making the mounting bracket just to verify everything would work the way I needed it to.  Here we are showing connections from the PC to the Display.  Note the 12V DC  plug is coming directly from a 4pin Molex connection that I wired specifically to power this display.

The initial tests passed with flying colors.  Not yet mounted, but running CAM perfectly.  On to the mounting bracket construction.

To make the bracket, I grabbed some sheet metal that I had left over from another project.  I measured both the exterior dimensions and the location of the mounting screw holes.

Once I had everything marked, cut out the piece, drilled the holes, and used my bench vise to make a nice 90 degree bend to accommodate mounting the display under the GPU bracket.

To secure the display to the mounting bracket, I am using M4-7 socket cap screws, and a few washers.  The length was a bit too long, as the mounting holes were not very deep, so I used some nuts to shorten the length of the screws.

After everything was drilled, cut, and bent, added a few passes of black spray paint to match the color theme of the PC build.  Also shown here is the 6mm screw I used to secure the mounting plate to the GPU bracket.

Here is the hole I drilled in the GPU bracket.

And here is where the 6mm screw will go.

With the mounting plate secured the the GPU bracket, we can now attache the display.

Here is a shot from the back to show how the screws are securing the display to the case.

And a final shot from the front to show the new upgraded display installed and running CAM.

I will show in the video more detail on how to get the NZXT CAM Monitoring software up and running, but just for reference, here is what my displays look like, with this new on set up as the 4th monitor of my system. Desktop Screen Capture of all 4 monitor.

Here is the video.  If you have any questions be sure to hit me up in the comments. Thanks!