For my first project i was thinking about building a automatic watering plants system. To begin with (only 1 pump, soil meter and plant but later on build a big container with more plants meters and watercontainers etc. I got the arduino and the soilhumitity meter in about an hour but i got stuck with my pump. I bought a jt-180A pump and want to control is. In my oppinion (correct me if i am wrong) there are two ways to do so. With a relais (which i ordered online) and but with the existing wires aswell. I dont want to focus on the relais to much because i think i can figger that out myself. My question is: how to control the pump?
The pump has 3 wires (red+ black- and white speedwire as i found out?). I hooked up my pump with an old usbcable to an external powersupply and it works great but i can not control it. Is it possible to control it with the white wire from the pump?
I have tried to control it with a analogWrite (11, x) but that dit not work. It did not gave me any errors but when i change the values from 0 to 255 the power of the stream did not change. In both cases i started with #define/int pump 11 or int pump 11.
I also tried an analogWrite on pin A0 since that is the real analog but it said it is a read only pin.
Am i doing something wrong or isn't possible to control the pump with the white wire and do i need to wait for my relais?
Hope i gave the right information and i hope you can help.
Before i forget: Arduino uno Waterpunt jt-180A soilsensor hl-69