In-stock items handed to the courier within 24-48 hours · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark guided builds
  • Electrolark lessons
  • Electrolark circuit tools
  • Electrolark part library
  • Project ideas on Electrolark

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy

© 2026 Geekobot. All rights reserved.

+91 91810 15606 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

Product directory · Sitemap

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,946 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,347 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,400 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV2,960 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,319 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,322 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers598 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries921 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors660 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive470 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs576 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays1,201 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables2,653 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping122 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test794 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics195 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits336 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts296 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio145 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Motors & Motion
  4. ›Mini Solenoid Valves 12V and 24V

Component guide · Beginner · 4 min read

Mini Solenoid Valves 12V and 24V

2-Way and 3-Way for Air, Water and Gas

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the Mini solenoid valve isMini solenoid valve pinoutWiring the Mini solenoid valveExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

A mini solenoid valve uses an electromagnet to open or close a small air, water or gas line. A 2-way valve has an inlet and an outlet; a 3-way valve adds an exhaust, so it can fill and then vent a small cylinder or bladder. Direct-acting types open with no line pressure. Drive the coil from a MOSFET with a flyback diode.

Key specs at a glance

Voltage
12 V DC or 24 V DC, as marked
Type
2-way normally closed, or 3-way 2-position
Operation
Direct-acting: opens with no line pressure
Port size
1/8 inch or 1/4 inch
Media
Air, water or gas as stated on the listing
Control
MOSFET module with a flyback diode
Mounting
Port threads; check the thread type of the fittings
!Safety: High current: wires and parts get hot

This part can carry many amps. Use wire thick enough for the current, put a fuse close to the battery, check that connectors are rated for the load and give drivers and motors room to cool. A short at these currents melts wires in seconds.

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1DC 12V 1/4'' 3-Way 2-Position Pneumatic Solenoid Valve for Compressed Air₹1,338
  • Option 2DC 12V Solenoid Valve 1/4'' 2-Way Normally Closed Direct-Acting for Water, Air, Gas₹689
  • Option 3DC 12V Solenoid Valve 1/8'' 2-Way Normally Closed Direct-Acting for Water, Air, Gas₹748
  • Option 4DC 24V Mini Solenoid Valve for Water, Air and Gas, Normally Closed₹406
  • Option 5FA0520E 12V DC 2-Position 3-Way Mini Solenoid Valve for Air and Gas₹274
01

What the Mini solenoid valve is

A solenoid valve is a coil around a plunger. When the coil is powered the plunger lifts and the valve opens (normally closed type) or closes (normally open type); a spring returns it when power is removed. Direct-acting valves move the seal themselves, so they work from zero up to a stated maximum pressure.

A 2-way valve just opens or shuts a line. A 3-way, 2-position valve has three ports: inlet, outlet and exhaust. In one position the inlet feeds the outlet; in the other the outlet is vented through the exhaust. That is how you inflate and then release a small pneumatic cylinder, a bladder or a gripper.

The valves here are the small 1/8 inch and 1/4 inch types: direct-acting 12 V valves for water, air and gas, a 24 V mini valve, a 12 V 1/4 inch 3-way pneumatic valve for compressed air, and the FA0520E 12 V 3-way mini valve for air and gas. Check the listing for the media and the maximum pressure of the exact valve.

Safety with gas: only use a valve with the gas stated on its listing, and never use these for fuel gas appliances unless the valve is certified for that use.

02

Mini solenoid valve pinout

The pins on the Mini solenoid valve and what each one does.

PinFunction
Coil lead 1+12 V or +24 V, as marked
Coil lead 2Switched to ground by the MOSFET
Inlet port (P)Pressure or water in
Outlet port (A)To the load
Exhaust port (R)3-way only: vents the outlet
PinFunction
Coil lead 1
+12 V or +24 V, as marked
Coil lead 2
Switched to ground by the MOSFET
Inlet port (P)
Pressure or water in
Outlet port (A)
To the load
Exhaust port (R)
3-way only: vents the outlet
03

