How do I connect a solenoid?

Continuing the discussion from My code says exit status 1 when i try to upload it:

how do i connect a solenoid to an arduino?

You seem to be missing how forums work. People have helped you so it would be nice if you could help somebody that encounters the same problem in future by posting the solution for the specific problem.

Not doing so if asked indicates you that you don't appreciate the effort that people put in to help you and that you only care about yourself. So don't expect too much help from those people to solve you next problem.

As we still have no idea which solenoid you are using (pictures of something don't count as the specifications that were asked for) those that might still want to help will not be able to do so.

1 Like

That is the solenoid

i've pluged my solenoid in proberly but it isn't working

Directly to the Arduino? See post #122; you need a driver. See the Adafruit product page: Medium Push-Pull Solenoid - 5V or 6V : ID 3992 : Adafruit Industries, Unique & fun DIY electronics and kits.

I certainly hope that you did not blow up your Arduino. Directly connecting that solenoid certainly brings the risk of damaging the Arduino.

Since they are about a distinctly different subject matter, I split the posts about the solenoid from the original topic to a dedicated topic here.

Carry on.

I would start simple and just try to control the solenoid without any additional stuff.

Note:
That solenoid draws more current than the USB port usually can deliver; use a separate power supply for your solenoid.

I have connected it all correct but my solenoid will not work.

Which transistor.
I see no base (or gate) resistors.

The base/gate in post#6 seems to be connected to the Aref pin.
Leo..

ok ill put post 6 back together

Looking at the photo in post #6, I can see that the red wire from the solenoid connects to a diode, but I don't see any connection to a power supply.

what is the power supply?

The power supply is something that can supply the 0.8A current that the solenoid requires to operate.

If you are asking this question, I assume that you don't have one.

This is the power supply. You need a real one capable of providing at least 1.5 Amps

They don't get any cheaper than this

what is the use of that?

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