filling machine using load cell and 2 solenoid valve

i have a final test in my college to create a filling machine for oil. i made it using load cell 40kg and 2 solenoid valve, also lcd 16x2 and 8 digit 7 segment display. i already finish my coding but there is a little problem with my solenoid valves. i use 220v solenoid valve and wiring it to relay module. is there anything that i should use to avoid the flyback ?? thank you

xzcircle:
i have a final test in my college to create a filling machine for oil. i made it using load cell 40kg and 2 solenoid valve, also lcd 16x2 and 8 digit 7 segment display. i already finish my coding but there is a little problem with my solenoid valves. i use 220v solenoid valve and wiring it to relay module. is there anything that i should use to avoid the flyback ?? thank you

The flyback diodes are most likely already in the relay module. That protects the Arduino pin. But if the 220 volt solenoid is very close to the Arduino wiring, that will cause problems.

Are you confident the relay module will handle the 220 volts without problem?

Paul

Most likely you will want a flyback diode across the relay coil, but to know for sure would require considering the actual type of relay and the rest of the circuit you have in mind. Driving a relay is a very common requirement, so have a look at the tutorials:

Paul_KD7HB:
The flyback diodes are most likely already in the relay module. That protects the Arduino pin. But if the 220 volt solenoid is very close to the Arduino wiring, that will cause problems.

Are you confident the relay module will handle the 220 volts without problem?

Paul

hey paul thank you for ur attention , here my code on program my solenoid
f (pengisian2 == true) { //pengisian
IsBtnDownActive = false;
IsEnterActive =false;
ClearScreen();
WriteToLCD(“START”,“2000 KILOGRAM”);
int lel = ( z + 20);
if ( lel < 1800) {
analogWrite(A0,0);
analogWrite(A4,0);
}
else if (lel > 1800 && lel <2000) {
analogWrite(A4,1023);
analogWrite(A0,0);
}
else if (lel > 2000) {
analogWrite(A0,1023);
ClearScreen();
WriteToLCD(“FINISH”,“2000 KILOGRAM”);
pengisian2 = false;
IsEnterActive= false;
}

gardner:
Most likely you will want a flyback diode across the relay coil, but to know for sure would require considering the actual type of relay and the rest of the circuit you have in mind. Driving a relay is a very common requirement, so have a look at the tutorials:
https://www.hackster.io/tarantula3/driving-a-relay-with-an-arduino-722c24

'hey i know what kind diode to use on solenoid 12 v DC but i need to know what to use to handle the flyback with solenoid 220v . thanks anyway

xzcircle:
'hey i know what kind diode to use on solenoid 12 v DC but i need to know what to use to handle the flyback with solenoid 220v . thanks anyway

I had assumed, I know that is a bad thing to do, that you were using 220 VAC on the solenoid. If you are using 220 Volts Dc, than a diode is necessary for the solenoid, but only if you are getting disturbances from the solenoid operation. If you are using 220 VAC, then a diode is not possible for reasons that should be obvious.

Paul

Paul_KD7HB:
I had assumed, I know that is a bad thing to do, that you were using 220 VAC on the solenoid. If you are using 220 Volts Dc, than a diode is necessary for the solenoid, but only if you are getting disturbances from the solenoid operation. If you are using 220 VAC, then a diode is not possible for reasons that should be obvious.

Paul

so diode can't be use for solenoid 220 v AC ?? is there anything that i should do to handle flyback on my solenoid valve 220 AC?

Sounds like what you're looking for is an 'ac snubber'.

xzcircle:
'hey i know what kind diode to use on solenoid 12 v DC but i need to know what to use to handle the flyback with solenoid 220v . thanks anyway

You won't need one on the 240V solenoid side. The relay is much more immune to the voltage spikes from switching a reactive load than a transistor.

Hi,
220Vac solenoid valve?