Controlling waterpump with light sensor

Hi.

I am trying to control a waterpump with my build-in light sensor on my Arduino nano 33 BLE. Since I am a rookie in Arduino and coding, I am confused as to what to do. I realize that I need to use a relay to connect my water pump to my Arduino, but I don't know how te circuit exactly works and how to develop the coding.

I am using the Water Pump WPM421 ( WATERPOMP kopen? | WPM421 | | Modules - Elektronicacatalogus.nl ) and the 5V Relay Module WPM406 ( Gotron | 5V relaismodule WPM406 voor Arduino | Elektronicaspecialist )

Thanks in advance

According to the pictures on the Arduino store site the Nano 33 BLE doesn't have the APDS-9960 populated. Did you solder it yourself?

Your relay module works on 5V but the Nano 33 BLE is a 3.3V board.

A simple top level view of the circuit:
Control the relay 5V inputs with the Nano
Connect the power for the water pump to the NO (normally open) pin of the relay, and then out via the GND or common pin of the relay to the pump and then ground of the pump power.

Some details:
Must put a diode across the coil pins of the relay. I can't tell if this relay module has one built in already. Any cheap old diode will work, e.g. 1N4007 or any 1N400x. It must be connected such that current will not flow though it if you just looked at the static picture of the circuit diagram. That is, the anode to ground and cathode to positive. It is there to save the Nano from the voltage generated by the collapsing field in the coil when it is de-energised.
I can't see from the relay info what current it draws at 5V. Likely too high for the Nano. So, connect the Nano output pin to the base of any old NPN transistor and drive the relay from it.

Here is a link that may help:
https://create.arduino.cc/projecthub/tarantula3/driving-a-relay-with-an-arduino-722c24

I would suggest you find a different relay module, the one you chose the relay coil appears connected directly to the Arduino, that will eventually fry the Arduino pin even if you use a diode. I would also be surprised if the arduino could supply enough current to actuate the relay. Relay boards are available from many sources that will work with 3V3 or 5V that typically have a transistor on them to energize the relay. Use this as a search term: "arduino relay 3v3".

That is because you are looking at the wrong side of it! Velleman VMA406.


No problems!


OK, I could be wrong about the no problems!

VMA406

:astonished:

Clearly needs a 470 Ohm resistor in series with the "S" lead. :face_with_raised_eyebrow:

Hi,
Here is the user manual for the relay.
3685880.pdf (427.3 KB)

Tom... :smiley: :+1: :coffee: :australia:

Didn't you like me publishing the link? :sob:

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