Arduino nano connection with a vibration motor

Hi there, im new to this and I'm trying to connect a 2.7~3.3v vibration dc motor to the Arduino Nano and add a button and an LED to it. Did I do the schematic correctly and is the resistance value correct? There will also be a 9v battery connected to the Arduino Nano.
when the button is pushed it will turn on the motor and one of the led and when the 9v battery is put it will light up the one of the leds

That motor will need more current than an Arduino pin can supply - use a transistor to switch it, and don't power it from the 3.3V or 5V pins but directly from a battery or other power source.

The LED needs a resistor in series indeed, but can not be in the same path as the motor as a motor needs way more current than an LED. The two just don't go together like that.

You can have a single pin light an LED and control a transistor which switches the motor.

How much current does this motor of yours need?

Connecting 3V3 to D3 is asking to fry your Arduino. Never connect a port pin to a power source or ground. You can use a N-Channel MOSFET avalanche rated to drive the motor directly.

That needs a motor driver, see e.g. this tutorial. Don't forget the flyback diode or your Arduino is likely to die rather quickly.

Do not even think of powering it from the 3.3V pin, which is meant for sensors and can deliver only some 30-50 mA of current. Use a separate power source for the motor, such as a 3.3V regulator powered by your 5V power supply (again not the Arduino but an external supply - such as a USB charger).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.