Hello, I am contacting you because I am looking for advices concerning my new project. This project consists in creating a small compact robot. To do this I need a board, to be able to communicate wirelessly with it, to control two motors in both directions and to receive data from a gyroscope.
I have done this kind of project before. I was working with:
-an arduino nano for the control
-a Bluetooth module of this type (I don't have the exact specification anymore)
-drv8833 bridge-h boards to control the motors
-small dc motors (I don't have the specifications either)
-a mpu 9250 gyroscope board
Everything was working perfectly but I'm going to buy new hardware so I'm looking for more clever alternatives because I found my project messy and not very compact.
So I come to my questions:
Is there a more appropriate board for this kind of thing (with for example one of the elements already integrated) ? I specify that I don't necessarily need Bluetooth, wifi is also good for me so maybe an esp (if we can talk about it here) but I'm a bit afraid that it is overkill and not very compact.
Is the h-bridge really necessary to control both motors (more or less 5v)? (I think so but I ask to be sure)
Do you have any particular advice to connect all these cables or any tiprs to make the project compact ? (like using rigid cables for example)
I have always powered my drv8833 boards and my Arduino by connecting them together to the 9v battery without really bothering to calculate resistors. Would it be worth it for a small project?
You can use a ESP32 with bluetooth onboard and or wireless. That would be about the size of your bluetooth module. Your motor drive should work good. I have no idea of what size 9V battery your going to use but I would expect it to have a very short life. If you decide to make a PCB check into KiCad, it is on the difficult side to learn but after a bit it is great. It will take you all the way from a schematic to gerbers for the PCB.
Thank you very much for all your answers.
I think I'll go for esp32 because it can be interesting to discover.
For the pcb, I have never done it but it can be also interesting to learn. I will start with a pcb matrix plate I think, it will maybe be enough and if not I will look for a custom plate.
Concerning the battery, I have a 9V 600mAh. It should be enough for my consumption and peaks of the esp. I don't need my battery to last very long.
But I wonder about the power supply through the Vin port. Is there is a gain between using the regulator by sending 9V or calculating a correct 5/6V arrival on the Vin port with resistors knowing that I want to power the h-bridge as much as possible? (if it's possible, I don't know much about regulation)
PCB design is very easy to learn. I also recommend KiCad. I use it on my Linux machine and it's totally free (and I think open source).
Make sure to double and triple check everything before sending it off to JLCPCB though. Two of my boards were defective from the design phase.
As for your question, I'm not really familiar with that H bridge, but good general advice is to power the Arduino and H bridge from the same battery, and giving them a common ground back to that battery. This means you get 9v giving punch behind the motor driver and powering the Arduino.
I had that happen with JLPCB they built exactly what I designed, I simply did not make two connections. Other then that I have never had a problem with them. I also learned that if a couple of us get together and have several boards they all come in the same box, and that saves lots on shipping charges.