New project - Need help on components & design

Welcome!

This Topic has been posted in an attempt to receive quality feedback from hobbyists & professionals alike, for cost-effective solutions to my next project:

The Project:
The project is relatively simple... 8x 1/2"solenoid valves in a gravityfeed system that will open in a sequence every 48 hours to allow specific amounts of liquid to be dispensed from reserviors - regardless of any power loss of fluctuations...
What will not be simple is the timer programming/power distribution and liquid measurements.

For Example:
*Every 48 hours, solenoid #1 needs to open for 5 minutes, then 1 minute later solenoid #2 will open for 5 minutes. *
Then solenoid #3 will open to allow 30mL of liquid to dispense, then a minute later #4 will open to allow 70 mL,
then #5 will allow 3 cups, then #6 will allow 3 cups.... etc.

Components:
I have yet to find many of the components i will need. Nor do really have a clear understanding of all of the components i will need.
Hopefully whomever replies has a handful of useful links.

The Microcontroller:
I dont even know if an Arduino controller is what i need..
So this sort of a shot in the dark.
But I will also need to perodically (& easily) increase or decrease the volume of liquid released by each solenoid at will.

I am not opposed to any suggestions on how to get this project done.

Please help point me in the right direction.

:o thanks!

Some questions:

How will you monitor performance?

Will you be able to access the micro-controller to change the programming, or will it be done wire-lessly?

How will you power the device?

How accurate do the amounts dispensed need to be?

What kind of fluid is being moved?

The 30 mL, 70 mL, and 3 cup amounts will be dispensed into what?

What is your target budget?

:)Thanks for the interest! - this project is in its infancy so most of the details & technicalities are open to debate.

How will you monitor performance?
Well, the Arduino was recommended for use with a laptop or computer. And since i know nothing of the Arduino chips, i assumed that a computer is what is commonly used. Sticking with the assumption of using a computer, id like to have a simple program interface to monitor & schedule my commands. What i envision is a simple set of drop down boxes for easily adjusting individual solenoid commands..

For Example: Solenoid Amount Time
[solenoid #3] [30mL] [9:03.15 pm]
[solenoid #4] [40mL] [9:04.30 pm]
[solenoid #5] [3cup] [9:05.45 pm] etc...

Again, i dont know how typical Arduino interfacing is done, so its open to debate & suggestion.

Will you be able to access the micro-controller to change the programming, or will it be done wire-lessly?
Yes, i would hope so. Dont know how thats done, but yes.
Wireless adjustments will not be needed at this time.

How will you power the device?
I assumed id just use 120Vac. The solenoids i planned to use are 120Vac. But they are also available in 240Vac and 12Vdc...
Whatever's most practical i will use. Open for debate.

How accurate do the amounts dispensed need to be?
As accurate as possible. I'd allow +/-1ml.
My set of reservoirs will most likely NOT be under pressure.
So at first i assumed that i would simply calculate flow rate per sec.
But accurate liquid proportions is ideal, via some sort of sensor array.

What kind of fluid is being moved?
Each solenoid will release a different liquid from its reservoir.
But none are a high viscosity or anything.
They are all just as thin as water i beleive.

The 30 mL, 70 mL, and 3 cup amounts will be dispensed into what?
These liquid concentrates will just be dispensed into a big tub of water.
The tub is like a big concrete mixing tub.

What is your target budget?
No target budget yet. wide open for the consideration of options.

The arduino is a micro-controller is has input and output capabilities. In can read sensor data, such as a thermistor or potentiometer. It can control things like lights, relays, and servos.

It can communicate with a computer (desktop or laptop) over a serial connection.

So, it would be easy to design a user interface to collect data, and a protocol to communicate the data to the Arduino.

Responding to that data, and opening and closing solenoids would be easy. The difficult part will be either measuring the amount of fluid released, or determining how long the solenoid needs to be open, if a constant flow rate produces acceptable results.

The Arduino has built-in timers, but not a clock, so an external real-time clock would be needed. They are readily available, though.

The Arduino is a 3.3 or 5 volt device, so some sort of transformer and voltage control would be needed.

Do you have a link to the solenoids you envision using?

Sounds like a fun project.

If all of the dispense tasks are timed then this should not be difficult.
Once you decide on a solenoid the rest should be easy.

You could go with either the 12VDC or 120VAC solenoids.
The 120VAC would require mechanical or solid state relays (I would
go with solid state). The 12VDC devices would require transistor buffers since
the Arduino outputs can not sink enough current to drive a solenoid
directly.

I make an Arduino compatible board that has a real-time clock (DS1337).
The DS1337 has two time-of-day alarms. You could use the alarms to
trigger the dispense. The datasheet for the board and some application
hints are at Loading...

(* jcl *)


www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks
blog: http://luciani.org

The solenoids that i figured that i would be using can be viewed here on ebay:

http://stores.ebay.com/valves4projects_Gravity-Feed-Nylon-Valves_W0QQfsubZ306695219

But even tho i've decided on a solenoid, the rest still doesnt seem so easy. lol

The specifications that I saw didn't look complete.

The 12VDC solenoid stated a current of 500mA. If that is the holding current
then you will need a decent 12VDC supply.

I did not see the current specification for the 120VAC.

Either one should work but unless you can get a better spec sheet you may have
to buy some and measure the currents. You could then determine the type
of solenoid circuitry to drive them.

Here is my quick summary ---

12VDC -- high current supply, buffer driver transistors, 12VDC can power the uC,
no exposure to line voltage in the system (this could be a major
safety advantage)

120VAC -- low current directly from the line, solid state relay drivers,
DC supply for the uC, exposure to line voltage in the system.

(* jcl *)

I didn't scroll down far enough on the page for the specs.

The 120VAC is around 85mA.

It sounds like both of those currents are holding currents.

(* jcl *)

Bear in mind that i have nearly zero components lined up for the construction of this project so far.
This i why i posted - To organize my build list and figure out what i will need for construction.

So I really appreciate the help!

I know nothing of the output capability/power distribution of the Arduino, so i still dont exactly understand how the arduino will distribute power to the solenoids.

And when it comes down to buffers and relays - unfortunately im clueless on their contribution/application to the system.

It doesn't matter much to me whether i use the 12Vdc, or 120Vac.
Whatever works will work.
You tell me i should use DC then ill buy those.
If i need AC, then ill get those....

I see what you mean though about DC solenoids being isolated from the main line to be safer. Im down with this concept.
As long as the DC are powerful enough to hold open the solenoid - all is well with the DC ones.

It sounds like one decision is made -- DC solenoids :wink: Since you are
new to this it is probably a good choice to remove the line voltage hazard.

Sometimes DC solenoids come in 24V versions which would reduce the current
(typically by half from the 12V). If the 12VDC ones you found on ebay will work
in your application I would probably not worry about 12VDC or 24VDC.

How many solenoids are on at one time? Multiply the number of solenoids by
500mA, add 500mA and this will the total current that is required for the 12VDC
power supply. You could search on Digikey or Mouser (or ebay) for a supply
with an AC input and 12VDC that can deliver the current that you calculated.

You should read about transistor buffers in the "Getting Started with Arduino" book (or online). This will discuss how to drive solenoids (or relays). If you query this forum
for relays (transistor buffers) you should find some schematics.

(* jcl *)

Then solenoid #3 will open to allow 30mL of liquid to dispense

In order to allow the release of that amount, you will need to measure the time the solenoid has to stay open. You may get 30ml on average, but each individual dispense will be different than 30ml.
If you are looking for high accuracy, the solenoid method does not seem very precise.

HAHA!
Thats one down. a million to go!

Jluciani:

One at a time solenoids.
Two of the eight solenoids used in the project may be bigger that 500mA.
So would i need two power supplies- one for each type of solenoid im using?
Or could i simply get one power supply thats at least big enough for the highest rated solenoid being used?

I will definately check out Digikey & Mouser for power supplies.

FLORINC:

Do you have a suggestion on a precise method of achieving what i need?

Im open to suggestions of all kinds on how to construct this project.

**skip

Well if you are still in the early design stage then you may want to first decide how much 'smarts' you want to do in the Arduino. If your going to be using an attached PC anyway to monitor and display status it could also handle all the time keeping and calculations. The PC would just have to send simple commands to the Arduino to activate the proper solenoids at the correct time.

If however the application was going to be standalone with no attached PC then you to decide what kind of UI is required.

The biggest hurdle to the applications is that you seem to think you can run it 'open loop', meaning you don't require feedback measurements of the amount of material moved in each step. Rather you assume that simple timed steps will allow the proper amount to pass. That is relying on gravity flow and amount to actually flow will depend on the amount of material in the holding tanks, as 'head pressure' will effect that amount passed as well as the time duration. The amount of variation of material passed between full holding tanks and nearly empty holding tanks will have to be determined to see if it meets your specifications. So calibrating the system will be a required task initially.

However if you could measure the flow amount or weight the amount of material being transferred then you could run the system in a 'closed loop' system, where each step is completed by actual material passed rather then a fixed time duration.

So you might want to play around a little with the physics first with some manual experiments rather then jumping in with a complete design. No problem with getting the solenoids up front and designing the mechanical part first, just run it by 'hand' first until you get a feel for what kind of automatic controls would work best.

Good luck

Lefty

Well im definately in the early design stage - thats true.
But im definitely planning on jumping in with tackling a complete design.

From what i understand, it Arduino can interface with multiple sensors like, maybe a flowmeter or something, and give me precise programming control of my solenoid executions based on the feedback measurements.

I would obviously rather not have to try and control the solenoids by a number seconds.
As i have read, height of reservoir's and other factors have much to do with affecting flow rates.

However, i did mention that two of the eight solenoids used in the project will open for a count of minutes, (probably bigger than 500mA Jluciani...)
But they will be for draining and refilling the 'mixing tub'. and therefore will not require flow measurement.

I dont seem to think i can run it without feedback measurements.
It was FLORINC, i believe who suggested the dispensing of precise amounts of liquid was to be based on seconds.
So that's definitely not the biggest hurdle

The first questions i tackled here was how i expected to monitor my performance. see top^ ::slight_smile:


What would really be the best system, is if i didn't have to have my computer present 24/7 for the executions.
A sort of set-it-an-forget-it system.

If i could just have a small box that would run my program while im away.
i could periodically come in, connect my lap top to monitor & make changes to the program. But then disconnect the laptop to take home and leave the box behind to run the new program....

Is this possible with the Arduino??
Any ideas on how to make it possible??

Oh, If only i could monitor & adjust the program from my iphone or something.... man, Its like were livin in the 50's here.


Also, does anyone have any good info on potential industrial solutions?
I know that there are many industries that use precise releases of liquid.
Ive been looking at sites like this: Fluid Metering - Home
But i cant imagine a way to interface with such an industrial tool.....


Jluciani: Multiply the number of solenoids by 500mA, add 500mA and this will the total current that is required for the 12VDC
power supply.

I get the multiplication but why add another 500mA??
Read ^^ for another power supply question i had for you.

Hi,

One option of measuring an amount of liquid presicely is to make a "motorized ceringe" with two one-way valves.
A small motor or a stepper motor with a spindle connected to the plunjer and some switches to mark the stroke.. With the stepper motor you could measure very precise how much the ceringe is filled with liquid without any switches. When the ceringe is filled with the amount of liquid you want just reverse the motor/stepper until the ceringe is empty. The valves make sure that the ceringe fills from the reservoir and empties in the water tank.

The downside would be that the "motorized ceringe" would be a project on it's own i guess.

Another 2 cents,

Jeroen

Edit:

Maybe the solenoid valves in combination with a version of the tipping bucket found in self emptying rainmeters?

Yes, i was looking lately at different syringe pumps.
Such as this one: http://www.basinc.com/products/iv/ctrl.html
Or even this one: http://www.syringepump.com/

True, building a syringe pump may be a project in its self, but im up to the challenge if its necessary - I found a rough diagram of how to build one here: http://www.chromatography-online.org/HPLC/Basic-HPLC/Pump/Syringe/rs10.html , but i dont know if building an array of these would be most practical, nor adjustable....

And also found a flowmeter company like this one: http://www.dewcopumps.com/seametrics.aspx

What do you guys think?
Any other links you guys may be seeing that im not?
Any ideas on how to interface with these sorts of pumps to be automated?

I had a similar system set up last year, which activated three relays at various times throughout the day. Two of the relays were on a strict timer, and a third one was activated and deactivated based on an external sensor. Here's how I pulled it off:

Arduino: The Arduino was running a small program that watched the Ethernet line (though you could use serial) for communications from the PC. When the Arduino received a sensor data request from the PC, it would send the appropriate data back. When it received a command from the PC, it would activate/deactivate the relay the PC specified, and return a message to the PC indicating whether or not it successfully completed the command.

PC: The PC was hooked into the same network as the Arduino, though again a serial (USB) line could be used to accomplish the same task. There was a small C++ program on the PC that communicated with the Arduino, using a custom protocol that the Arduino was also programmed to respond to. The PC asked the Arduino for all of its sensor values once each minute, and wrote them all out to a logfile. It also compared a pre-written schedule (in a text file) with the current system time, to determine which relays should be on or off at that time. If a relay was in the wrong state, the PC sent a command to the Arduino to swtich its state, and the Arduino responded as to whether or not it understood/completed the command.

Things to consider:

  • Solenoids and relays are more or less the same thing electrically, so some of this can apply to you.
  • To get any sort of accuracy in your liquid dispensing, you either need a really good model of how the liquid acts, or some sort of feedback as to how the liquid is flowing. Using some kind of sensor is the best bet. Using a syringe pump would be good, but you'd still need feedback as to how far your motor pulled back the syringe (or you'd need to know exactly how fast your motor travels each second)
  • If you have a PC in the loop, USE IT. The PC is way more powerful than the Arduino. You only really need to program the Arduino to carry out the PC's commands and return sensor data. You might want to look into the Firmata package, which is basically a communications protocol to send and receive digital and analog information from the Arduino. You can also write your own protocol, it doesn't really matter.
  • PC's have really good clocks (and if it's online it can get time corrections).
  • Any computer language that can talk to a Serial port can pull off this task. I'd look into Processing if you're not familiar with c/c++/c#/java/basic/python/etc.

Thanks for the valuable input - i thought maybe this thread would die..


Unfortunately I know little about programming languages.
Autocad is about the closest i ever came to programming.
I just figured that when the time came id just pay someone else who knows what their doing to handle the programs and protocols for me. $

Ive only located a few ideal parts and sensors that i would likely use - flowmeters, alkalinity testers,etc. but i dont even know what their protocols are.

Nor do I even know if its possible (with Arduino or anything) to interface each of their different protocols (whatever they may be) together in a manageable, realtime feeback system. Thats the ulitimate question here....

If i have to ultimately use a laptop for the firing of my relays, i guess im down - But someone else posted about there being a 'clock' chip available - so i started hoping thered be the option of a standalone system that could run the program (or firing of relays) for me.

Although not necessary, it would be great if it would log data on its own. That way i would only have to bring in my PC or laptop to read manage/adjust the system, as well as get feeback of things like current & previous alkalinity. As well as even confirmation on how many mL were dispensed & when.

Maybe even a green light to say everthings ok - and a red light that says something off from the intended program. (Either onscreen, or onbox, preferrably both...)

Hopfully theres someone here that could program these log files to be presented in a graph - like when you monitor the performance of your CPU & RAM in Task Manager.... that'd be tight.


I know what i want cant be that difficult; After all, its almost 2010...

Perhaps i belong in some engineering forum looking for design help on such a system.... But this was the first place i posted.
Once i learned that i could have a microcontroller to connect my computer to it for feedback i was all over it. Members here seem pretty savvy..
I want something marketable & seriously pretty cutting edge.


I found this Arduino Mega ATmega1280 with python on-chip
http://cgi.ebay.com/Arduino-mega-ATmega1280-(Python-on-chip)_W0QQitemZ280403897996QQcmdZViewItem?rvr_id=&itemid=280403897996
The description talks of standalone system capabilities, onboard crystal oscillator, and python included....
aside from getting someone to help interface the meters and relays, and having someone code a UI, wouldnt this be a good choice for the platform???
It appears to be able to keep time... or is there a better, kick ass Arduino available.

Buy two of them. One for you, and one for me, and I'd help with the programming. What you want to do is entirely do-able, and not all that difficult.

Hi Victor... i'm doing a similar thing...

i've a java program running on the pc (server) that receives data from arduino (client).

First I had realize the communication via USB, now i'm going to substitute it with ethernet communication.

I was able to receive data from arduino via ethernet, but i don't know how to send data to arduino from the pc (and how receive data in arduino)...

Could you help me, please?
I don't know which functions i have to use...

Thank you very much!!!

P.S: Sorry my english!! lol