Project

Precious Plastic anti-jam shredder

Anti-jam system that allows reversing the direction of the motor to undo the jam that can occur in the Precious Plastic shredder.

Group Precious Plastic

Precious Plastic anti-jam shredder

Within the work flow of the Precious Plastic project that Hirikilabs is trying to replicate, one of the main elements is the shredder, a machine with which we can shred different plastics to obtain plastic flakes and thus start the recycling process. Once the construction of the machine was finished and the tests started, we immediately began to see the limitations of the motor-gearbox-transmission assembly that we had, and how with very robust pieces or a large amount of material the machine would get jammed, which even resulted in breakage of a transmission coupling. Looking for a solution, Carlos came up with a system for detecting the travel of the shredder shaft, which on detecting that this had stopped advancing would stop the engine. And with this fitted and having acquired the necessary components, a system was added that allows the reversing the direction of the motor for a few seconds to unblock the jam, and then move forward again to continue shredding, all based on Arduino of course. So let’s get to work!

Step by step

You have to 3D print the encoder part. The FreeCAD file is available on thingiverse. Within the FreeCAD design, there is a spreadsheet where we can adapt the diameter of the shaft and the diameter of the wheel to our needs. As the part will not exert any force, it can be printed with a couple of perimeters and little infilling (10-15%).

The entire system must be connected following the diagram below. Keep in mind that we are using 380 V three-phase current and a lot of current, and therefore a cable with a sufficient cross-section (2.5 or 3.5) must be used. Ideally, all the terminal connections should be crimped. To get the 12 V out of the Arduino a normal transformer can be connected to one of the input phases.

// Precious Plastics Shredder anticlog system
// (C) Carlos Garcia "Txakurrakuka" & Hirikilabs
//
// This program is free software: you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.
// If not, see .


#define RELE1PIN    8
#define RELE2PIN    9
#define RELE3PIN    10
#define SENSORPIN   4

int main_counter = 0;
int encoder_value = 1;
int encoder_counter = 1;
int change = 0;

void setup() {
    // init peripherals
    Serial.begin(9600);
    // GPIO
    pinMode(SENSORPIN, INPUT);
    pinMode(RELE1PIN, OUTPUT);
    pinMode(RELE2PIN, OUTPUT);
    pinMode(RELE3PIN, OUTPUT);
    
    digitalWrite(RELE1PIN, HIGH);
    digitalWrite(RELE2PIN, HIGH);
    digitalWrite(RELE3PIN, HIGH);
}

void loop() {
    // read encoder
    encoder_value = digitalRead(SENSORPIN);
    
    // check if we are advancing
    if (encoder_value == 1 && change == 0) {
        encoder_counter++;
        change = 1;
    }
    
    // yes, we are, reset counter
    if (encoder_value == 0 && change == 1) {
        main_counter = 0;
        change = 0;
    }
    
    // increment
    main_counter++;
    
    // if counter is big enough, we are not advancing, unclog
    if (main_counter == 20) {
        // turn off motor
        digitalWrite(RELE1PIN, LOW);
        delay(100);
        digitalWrite(RELE1PIN, HIGH);
        Serial.println("MOTOR STOPPED");
        delay(1000);
        
        // turn motor backwards
        digitalWrite(RELE2PIN, LOW);
        delay(100);
        digitalWrite(RELE2PIN, HIGH);
        Serial.println("MOTOR BACKWARDS");
        delay(1000);
        
        // turn off motor
        digitalWrite(RELE1PIN, LOW);
        delay(100);
        digitalWrite(RELE1PIN, HIGH);
        Serial.println("MOTOR STOPPED");
        delay(1000);
        
        // turn motor forward
        digitalWrite(RELE3PIN, LOW);
        delay(100);
        digitalWrite(RELE3PIN, HIGH);
        Serial.println("MOTOR FORWARD");
        delay(1000);
    }
    
    // reset counter
    if (encoder_counter == 25) {
        encoder_counter = 0;
    }
}