Raspberry Pi Pocket Cloud Server

21,276

296

17

Introduction: Raspberry Pi Pocket Cloud Server

About: University student in Hong Kong, one of the developer of ArOZ Online Project. I love making something no one has thought of. If you like making things that seems not possible, send me a message to share your i…

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.

Step 1: Gather Your Materials

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.

Step 2: Connect Everything Together

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.

Step 3: Completed Electronic Parts

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.

Step 4: 3D Printing Cases

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.

Step 5: Housing the Electronics

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.

Step 6: The Choice of Software and Why?

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

Step 7: ArozOS!

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.

Step 8: Create Your First Account on Your Pocket Cloud Server

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

Step 9: Setup Your Desktop and Done!

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.

Step 10: 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 :))

Step 11: Appendix 1: Complete Wiring Diagram

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.

Step 12: Appendix 2: LiPo Parallel Connection

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.

Battery Powered Contest

Second Prize in the
Battery Powered Contest

Be the First to Share

    Recommendations

    • Make It Bridge

      Make It Bridge
    • For the Home Contest

      For the Home Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge

    17 Comments

    1
    Ace44
    Ace44

    2 years ago

    Awesome work with the video featuring ArOZ OS. It's amazing that so much can be done via ArOZ OS. Thanks for your awesome tutorial and for the appendix!
    Keep up the hard work :)

    0
    Solderdot
    Solderdot

    2 years ago

    When it comes to switching on and off (especially switching off) do you simply cut the power or does a proper shut down take place?
    How does charging the PowerBank take place? Often PowerBanks are charged via the same port used to power other devices, so it is impossible to charge the PowerBank while supplying the other device...

    1
    tobychui
    tobychui

    Reply 2 years ago

    I am not sure which power bank brand you are referring to but mine do supply voltage while it is being charged. My solution to your problem will be adding a diode like the diagram below to bypass the PCB when charging. Use a shockley diode for less voltage drop if needed.

    2020-12-08_16-13-41.png
    1
    Ever_Smaller
    Ever_Smaller

    2 years ago

    I am a little concerned about the power switch: normally a Linux-based OS prefers to have a graceful power down through software command rather than a hard power off. Turning off the power without flushing out open files can result in data loss and file corruption. How does your ArozOS safeguard files in view of this hard power off?

    0
    tobychui
    tobychui

    Reply 2 years ago

    It is nice for you to raise this concern. This switch button is not for shutting down the pi zero w. It is for turning on the pi instead. To shutdown the system, use the "Power Off" button in the top menu in the OS's web UI.

    2020-12-08_15-57-59.png
    0
    aandd.tech.solutions
    aandd.tech.solutions

    Question 2 years ago

    Hey! This is amazing and I'll definitely be trying this out. How did you calculate the correct battery capacity?

    1
    tobychui
    tobychui

    Answer 2 years ago

    Hi! Why you need to calculate the battery capacity while it is labelled on the battery package?

    0
    qazwsxedcrfv000
    qazwsxedcrfv000

    2 years ago

    I can't see quite clearly from the photos. But, by the schematic, are you having two individual single-cell LiPo connected in parallel?

    0
    tobychui
    tobychui

    Reply 2 years ago

    Yes, they are connected in parallel. The reason I can connect the battery like this without balancing issues is that the battery I use came with a build in DW01 protection circuit board and it is soldered internally at the battery terminal. If you tear down the battery, you will see this inside (please refer to the attached image).

    2020-12-08_15-54-21.png
    0
    krishna.mohan.ec
    krishna.mohan.ec

    2 years ago

    hi,
    i used raspberry pi z w, written the os, powered on but no wifi network found?
    tried after plugging a wifi device but nothing happened ?
    whats the issue!

    photo_2020-12-06_18-48-27.jpg
    1
    Gibo65
    Gibo65

    Question 2 years ago

    HI, good job, eng toby! ;_)
    ...where is MT3608 Step Up Boost module?
    Anyway on FE1.1S you can solder a smd led to show activity and also 12Mhz crystal quartz to regulation synk... (maybe in my scheme switch negative out pole is wrong)

    NAS_RPI.jpg
    0
    tobychui
    tobychui

    Answer 2 years ago

    Hi! Nice of you for pointing it out.
    The one I made in the video uses two modules (TP4056 + MT3608) to handle battery charging and voltage step up. In the later builds, I replace these two modules with one single power bank PCB which can handle charging and voltage step up in one chip. Hence, the latest wiring diagram do not contains the step up regulator.

    1
    aadithya_s
    aadithya_s

    2 years ago

    Hi, This setup was what I was looking for. However, I am having trouble following the video. Would it be possible to upload the wiring diagram? Thanks a lot.

    0
    tobychui
    tobychui

    Reply 2 years ago

    Hi, I have added the diagram in the appendix section. Hope it helps :)

    2
    rch
    rch

    Question 2 years ago

    Nice setup. Good job. I will have to check out your GitHub page and study your OS.
    One quick question. Since the Raspberry Pi Zero W has WiFi and Bluetooth built in, why is a WiFi adapter also necessary? The Pi can already create an AP using its built-in chipset.
    Thanks.

    0
    tobychui
    tobychui

    Answer 2 years ago

    Hi! That is true that the pi zero w already got a built in WiFi interface, separating the WiFi AP and Client into two hardware interface can make sure the AP bandwidth won't be affected by the WiFi Client bandwidth usage. Hence, the overall IO of the system is higher when setup this way.