Final Project: Autonomous manure grinder for a turkey farm

under this licence:

The problem: The floor where the turkeys are raised, known as a bed, is made up of rice husks, organic matter and humidity. It is an ideal environment for flies to lay their eggs. 95% of the flies are in a larval and pupal state, and only 5% are adults. This 5% is a problem for raising birds.

First ideation

A robot that locates areas with high humidity, detects groups of larvae and kills them mechanically.

  • Mechanics: Servo, motors and gears.
  • Electronics: Motion, humidity and temperature sensors.
  • Programming: Data processing and decision making

First draft


Video of presentation of the final projectPresentation

What is?

It is a device with a linear displacement, that loads an implement similar to a tiller rotavator and has a movement sensor.

What it will do?

When the device goes forward, the tiller rotavator breaks the compacted manure and destroy the conditions for fly larvae growth. Also, when the movement sensor detects and obstacle, it stops the system.

Who will use it?

Ideally must be used in non-automated raising birds farms.

3D assembled model - Design and manufacture of mechanical parts

Parts manufactured in: CNC router machine

DXF shopbot files

Parts manufactured in: Laser cutter

DXF laser cutter files

Parts manufactured in: 3d printer

STL Fusion Files (for 3d printed)


This device used two main systems, one to move two steppers motors and the other for control a motion detector (Ultrasonic Ranging Module HC - SR04). In interaction between this systems is simple, when the motion sensor detects an obstacle, send a LOW signal to the VCC conection of the other system, so that the current flow is cut off and the motors stop. For control the steppers motors, I use a Tecsup Fabduino 2019 model and a GRBL Shield for Fabduino Tecsup 2019, which aims to connect the DRV8825 drivers to the Fabduino.


Stepper motor system

Tecsup Fabduino 2019
  • atmega 328 p
  • capacitor 10 μF (*2)
  • regulator helgers 7805
  • capacitor 0.22 μF (*2)
  • resistor 499 (*2)
  • LED (red)
  • LED (green)
  • resistor 10 K
  • resistor 00
  • switch
  • female jack connector DC005
  • ISP connector
  • capacitor 0.1 μF (*2)
  • capacitor 1 μF
GRBL shield
  • DRV8825 drivers (*2)
  • DG 340 - 3.81
  • capacitor 10 F
  • Pin headers

Movement detector system

HC - SR04 controller
  • attiny 45
  • header 3*2
  • resistor 10 k
  • resistor 499
  • capacitor 0.1 μF
  • ISP connector
  • LED

Schematic of Fabduino

Board of Fabduino

Download Fabduino files

Schematic of GRBL Shield

Board of GRBL Shield

Download GRLB shield files

Schematic of sonar

Board of sonar

Download sonar files


Program the stepper motor system: I program the stepper motor system that uses the Atmega 328 p and the movement detector system uses an attiny 45, for both I use Arduino IDE for load the codes.

Stepper motor system
I adapted the code from here

Arduino Stepper Motor Code

Movement detector system

This code requires the use of the following library: NewPing.h

Arduino Movement detector Code

Assembly and test


Fab Lab Tecsup