vibration motor/How it drives the motor/03. A switch in the ground wire
How it drives the motor · 03 of 10

A switch in the ground wire

SIGNAL does not power the motor. It sets the gate of a MOSFET that sits between the motor's − lead and GND, and the gate needs only 0.7 to 1.4 V to begin to conduct. So a 3.3 V pin switches the motor fully on, gives a third of a milliamp to do it, and a 10 kΩ keeps the motor off whenever nothing drives the pin.

The motor is always connected to the supply

The motor's + lead sits on the board's 3.3 V all the time, whether it is running or not. What is switched is the other end. Its − lead goes to the drain of a MOSFET, the MOSFET's source goes to GND, and the gate decides whether current can pass between them.

A switch in the ground wire
SIGNAL is
Gate
3.3 V
MOSFET
closed
Motor current
about 54 mA
Across the MOSFET
under 3 mV
SIGNAL HIGH from a 3.3 V board. The gate needs 0.7 to 1.4 V to begin to conduct, so 3.3 V is more than twice the most any part needs. The MOSFET closes, about 54 mA flows from the rail through the motor to GND, and the LED lights. Your pin gives only the 0.33 mA the 10 kΩ takes.

Pick a state for SIGNAL. LOW, the gate is at 0 V and the MOSFET is open: the − lead has no path to GND, so no current flows and the motor is still. HIGH, the MOSFET closes, current runs from the 3.3 V down through the motor to GND, and the motor turns. The LED lights on the same path.

This is called a low-side switch, and it is the usual way to let a microcontroller turn on something that needs more current than a pin can give.

What the gate needs

A MOSFET's gate is insulated from everything else in it. It does not take a steady current; it takes a voltage. The AO3400A starts to conduct somewhere between 0.7 and 1.4 V on its gate, depending on the part, and its datasheet gives its full on-resistance with 2.5 V: at most 52 mΩ. A 3.3 V pin gives more than twice the highest threshold, and a 5 V pin more again, well inside the 12 V the gate is rated for.

At the motor's current, about 54 mA, that on-resistance drops less than 3 mV. The switch is, for this purpose, a piece of wire.

What the pin gives

Only the 10 kΩ's share: 0.33 mA from a 3.3 V pin, 0.5 mA from an Uno's 5 V. That is well inside what any of the four boards in this book can supply, including a Pico's pin at its default 4 mA drive. The motor's current never flows through your board at all, only through its GND.

That also means SIGNAL can come from anything that makes a voltage: a pin, a switch to VCC, another block's output.

Off unless told otherwise

The 10 kΩ from the gate to GND is a pull-down. When nothing drives SIGNAL, because the wire is out or the board has not started its sketch yet, it holds the gate at 0 V. Without it a gate left floating picks up whatever is nearby, can sit halfway, and leaves the motor running weakly with the MOSFET warming up. With it, the motor is off at power-up, off during a reset, and off when the wire falls out.

When it does not work

Is a 3.3 V pin strong enough to drive the motor?

It does not have to be. The pin drives the MOSFET's gate, which draws almost nothing, and the 10 kΩ beside it, which takes 0.33 mA at 3.3 V. The motor's current flows from the board's own 3.3 V through the MOSFET to GND and never through your pin.

Why does the motor stay off while my board boots?

Because of the 10 kΩ from SIGNAL to GND. Until your sketch makes the pin an output, the pin floats, and a floating gate could drift up and switch the motor half on. The resistor holds it at 0 V, so the motor stays still through power-up and resets.

Can I use the TK30 without a microcontroller?

Yes. Power VCC and GND, then touch SIGNAL to VCC or any voltage from about 2.5 V up, and the motor runs. Let go and the 10 kΩ turns it off. The gate is rated for up to 12 V, but keep to your supply.

Why is the switch on the ground side?

An N-channel MOSFET switches best with its source on GND, where a gate voltage measured from GND is the voltage it sees. With the switch above the motor instead, the gate would need to be several volts above the motor's supply to turn on.

Where this goes next

VCC feeds a regulator and nothing else, and that decides how to wire it.

Why VCC can be 5V

Edit this page — content/books/vibration-motor/a-switch-in-the-ground-wire.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Vibration Motor

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum