Jump to content

Automatic dumping station

So, I had this idea about making an automatic dumping station for memory cards, that I kinda wanted to use at an upcoming LAN event.
The idea was to have a sort of station, where both me and others in the photo crew could just insert a memory card in to a memory card reader, and then the "station" would automatically copy them over to a new folder on a hard drive, and once it was done copying the files, it could format the memory card (and maybe make a sound to signal it was done, just to remove the need for a monitor), having the momry card ready for anoither round of photography.
I was also thinking that it should maybe be network attached as well, so that we'd be able to access the files for editing,withoiut having to move around on the hard drive, and for the ability to upload photos to it, if the station were occupied.

 

I have a Raspberry Pi 3B+ that I thought could be used for this, together with an external HDD, and a multi memory card reader (so that I have support for both SD and CF cards). Currently we're only 3 people in the photo crew, which is why I thought this would be decent equipment for the idea, my big problem however is that, whilst I think it's a great idea, I really don't know how to actually do it...
 

My big questions are: 

  • What OS would be the most practical for this? 
  • Which programming language would be the most suitable?
  • And just, how would you do it?

I'm still relatively fresh to programming, trying my best to learn, so any help, suggestions and/or ideas would be highly appreciated.

 

I also want to apologize for any bad English here (grammar, spelling, phrasing etc.), it's not my native language, but I still hope you understand. Thank you

Link to comment
Share on other sites

Link to post
Share on other sites

Would you trust your cobbled up code with your photographs?

By the time you add the batteries (maybe a usb power bank) and everything you get a bulky solution.

 

Cheapest would probably be to buy a refurbished laptop with one or several USB 3.0 ports and maybe a gigabit network card .. you'll still have a wireless card inside it. Or a tablet.

You can dump the media to the hard drive and zip it , or make a disk image of the card using imgBurn or any other software and then in background queue it for upload to a remote server (for example a ftp / ftps server)

You could configure a ftp client to monitor a folder and upload everything coming into a folder, to a remote location.

So process would  be copy and zip or make image, when done move image to 'ready for upload' folder, quick format the card.

 

Based on your name you're probably in Europe, Norway, Sweden ... not sure about the refurbished situation, in US they're fairly cheap.

 

ex. 55$ for this slow thing ... but fast enough for your needs: https://www.newegg.com/black-dell-latitude-2120-everyday-value/p/1TS-000A-00YY1

Optionally, replace the aging hdd with a 500-1TB sata SSD and you're golden.

 

If you want something ligher, 110$ gets you a lenovo : https://www.newegg.com/p/1TS-000E-0EEV4

Lenovo ThinkPad X131e 3372-3FU 11.6" Notebook AMD E1-1200 (1.4 GHz), 2GB RAM, 320GB HDD + Fitted Sleeve Case

  • 1.4GHz AMD E1-1200 Accelerated Dual-Core
  • 2GB of 1600MHz DDR3 RAM
  • 320GB 7200rpm Hard Drive
  • Integrated AMD Radeon HD 7310 Graphics
  • 11.6" HD Antiglare LED-Backlit Display
  • 1366 x 768 Native Resolution
  • 4-in-1 Media Card Reader
  • 802.11b/g/n Wi-Fi, Bluetooth 4.0
  • Integrated Webcam, Microphone & Speakers
  • Windows 7 Professional (64-bit)

 

In the tablet department, here's a Dell tablet for 100$ : https://www.newegg.com/p/N82E16834296548

Dell Venue 11 Pro Tablet Intel Atom Z3770 X4 1.46GHz 10.8" (Black)

  • 10.8" Full HD 1920 x 1080
  • Intel Atom 1.46 GHz
  • 2 GB Memory, 64 GB SSD
  • 11.3 x 6.9 x 0.4 < 2lbs
  • Windows 8.1
  • Dell Venue 11 Pro 10.8" Capacitive IPS Touchscreen Tablet; Microsoft Windows 8.1 32-bit pre-installed; AC power adapter; USB cable

 

plug one of those usb hubs with gigabit network built in and an external card reader and hard drive and you have a tiny package.

 

Link to comment
Share on other sites

Link to post
Share on other sites

on the name thing, yes, I'm from Norway.
Batteries: Not needed, as I'd be able to have it running from a wall adapter

Refurbsihed here in Norway is *demonitized*, as most people for some reason believe they can re-sell their old things at retail price, so that laptops like the ones you've found, quuickly costs from 5000 NOK (roughly 500 USD)

I wanted to keep it on an RPi simply because of the physical space it takes.
Based on some searching I've done earlier today, could be using an FTP server to connect to it, and do automatic "backups" of the memory  cards, but skipping the formatting part (can be done in cameras after all)
Probably not gonna have it done for this LAN anyways, but I'll prototype it in my sparetime until I'm happy then

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know the specifics for Linux  (Should be very similar operation but different API's) but in Windows you could use GetLogicalDrives() in the File API of windows to detect the drive and any other relevant information. From there read the file as a binary stream which then you can use the File API again to create a new directory and a new file which you stream the data from the SD card to the newly created file. For piece of mind check that the file is complete and then you can use the same api to delete the contents of the SD card so that its ready to go again. 

 

This is assuming C++ but there should be bindings for just about any language.

 

 

*edit* 

A easier option actually might be https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfileexa as its a copy and write in one. 

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

If you're inexperienced with software development, I'd suggeset to start off with a simple programming language.

Since you're relying on a rpi, I'd suggest going for Python.

What you'd have to do, is basically loop through the disks, detect new drives (not sure if you could attach it to a system event for when new drive is connected, to drop the loop?) , go to a clone/copy function, format, then possibly use the rpi GPIO to display a LED for "done".

 

Luckily for us, the internet is overflowing with helpful articles

Detecting new USB devices
https://stackoverflow.com/questions/47495206/how-to-detect-a-new-usb-device-is-connected-on-python

 

Python copy:

https://docs.python.org/3/library/copy.html

https://stackoverflow.com/questions/123198/how-do-i-copy-a-file-in-python

 

Python format drive
https://stackoverflow.com/questions/27568706/format-drive-in-python

 

Raspberry pi/Python GPIO
https://thepihut.com/blogs/raspberry-pi-tutorials/27968772-turning-on-an-led-with-your-raspberry-pis-gpio-pins

 

Not sure if all of these articles are completely up-to-date and working with RPI/Linux, but it should give you an general idea for the path you should take

Edited by Mortenrb
Link to comment
Share on other sites

Link to post
Share on other sites

I'll try that first thing after work tomorrow, thanks! 
I'll have to read up on them, but from a general overlook now, I think this could work.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×