High power output mosfets

The mosfet outputs can be used for various purposes like solenoids and other functions. The NCE6005 mosfets on the FluidBoard are rated for 60V, 5A, which should be enough for most applications.

Each FluidBoard comes with 3x mosfet outputs.

Typical uses are pneumatic valves (air blast, tool release, a pneumatic turret), coolant pumps, air assist for a laser, vacuum hold-down solenoids, fans and work lights.

How it works

The mosfet outputs are low-side switches. The positive side of the load is permanently connected to the supply (the Vcc terminal), and the mosfet sits between the negative side of the load and ground. When the output is switched on, the mosfet connects the negative side of the load to ground and current flows. When it is off, the circuit is open.

This has a few practical consequences:

  • The negative wire of the load is not a ground. Never connect it to the machine frame or to any other GND. If you do, the load bypasses the mosfet and is simply always on.
  • With a load connected and the output off, the Out terminal sits at roughly the supply voltage (through the load). When the output is on, it drops to nearly 0V. This is normal, and a handy check with a multimeter.
  • The voltage the load gets is determined by the jumper, not by the controller. A 12V valve belongs on the 12v setting; only put a load on VMot if it is rated for your motor supply voltage.

Wiring

Wiring diagram not available. View SVG

  • Set the jumper to either 12v or VMot. The 12v output can sink 2A total. The VMot output is 5A total.
  • Wire the Vcc side of the screw terminal to the positive side of the load.
  • Wire Out1-3 to the negative side of the load.
Controller pin Gpio Description
Out1 gpio.46 Mosfet output; shared with PWM output
Out2 gpio.45 Mosfet output; shared with PWM output
Out3 gpio.3 Mosfet output; shared with PWM output

The pins are shared as follows: mosfet Out1 (gpio.46) is the same pin as 5V output 3, mosfet Out2 (gpio.45) is 5V output 2, and mosfet Out3 (gpio.3) is 5V output 4, which is also the pin used for the LED strip. Each gpio can only be used for one function in your configuration.

Current budget

The current limits are totals, so add up everything that runs at the same time. If the current of a solenoid or valve isn't printed on it, measure the coil resistance and calculate it: current = voltage / resistance. A 12V coil of 24 Ω draws 0.5A, so four of those would already reach the 2A limit of the 12v supply. Use wire that is rated for the current you draw.

Inductive loads

Solenoids, valves, relay coils and DC motors are inductive. When the mosfet switches off, the collapsing magnetic field produces a voltage spike that can be many times the supply voltage. The mosfet outputs on the FluidBoard have flyback diodes on the board, so you can connect valves, relay coils and small motors directly.

With long cables to the load, an extra diode at the load itself can still help: it absorbs the spike where it is generated, so it doesn't travel down the cable and couple into signal wiring next to it. If you add one:

  • Cathode (the end with the stripe) to the positive side of the load.
  • Anode to the negative side of the load, the side that goes to Out1-3.
  • For on/off loads, a general purpose diode such as a 1N4007 is fine. For loads you switch with PWM, use a Schottky diode rated for the load current.

Some pneumatic valves have suppression built into the connector (often visible as an LED); those are polarized, so check that Vcc goes to the + side of the valve.

Configuration

user_outputs:
  digital0_pin: gpio.46
  digital1_pin: gpio.45
  digital2_pin: gpio.3

Each digitalN_pin becomes a digital output you can switch from G-code. The number after digital is the number you use with the P word, so in this example Out1 is P0, Out2 is P1 and Out3 is P2. Only configure the outputs you actually wire; leave the others out so the pins remain available for a laser, PWM spindle or LED strip.

All PWM capable pins are shared with the mosfet outputs.

Switching outputs from G-code

  • M64 P0 switches output 0 on immediately, M65 P0 switches it off immediately.
  • M62 P0 and M63 P0 do the same, but synchronized with motion: the change is queued and takes effect when the next motion starts, so it happens at the right place in the toolpath.

Use M64/M65 for manual control from the console or a macro, and M62/M63 inside programs, for example to start an air blast exactly when a cut begins.

Testing it

Test every output from the console before you trust it in a program:

  1. Power up with the load connected and keep clear of anything the load moves.
  2. Send M64 P0. The load should switch on. Measure the Out terminal: it should be close to 0V.
  3. Send M65 P0. The load should switch off, and the Out terminal should rise to roughly the supply voltage.
  4. Repeat for the other outputs.

Don't rely on a mosfet output for anything that must switch off in an emergency. Loads that can hurt someone when they stay on should be cut by the emergency stop circuit independently of the controller.

Troubleshooting

Symptom Likely cause Fix
Load never switches on Jumper missing or on the wrong setting Set the jumper to 12v or VMot to match the load
Load never switches on Wrong output number Check that the P number matches the digitalN_pin
Load is always on Negative side of the load touches the frame or another GND Isolate the negative wire; it must only go to Out1-3
Load is always on or flickers The gpio is also used by a laser, PWM spindle or LED strip Use each shared pin for one function only
Board resets or misbehaves when a valve switches Interference from the load cable coupling into signal wiring Keep load wires away from signal wires; with long cables, add a flyback diode at the load
Load is weak or drops out when several outputs are on Total current above the supply limit Recalculate the current budget, or move loads to VMot or an external supply with a relay
Copyright (c) 2024 by NubiloSoft, all rights reserved.
Accepted payment methods