Disconnection of the bluetooth board when using a servo motor

Hello, I made an app to control a servomotor by bluetooth using arduino, the app works, but when pressing the button to move the servo, it sends the command many times and turns off the bluetooth module or it also turns off when starting the servo. I tried it with leds and it does not turn off, it is only when I use a servo motor, could someone help me? It is a project that I have, Thank you

2 Likes

Sounds like a power issue to me. How are you powering it all?

2 Likes

Hello nacraft 71

Make/Model/Specification of the Servo?

I suspect that Joel's suspicions about the power supply are in the right ball park. Also ensure that the board is adequately cooled.

1 Like

at first I did it with the pc cable, with which I load the data and then with a 9v battery. I could have damaged something when using the pc cable that gives me less voltage ?.

1 Like

image

this is the servo

1 Like

Probably not damaged. Amps are as important as volts which is why I asked you for the specification (or a link).

1 Like

https://datasheetspdf.com/pdf/791970/TowerPro/SG90/1

Is this, if I don't know what harm could it be? now I'm using it with a 9v battery but it's still the same.

1 Like

How have you connected the servo the arduino? Are you connecting the 9v battery the arduino then the arduino pins to power the servo? Like ChrisWard said its not so much voltage as it is current. Arduino only gives something like 0.25A max current from its pins.

When using servos it much better practice to use an external/separate power to the arduino power.

You could test if this is the problem in 2 ways. By powering the arduino through the pc cable and the battery to a breadboard 5v power board then connect the servo power to that boards output. If you don't have one of those you can create a simple voltage divider circuit using resistors to get it the battery voltage down to 5v.

Test 2: you can follow an arduino tutorial for using a servo with a potentiometer and see if when you run that in your current setup that it runs without power loss. If that runs fine but the potentiometer code into your code and see if with everything you want still happening that the potentiometer still moves the servo.

1 Like


así lo tengo conectado ahora

1 Like

Yeah so you can't draw much current the the way it's connected. Try powering the servo serperatly as mentioned in my previous comment.

1 Like

Also it's a 5v servo. Why have you connected it to the 3v pin? That could also be the issue.

1 Like

I took that image quickly from the internet, if actually I have it connected to 5v from the Arduino.
You say that I deprive it by connecting the 9v battery directly to the servo?

1 Like

No don't connect the 9v directly to the servo. You need to create something called a voltage divider using resistors. Or use a 5v breadboard power unit like this:

https://www.amazon.co.uk/AZDelivery-Breadboard-Adapter-Arduino-Netzteil/dp/B06X962SPW/ref=mp_s_a_1_1?dchild=1&keywords=B06X962SPW&qid=1625506805&sr=8-1

1 Like

Also just checking, have you moved over the header pin on the arduino from the usb power to the power jack power?

1 Like

Actually, a lot depends on the purpose of your project too. If the Uno and the servo are together in a stationary platform, e.g. a box that does not move as apposed to a robot that goes everywhere, then the best power source would be a mains adaptor. (AC to DC, like a phone charger), because your Servo needs power the UNO can't deliver with a battery. Note also that the Servo should be connected to the PWM pin (Pulse Width Modulation).

See my website here:
https://www.professorcad.co.uk/appinventortips#TipsArduino

See this Forum Topic, which uses a similar servo (you will need to read the latter part of the Topic about power).

1 Like

Yes my suggestion is meant more for a test to diagnose the problem. Not as a final solution.

Also @ChrisWard the diagram he showed does already have the servo connected to the PWM pin.

1 Like

Hi Joel
I didn't trust the diagram because:

1 Like

Ahh yes, forgot about that bit :slight_smile:

1 Like

A post was split to a new topic: I made an app its working but the Bluetooth module (HC-05) is disconnecting while I sliding the slider to control the servo motor