☠️
The MalaMaker Wiki
  • Home
  • Projects
    • Halloween and Haunt
      • Caught on Camera
      • Costumes and Costume Props
        • Dumb and Dumber: Mutts Cuts Wagon
        • Ninja Turtle: Custom Shells
      • Tombstones
        • Stranger Things: Billy Hargrove
        • Hocus Pocus: Billy Butcherson Tombstone
        • Hocus Pocus: Emily Binx Tombstone
        • Frankenweenie: Sparky Tombstone
        • Mouse Hunt: Catzilla
        • The Statues Are Watching
      • Props and Decor
        • Foam Tattooing (Graphics Transfer)
        • Let it Grow... Lights
        • Moss (DIY)
        • Moss (Fear Finish)
        • Rust (Fear Finish)
        • Graveyard Entrance
        • Corner / Entrance Pillars
        • Wrought Iron Fencing
        • Finishing Techniques
        • Beetlejuice Arrow Sign Prop Replica
      • Electronics & Automations
        • Motion Sensor Array
        • Smart Lantern Upgrade
      • Fogger Hacks
        • Homemade Fog Fluid
        • Fog Machine Maintenance
        • Fog Distribution System
        • Smart Fog Controller Hack
      • Animatronics and Special Effects
      • Pumpkin Carving
    • Arcade Games
      • Skee Ball Xtreme
    • Games
      • Among Us (Live Action Play)
    • Toys
      • Lionel Ready To Play Train Set
        • Criss-Cross Track (LR2P)
        • Railroad Crossing (LR2P)
        • Track Bumper (LR2P)
        • 60 Degree Crisscross Track (LR2P)
        • Loco-Loader Express Track (LR2P)
        • Ramp and Elevated Track System (LR2P)
      • Playskool Express 1988 - 1991 Train Sets and Accessories
        • Locomotive Assembly and Maintenance (Playskool Express)
      • Matchbox Action Driver Compatible City Roads and Interstate
    • Hobby
      • Death Racer
        • Cast Track Shoes
        • Wheelie Bar Battery Cover
        • Kill Switch Relay Mod (Headshot Trigger)
    • Machines and Tools
      • Syil x4 CNC Mill Rebuild
      • Countertop Transport Cart
      • DIY Concrete Vibrator
      • Elegoo SLA Printer USB Network Storage
      • Duet3D Pick n Place with Openpnp
    • Home Automation
    • Casting (Resin and Silicone)
      • Recasting Rubber Axe Handles
      • Stage Pouring a Mold
    • Concrete Countertops
    • Covid-19
      • The MalaMask Project
  • TikTok (@malamaker86)
  • YouTube (The MalaMaker)
  • Photo Album
  • Maker86 Ind. Store
  • M86 Toys Store
  • Maker86 Industries
  • River City Labs (My MakerSpace)
Powered by GitBook
On this page
  • Supplies
  • Setting Up the Pi
  • Installing the OS
  • Post OS Install Pre-rec's
  • Configure the Mass Storage
  • Conclusion
  • Resources

Was this helpful?

  1. Projects
  2. Machines and Tools

Elegoo SLA Printer USB Network Storage

Sick of the USB thumb drive... make your printer smarter with network mass storage using a Raspberry Pi Zero!

PreviousDIY Concrete VibratorNextDuet3D Pick n Place with Openpnp

Last updated 7 days ago

Was this helpful?

Supplies

  • Raspberry Pi Zero W

  • Class 10 Micro SD Card (>= 32Gb)

  • Case

  • (Qty 2) USB to Micro USB

  • (5.5mm x 2.5mm - Male Plug)

  • (5.5mm x 2.5mm - Female Plug)

Setting Up the Pi

This instructional revolves more around setting up a device that can be used as a network mass storage device. I will focus on more of the hardware sides of things and when it comes to setting up the Pi refer you to instructionals I used to make this project possible.

Installing the OS

Post OS Install Pre-rec's

(1) Update apt

sudo apt update

(2) Install Python3 / PIP (It should already be installed)

sudo apt install python3-pip

Configure the Mass Storage

STEP-01 through STEP-08

STEP-09: Creating a Test file and Slices Directory

Now we are going to create a file and directory that will eventually be visible on the Elegoo printer. The Raspberry Pi Zero W should be plugged into the printer from the designated USB port on the pi and you should have a power supply hooked up to the pi as well. The stock USB port on the Elegoo does not supply enough power to power the pi.

sudo touch /mnt/usbshare/hello.world.txt
sudo mkdir /mnt/usbshare/Slices

STEP-10: Test mass storage device mode

Now comes the moment of truth. Let’s see whether the 3D printer is going to be friends with the Pi Zero W. The command below will enable USB mass storage device mode, and the Elegoo printer should pop up a dialogue box. If it doesn’t, you may need to back out of the menu to the main menu page and get back into the storage.

sudo modprobe g_mass_storage file=/piusb.bin stall=0 ro=0 removable=1

The printer should provide the file and directory we previously created on the printer screen.

Once you’re satisfied that all is well, try a dismount:

sudo modprobe -r g_mass_storage

STEP-11 through STEP 12

STEP-13

In order for the printer to detect any changes we’ve made over the network (for example, file or folder creations and deletions), it needs to be tricked into thinking that the USB device has been removed and reinserted.

We can use a Python library called watchdog (magpi.cc/2sLL1fi), which is designed for monitoring file system events and responding to them. Install this with the command below:

sudo pip3 install watchdog

We then need some code to start a timer whenever something changes in the shared folder. The timer is reset to zero every time a new change occurs, and the USB reconnect is only triggered if we see 30 seconds of inactivity after a change. This avoids spamming the printer while we’re copying over multiple files.

The article refers to a program written to do this. To download it, type:

sudo wget http://rpf.io/usbzw -O /usr/local/share/usb_share.py
sudo chmod +x /usr/local/share/usb_share.py

You will need to go into the usb_share.py program and modify line 7 to read like the following...

CMD_MOUNT = "modprobe g_mass_storage file=/piusb.bin stall=0 ro=0 removable=1"

To modify the program, type:

sudo nano /usr/local/share/usb_share.py

Press CTRL+O followed by Enter to save, and then CTRL+X to quit.

STEP-14

Conclusion

Now that you are done you should have a SLA printer that is a little smarter and more convenient to use when it comes to providing your slices to your printer.

Resources

Instructional:

Instructional:

There are many instructionals online to walk you through setting up your raspberry pi. I use the "" with the Raspberry Pi OS Lite image.

Once the SD card has the OS written you will need to enable ssh and configure wifi. Use the resource files below ("ssh" and "wpa_supplicant.conf") the "" article to configure these files for your network.

Follow the steps in "" but there are some tweaks and changes that will be noted here with the steps they pertain to.

Follow the instructions as they are originally written. ("")

Follow the instructions as they are originally written. ("")

Follow the instructions as they are originally written. ("")

Make a Pi Zero W Smart USB flash drive
Headless Pi Zero W Wifi Setup
Raspberry Pi Imager
Headless Pi Zero W Wifi Setup
Make a Pi Zero W Smart USB flash drive
Make a Pi Zero W Smart USB flash drive
Make a Pi Zero W Smart USB flash drive
Make a Pi Zero W Smart USB flash drive
Barrel Whip
Barrel Whip
USB Buck Converter
0B
ssh
149B
wpa_supplicant.conf