DIY Automated Clean-In-Place System

Looking to build a Clean-In-Place system. I'm a beginner with Arduino and not sure where to start. Needing to know how to control valves (open at different times). Want them to open depending on temperature and water level.

Valves I'm using: 1" Brass Electric Motorized Ball Valve - 3 Wire

PFD

Process I am trying to accomplish

  1. Water for injection enters Wash Tank (WT)
  2. Level Transmitter determines amount of water WT
  3. Once level is reached, Ball Valve-1 (BV-1) & Ball Valve-2 (BV-2) opens
  4. WFI flows to Small Pump (SP)
  5. WFI flows to Heat Exchanger (HE)
  6. WFI flows back into WT
  7. Process 1-6 repeats until certain temperature is reached
  8. Temperature transmitter determines desired temperature
  9. Once desired temperature is reached, BV-3 and BV-4 opens
  10. Water flows into Large Pump
  11. Water flows out of Large pump back into RT

You’ve done a good thing.
You’ve identified the sequential states of operation.

The next step is to create a ‘state machine’ in software to perform that sequence.

If you can,list the hardware you’re using, with data sheets.

Read up on millis() timing, the rest will fall into place.

Hello cmsiv

Welcome to the worldbest Arduino forum.

This is a nice project.

Take a peace of paper, a pencil and design, based on the IPO model, a program structure plan before start coding.
Identify functions and their depencies. Now start with coding and testing, function by function.
At the end merge all tested function via control function together to get the final sketch.
The basics for coding the project are to be found in the IDE as examples.

Have a nice day and enjoy coding in C++.

The valves in your drawing are 3 way, valves in the link are 2 way (OPEN / CLOSE)?

Also called "diverting"

Or, turn any bv into a motorized bv

Is it just me that's being ignorant?

What's a "clean in place system"?

What's being cleaned?

What place is it being cleaned in?

google

Yep. Sent the wrong link. Not sure how any of this works.


Using these valves. I think my question is where to place wires and what extra pieces I need. I think I can figure the code out.

@cmsiv I thought this would make more sense later when I was sober and well rested.

With two out of three, I am still confused.

At step 6, why isn't anyhting flowing into tank RT?

At step 11, there is nothing to connect the large pump with the RT.

In any case let us assume you actually know what you want to do.

There is nothing hard about this problem as I can see, beyond getting that list and diagram to agree to make sense.

Then a program is easy.

Take a look into finite state machines and the IPO model for process handling.

As for the valves, it is not clear what kind of current must be carried by the open/close switch.

Are you using on/off valves with the three wire interface? A relay could replace the switch and be driven by the Arduino. You can get bistable or "latching" relays so they would not be enrgized all the time in one state or the other.

Or you could use a high side MOSFET switch almost without a doubt, like described here

The switch green wire would go to the MOSFET, and there would be no motor explicitly in the circuit.

Adding the diode on the red and black wires would not hurt and might be a Good Idea.

a7

You come here asking for free help, but when someone asks you a question, you tell them to go use Google?

Adding to ignore list...

Looking for some help with what Arduino equipment I need to get started on this. Also some help on the code for valves to open and close at different times on a delay. I’ve read that I might need a relay (not sure what that is). Anything helps

Valves: 1" 3 Way Brass Electric Motorized Ball Valve - 3 Wire

Heat Exchanger: https://www.amazon.com/TC-Home-Propane-Heater-Tankless-Instant/dp/B08WWW496Z/ref=sr_1_30?crid=3A5P6BKS2VMEV&keywords=tankless%2Bhot%2Bwater%2Bheater&qid=1675808132&sprefix=tankless%2Bhot%2Bwa%2Caps%2C91&sr=8-30&th=1

Pump: https://www.amazon.com/Acquaer-Shallow-Automatic-Pressure-Versatile/dp/B09SZ9W8YN/ref=sr_1_6?crid=8AS0TMP5V7TY&keywords=jet+well+pump&qid=1679436093&sprefix=jet+well+pupm%2Caps%2C257&sr=8-6

(post deleted by author)

Thanks for the explaining picture! Great!

The brass valve lacks data about resistance or voltage. 500 mA just. We need more in order to suggest a reasonable driver.

The heat exchanger link. The sales page gives no data.

The pump I would suggest a solid state relay to control it. 230 volt, 1 Hp lands at some 3 Amps, a current easy to handle.

In a project likes this a good way is to make test code for handling each of the three devices, one at the time.

The description says nothing about temperatures and an eventual control of it. Is it either heated or not heated water to be pumped out?

For time scheduled action a Real Time Clock, RTC, is needed.

Your two or more topics on the same or similar subject have been merged.

Why did you start a second one on the same subject ?

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

@cmsiv you have added a diagram that has less information than the first diagram, a new diagram which makes as little sense to me as the first.

You have not specific any more detail, or in any easier way to understand, than your list from the top post.

The valve you link is a like a switch, send fluid one way or the other, how is that in the line?

Sry, if this is all obvious to everyone I'll just watch.

But you are wondering what a relay is, or do I misunderstand?

Just in case

We will suggest a relay sometimes when an Arduino has to essentially close a switch to effect control in the real world. Here presumably the output contacts would be wired to complete the circuit with the green wire, thus switch the valve to its alternate state.

a7

I tried to simplify the process. What is there not to understand?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.