Vibration motor disconnects serial ports

Hello everyone,

I try to add some feedback to one of my touch surfaces and using an vibration motor, similar to this project. I soldered everything to a board and connected it via jumper wires. I dont think the board provides additional information but maybe there is a hardware error I am not seeing

Here is my Problem: The code is uploaded correctly and runs, but after every 'vibration' the serial port is disconnected and I hear the disconnect sound of the system, but no reset is initiated. I increased the delay time of the setup and shorten the frequency of the vibration. If there was a reset the vibrations would be longer apart, but there is an impulse every 1000ms (instead of 5000ms waiting time).

#include <Arduino.h>

//#include <MPR121.h>
//#include <MPR121_Datastream.h>
//#include <Wire.h>
//#include <Logger.h>

bool DEBUGLOG = true; 

const uint32_t BAUD_RATE = 9600;

uint8_t motorPin = 3;

void setup() {
  Serial.begin(BAUD_RATE);

  pinMode(motorPin, OUTPUT);

//  Logger::log("--- G08 ---");
  Serial.println("--- G08 ---");

  delay(5000);

//  Logger::log("--- start ---");
  Serial.println("--- start ---");

}

void loop() {
//  Logger::log("ON");
  Serial.println("ON");
  digitalWrite(motorPin, HIGH);
  delay(100);

//  Logger::log("OFF");
  Serial.println("OFF");
  digitalWrite(motorPin, LOW);
  delay(1000); 
}

I had some issues with other devices when they drew too much current and the devices reset, but since there is no 'odd' behavior in the main_loop I doubt there is hardware error. When I disconnect Pin_3 the program and the serial monitor runs normal.

Had anyone similar experiences?

You're the only one who can say that, because we can't see your schematic.

You are right. I copied the schematic in the example

I'm sure there is.

I see a small-board Arduino (Nano?) in your picture.
The 3.3volt supply of a Nano is 'stolen' from the USB<>Serial chip, and can only provide ~30mA.
You're trying to power a >100mA vibration motor off that pin.
Try to power the motor from the 5volt pin, with a suitable resistor in series.
Leo..

That is shown using a UNO which has an actual 3.3 V regulator.

The Nano - which is much more practical in most respects - derives the "3 3 V" from the USB interface chip, so if you overload it by connecting a motor, the USB interface is disabled and consequently disconnects from your PC. :worried:

Thank you for the clarification. That makes a lot of sense. I did not look at the output specifications of the 3V3. Usually I use Nanos, Unos, etc with external supplies and do not need to worry about current limits, except for quick prototypes. I should not be so confident in my unproven layout.

I added a 33Ohm Resistor in series between the 5V supply of the Nano

2022-03-17 09_24_04

and the vibration disk is working properly, no lost connection.

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