Benutzer-Werkzeuge

Webseiten-Werkzeuge


projekte:kameraslider

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Nächste Überarbeitung
Vorherige Überarbeitung
projekte:kameraslider [2016/03/10 19:24] – angelegt markusprojekte:kameraslider [2021/01/17 20:19] (aktuell) thorsten
Zeile 8: Zeile 8:
 # Bilddateiname relativ zum Ordner projekte: # Bilddateiname relativ zum Ordner projekte:
 # Wenn (noch) kein Bild vorhanden, bitte none.png lassen # Wenn (noch) kein Bild vorhanden, bitte none.png lassen
-imgname_img90   : Kameraschlitten/Bild_1.jpg+imgname_img90   : projekte:kameraschlitten:Bild_1.jpg
  
 # Links zu Seiten der Mitglieder, die am Projekt beteiligt sind, also intern:mitglieder:hubert (mehrere mit Komma getrennt) # Links zu Seiten der Mitglieder, die am Projekt beteiligt sind, also intern:mitglieder:hubert (mehrere mit Komma getrennt)
Zeile 29: Zeile 29:
  
 Der Schlitten läuft auf zwei parallel gelegten Edelstahl Stangen welcher über einen GT2 Zahnriemen mit einem Schrittmotor angetrieben wird. Die Steuerung erfolgt auf einem Raspberry Pi auf dem ein Skript mit freier Eingabe der Variablen (Belichtungszeit der Kamera, Schrittzahl bis zum nächsten Foto, Geschwindigkeit und Richtung) läuft. Der Schlitten läuft auf zwei parallel gelegten Edelstahl Stangen welcher über einen GT2 Zahnriemen mit einem Schrittmotor angetrieben wird. Die Steuerung erfolgt auf einem Raspberry Pi auf dem ein Skript mit freier Eingabe der Variablen (Belichtungszeit der Kamera, Schrittzahl bis zum nächsten Foto, Geschwindigkeit und Richtung) läuft.
 +
 +----
 +
 +**Hardware**
 +
 +-
  
 ---- ----
Zeile 35: Zeile 41:
  
 Das Python-Skript frägt am Anfang die benötigten Informationen wie oben genannt ab. Danach kommt die Initialisierung, damit der Schlitten an das Ende der Schiene fährt. Es folgt das Abfahren der Positionen bis zum anderen Ende der Schiene. Des weiteren sind Funktionen wie das automatische wegfahren des Schlittens vom Endanschlag und Schalterentprellung mittels Software im Skript integriert. Das Python-Skript frägt am Anfang die benötigten Informationen wie oben genannt ab. Danach kommt die Initialisierung, damit der Schlitten an das Ende der Schiene fährt. Es folgt das Abfahren der Positionen bis zum anderen Ende der Schiene. Des weiteren sind Funktionen wie das automatische wegfahren des Schlittens vom Endanschlag und Schalterentprellung mittels Software im Skript integriert.
-  *** Die Entprellung ist für einen sauberen Programmablauf notwendig, da evtl. Funktionen mehrmals aufgerufen werden.**+  *** Die Entprellung ist für einen sauberen Programmablauf notwendig, da sonst evtl. Funktionen mehrmals aufgerufen werden.**
  
 ---- ----
Zeile 53: Zeile 59:
   * 1x Spannungsversorgung min. 12V   * 1x Spannungsversorgung min. 12V
   * Xx Diverse Kabel   * Xx Diverse Kabel
 +  * 1x Raspberry Pi
 ---- ----
  