Wiring the Mini solenoid valve

Connect the Mini solenoid valve like this.

Mini solenoid valve pinArduino UnoESP32
Coil +Supply + (12 V or 24 V)Supply +
Coil -MOSFET module OUT-MOSFET module OUT-
DiodeAcross the coil, stripe to +Across the coil, stripe to +
MOSFET signalD7GPIO 26
GNDGND shared with the supply -GND shared with the supply -
Coil +
Arduino Uno:
Supply + (12 V or 24 V)
ESP32:
Supply +
Coil -
Arduino Uno:
MOSFET module OUT-
ESP32:
MOSFET module OUT-
Diode
Arduino Uno:
Across the coil, stripe to +
ESP32:
Across the coil, stripe to +
MOSFET signal
Arduino Uno:
D7
ESP32:
GPIO 26
GND
Arduino Uno:
GND shared with the supply -
ESP32:
GND shared with the supply -
04

Example code

The MOSFET switches the coil. A 3-way valve works the same way: HIGH connects the inlet to the outlet, LOW vents the outlet (normally closed type).

Open the valve for 3 seconds, then close it (Uno or ESP32) · Arduino C++Verify & upload in Electrolark
const int VALVE = 7;   // use 26 on an ESP32

void setup() {
  pinMode(VALVE, OUTPUT);
  digitalWrite(VALVE, LOW);
}

void loop() {
  digitalWrite(VALVE, HIGH);   // coil on: valve opens
  delay(3000);
  digitalWrite(VALVE, LOW);    // coil off: spring closes it
  delay(10000);
}
05

Setup and tuning

Coil heat

solenoid coils get warm when held on. Pulse them, or check the duty rating.

Flyback diode

always fit one across the coil.

Threads

match the port thread of your fittings, and use thread tape on tapered threads.

Filtering

dirt can hold the seat open. A small inline filter helps.

06

What you need

Shop this list8 of 10 found in our store · ₹4,272

  • DC 12V 1/4'' 3-Way 2-Position Pneumatic Solenoid Valve for Compressed Air: the part this guide coversDC 12V 1/4'' 3-Way 2-Position Pneumatic Solenoid Valve for Compressed Air₹1,338
  • 12 V 1/4 inch direct-acting valve, normally closed: water, air or gas lineDC 12V Solenoid Valve 1/4'' 2-Way Normally Closed Direct-Acting for Water, Air, Gas₹689
  • 12 V 1/8 inch direct-acting valve, normally closed: smaller portDC 12V Solenoid Valve 1/8'' 2-Way Normally Closed Direct-Acting for Water, Air, Gas₹748Closest match, check the specs
  • DC 24V Mini Solenoid Valve for Water, Air and Gas, Normally Closed: another version this guide coversDC 24V Mini Solenoid Valve for Water, Air and Gas, Normally Closed₹406
  • FA0520E 12 V 3-way mini valve: to fill and vent a small cylinderFA0520E 12V DC 2-Position 3-Way Mini Solenoid Valve for Air and Gas₹274Closest match, check the specs
  • MOSFET switch module (D4184 / LR7843): to switch the valve coil from a GPIOMOSFET Switch Module, Relay Replacement (D4184 / LR7843)₹39
  • 1N4007 diode: flyback protection across the coilFind this part
  • SMPS power supply in metal enclosure (5/12/24 V): a 12 V or 24 V supplySMPS Power Supply, Metal Enclosure (5V / 12V / 24V)₹298Closest match, check the specs
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • ESP32-WROOM-32 38-pin development board: controller for the valveESP32-WROOM-32 38-Pin Development Board₹480
07

Alternatives and when to choose them

  • ✓For larger water valves, see 12V solenoid water valve.
  • ✓For pumps instead of valves, see mini submersible water pump.
  • ✓For a build, see the gravity-fed drip irrigation valve project.
08

