I'm working on a project, and my HC-05 doesn't work when I'm more than 1.5m away. I've already tried using a piece of wire connected to the HC-05 built-in antenna, I've also placed capacitors all over the project to try to stabilize it, but nothing works.
In this project I'm using: 1x Arduino Nano, 1x L298 mini, 1x DC Motor, 1x HC-05 and 1x Servo
For the power I'm using one 18650
I've also tried using only one LED to know if when I click the button on my phone, the LED on the arduino turns on and off, and with just one LED, it worked about 7m away from the HC-05.
I think the problem it's the 18650
*I forgot to say that when I move the servo, the Arduino restarts
If you power the whole thing from a 1A USB phone charger, does it work any better?
PS: I wouldn't expect a 4.2V battery to be able to reliably supply a 5V Arduino plus some motors. I'm not surprised it resets; I am surprised it only does so when the servo comes on. I'd expect more stability issues!
That is very unlikely to help, since the on board PCB antenna is carefully designed and cannot be modified. Make sure the PCB antenna is not near a metal surface.
I agree with the comment above. There are many potential problems with your setup, such as the totally inappropriate servo power supply. Use a separate, 4xAA battery pack for the servo, and connect the grounds.
Test the radio range on a setup without anything else attached to the Arduino, following one of the excellent tutorials on line, like this one.
In case there is a defect in the module you have, try other HC-05 or HC-06 modules. They are ridiculously cheap.
Indeed. The comment that with only an LED connected, the Bluetooth range was a lot better suggests that noise from the motor(s) affects the wireless communications. I'd like to see a photo of the physical device as built, and I'd recommend shielding the motors.
Thanks for the photos; I think they illustrate a couple of potential problems. As @Wawa pointed out, verify you have all GNDs and Vcc's connected; I think you probably do, but it's good to be sure. It's hard to tell from the images.
Moreover, a breadboard environment is electrically very noisy and issues with e.g. wireless/BT range are to be expected due to this. I'd start by removing everything except the BT module and then verifying the range you get with just that. Then add the MG90 servo motor, have it run continuously while again checking the range you get from BT. If this is insufficient, take measures to reduce the impact of the MG90s. Add one of your electrolytic buffer capacitors (e.g. 220-1000uF) on the Vcc rail as well as a small 100nF capacitor close to the motor's supply. Experiment with placing and orientating the MG90 differently vs. the BT module. See what difference this makes. Consider shielding the casing of the motor with e.g. copper foil that you connect to your circuit's GND.
Add components one by one while systematically testing this way. Be cautious especially when adding motors and their drivers, since these can be expected to present electrical noise problems as well as power supply issues.
I wouldn't have expected the 3A charger to make a difference vs. a 1A one. I would have expected/hoped that a proper 5V supply instead of something considerably lower would have helped to make the Arduino more stable. I still don't recommend running this circuit on a single 18650 without any step-up converter. The Arduino Nano you're using is specified to run on 5V. While they usually work at slightly lower voltages in my experience, this gives you very little room for error; the slightest power supply fluctuation may push it into a brownout condition, making it reset or simply lock up.
Finally, careful with the wiring; I see pretty badly frayed wires on the power supply adapter; that's a short circuit waiting to happen:
His entire channel is based on this. He even has a Arduino course for projects like this. He also has a telegram, Where many people upload videos of their projects working.