I need to count the number of times a pump starts to notice when it starts too often and check if some pressures are ok. (its a domestic water installation on my parents home)
The pumps is NOT started by arduino, its started by an automatic presostatic sensor.
So every time the sensor starts the pump, I can collect the current from the sensor (230V) and convert it to low voltage that is ok for some arduino input (I can use a simple 230V to 5V supply or lower). If this is not ok I can activate a relay and have arduino counting how many times the relay connects.
After this, I want to use the digital display from the arduino kit to show this number.
On top of this I would also need a way to reset the display to zero.
I am very new to programming, I am learning from the arduino starter kit right now so I don't really know how to connect the board and program it yet.
How can I program arduino to do those things and how complicated is this project going to be?
your project does not involve any difficulties regarding the software as long as you manage to provide an appropriate signal that the pump is switched on.
If you are using 230V you must make sure that you consider all aspects of safety! I recommend to use low voltage sensors to create the signal
For the software you can start with a sketch that counts if a switch is closed. Just displaying the count via serial
Then program the display.
After both are running integrate them to one sketch.
Are you aware of Wokwi? It allows you to develop and test online with simulated components and provides a lot of information and examples to check out.
I moved your topic to an appropriate forum category @mando111.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
IF you are experienced with handling and wiring 230VAC apparatus, the relay approach would be simplest, connect Arduino GND and a digital input to a "dry" relay contact, debounce the input signal and count when the relay toggles.
Neither Google nor I know what that is. Please explain.
What type of Arduino circuit board do you have. You mention a display from an Arduino kit. What is that display and do you have it working with a program in your Arduino board? That is step # 1.
What else is in your kit? A push button switch, perhaps?
Be advised, the current from your sensor is AC, so it turns off 120 time per second, so you cannot use it directly to tell that the pump is on or off. You need to convert that AC signal to DC and temporarily store that DC voltage in a small capacitor. Then you can program to watch for the DC voltage to appear and then you will know the pump has started.
Overall, the whole project is pretty easy to build, test and get to work the way you want it to.
It seems that we usually have a growing pile of AC to 5V wall warts lying around. One could be wired in parallel with the pump motor and the resulting 5V output connected to a digital input. I’d also place a resistive load and possibly a voltage divider to insure that it never went above the voltage tolerated by your controller and would drop to zero quickly when powered down.