Common mistakes to avoid

  • !No flyback diode across the coil.
  • !Using a pilot-type valve with no line pressure.
  • !Using a valve with a gas it is not rated for.
  • !Holding the coil on and overheating it.
  • !Mixing up the inlet and exhaust ports on a 3-way valve.
09

Frequently asked questions

Does a direct-acting valve need pressure?

No. It opens at zero pressure up to its stated maximum, so a raised tank works.

What is a 3-way valve for?

It switches an outlet between pressure and exhaust, so you can fill and then release a small cylinder or bladder.

Can I drive it straight from an Arduino pin?

No. A coil needs more current than a pin can give. Use a MOSFET module and a flyback diode.

What is normally closed?

The valve is shut with no power and opens when the coil is powered.

12 V or 24 V?

Use the supply you already have. 24 V draws less current for the same power.

Parts for this guide

  • DC 12V 1/4'' 3-Way 2-Position Pneumatic Solenoid Valve for Compressed Air
    ₹1,338View
  • DC 12V Solenoid Valve 1/4'' 2-Way Normally Closed Direct-Acting for Water, Air, Gas
    ₹689View
  • DC 12V Solenoid Valve 1/8'' 2-Way Normally Closed Direct-Acting for Water, Air, Gas
    ₹748View
  • DC 24V Mini Solenoid Valve for Water, Air and Gas, Normally Closed
    ₹406View
  • FA0520E 12V DC 2-Position 3-Way Mini Solenoid Valve for Air and Gas
    ₹274View
  • MOSFET Switch Module, Relay Replacement (D4184 / LR7843)
    ₹39View
  • 1N4007 Rectifier Diode (Pack of 10)
    ₹15View
  • SMPS Power Supply, Metal Enclosure (5V / 12V / 24V)
    ₹298View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹480View
Shop Pumps & Valves

🎓 Keep learning on Electrolark

  • MOSFET Switch Module, Relay Replacement (D4184 / LR7843)How this part works, with a simulator
  • 1N4007 Rectifier Diode (Pack of 10)How this part works, with a simulator
  • SMPS Power Supply, Metal Enclosure (5V / 12V / 24V)How this part works, with a simulator
  • Learn the topicFree lessons with simulators and quizzes
  • Browse these partsPinouts, specs and what each part does

Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans

Projects that use it

Put this into practice: 9 step-by-step builds in our project library use parts from this guide.

Intermediate · 2 hoursLeak-triggered water shut-off valveView projectIntermediate · 2–3 hoursHoney jar filling scaleView projectIntermediate · 2–3 hoursTouchless water tap for washbasinsView project
Browse all 9 projects

Keep learning

Component guideBeginner12V Solenoid Water and Air Valves (1/2 Inch, Plastic and Brass)A 12 V solenoid valve opens a water or air line when its coil is powered and closes again when power is removed (normally closed).4 min read · Motors & MotionComponent guideBeginnerPush-Pull Solenoid 12VPush-pull solenoid guide: how the plunger moves, stroke and force, duty cycle, MOSFET drive with flyback diode, and PWM hold to keep it cool.4 min read · Motors & MotionComponent guideBeginnerMini Submersible Water PumpsMini submersible pumps sit inside the water and push it up a tube.3 min read · Motors & Motion

Sources

  • Arduino reference: digitalWrite()
  • MOSFET switch module (D4184 / LR7843) documentation

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the Mini solenoid valve isMini solenoid valve pinoutWiring the Mini solenoid valveExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)5 items · ₹2,683

DC 12V 1/4'' 3-Way 2-Position Pneumatic Solenoid Valve for Compressed Air · DC 12V Solenoid Valve 1/4'' 2-Way Normally Closed Direct-Acting for Water, Air, Gas · DC 24V Mini Solenoid Valve for Water, Air and Gas, Normally Closed · MOSFET Switch Module, Relay Replacement (D4184 / LR7843) · Uno R3 CH340G ATmega328p Compatible Development Board

Ask the Community

Ask a question