Is the way I hooked up the transistor and solenoid OK? (Schematic attached)

Hello everyone, I am building a motion-controlled sprinkler system (to chase pests away). This schematic shows the way I want to connect the solenoid valve (which requires 18v DC) to the Arduino. I still haven't worked on the control system.

My question is, is the way I hooked everything up right? I'm a bit afraid I connected the transistor and solenoid wrong. I'd very much appreciate it if anyone can check my work.

Thanks in advance, turbine495

PS. The schematic is in Fritzing.

[u]EDIT[/u]: Thank you for all the great suggestions! This is my revised circuit. I hope I didn't goof up again. Let me know if I did. Thank you very much! - Turbine495

Screenshot-ANTICOON.fzz* - Fritzing - [Schematic View].png|1036x600

Screenshot-ANTICOON.fzz* - Fritzing - [Breadboard View].png|1036x600

Can you make a picture of the schematic ? I'm too lazy to install Fritzing.

Peter_n:
Can you make a picture of the schematic ? I’m too lazy to install Fritzing.

I would second that except I am not to lazy to install it, I just refuse to have such bloody awful software on my machine.

just draw the schematic on a piece of paper and post a photo of it.

I am sorry for the inconvenience. Here ya go.

Screenshot-1.png

My question is, is the way I hooked everything up right?

No it is very wrong.

1) You have no resistor in the base of that transistor.

2) You have no reverse biased diode cross the relay.

3) You have a relay and therefore there is no need to connect the ground of the arduino to the ground of your supply, you increase the chances of interference if you do.

4) You have no reverse biased diode across the solenoid.

Is the solenoid going to be on a lot? Because it looks like the way you have it hooked up, the solenoid is powered when the relay isn't. Which means you'll have to power the coil of the relay when you want the solenoid off. Either your relay or your solenoid is going to be powered all the time.

Which will probably work, it just isn't the most efficient use of power, and reduces the life of your components.

Meaning you connect the solenoid to the N.C. (Normally Closed) contact on the relay instead of the N.O. (Nomally Open). It should be connected to the Normally Open contact so the solenoid is energized when the relay is energized and not vice versa. (solenoid is OFF when relay is ON) which makes no sense.

Thank you for pointing that out. No, the solenoid will be running only for 5-10 seconds at a time. You see, I have been using breadboard view, and the picture on that is opposite from the schematic views'. I fixed that. I am making a revised schematic with Grumpy_Mike's suggestions. Thanks! - turbine495

I was a Fritzing fan, but recently I downloaded Eagle. It's free for non-commercial use with some limitations on board size, but that's of no concern personally.

You see, I have been using breadboard view, and the picture on that is opposite from the schematic views'

That is why a breadboard view is TOTALLY useless for doing any sort of analysis. You have to convert it into a schematic in your head.

JimboZA: I was a Fritzing fan, but recently I downloaded Eagle. It's free for non-commercial use with some limitations on board size, and a watermark on exported pix, but that's of no concern personally.

Thanks for sharing! It does seem interesting, but I really like Fritzing's neat "virtual breadboard", (with many component libraries) which is what I am using it for. Just by looking at it, it seems that EAGLE is more of a "serious" PCB design suite. Although it just be me who is using Fritzing wrong...

P.S. I think that Fritzing's autorouter sucks ahem, needs some improvement . It seems to want to zig when I want the wire to zag and vice versa. I always end up correcting the autorouter's messy handiwork by hand. Better than nothing, though.

Once again, thanks for sharing. - turbine495

Fritzing is not a schematic and therein is the biggest drawback and objection most people have to it.