A PirateBox is a Linux based system built using free software for the Raspberry Pi that provides private sharing of digital content. The PirateBox creates a local WiFi network, independent from the Internet, with anonymous file sharing and chatting capabilities.

I wanted to make a PirateBox and create a cool looking case for it. I used a laser cutter to cut the pieces of the case from 1/8" thick birch plywood and painted it to look as shown in photos 1 and 2. A small Python program controls custom hardware that makes the arcs above the skull glow when the PirateBox is up and running. Another small Python program controls a push button switch that illuminates when the Raspberry Pi is powered up. When the switch is pressed, the program shuts down the Raspberry Pi preventing the problems that can occur if you just unplug a running Raspberry Pi.

The "PirateBox Wiring Diagram" shows how the various components are connected to the Raspberry Pi. The second diagram and the schematic show the wiring for the LED circuit board. Since the three large LEDs draw more power than the Raspberry Pi can provide, the LED circuit board is powered separately and uses an optoisolator to keep the LED circuit isolated from the Raspberry Pi.

The PirateBox can be painted with different color schemes to create the skins shown in step 19.

This instructable assumes you have experience with setting up and running a Raspberry Pi, that you have experience soldering components to printed circuit boards, and that you have access to and experience with a laser cutter.

I made this at TechShop.

Step 1: Parts

The following parts are needed to construct the Raspberry Pi PirateBox:

Raspberry Pi Parts:

  • 1 Raspberry Pi model B 512MB RAM (Available on Amazon or Adafruit ID 998) (photo 1)
  • 1 16GB SDHC class 4 card (photo 2)
  • 1 HK Mini USB WiFi 150Mbps wireless adapter 150M LAN 802.11n/g/b with antenna (available from Amazon) or other supported WiFi adapter for Raspberry Pi (photo 3)
  • 2 1 1/4" #4-40 Machine screws and nuts (photo 4)
  • 6 1/4" Round nylon spacers for #4 or #6 screws (photo 4)

LED Circuit Board Parts:

  • 3 10mm Diffused blue LEDs (Jameco Part no. 2152147) (photo 5)
  • 3 47 Ohm 1/4 watt resistors (photo 6)
  • 1 USB female 4 position solder right angle thru-hole 4 connector (Jameco Part no. 2096181) (photo 7)
  • 1 Adafruit Perma-Proto half-sized breadboard printed circuit board (Adafruit ID 571) (photo 8)
  • 1 NPN Optoisolator PS2501-1 (Jameco Part no. 320653) (photo 9)
  • 1 120 Ohm 1/4 watt resistor (photo 10)
  • 2 12" Jumper wires (one end male, one end female) (Sparkfun Part number PRT-09385) (photo 11)
  • 24 AWG solid core hookup wire (photo 12)
  • 2 3/8" #4-40 Machine screws (round head) and nuts (photo 13)
  • 2 Round nylon spacers for #4 screw size, 0.187" outer diameter, 0.115" inner diameter, 1/8" length (Amazon Part B000FP7TY0) (photo 13)

