As a student, I'm currently working on a science project where I intend to connect a 12V, 2A solenoid valve to a relay and subsequently to a Raspberry Pi Pico. The solenoid valve is powered by a 12V, 5A source. Despite installing two 1N4001 flyback diodes, I'm still experiencing sparking issues with the solenoid valve.
I've verified that the flyback 1N4001 diodes are functioning properly. Upon watching videos of others facing similar issues, I've noticed that the sparks I'm experiencing are larger than theirs.
For my project, the valve needs to be open for a few seconds and then closed again.
Could anyone please provide insights into why this issue might be occurring, what I can do to mitigate it, and if there are any alternative solutions I could explore?
Sparks:
Circuit diagram: