Introduction: EAL - SmartStorage

Picture of EAL - SmartStorage

This is a projekt for SmartStorage by Kasper Borger Tulinius

Step 1: Methods

Picture of Methods

For this project i have used a few different programs.

The machine itself is created in 123D Design and printete on a DaVinci jr. printer

Not the best but very simple and user friendly.

It is run by an Arduino programmed in C.

I have used Visual Studio 2017 to make a WindowsFormApp (C#).

Step 2: Code for the Arduino

Picture of Code for the Arduino

For the machine itself I’ve used an Arduino Mega. It is programmed in C. The machine is very simple. It runs a simple sequence to get a shelf and present it for the operator.

The motors i've used are 2 small stepper motors driven by 2 SBT0811.

To control the machine i've made an app that communicates by the com port.

#include "Stepper.h"
#define STEPS 32  //Number of steps for rev of internal shaft
                  //2048 steps for one rev of externaæ shaft

int cmd;                   //Fra WinApp
int posZero = 0;
int posOne = 1000;
int posTwo= 1500; 
int posThree = 2000;
int grab = 100;
int deliver = -100;  
int steps_extractor_out = 512;
int steps_extractor_back = -512;


Stepper hoist(STEPS, 8, 10, 9, 11);
Stepper extractor(STEPS, 2,3,4,5);

void setup() 
  {
    
  }  

void loop() 
{
  Serial.begin(9600);
  cmd = Serial.read();
 
     if (cmd == 1)
    {
      Serial.end();
      delay(1000);
    }
    else if (cmd == 0)
    {
      hoist.setSpeed(600);
      hoist.step(posOne);
      delay(200);
      extractor.setSpeed(300);
      extractor.step(steps_extractor_out);
      delay(200);
      hoist.setSpeed(100);
      hoist.step(grab);
      delay(200);
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.setSpeed(600);
      hoist.step(-posOne-grab);
      delay(200); extractor.step(steps_extractor_out);
      delay(5000);  //EVT CMD FRA WINaPP
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.step(posOne+grab);
      delay(200);
      extractor.step(steps_extractor_out);
      delay(200);
      hoist.setSpeed(100);
      hoist.step(-grab);
      delay(200);
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.setSpeed(600);
      hoist.step(-posOne);
      Serial.begin(9600);
      Serial.println(0);
      Serial.end();
    }
    else if (cmd == 2)
    {
      hoist.setSpeed(600);
      hoist.step(posTwo);
      delay(200);
      extractor.setSpeed(300);
      extractor.step(steps_extractor_out);
      delay(200);
      hoist.setSpeed(100);
      hoist.step(grab);
      delay(200);
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.setSpeed(600);
      hoist.step(-posTwo-grab);
      delay(200); extractor.step(steps_extractor_out);
      delay(5000);  //EVT CMD FRA WINaPP
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.step(posTwo+grab);
      delay(200);
      extractor.step(steps_extractor_out);
      delay(200);
      hoist.setSpeed(100);
      hoist.step(-grab);
      delay(200);
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.setSpeed(600);
      hoist.step(-posTwo);
      Serial.begin(9600);
      Serial.println(0);
      Serial.end();
    }
    else if (cmd == 3)
    {
      hoist.setSpeed(600);
      hoist.step(posThree);
      delay(200);
      extractor.setSpeed(300);
      extractor.step(steps_extractor_out);
      delay(200);
      hoist.setSpeed(100);
      hoist.step(grab);
      delay(200);
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.setSpeed(600);
      hoist.step(-posThree-grab);
      delay(200); extractor.step(steps_extractor_out);
      delay(5000);  //EVT CMD FRA WINaPP
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.step(posThree+grab);
      delay(200);
      extractor.step(steps_extractor_out);
      delay(200);
      hoist.setSpeed(100);
      hoist.step(-grab);
      delay(200);
      extractor.step(steps_extractor_back);
      delay(200);
      hoist.setSpeed(600);
      hoist.step(-posThree);
      Serial.begin(9600);
      Serial.println(0);
      Serial.end();
    }
}

<br>

Step 3: App

Picture of App

The app i've created is made in VisualStudio 2017.

It is a windows forms applikation which in this case includes an SQL-database.

The database has 3 tables which contains info on the user, location of each machine and the content of each machine.

When starting the app you login with your name and pw.

Then you will choose which machine to operate and the contents of each drawer will be presentet for you.

Then you can simply press "get drawer" and the machine will get the drawer and you can the update the amount of the given item you've taken or filed in.

Comments

About This Instructable

139views

2favorites

More by KasperT1:EAL - SmartStorageEAL M&M Sorting Machine
Add instructable to: