What components do I need to wire a pull solenoid to arduino?

Hello All,

I’m a noob to this forum and a noob to electronics as well so I will be asking lots of questions.

My first arduino project is creating an electronic trigger for an air rifle using a pull solenoid. The solenoid will be replacing a mechanical trigger mechanism that is simply a rod that connects a trigger to a lever. The solenoid will be attached to the mechanical lever which when pulled will allow the release of high pressure air into the barrel. The electronic trigger mechanism will be replacing a rod that attached to the trigger which when pulled actuates the lever. Instead of a rod connecting the trigger to the lever, when the trigger is pulled it will press upon a push button which will send a signal to the solenoid to pull a lever, releasing a blast of air.

*Trigger= conventional trigger found on an air rifle

So far I have purchased the solenoid, nano arduino, relay, diode, lithium batteries, battery holder, and breadboards.

I want to know exactly what do I need to wire everything. And how to wire it properly.

Solenoid specs are:
Suction:20N
Vltage:12V DC
Stroke:10mm/0.4"
24V Current:1A

Batteries are 14500, 3.7v, 800mah Li-ion

Here’s a list of parts I bought so far:

  1. Batteries
    Xtar 14500 800mAh 3.7V Protected Lithium Ion (Li-ion) Button Top Battery - Boxed

  2. Arduino nano https://www.amazon.com/gp/aw/d/B07R9VWD39?ref=ppx_pt2_mob_b_prod_image

  3. Relay https://www.amazon.com/gp/aw/d/B01NACU547?ref=ppx_pt2_mob_b_prod_image

  4. Breadboard https://www.amazon.com/gp/aw/d/B07RSBPFN7?ref=ppx_pt2_mob_b_prod_image

  5. Wires
    https://www.amazon.com/gp/aw/d/B01EV70C78?ref=ppx_pt2_mob_b_prod_image

  6. Solenoid
    https://www.amazon.com/gp/aw/d/B07VC6R4DH?ref=ppx_pt2_mob_b_prod_image

  7. Battery holder https://www.amazon.com/gp/aw/d/B01MAXT00Q?ref=ppx_pt2_mob_b_prod_image

Google Arduino + solenoid and select the project....

Do I need the diode when using a relay?

Can I wire these parts without a breadboard?

I googled this before coming here and could not find answers specific to my question. Which lead me to a forum where I’m hoping to find direct answers.

Good question. What makes You ask? The answer is Yes for every inductive load.

Yes. Use soldering.

You ought to find 13 answers for 12 questions. Look for application notes.

Sorry, missed that You need some kind of driver for every load that needs more than 20 milliamps.

Is a driver the arduino nano board or the relay?
Thanks for the previous answers

You have things to learn before You connect any electronics.
A driver is a device making it possible for a controller to operate more current consuming devices like relay coils or solenoids.

Yes I know I have to things to learn.
According to your answer a driver is a relay if I’m not mistaken

bender_5000:
According to your answer a driver is a relay if I’m not mistaken

Wrong. Relays needs drivers.

Which driver do I need for my project?

There are so called relays that actually should be called "relay boards", "relay modules", that contain this "driver" and operates by controller 5 volt, 20 mA signals. They have a separate "power supply line" that handles the coil "power".

For a single solenoid You can either use a relay, or motor, driver board, or an N channel logic MOSFET transistor and a resistor or two.

What kind of stuff is that "electronic trigger" You mention?

Ahh that makes sense. From the looks of the one I purchased it is a “relay board”.

I am replacing the mechanical trigger mechanism on my air rifle with an electronic trigger mechanism

Relay boards have a separate power supply line and there is one pin that connects to the controller, and GND of cource.
Your mystic electronic trigger does not send any trigger signal to the controller....

Trying to help members I feel that a lot of time is used just to write an understandable question.

Know that every helper, expert, professor.. is a complete newbie to Your project. We are not mind readers and very few use chrystall balls.

2.44 Am and high time to sleep here..

I explained exactly what was pertinent to the information I am seeking. The components that I listed in the first post are the electronic trigger itself.
I believed further explaining what the trigger was used for was irrelevant and would only confound the questions I asked. Perhaps I was wrong in thinking that. I don’t see what is “mystical” about it as I have told you what the trigger is for when you asked. As you can see I don’t have a problem telling you what the trigger is for but I am having trouble understanding how it will help you to answer my questions. I thought listing the parts for my project would be enough to help me with learning how to wire them. However I am saddened to hear you’re not a mind reader.

You're on the wrong track. What we want to know, among others, is inputs and outputs of the controller.
"Trigger" is a commonly used name for signals to a controller. What an output is doing is secondary as long as the electronics is properly designed.
Listing a lot of stuff is not at all explaining what the purpose is.
Maybe You should scrap that project and step in as a helper instead as You "know how to...".

the relay "module" has driving transistor and a flyback diode incorporated , the solenoid requires 12 volt supply and the relay module is 5volt supply
the attached is a rough circuit without specific details of the connections (pins) between the nano and the relay module

circuit.jpg

circuit.jpg

As I said I’m a noob so I’m unfamiliar with commonly used terminology in electronics. I am quite literally building a “trigger mechanism” used for an air rifle as I said previously.

The solenoid will be attached to a mechanical lever which when pulled will allow the release of high pressure air into the barrel. The electronic trigger mechanism will be replacing a rod that attached to the trigger which when pulled actuates the lever. Instead of a rod connecting the trigger to the lever, when the trigger is pulled it will press upon a push button which will send a signal to the solenoid to pull a lever, releasing a blast of air.

@cherk thank you for the info. Being that the relay module has a diode, do I still need to add another diode?

sorry the circuit didn't show up .....I've amended it now .

the additional diode needs to go across the solenoid to suppress any flyback spikes which can cause emf
effects on the nano (resets).

edit: not sure I know why you need a MCU for what seems a simple replacement

cherk:
sorry the circuit didn't show up .....I've amended it now .

the additional diode needs to go across the solenoid to suppress any flyback spikes which can cause emf
effects on the nano (resets).

and burn the contacting relay fingers..