Shutdown Switch Parts:

  • 1 16mm Illuminated push button red momentary switch (Adafruit ID 1439) (photo 14)
  • Heat shrink tubing (1/16" diameter) (photo 15)
  • 4 12" Jumper wires (one end male, one end female) (Sparkfun Part number PRT-09385) (photo 16)
  • 1 470 Ohm 1/4 watt resistor (photo 17)

Hardware for the Faceplate:

  • 6 1/2" #4-40 Machine screws (I used black nylon screws for the black faceplates and zinc screws for the silver faceplates) (photo 19)
  • 6 #4-40 Machine screw nuts (photo 19)

Cables and Cable Mounting Hardware:

  • 1 USB type A male to type A male cable (photo 20)
  • 1 USB type A male to micro USB male cable (photo 21)
  • 2 USB power adapters (5 volts @ at least 1 amp each) (photo 22)
  • 3 Nylon cable clamps for 3/16" diameter cable (Jameco Part #173729) (photo 23)
  • 3 3/8" #6-32 Machine screws and nuts (photo 23)
  • Short cable ties (photo 24)

Case Parts:

  • 4 Self adhesive rubber/plastic feet/bumpers (height 1/4") (photo 25)
  • 1 18" x 24" Sheet 1/8" (3mm) birch plywood
  • 1 8" x 3" Sheet of 1/8" Sign lighting white 60% or 40% transparency acrylic (Available from TAP Plastics)

Finishing Materials:

  • Painter's tape (photo 26)
  • Flat black spray paint (photo 27)
  • Flat white spray paint (photo 27)
  • Metallic silver spray paint (photo 27)
  • Wood glue (photo 28)
  • Small brush (photo 28)
  • Adjustable band clamp for gluing (photo 29)

Tools (Not pictured):

  • Laser cutter and engraver
  • Soldering iron and solder
  • Wire cutters / wire snips
  • Wire strippers
  • Needle nose pliers
  • Screwdriver (small Philips head)
  • Heat gun, lighter, or matches for the heat shrink tubing

Equipment for installing Raspberry Pi software (Not pictured):

  • HDMI capable computer monitor
  • USB keyboard
  • USB mouse
  • Ethernet cable
<p>Hi! Great project here. Just wonder is there any alternatives to the NPN Optoisolator PS2501-1? I could not find it in the UK. Please reply soon. Cheers!</p>
<p>It looks like www.maplin.co.uk has optocouplers that will work.</p>
<p>I saw this on flipboard - god this just looks damn cool!</p>
<p>hey bruce.. led ckt board is not working on gpio 23.I hve repeated the whole process of software installation sveral times, but no success. I am powering up the board from the rpi itself..</p><p>I am using illuminating rocker swith instead of push swich?Does that have any effect , as it is also not illuminating on powering up the raspberry pi.</p><p>Is it necessary to give extrnal power supply of 1A as you mentioned?</p><p>Please reply soon!!!!!</p>
<p>The LCD needs to be powered separately. The three LEDs draw too much current to be powered by the Raspberry Pi. The switch needs to be a momentary switch - it needs to make contact briefly and then return to the off position - does your rocker switch do that or does it stay in place when you change positions - if it does the latter then you need to get a momentary switch. You say the switch doesn't illuminate - what kind of light is in the switch - is it a LED? If it's an LED then you need the right value resistor for it. Do you know the voltage requirement for the switch and the forward current draw for the LED in the switch? </p>
<p>Thanks for the reply Bruce</p><p>the ROCKER SWITCH is momentary and it has an LED</p><p>switch's current and voltage rating is</p><p> 6A-250V</p><p>10A-125V </p>
<p>What range does the box get? I'm looking to use the adapter in a LOS application (so no need to worry about walls, really). What's the range you've seen from it when there are no obstructions?</p><p>Also, do you have to plug the wifi adapter into a powered hub?</p>
<p>I've only tested it to about 25 feet. I'm not sure what the maximum range would be. I plugged the wifi adapter directly into the Raspberry Pi.</p>
<p>hey bruce....I am getting a message after the command - </p><p>tar piratebox ws_current.tar.gz </p><p>as , cannot find this file</p><p>What is thy solution for this?</p><p>Please reply as early as possible</p>
<p>Hi. From your post it looks like you didn't type the command correctly. </p><p>It's not: tar piratebox ws_current.tar.gz</p><p>The correct command is: tar xzf piratebox-ws_current.tar.gz</p><p>Try that and see if that works. </p>
The problem is solved brother....thanks for the reply
<p>I decided to take up this project, and through all adversity and learning new things on the way, I now have my very first Pi(rate) Box.</p><p>When I get to, Ill be building this into a chrome halloween skull and put the appropriate ports outside of the skull for the power, thumbdrives and ethernet. </p>
<p>Congrats on your first Piratebox! Your idea about the chrome skull sounds great. When you get it done please post a photo of it!</p>
How do I set up a raspberry pi rate box without any external circuit (of LEDs etc..) I just want to make a pirate box without any external circuit knowledge
<p>Instructions for making a Raspberry Pi Piratebox without the external circuits can be found here: </p><p>http://piratebox.cc/raspberry_pi:diy</p>
And I have a Dlink DWA-123 wireless adapter (usb dongle) will it run directly or any drivers have to be installed.. please help
<p>Very cool. Nice work! I did something vaguely similar with a cheapy generic $11 eBay travel router + a USB flash drive...I just set the router to not broadcast its SSID, and plugged into the router the flash drive containing the files I wanted to privately share. Then I setup LAN file sharing, so now I can hide the router in a stealth box with a 9v battery + LM7805 voltage regulator powering it. When a fellow &quot;agent&quot; is in range of the pre-shared GPS coordinates of the router (~15 feet) , they manually add the WiFi network in from the hidden but pre-shared SSID name and password. Then they can browse for and download wirelessly the files that are on the flash drive. But your instructable is quite a few levels more advanced, and far more clever from my quick project. :)</p>
<p>Love the numbered photographs. This is a very well-presented project.</p>
<p>Thanks for the feedback! I've written a lot of instructables and found that with unnumbered photos saying things like &quot;in the fourth photo&quot; could get confusing especially with a lot of photos so I started numbering them. It adds time to add the numbers but it actually makes it a bit easier to write the instructable and certainly a lot easier to follow.</p>
<p>How long did it take to make this Instructable? it is one of the larger ones I have seen!</p>
<p>I worked on this on and off over about two months but I would say it it was probably about a solid week or two of work. The actual building of the PirateBox was pretty quick: probably about about three days (including time for paint to dry). The most time consuming part was selecting which photos to use (I take a lot of photos as I built the project) and documenting the steps for the instructable. </p>
<p>talk2bruce, I am not able to figure out these two statements...</p><p>1) Using a text editor, edit the &quot;/etc/rc.local&quot; file and add the line below to the bottom of the file before the line with &quot;exit 0&quot;. Since &quot;/etc/rc.local&quot; is a system file you will need to use the sudo command when you start your editor - for example &quot;sudo nano /etc/rc.local&quot;. </p><p>2) Make sure to put the ampersand (&quot;&amp;&quot;) at the end of the line.</p><p>Please help me out as I am working on it.</p>
<p>Edit the &quot;/etc/rc.local&quot; file by issuing the following command on the command line:</p><p>sudo nano /etc/rc.local</p><p>when the editor has started and is displaying the contents of the file, you'll see that the last line of the file says &quot;exit 0&quot;. Insert a line above that looks like this:</p><p>python /home/pi/python_programs/rpi_halt_btn.py&amp;</p><p>Save the file.</p>
talk2bruce , can you provide me a technical paper or any sources for Piratebox using raspberry pi? I will be grateful to you.
<p>The official Raspberry Pi Piratebox web site is <a href="http://piratebox.cc/raspberry_pi" rel="nofollow"> http://piratebox.cc/raspberry_pi</a></p><p>The software on that site is easy to install and works great but is incompatible with the hardware in this instructable. See the last step of this instructable for more details.</p>
<p>Thanks a lot talk2bruce!!! </p>
<p>I am getting an &quot;ERROR 403: Forbidden&quot; indication when I attempt to get the </p><p>rpi_halt_btn program.</p><p>Any suggestions?</p>
<p>This is odd. I saw your post and then tried it myself and I got the 403 error as well. As I was trying to figure out why this was happening, it started working again. Since a 403 error comes from the server, it may have been a temporary problem in the Amazon S3 infrastructure. Can you try it again, see if you still get the error, and let me know if it persists? One workaround, by the way, would be to use an editor like nano to type in the programs and save them in the python_programs directory. The code is listed in step 20.</p>
<p>Very nice work. Just out of curiosity, what made you choose Raspbian over SliTaz?</p>
<p>I chose Raspbian for two reasons: (1) Raspbian was what the PirateBox software was originally made available on and (2) I had a lot of experience with Raspbian and that made it easy for me to determine how to hook my extensions for the shutdown switch and LED circuit board into the Raspbian system. I hadn't heard of SliTaz until I saw your comment: I'll have to check it out.</p>
<p>Hello, dnsmasq fails to start, gives me no debug issues, and I do not know what is wrong. Can you please help out?</p>
<p>Try issuing these commands and see if it fixes the problem:</p><p>sudo update-rc.d dnsmasq remove</p><p>sudo /etc/init.d/dnsmasq stop</p><p>sudo shutdown -r now</p>
<p>can we use your script for the power button with other projects that use Pi? I wnated to make a media center that has a power/on/off button. will this work for that as well?</p>
<p>Sure, you can use the script for the shutdown button in other <br>projects. I'm planning to use that script for some other Raspberry Pi <br>projects I have underway. The thing to remember is that the script <br>doesn't power down the Raspberry Pi, what it does is shutdown the <br>Raspbian operating system so that it's safe to remove the power. It's important to &quot;halt&quot; Raspbian before removing power because you could corrupt the file system without a clean shutdown. In addition to a shutdown button, if you want to have a on / off button for the Raspberry Pi, what you'd need to do is modify a USB cable to have the switch break the power connection. If you have any questions about how to do that, feel free to send me a private message and I can explain in more detail.</p>
<p>Awesome! That case is sweet! I'm thinking about doing something similar with my raspberry pi.</p>
<p>Yarr! Nice case. Well done project!</p>

About This Instructable


1,252 favorites


More by talk2bruce: Raspberry Pi Internet Monitor Laser Cut Raspberry Pi LCD Case Raspberry Pi Motion Sensitive Camera
Add instructable to: