Hello All and thanks in advance for your comments.
I'm Considering the possibility of creating an automated bottle filling line. I'm new to Arduino and I've read others on here trying to fill bottles by liquid level or weight but I think the easiest method I can accomplish is filling by time. We do it now and it works well enough for our needs.
Here's the process that I'd like to accomplish:
Run a conveyor motor until a sensor detects a bottle in position X.
After the conveyor stops, lower an arm down into the bottle. Arm stops lowering by hitting a contact switch.
After the arm is lowered, turn a liquid pump on for a time of X.
After the time has elapsed and the pump stops running, raise the arm back to the starting position. Arm stops raising by contact switch.
After arm is raised, start conveyor again which moves full bottle out and a new bottle is placed into position.
Additional Information:
The ability to adjust the fill time in tenths of a second directly on the Arduino would be necessary.
Having a program to store different fill times would be nice but not necessary.
There would be a total of 1 regular motor (conveyor), 1 stepper motor (raise/lower), 1 liquid pump, 1 sensor to stop conveyor, 2 contact switches for raising/lowering of arm.
Questions are:
Is this something a single Arduino can handle?
Which one would you recommend?
Is the software logic to perform this sequence very complicated? Each function by itself is very simple but I don't know how complex it makes it when it's all chained together.
Any other thoughts/opinions?
A standard Arduino Uno should have enough I/O pins and program memory to accomplish all the tasks you describe, as long as no keypad and display is required. However, to characterize each step in the operation as "simple" is misleading. You will need separate motor drivers and power supplies for each step involving a motor, each with its own peculiarities and design challenges, and each motorized task will deliver a very different programming challenge.
In all, this is a straightforward project for someone who is comfortable with electronics and microcontroller programming. How comfortable are you with the mechanical aspects of the intended setup?
Thank you jremington. If a display and keypad were required what would be your suggestion on the Arduino model? I would like the ability to adjust fill time on the fly.
The mechanical side will be much easier for me than the programming and that's why I thought since each "step" is fairly simple by itself, the programming may not be insurmountable....as long as I buy the proper hardware upfront, I can fight through the rest.
I don't think memory will be an issue, so the primary limitation to adding features is the number of I/O pins. A generous guess for your project is that the motor controllers and limit switches or sensors would take up about 12 pins of the approximately 20 available on the UNO. Adding a keyboard and display could take up another 3 to 15 pins, depending on which type of keyboard (maybe just 2 buttons) and display (serial or parallel) is chosen. So, it seems possible that you could do everything with an UNO, but I'll be that every available pin would end up being used.
A reasonable next step up from the UNO is the Mega 2560, which roughly triples the number of available I/O pins and would probably be overkill. A nice thing about your project is that each piece can be worked out more or less stand-alone, then all put together for the final product. For the most part, any development you do on the UNO could be transferred without much change to the Mega. Hope someone else will chime in!
juno72:
Here's the process that I'd like to accomplish:
Run a conveyor motor until a sensor detects a bottle in position X.
After the conveyor stops, lower an arm down into the bottle. Arm stops lowering by hitting a contact switch.
After the arm is lowered, turn a liquid pump on for a time of X.
After the time has elapsed and the pump stops running, raise the arm back to the starting position. Arm stops raising by contact switch.
After arm is raised, start conveyor again which moves full bottle out and a new bottle is placed into position.
You've nearly written your program in that stepwise description.
I would write it as:
1)Start conveyor motor.
2)If sensor detects bottle, stop conveyor motor.
3)Lower arm.
4)If bottom contact switch closed, stop lowering arm.
5)Turn on pump
6)If X seconds have elapsed, stop pump.
7)Raise arm.
8)If top contact switch closed, stop raising arm
9)Loop back to 1
Just 'translate' the above into C++ and you're there.
Thank you for both of your input and guidance. It will be an interesting project for me and any other comments/feedback would be appreciated. I can now feel confident that if the project fails, it will be a result of my own shortcomings and not a limitation of the hardware itself.
If you want to add a display and pushbuttons, there are UNO-compatible display shields that include an integral set of push buttons which would give a very convenient solution.