Thread Rating:
  • 0 Vote(s) - 0 Average
WiFi Usb flash drive (WIP)
#1
The final scope is to remotely sent files to my Elegoo Mars 3D printer with the help of raspberry pi zero w board. (WIP)

Similar to The MagPi magazine's article the owner of photon printer (Will Koone) make a ready to use image file that can be found here
(https://drive.google.com/file/d/1sh5zXyo...QXdAzlZ43N)

I use Windows 7, and Putty to communicate with Pi. You need also one program to write the image to the microSD (like Etcher from Balena) and your favorite text editor (like Notepad++). It handy to have also an Ip scanner (like ipscan24) to find the IP of your pi.

original info pages:
https://magpi.raspberrypi.org/articles/p...lash-drive
https://www.facebook.com/groups/Anycubic...765643826/)

>Make WiFi USB flash driveĀ 

- Write the img to microSD (minimum SD size 4GB suggested size is 16GB)
- After finish, load again the SD and add two text files 'ssh' (without extension!!!) and 'wpa_supplicant.conf' (.conf !!!) inside the second one enter your wifi data (SSID-password). You can google the filename for sample (also I have add sample files).
- Remove the SD from computer and put it to the pi zero and power up it from power port.
- After pi boots (you can check the green light became steady on), run the ipscan24 to find the ip of the pi. If you can't find check again the data in wpa_supplicant.conf (when pi boots it delete the two extra files)
- run Putty and enter the ip of pi to make ssh connection. Default name will be pi and the password is raspberry. You don't need to change that if you have secure WiFi network at home.
-If all went ok so far, at windows Network you can see a new computer with name 'RASPBERRYPI' and with shared folder named 'usb'. This is the folder that we will sent the files to the printer.
- Because the initial folder space is the minimum (512MB) in order to fit the image to 4GB SD, you can run this command at the terminal (with putty)

sudo rm /photon.bin
sudo dd bs=1M if=/dev/zero of=/photon.bin count=8192
(NOTE: this will take some minutes to finish, don't power down the pi)
sudo mkdosfs /photon.bin -F 32 -I
sudo reboot now

(2048=2G, 4096=4G, 8192=8G and so on) Make sure you leave room for the OS.

Please note that after any reboot or halt the ssh connection with the putty is lost and you must start over.


>Connection with the Elegoo Mars:
Although in my laptop the pi zero working ok when connecting it with the 2nd usb port (NOT the power port) in my 3D printer there is problem with power. It cycles power on/off before pi zero loads properly. I have the newer board (w/o Lan port) and in info screen it says ChiTu L5.5 Series, Version v4.3.1
My temporary solution was 1st to power the pi zero with external power bank using the power port. After pi boots, I have connect the usb data cable to Elegoo Mars but with cutted (!!!) the red cable so do not pass power from my battery, back to my printer's board. Then I can normally see my files. 2nd solution: I also make a custom Y cable. One side with male USB and two female USB in parallel connection. Then FIRST power up the pi zero from the power port. AFTER boot ends (normally after couple seconds) THEN I connect the other USB cable to the data port of Pi Zero. After that I can see the files of shared folder. The drawback in this solution is that you have to disconnect the data cable after power off the printer. I need work with that....

>power on/off button:
adding a momentary switch to pins 5-6. It is safer to power down properly the pi zero, because you may have problems with the SD or worse with the board it self.

thru ssh (putty) run the command
curl https://pie.8bitjunkie.net/shutdown/setup-shutdown.sh | bash

after finished you must to edit the rc.local file
sudo nano /etc/rc.local
And right above 'exit 0' (last line) you must add the command:
sudo python /home/pi/scripts/shutdown.py &

Exit editor (Ctrl+X and choose Yes and press Enter, to save without change the filename)
sudo reboot

Original info at pages:
https://pie.8bitjunkie.net/retropie-shut...e-easy-way
https://www.dexterindustries.com/howto/r...t-startup/

>adding indicator led:
add a led between pins 6-8 with a resistor of about 300 Ohms for security. Pin 6 is our common negative pin so we use total 3 pins

connect the SD to computer and edit the file config.txt adding at the end the line
enable_uart=1

Original info at:
https://howchoo.com/g/ytzjyzy4m2e/build-...-indicator

This solution it cost to me about 16 euros for the pi board with the case. The rest are from salvage stuff.


Attached Files
.zip   sample_files.zip (Size: 408 bytes / Downloads: 28)
Reply


Messages In This Thread
WiFi Usb flash drive (WIP) - by demer - 02-29-2020, 01:02 PM
RE: WiFi Usb flash drive (WIP) - by alizobil - 05-28-2020, 04:41 AM
RE: WiFi Usb flash drive (WIP) - by martinronz - 06-12-2020, 05:54 AM
RE: WiFi Usb flash drive (WIP) - by Martian - 06-28-2020, 09:34 PM
RE: WiFi Usb flash drive (WIP) - by Van Valen - 11-08-2020, 08:31 AM
RE: WiFi Usb flash drive (WIP) - by Van Valen - 11-20-2020, 09:21 AM
RE: WiFi Usb flash drive (WIP) - by satgod - 12-11-2020, 09:37 PM
RE: WiFi Usb flash drive (WIP) - by Van Valen - 01-09-2021, 10:45 PM
RE: WiFi Usb flash drive (WIP) - by tech_romancer - 09-22-2022, 05:07 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)