Solenoid Valve Won't Open in OpenPnP: The 60-Second Fix
Your solenoid valve won't open. The nozzle has no vacuum. You can't pick up components. Before you spend an hour debugging, check this: the GPIO pin mapping in OpenPnP doesn't match your actual wiring.
That's the answer 80% of the time. Here's the 60-second diagnostic and the full troubleshooting flow.
The 60-Second Fix
OpenPnP's solenoid control is configured through GPIO pins. The most common failure is a mismatch between the pin number in your OpenPnP configuration and the physical pin your solenoid valve is wired to.
Check this first:
- Open OpenPnP →
Machine → Drivers → Solenoid - Note the GPIO pin number listed (e.g., GPIO 17, GPIO 26)
- Trace the physical wire from your solenoid driver board to the GPIO header
- Confirm the pin numbers match
If they don't match, update the OpenPnP configuration to match your wiring. Save, restart OpenPnP, and test.
If they already match, keep reading.
Full Diagnostic Flow
Step 1: Physical inspection
- Is the solenoid valve connected to its driver board?
- Is the driver board connected to the GPIO header?
- Are all connections secure? (Check for loose Dupont connectors—they're the #1 physical failure point)
Step 2: Test the solenoid directly
Use a multimeter to verify the solenoid valve itself works:
- Disconnect the solenoid from the driver board
- Set your multimeter to resistance (ohms)
- Measure across the solenoid terminals
- You should see 20-80 ohms for a typical 12V solenoid
If you see infinite resistance (open circuit) or zero (short), the solenoid is dead. Replace it.
Step 3: Test the driver board
Most solenoid driver boards use a MOSFET or relay to switch the solenoid:
- Apply 5V to the driver board's signal input (the pin connected to GPIO)
- The solenoid should activate
- If it doesn't, the driver board may be faulty
Step 4: Verify GPIO pin configuration
In OpenPnP, the solenoid pin mapping depends on your controller firmware:
For GRBL-based controllers:
$4=17 # Solenoid enable pin (example)
For Smoothieware:
solenoid.enable = true
solenoid.pin = 2.4 # Physical pin designation
For Marlin:
Check pins.h or your configuration for the solenoid output pin.
Step 5: Check current limiting
Some GPIO pins can't source enough current to drive a solenoid directly. Typical solenoid valves need 100-300mA. Most microcontroller GPIO pins max out at 20-40mA.
If your driver board isn't amplifying the signal, you need a transistor or MOSFET between the GPIO and the solenoid.
Step 6: Firmware pin mapping
Different controller boards map physical pins differently. An "GPIO 17" on a Raspberry Pi isn't the same as "GPIO 17" on an Arduino Mega. Verify your controller's pinout diagram and cross-reference with OpenPnP's configuration.
Common confusion: BCM pin numbering vs. board pin numbering on Raspberry Pi. BCM 17 ≠ Board 17.
The 60-Second Diagnostic Flowchart
Solenoid won't open
├── Check GPIO pin mapping in OpenPnP config
│ ├── Mismatch → Fix pin number → Done
│ └── Match → Continue
├── Test solenoid with multimeter (20-80Ω?)
│ ├── Bad → Replace solenoid → Done
│ └── Good → Continue
├── Test driver board (apply 5V to signal input)
│ ├── Bad → Replace/repair driver → Done
│ └── Good → Continue
├── Check current capability of GPIO pin
│ ├── Insufficient → Add MOSFET driver → Done
│ └── Sufficient → Continue
└── Verify firmware pin mapping matches physical board
├── Wrong → Update firmware config → Done
└── Right → Check for software pin conflicts
PikkoBot's Pre-Configured Solenoid Setup
PikkoBot ships with the solenoid valve, driver board, and GPIO wiring fully documented and pre-tested. The OpenPnP configuration includes the correct pin mapping for PikkoBot's controller, so the most common failure mode (pin mismatch) is eliminated out of the box.
If you're building a custom setup, use PikkoBot's wiring documentation as a reference for how a working solenoid system is configured.
Prevention
After you fix the issue, document your pin mapping somewhere accessible. A simple reference like this saves hours of future debugging:
Solenoid: GPIO 17 (BCM) / GPIO 11 (Board)
Driver input: 5V signal
Solenoid: 12V, 200mA
OpenPnP config: Machine → Drivers → Solenoid → Pin = 17
Keep this next to your machine. When something breaks six months from now, you'll know exactly where to look.
Related Documentation
For the complete hardware setup and calibration sequence, see the OpenPnP v4 Calibration Guide.
New to PikkoBot? Start with the Getting Started guide.
