Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
emielbeus
Published

Simple Welding Bot Feedback

This is my first dive into electronics. I have learned a lot so far but I would like to get some feedback on my project. Thank you!

BeginnerWork in progress2,147
Simple Welding Bot Feedback

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DC motor (generic)
4,5/15 V coalbrush
×1
Relay (generic)
12 Relay
×1

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

schematic

My first schematic!

Code

Autolas V 0.4

C#
/*
 Autolas V 0.04
 Auteur: Emiel van Beusekom.
 
  Pin-layout:
    Pin 2   = Indenticatie LED - Controller Gereed voor cyclus
    Pin 3   = Indenticatie LED - Moter actief
    Pin 4   = Indenticatie LED - Lastorch actief
    Pin 6   = Cyclus Start schakelaar
    Pin 7   = Volledige rotatie schakelaar
    Pin 9   = Aansturing Moter
    Pin 10  = Aansturing Lastorch 
 */
 
// Indenticatie LED's                           //Pin-layout:
const int GereedIndLED = 2;                        //Pin 2   = Indenticatie LED - Controller Gereed voor cyclus
const int MoterIndLED = 3;                         //Pin 3   = Indenticatie LED - Moter actief
const int LastorchIndLED = 4;                      //Pin 4   = Indenticatie LED - Lastorch actief
// Schakelaars                                     //Pin 6   = Cyclus Start schakelaar
int Sk01 = 6;                                      //Pin 7   = Volledige rotatie schakelaar
int Sk02 = 7;                                      //Pin 9   = Aansturing Moter
int Sk01Status = digitalRead(Sk01);                //Pin 10  = Aansturing Lastorch
// Werktuigen                                      //Pin A0  = Potmeter startvertraging
const int Moter = 9;                               //Pin A1  = Potmeter stopvertraging
const int Lastorch = 10;                           //Pin A2  = Potmeter snelheid
     
      //Identicatie LED's test.
      void IndLEDsTest(){
          digitalWrite(GereedIndLED, HIGH);
           digitalWrite(MoterIndLED, HIGH);
           digitalWrite(LastorchIndLED, HIGH);
           delay(500);
           digitalWrite(GereedIndLED, LOW);
           digitalWrite(MoterIndLED, LOW);
           digitalWrite(LastorchIndLED, LOW);
           delay(500);
      }

      
void setup() {
  Serial.begin(9600);
  Serial.println("Bezig met opstarten");

// alle pinnen worden gelinkt
  pinMode(GereedIndLED, OUTPUT);
  pinMode(MoterIndLED, OUTPUT);
  pinMode(LastorchIndLED, OUTPUT);
  pinMode(Moter, OUTPUT);
  pinMode(Lastorch, OUTPUT);
  pinMode(Sk01, INPUT);
  pinMode(Sk02, INPUT);

// LED Test
  IndLEDsTest();
  IndLEDsTest();
  IndLEDsTest();
  IndLEDsTest();
  IndLEDsTest();

// Terug gaan naar correcte positie
  while (digitalRead(7) == LOW){
    digitalWrite(Moter, HIGH);
    digitalWrite(MoterIndLED, HIGH);
    }
    digitalWrite(Moter, LOW);
    digitalWrite(MoterIndLED, LOW);

// Opstarten voltooid
  digitalWrite(GereedIndLED, HIGH);
  Serial.println("Opstarten Voltooid");

}


void loop() {
  Serial.println(" ");
  
  while (digitalRead(6) == LOW) { }
    
  int Potmeter1 = analogRead(A0);
  int Potmeter2 = analogRead(A1);
  int Potmeter3 = analogRead(A2);
  float StartVertraging = Potmeter1 * 5 + 150;
  float EindVertraging = Potmeter2 * 5 + 150;
  float Snelheid = Potmeter3 * 0.19 + 50;
  
  Serial.println("Cyclus gestart");
  Serial.println("Startvertraging:");
  Serial.println(StartVertraging);
  Serial.println("Stopvertraging:");
  Serial.println(EindVertraging);
  Serial.println("Snelheid:");
  Serial.println(Snelheid);
  Serial.println(Potmeter3);
  
  digitalWrite(LastorchIndLED, HIGH);
  digitalWrite(Lastorch, HIGH);
  
  delay(StartVertraging);
  
  digitalWrite(MoterIndLED, HIGH);
  analogWrite(Moter, Snelheid);
  
  while (digitalRead(7) == LOW) { }
  
  digitalWrite(MoterIndLED, LOW);
  digitalWrite(Moter, LOW);
  
  delay(EindVertraging);
  
  digitalWrite(LastorchIndLED, LOW);
  digitalWrite(Lastorch, LOW);
  
  Serial.println("Cyclus voltooid");
  Serial.println(" ");
  delay(1);
}

Credits

emielbeus
1 project • 0 followers
Contact

Comments

Please log in or sign up to comment.