Having issues powering a 5/6v solenoid

I am new to Arduino and have been tinkering a bit.

Currently making a circuit to control a small 5/6v solenoid. Specifically this one:

I have wired everything up and coded everything. I feel like the wiring is correct as the solenoid is turning on according to the logic of my Arduino code. The solenoid just seems weak however. I kind of have to help it in order to for it to work.

I'm not sure how to diagnose what is wrong. So I wanted to reach out here for assistance.

Some other specs:

-using a 12v 3amp battery with a buck converter which converts to a little over 5v (5.2 when I checked with multimeter). I have tried powering the Arduino with this battery and with a separate source and saw the same results.
-using an Arduino nano
-using a IRLB8721PBF n channel mosfet transistor
-using a 220 ohm resistor between Arduino pin and the gate pin of transistor

Thank you for any help!

It seems that something else is wrong. Since we cannot see the setup, please post an annotated schematic showing exactly how you have wired it. Be sure to include all connections, power, ground, power sources, and any other relevant details..

I'm not familiar with how to make a schematic. Would a photo suffice?

Hi, and welcome :slight_smile:

Photos are a tad difficult to look at, it's 3d but you can't rotate etc, so it's this flat 2d image after all. Schematics are much better, or if you draw by hand and take a photo of that.



Here are a couple photos if that is difficult to see I will add a tinkercad soon

Does the solenoid work properly when temporarily powered by the buck converter?

It'll do for now.

  1. That solenoid, how many amps does it draw?
  2. Is that MOSFET connected before the solenoid or after?
  3. The solenoid probably moves ok if you connect it directly to the power source.

So you mean just plug the solenoid directly into the buck converter?

Yes! just to hear it click!

  1. According to the link I sent it should be 5v /.8amp or 6v/1amp

I will check on your other two questions

  1. Right, I was lazy :upside_down_face: It's probably more than the breadboard can handle, and there are several jumperwires, each connection in series with other, adds more resistance.

What you want to do is connect the solenoid so it gets unrestricted power (sounds like Darth Vader..) as little restricted is better wording.

What is the green wire going between the breadboard and the Arduino? Is that GND?
This is confusing to me because typically red would be voltage and black would be GND, but it looks like you may have reversed that convention here. It's just semantics though.

Also, your 220 ohm resistor is letting about 2mA of current in to the gate of the transistor. That should work, but you might consider lowering the value of that resistor to get the transistor to switch states faster and more completely. You should be able to go down to a value as low as 47 ohm with no problem.

Here is what a schematic looks like and it is for your solenoid which replaces the M (motor)..

The 10K resistor insures it will be off during reset etc.
The link to the solenoid states: "These draw quite a bit of current, 800mA at 5V and 1 Amp at 6V, so you'll want a good strong driver." Ensure that the source of the MOSFET is connected directly to the ground of the converter and that the solenoid's positive terminal is connected to the positive output of the converter.

Does this diagram show the buck converter? Or can I just power the solenoid direct with the 12v battery?

No!

No!

We can’t accurately assist without knowing the specifics of your setup. Clear, detailed descriptions will allow us to offer the best help possible. Without this information, diagnosing and solving your issues will be much harder.

Give yourself an belated Christmas present and pick up these resources, along with the Arduino Cookbook:

This will help build your basic knowledge of the Arduino and Electronics.

Paper and pencil. Make rectangles for larger items (controller, buck converter, solenoid) and label as to function. Draw straight lines from one component to another where they connect. Label/identify the connection points at each component (power supply positive and negative or D2 for instance).

Make it flow more or less left to right (input to output).

Take a picture and upload it to the thread.

1 Like

?
The gate of a mosfet has near infinite resistance, so no current flows.
A 100k or higher resistor would still drive the FET without a problem.
The only thing is a fraction longer switching time, which is irrelevant in this case.

The 220 ohm resistor is there to limit Arduino pin current related to the gate capacitance.
Leo..

1 Like

So I tried this and still not enough to make the solenoid go. It wiggles. So maybe I need to kick it up to 6v. The converter only puts out 5.2/6amp

So i made my circuit with tinkercad which provides a schematice which is nice. Only differences are that tinkercad doesnt give me a solenoid so i just picked a random motor.

Also the batter says 9v. However, I am using a converter to change 12v to 5v. According to the converter specs the ouput from the converter is 5.2v/6A/30W.

Another odd thing is I bought 2 of the same solenoid and one shows as 350 mA and the other 2amps. Its weird because they seem like the same model and I bought them both at the same time from the same place. Also, the ada fruit link I shared claims they should also work at 5amp. So i am not sure what to think haha.