Baler Automation System

The goal of this project is to create an automated method to flip bales as they come off of a rectangular hay baler so that they can be scooped up in a specialized fork to create an optimized bale stack consisting of 4 bales vertical on the bottom with 3 bales lengthwise on top.  The bale control unit will replace manual laborers hired for hay season whose job was to flip the bales as they came off of the bale sled.  I created a bale control unit to be able to set the state of a solenoid based on the bale count detected by a switch depressed as the bales across over the bale sled. The solenoid operates a hydraulic rod that operates a platform that controls how the bales fall off the platform.

Here is a picture showing the layout of the baler containing the switch mounted on the right, and the solenoid controlled platform on the bottom.

The static part of the platform on the right supports only about one third of the bale on the bottom.  The dynamic platform supports the other two thirds of the bale on the bottom when it is horizontal.  When the dynamic platform is vertical, the bale will come out, and being only supported partially on the bottom, it will cause the bale to tip on its side so that the bale is oriented the tall way on the ground.

The images below shows how the bale control unit is mounted on the baler.

The bale control unit has a power on/off pushbutton on the left with a single LED to show status.  The pushbutton on the right and the seven LEDs above it represent the layout of the optimized seven bale stack.  The pushbutton can be used to set the state within the sequence of bale flipping in case the tractor/baler has to stop and is shut off in the field.

Baler Control Unit Design:
The design centers around the logic in a Microchip PIC16F84 microcontroller. The microcontroller takes inputs from a switch that the bales activate when they pass by, and a switch on the project box. Both switches have the same effect of incrementing the internal bale counter used in the microcontroller to determine what state to place the solenoid is in. LEDs are used to keep track of the current bale configuration to provide user feedback while setting the bale count manually using the switch on the project box if desired.

Assembly Code for PIC16F84: baler.asm

Circuit Board Picture and Schematic Layout

 

Circuit Board as Mounted in Final Control Unit Box

Schematic Layout of the Control Unit with Interfaces