Raspberry Pi Pocket Cloud Server

by tobychui in Circuits > Raspberry Pi

24266 Views, 308 Favorites, 0 Comments

Raspberry Pi Pocket Cloud Server

banner.png

A few months ago, I saw some advertisement on Kickstarter regarding a portable SSD that allows you to store your file on the go. I always want an off-grid storage solution for my devices as a developer. However, a portable SSD is not the only thing you need for off grid storage. You also needs a data cable, adapters for your laptop, smartphone and different devices etc.

On the other hand, I am building myself a cloud storage solution just like the Synology DSM in my previous projects (In case you don't know what is DSM, it is an operation system for Synology NAS named "Disk Station").

Why can't I just combine both of them into an ultra portable "Cloud Server"?

That is why I started this project a few months ago, for building a portable NAS devices powered by a build in battery with its own WiFi AP and storage pools.

Gather Your Materials

2020-12-01_15-59-07.png

The parts that is required to build this project is fairly simple

  1. Raspberry Pi Zero W
  2. LiPo battery with the correct size
  3. Cheap, single cell 18650 power bank (The picture showing the one type that I use, with that particular power regulator)
  4. RT3070 USB WiFi Adapter (or any adapter that Raspberry Pi OS support with AP mode)
  5. FE1.1S USB Hub Module (Or just get the chip and solider directly on its pins)
  6. Micro SD card of your desired size

You can also use different USB hubs and WiFi module depending on your resources and where you live. Ebay is a good place to start gathering them but sometime you might want to get a new one (like SD card maybe?) if stability is one of your highest concern in building this project.

Connect Everything Together

structure diagram.png
DIY Portable Raspberry pi zero w NAS

The next step is to connect everything together.

The structure of the circuit is shown in the diagram above. If you do not need the AP mode of the system, feel free to remove the RT3070 WiFi Adapter.

The attached video shows my early attempt to build the Portable Cloud Server. After that, I have re-arranged many parts to make it even smaller. You can see them in my later steps.

You can also optionally add a switch between the power bank PCB and the Pi zero if your power bank PCB didn't have a button included. But in most of the case, your power bank PCB should have a button for controlling the power on / off.

Completed Electronic Parts

DSC_2018.JPG
DSC_2019.JPG
DSC_2020.JPG
DSC_2021.JPG
DSC_2022.JPG
DSC_2023.JPG
DSC_2024.JPG

The completed electronic parts should looks like this.

The pi zero w is placed on top of the LiPo and the USB hub module and power bank PCB is held in place by some epoxy glue.

And you should also make sure to glue the USB port while the USB drive is inserted to prevent placing the two port too close to each other.

The design here use 2 x 1200mAh LiPo which under high load, can works around 45 min to 1 hour. However, depending on what OS and software you are planning to run on this pocket server, the run time might be somewhat different.

3D Printing Cases

untitled.4.png

The 3D Printing case of the system is separated into two parts, the top cover and the base. An the two parts is hold together with three M3 x 10 screws. The model files are attached above. You can also edit the ipt files with Autodesk Inventor.

Housing the Electronics

DSC_2017.JPG
DSC_2016.JPG
DSC_2014.JPG
DSC_2015.JPG

After 3D printing the case, now you can put the electronic parts into the casing.

I printed mine with PLA at 0.15mm per layer for the surface smoothness. You can also print with other material of your choices as well as other colors.

After assembling the case, congratulation!

Now you have completed the hardware section of the project!

Next, lets move on to the software part of this project.

The Choice of Software and Why?

2020-12-01_16-15-21.png

In most of the instructables, Open Media Vault (OMV) or FreeNAs is used as the "standard" for any Raspberry Pi NAS / Server build. But I want to go a bit further than that:

Building my own Operating System for my NAS system!

That is why in the remaining part of this Instructable, I will be mentioning how to install my own Open Source NAS Operating System into my DIY Raspberry Pi Cloud Server.


Yes, the picture above is the OS I wrote for my own NAS system. If you are in a hurry, you can check it out over here: https://github.com/tobychui/arozos

ArozOS!

arozos Web Desktop System for Raspberry Pi v1.103 Demo
2020-12-01_16-17-38.png

ArozOS is a self developed cloud platform that support Raspberry Pis and other ARM SBCs. You can get it here:

https://github.com/tobychui/arozos

The main reason that I write my own NAS OS is due to the other open source solution are written in PHP which is slow. Using Go(lang) to write a new system can better ensure I can use every little remaining processing power on the Raspberry Pi series.

If you are using other SBCs like orange pi, you might need to download the pre-compiled binary and setup the Linux environment yourself. However, as I have already built a version for the Raspberry Pi, you can just download it from the image list in the github repo README file.

Scroll to the section labeled "For Raspberry Pi (For Raspberry Pi 4B+)" and select the latest image.

Once the image is downloaded, following the steps below to install the image to your SD card. As these steps are taught by many instructables, I am not gonna to get into detail here. If you have no idea how to burn an image into the SD card, you can take a look at this Instructable, but replace the downloaded image with the one download from the Github repo.

  1. Unzip the compressed file with 7zip.
  2. Download Win32 DiskImager
  3. Burn the extracted image into the SD card using the Win32 Disk Imager
  4. Connect to your pi using Putty, login with the default pi / raspberry password
  5. Expand the file system using "sudo raspi-config"
  6. Reboot

The video attached above showcasing my ArozOS system web desktop mode in action.

Create Your First Account on Your Pocket Cloud Server

2020-12-01_16-23-31.png
2020-12-01_16-25-35.png
2020-12-01_16-25-45.png

After starting up the server, you will see a new devices pop up in your Network Neighborhood.

Double click the icon and you will be redirected to the registration interface. To create an account, follow the steps below.

  1. Enter username and password for your default administrator account
  2. Click "Create"
  3. Login using the newly created account
  4. You will be redirected to your web desktop

Setup Your Desktop and Done!

2020-12-01_16-27-40.png
3.png
4.png

Similar to your Windows laptop, you can create shortcuts, open file explorer and do stuffs with it, all within your Raspberry Pi zero w.

In my case, I prefer putting a shortcut of File Explorer and some of my commonly used apps on the desktop so I can access them easily when I launch the system.

The system also support mobile interface, aka you can login the system with your mobile phone and the system will redirect you to the Mobile interface of the system that also allow easy access to all your musics, videos and files that you want on the go.

Future Development?

Regarding the hardware design, I think it is quite optimal as it is small, light, portable and easy maintainable. Of course if there are faster SBCs with the same form factor of the pi zero w, I might be upgrading the design in the future. But for current usage for storing script files, some musics and documents, I think it is good enough.

For the ArozOS software, it is still work in progress and many things will be changing monthly. If you have any suggestion or want some custom features on the system, feel free to create a new issue over https://github.com/tobychui/arozos

I will get back to you once I have free time to do so :P

Thanks so much for reading this Instrutable. Have a nice day :))

Appendix 1: Complete Wiring Diagram

ArOZ Portable Circuit Diagram.png

As some reader suggest and requested a full wiring diagram, here it is.

However, I cannot provide a detail wiring diagram on each module because they are just too complex and / or not easily obtainable without doing reverse engineering on the purchased module. The diagram above shows the complete wiring diagram that I have implemented in my design that should be able to get you started.

Appendix 2: LiPo Parallel Connection

2020-12-08_15-54-21.png

As one of the reader raise this question (or concern) regarding parallel connecting two LiPo with one charger.

YOU CANNOT DO THIS WITH 18650 OR LIPO DESIGNED FOR RC TOYS.

The reason why in this project, two LiPo can be connected in parallel without balance charger is that both LiPo has an internal soldered protection circuit with DW01 IC

You have to use those LiPos design for mobile devices like those cheap Tablets or phone that contain a build in protection circuit (with over voltage protection). If you are not sure if you LiPo contain such a protection circuit, you can try to peal off the Kapton tape on the top part of the LiPo and see if there is any PCB with small chips on it. If yes, it is mostly protected.

If you are not sure your battery can be parallel connected like mine, just use one big LiPo instead of two smaller one for maximum safety.