Bale Counter

My Father has asked me to make a bale counter that will count strokes per bale, display that amount on a screen as well as total bale count. I've built the circuit electrically but he's added that he'd rather just at the end of each bale the screen displays the stroke count until the next bale is completed so is an Arduino a suitable platform to use?

Cotton bale?

Small Lucerne bales.

The way the baler works is it picks up the windrows then feeds that into a chamber that compresses the hay in the feeder using a plunger then once a bale is complete a needle stabs through the whole bale to tie the knot and complete the bale.

So currently I have a prox sensor on the plunger to counter strokes and another prox on the needle arm to reset the stroke counter and count total bale amount

Sounds totally within the abilities of an Arduino.

ok cool I'll do some more research into coding and work on it from there is there a forum where I can ask more questions about components and such for the project?

djensen2602:
is there a forum where I can ask more questions about components and such for the project?

Just continue with your questions in this Thread. That way all the info about your project is in one place which makes it much easier to help.

...R

Welcome to the forum!

one of the things you can do to make it easier for us to help you is to post what type of sensors you are using. if it is a simple switch, etc. also the type of Arduino, etc.

well I'm using just some 12VDC negative switching prox switches but I was going to use them to switch relays and use the relay contacts to input into the Arduino. I have just a basic Arduino UNO starter kit but I'm just using that to teach myself to code them.

Let us know which exact switch (data sheet). Very likely you don't need a relay. That's anyway not a good way to pass on signals.

we typically request that you take pencil to paper
sketch out the parts, model numbers, power needed, etc
so that it is easier to idenfity what is going on.

what prox sensor ? what is the output ?

I find that the nokia 5110 display is simple because it is I2C, requires two pins and there are lots of examples.
there are serial to parallel boards to allow the use of a 2 (or 4) line display
and the OLED I2C unit that is backlit. all can be seen if there is a shadow, the Nokia is black on gray and I beleive has good contrast when in sunlight.

I've attached an electrical drawing of the bale counter in its working condition.

the sensors used are:

SICK RZT7 two wire
Ebay No Brand NPN three wire switches on the negative.

Counters are both just Ebay Chinese counters no brand

wow, an actual ladder diagram ! some things in life are so simple,

if I understand your need, you want to count the number of cycles it takes to make one bale.
you could also show how many bales you made, or how long it took to make one bale.
the 16 characters, by 2 row would offer that

Strokes 123 // 11 characters
1234 AT 123 // count and average time 10 characters

do you have any Arduino parts yet ?

the NANO offers a screw terminal board to help keep wires well connected
NANO screw terminal board

the 2 line LCD would offer a bright numeric display, not good for battery, but since you would be in a vehicle, I assume you have power available
LCD Backpack

this one looks like it has a 16 character display and comes with the backpack
LCD display

with these and a few resistors, you can read the sensors you have and display them.
the IDE (free Arduino programming software) has examples that will let you get something working pretty easily.

not sure what you have in mind for an enclosure, but here in the States, we have blue electrical boxes, 4 inches x 4 inches and plastic cover plates that you can cut with a knife or drill.

as a note, I have a $10 soldering iron with dial and it works fine for small projects.

soldering Iron

The only parts I have are from the Arduino starter kit so a Arduino Uno and a few push buttons and resistors.

I'm a sparky by trade the diagram was a little rough but obviously did the job.

It'll be set up in a tractor so I'll have constant 12VDC power via a cigarette socket.

The way I want it to work is to internally count the number of cycles it takes per bale and display that amount until the next bale is made it then it will display the second bales cycle count and so on.

As well as the cycle count I also want a total bale count as well so we can work out a bale per acre.

Currently I have my two electronic counters mounted in a 125mm x 100mm PVC box.

if you have an UNO the same display can work, the reason I suggest the backpack is that it takes 2 wires.

the IDE has examples of how to watch a switch.

you can count cycles per bale

then when the bale is done, you get a second input and that stores that first value as starts counting for the new bale.

since the second input is the bale you can just keep adding to that for total bale count.

if you want to play, put on two switches.

one is cycles, the other is bales.

read the first switch and start the count
the second switch would be bales.
it would increment the total bale count and re-zero the cycle count.

you should be able to do that with the parts you have.

there is a serial.Print() that you can use to print that to your computer screen to show the two counts.

I'm still struggling with writing the code does anyone know where I can find a code to give me a start just a basic counter and display code with wiring diagram would be awesome.

Thanks Daniel

Show us the code you are struggling with.

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

Show us your current schematic.
Show us a good image of your wiring.
Give links to components.
Posting images:
https://forum.arduino.cc/index.php?topic=519037.0

What display do you want to use

What do you want to see on the display?

What is the minimum time between bales, more than aminute?

reset switch to start an acre ?

with one input for the stokes per bale
and one input for the bale complete

the arduino should be pretty easy.

A cigarelte car USB adapter should be good enough.

what do you want to see on the display ?

total bales xxxx
strokes per xxx
bales since last reset xxxx
bales since start today xxxx