Git Product home page Git Product logo

roboscan's Introduction

RoboScan

This is the source code for a Lego+Raspberry Pi-powered analog film roll scanner. Watch it in action: RoboScan

Parts

You'll need these items to build RoboScan:

Part 1: Wiring

Diagram

Roboscan wiring diagram

(made using Fritzing with the help of parts from e-radionica.com and Blomquist)

ULN2003A wiring

Put a 50V, 47 μF capacitor between the LED+ and LED - pins of the driver.

ULN2003A Stepper Motor driver Raspberry Pi
IN1 GPIO 5
IN2 GPIO 6
IN3 GPIO 13
IN4 GPIO 19
POWER+ 5V power (such as the one next to the Ground)
POWER - Ground (such as the one next to the 5V power)

Recom Power RCD-24-0.70/PL/B Backlight LED driver wiring

Recom Power RCD-24-0.70/PL/B Raspberry Pi
1 - +Vin 5V power (the one not already used by the stepper motor)
3 - PWM/ON/OFF GPIO 18
4 - GND Ground (such as the one next to the GPIO 18)

Alternative: Sparkfun FemtoBuck Backlight LED driver wiring

Untested - make sure to solder the jumper that can be closed with a glob of solder to double the output current from 330mA to 660mA.

Sparkfun FemtoBuck LED Driver Raspberry Pi
V-/PGND Ground (any remaining)
V+/VIN 5V power (the one not already used by the stepper motor)
D-/DGND Ground (such as the one next to the GPIO 18)
D+/CTRL GPIO 18

Part 2: Software installation

Prepare the Raspberry Pi

Follow Raspberry foundation documentation, such as: https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up. Tip: you can set the hostname of your Raspberry Pi to "piscanner" as it's what's used in this tutorial. You can use raspi-config for this.

Install Docker

The easiest is to use the "convenience script" as described here: https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script.

In a nutshell:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add your user to the docker group
sudo groupadd docker
sudo usermod -aG docker $USER

Install docker-compose

Full docker-compose installation instructions are available here: https://docs.docker.com/compose/install/#install-compose-on-linux-systems.

On Raspbian, the easiest is to install it through Python's pip:

# Install Python3 and pip
sudo apt install python3 python3-pip
# Install docker-compose
sudo pip install docker-compose

Clone this repository on your Raspberry Pi

git clone https://github.com/bezineb5/RoboScan.git
cd RoboScan

Start the application

Now, you will ask docker to build and start the application. This might take a while (30-120 minutes).

cd docker
docker-compose up -d --build

It will start all components and restart them at reboot.

Part 3: Using RoboScan

The camera must be connected to the Raspberry Pi via USB. It must be compatible with libgphoto2.

Connect to the web interface

Simply navigate to http://piscanner/ (adjust the hostname to your Raspberry Pi)

Optional: Google Coral TPU

You can improve the machine learning inference performance by using a Google Coral Edge TPU USB Accelerator plugged on a USB port of the Raspberry Pi. To do so, you have to change the file src/Dockerfile. Replace:

CMD ["python", "webapp.py", "--destination", "/storage/share", "--archive", "/storage/archive", "--temp", "/storage/tmp"]

by:

CMD ["python", "webapp.py", "-tpu", "--destination", "/storage/share", "--archive", "/storage/archive", "--temp", "/storage/tmp"]

Optional: for developers

The easiest is to code on you PC and deploy docker containers remotely. To do so, enable remote access to the docker daemon.

# Set the DOCKERHOST variable (only once)
# Adjust the hostname to your Raspberry Pi
export DOCKER_HOST=tcp://piscanner.local:2376 DOCKER_TLS_VERIFY=

# Then deploy as usual
cd docker
docker-compose up -d
cd ..

roboscan's People

Contributors

bezineb5 avatar dependabot[bot] avatar willyfrog avatar mhasbini avatar och29 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.