Zeile 245: Zeile 251:
  
  
 +
 +</file>
 +
 +<file C SLIDER_NO_UI.ino>
 +/*
 +SLIDER_NO_UI.ino
 +created by Markus Buecher
 +markus@lug-saar.de
 +
 +Feel free to contact me if you have any questions, ideas, critics or improvements.
 +
 +RELEASE NOTES
 +Please note that this Version doesn't contain an user interface (UI). You have to enter all values manually in the Parameter / Varaible section
 +in the head of this program. Feel free to copy this and build your own camslider. 
 +**Version 1.0**
 +    First release of the Arduino Program for Camslider.
 +    ***WORKING:***
 +    -Initialisation
 +    -Move from point to point
 +    -Auto Reset after reaching the other end of line
 +
 +    ***NOT WORKING / NOT IMPLEMENTED***
 +    -RUNTIME (means to set a time which gives the duration of the real time duration of a timelapse for example)
 +     --> does not automatically calculate the amount of Move Step and Exposure Time
 +    -Cameracontrol
 +    -lots of more ideas
 +*/
 +
 +//Pinout
 +const int END_STOP_LEFT = 5;      //Left Endstop
 +const int END_STOP_RIGHT = 6;     //Right Endstop
 +const int STEP_SIGNAL = 3;        //Step Signal for Pololu --> STEP
 +const int DIRECTION_SIGNAL = 4;   //Direction Signal for Pololu --> DIR
 +const int LED_INDICATOR = 2;      //LED-Pin for Status Signal
 +
 +//Global Variables
 +
 +int STATE = 0;         //0 = Slider somewhere -> Initialisation; 1 = Initialisation completed, jump from point to point; 2 = Go home again; 3 = Waiting for reset
 +int RUNTIME = 1000;     //RUNTIME in seconds 60s = 1m; 120s = 2m; 600s = 10m; 3600s = 1h; 7200 = 2h. Entered values will be calculated into MoveTime and ExposureTime
 +int long STEP_COUNTER = 0;        //Counts the amounts of Step-Signals from the Arduino to the Driver
 +int MOVE_STEP_FROM_SWITCH = 200;  //defines the amount of steps, the cartridge moves back from a collision with the endswitch
 +int MOVE_STEP = 1200;             //number of Steps made  between each photo
 +int EXPOSURE_TIME = 1;            //Exposuretime
 +int FREQUENCY = 3000;             //Set frequency for Step Signal (Steps per Second)
 +
 +void setup() {                    //set pinModes to In- or Output
 + pinMode(END_STOP_LEFT, INPUT);
 + pinMode(END_STOP_RIGHT, INPUT);
 + pinMode(LED_INDICATOR, OUTPUT);
 + pinMode(STEP_SIGNAL, OUTPUT);
 + pinMode(DIRECTION_SIGNAL, OUTPUT);
 +}
 +
 +void step() {                     //this function is generating the Logic HIGH to LOW Signal for Stepper Driver
 + digitalWrite(STEP_SIGNAL, HIGH);
 + delayMicroseconds(1000000/(FREQUENCY));
 + digitalWrite(STEP_SIGNAL, LOW);
 + delayMicroseconds(1000000/(FREQUENCY));
 + ++STEP_COUNTER;
 +}
 +
 +void loop() {                     //Main Loop
 +
 +switch (STATE) {                  //Switch/Case Statement in the loop function. The State to the number can be found above in the description of STATE Variable
 +     case 0:                     //Initialisation
 +       while (digitalRead(END_STOP_RIGHT) == LOW) {
 +       digitalWrite(DIRECTION_SIGNAL, LOW);
 +       step();
 +          if (digitalRead(END_STOP_RIGHT) == HIGH) {
 +            digitalWrite(DIRECTION_SIGNAL, HIGH);
 +            STEP_COUNTER = 0;
 +            while (STEP_COUNTER <= MOVE_STEP_FROM_SWITCH) {
 +              step();
 +            }
 +          STATE = 1;
 +          }
 +          break;
 +        }
 +        break;
 +
 +     case 1:                     //Take Photos with specified delay, stepwidth and exposuretime   
 +        delay(1000*(EXPOSURE_TIME));          
 +        while (1) {
 +          digitalWrite(DIRECTION_SIGNAL, HIGH);
 +          STEP_COUNTER = 0;
 +          while (STEP_COUNTER <= MOVE_STEP) {              
 +            if (digitalRead(END_STOP_LEFT) == HIGH) {
 +              STATE = 2;
 +              break;
 +            }
 +            else
 +              step();
 +          }
 +          break;
 +        }
 +
 +      case 2:                     //Move back to home (2nd Initialisation)
 +        while (digitalRead(END_STOP_RIGHT) == LOW) {
 +          digitalWrite(DIRECTION_SIGNAL, LOW);
 +          step();
 +          if (digitalRead(END_STOP_RIGHT) == HIGH) {
 +            digitalWrite(DIRECTION_SIGNAL, HIGH);
 +            STEP_COUNTER = 0;
 +            while (STEP_COUNTER <= MOVE_STEP_FROM_SWITCH) {
 +              step();
 +            }
 +          STATE = 3;
 +          }
 +          break;
 +        }
 +        break;
 +       
 +       case 3:                    //Indicates with a LED that the Slider is ready with taking photos
 +        while(1) {
 +          digitalWrite(LED_INDICATOR = HIGH);
 +          delay(200);
 +          digitalWrite(LED_INDICATOR = LOW);
 +          delay(200);
 +        
 +        }
 +
 +       break;
 + }
 +}
  
 </file> </file>
projekte/kameraslider.1457637856.txt.gz · Zuletzt geändert: 2021/01/17 01:07 (Externe Bearbeitung)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki