Variable duty cycle controller

Hello,

I'd like to use my arduino to control my water well. We have low producing well with a holding tank. There is a float in the tank. I am currently using an arduino to send signal power to a relay that is spliced into my float wire (110V). It sends signal to the relay for 35 seconds while powering a green LED, my well runs dry, it shuts off for 10 minutes to allow my well to fill back up while powering a red LED. Downside of this system, is the arduino loop is running constantly, even if the float is not sending signal because the tank is full.

I'd like to expand on this later, but for right now, this is what im trying to achieve:

Using a potmeter, vary the time that the water well pump (and green LED) is on, once the timer runs out, the water well pump (and red LED) shut off for a set time determined by the second potmeter.

Id like to have both the adjustable countdown on a display. Will this require 2 displays?

I understand the theory of a potmeter used an analog signal, but no idea how to set different times for different values.

Ideally what id like to see in the end, is figure out how to read the power from the 110V float, and have that signal start a the loop of the variable duty cycle controller.

Im new to all of this. This is my first arduino project, happy with what ive been able to achieve and learn so far, but I'd like to make it a bit more fancy to see how in depth my arduino learning will be. This will help my water well pump($2,300) last longer (not pumping when theres no water), and really make a difference in my electricity bill.

It sounds like you are approaching this project with a very limited view of what’s possible and available,

Plus, playing electrics alongside water has some possible downsides.

Maybe describe your fundamental problem with pictures , numbers and an open mind, you may find a solution that is cost-effective, and more functional than you can imagine.

Why not use a water level sensor in the well and only allow pumping when there is enough of water?
The logic would be: run the pump if both good well water level and tank is not full.

A loop, or starts it looping?

What stops the loop, the absence of the float signal that said there is enough?

Can you try to draw a diagram showing the levels in all the places that hold water, and how the variable duty cycle pumping gets started and what stops it?

If enough is enough, and you expect something to recharge during the off period, there is no looping at all, just a decision to run a cycle and wait or don't do that.

That's simple enough. Develop the logic using serial output. Once the logic is solid, worry about fancy displaying of system parameters and status.

More sensors woukd let you build a smarter controller, and maybe spill less liquid.

a7