duncantexasbellecraig
Published © GPL3+

Auger weigh feeder for beginners

Hello friends, Do some 3D printing, hook up a minor amount of electronics after having raided a kitchen scale for the load cell.

BeginnerWork in progress1,096
Auger weigh feeder for beginners

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DFRobot DFR0316
×1
Parallax Continuous Rotation Servo
×1
RobotGeek Pushbutton
×1

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Prototyping Kit, Breadboard
Prototyping Kit, Breadboard

Story

Read more

Custom parts and enclosures

Plastic parts

Print and assemble

Schematics

Image of wiring

Here's how the wiring looks.

Code

The code for the project

Arduino
An easy little sketch to get going with the feeder
/* MCP 3424 version 1.2 example sketch Multichannel
  Written by B@tto
  Contact : batto@hotmail.fr

  In this example, the four channel are measured and results displayed by serail connection.
*/

#include <MCP3424.h>
#include <Wire.h>
#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards
MCP3424 MCP(6); // Declaration of MCP3424 pin addr1 et addr0 are connected to +5V

int pos = 80;    // variable to store the servo position
int sensorPin = A0;    // select the input pin for the potentiometer
long Voltage[4]; // Array used to store results
int reading;
long average;
float dispval;
bool start = 0;
const int buttonPin = 2;         // the number of the pushbutton pin
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  Serial.begin(9600);  // start serial for output
  myservo.write(pos);
  pinMode(buttonPin, INPUT);
}

void loop() {

  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  if (buttonState == HIGH) {
    // turn start bit on:
   start = HIGH;
  }

  for (int a = 1; a <= 25; a++) {
    average = average + reading;
    if (a = 25) {
      dispval = average;
      average = 0;
    }
  }

  if (start == HIGH) {
    pos = 70;
    myservo.write(pos);
  }

  if (dispval > 50) {
    pos = 80;
    myservo.write(pos);
    start = LOW;
  }

  for (int i = 1; i <= 1; i++) {

    MCP.Configuration(i, 18, 1, 8); // MCP3424 is configured to channel i with 18 bits resolution, continous mode and gain defined to 8

    Voltage[i] = MCP.Measure(); // Measure is stocked in array Voltage, note that the library will wait for a completed conversion that takes around 200 ms@18bits
    reading = (Voltage[i]);
 //   Serial.print("Channel "); // print results
 //   Serial.print(i);
 //   Serial.print(" : ");
    Serial.print(((dispval + 0.0) * 1.0));
    Serial.println(" Grams");

    delay(100);
  }
}

Credits

duncantexasbellecraig

duncantexasbellecraig

1 project • 0 followers

Comments