PCB with two motor drivers, one does not work if the other one is not running - Page 1
Forum section: electronics / projects

author: Its wednesday my dudes
author_rank: Contributor
timestamp: May 04, 2025, 08:39:07 am
content: HiI am a hobbyist trying to create a PCB that controls some motors using two DRV8871 depending on what two sensors report. I've now received the first version of the PCB, soldered everything onto it, and while everything seems to be connected properly, I have the problem I cannot turn on the second motor, if the first one is running, and vice versa. I only hear some buzzing noise from the motor that I've tried to start second. First I thought it might be my Arduino code is causing this issue, but it also persisted after I removed the Arduino completely and controlled the drivers using wires. The board takes 18 Volt as VCC which is also used to run the motors. I am kinda clueless and I would be super grateful for some advice. I've attached the pdf of the schematic and a photo of the pcb And If you have some advice what you would differently for this circuit, I would be glad for that as well.

author: pcprogrammer
author_rank: Super Contributor
timestamp: May 04, 2025, 09:35:06 am
content: Oh the awful influence of the internet on drawing schematics. This compartmentalization and usage of net labels or names makes reading them a lot harder. I too fell for this when I took up the hobby again, but try to improve on it, and hope others will do this too.See here for how not to:https://www.eevblog.com/forum/microcontrollers/suggest-a-microcontroller-for-a-diy-pcb-watch/msg5847841/#msg5847841https://www.eevblog.com/forum/microcontrollers/need-help-with-a-schematic/msg5883614/#msg5883614And here for a bit better:https://www.eevblog.com/forum/microcontrollers/suggest-a-microcontroller-for-a-diy-pcb-watch/msg5849577/#msg5849577https://www.eevblog.com/forum/microcontrollers/need-help-with-a-schematic/msg5897402/#msg5897402More links on the subject are given here:https://www.eevblog.com/forum/microcontrollers/need-help-with-a-schematic/msg5885148/#msg5885148But that is a side step from your question. What is missing from what you provided is the PCB layout, and particular the power supply connection onto the two motor drivers. It might be that there is a to big a voltage drop, or oscillations going on due to missing decoupling.You should have consulted the datasheet, which shows that there is the need for a decoupling and a buffer capacitor near the driver.https://www.ti.com/lit/ds/symlink/drv8871.pdf?ts=1746299249036&ref_url=https%253A%252F%252Fwww.google.com%252FChapter 9 and 10, page 14 and 15 show this.Make sure to have proper ground paths and a thick enough trace for the supply voltage to the motor drivers.

author: Its wednesday my dudes
author_rank: Contributor
timestamp: May 04, 2025, 10:40:04 am
content: Quote from: pcprogrammer on May 04, 2025, 09:35:06 amOk, fair point. While it makes everything look clean on the paper, it is actually making it harder to understand the circuit. I will consider this with my next project (or if I redo this one in Kicad to learn the software).Quote from: pcprogrammer on May 04, 2025, 09:35:06 amI've now also attached a picture of the PCB. OK, that indeed might be an issue. I've built a test circuit on a breadboard using one of these drivers. As it was working, I wasn't putting too much thought into it anymore, and I've just duplicated the working circuit. So I will get a second batch of PCBs conforming to the design in the datasheet.

author: pcprogrammer
author_rank: Super Contributor
timestamp: May 04, 2025, 10:54:34 am
content: Depending on how much current the motors draw, the supply trace might be to narrow. There is plenty of space to use a much wider trace, or just move the supply input to the side of the motor connections so the trace distance is a lot shorter.Another issue is, only the one via for the return current into the ground plane. Use multiple vias to create better grounding. Again see the datasheet on how it is done there.

author: eugene
author_rank: Frequent Contributor
timestamp: May 04, 2025, 01:48:06 pm
content: Quote from: pcprogrammer on May 04, 2025, 09:35:06 amMeh. I don't want a war, but I don't think his schematic would be improved by drawing lines everywhere instead of using net labels. All of the labels are just pins on the Arduino. I doesn't even matter which pin. All I need to know is that it connects to some pin on the Arduino. I think that in this case, running wires on the schematic page would make it considerably harder to read and understand.There are good places for wires and good places for net labels, but not any good places for unquestioned ideology.

author: pcprogrammer
author_rank: Super Contributor
timestamp: May 04, 2025, 03:17:22 pm
content: Quote from: eugene on May 04, 2025, 01:48:06 pmSure there needs to be a balance between the usage of wires and labels, but in this case reordering the location of the connectors and components and putting it all on a single sheet with the use of wires instead of these labels or ports, will improve on readability.But opinions and preferences can differ.

author: Simmed
author_rank: Frequent Contributor
timestamp: May 04, 2025, 04:28:19 pm
content: why dont you write some test sequenceto determine the sensor is working (w/o output to motor)and the motor is working (w/o input from sensor)

author: eugene
author_rank: Frequent Contributor
timestamp: May 04, 2025, 06:13:21 pm
content: There's nothing obvious about the schematic or layout that I would expect to cause the problem that you describe. Only testing and close observation under different conditions will root the problem out.I do have to wonder why you put a capacitor across the motor but no decoupling capacitor at the VM pin. It's tempting to put a capacitor across the load with PWM - it seems intuitively like a good idea - but it's really not necessary. And, I'm not sure how it affects the DRV8871's current sensing. I know that I've used the same driver without a cap across the load and it worked as advertised.EDIT: after thinking about it a little more, it seemspossiblethat the lack of bypass capacitors at the VM pins of the drivers, along with the caps across the motors might be causing you some trouble. It's not necessarily something that I would predict, but I've seen plenty of weirder things. The 1uF caps in combination with the inductance of the motor windings form resonant circuits that's, well, resonating.I would try removing C4 and C5. If you notice any significant change in the behavior, then add bypass caps right at the VM pin. There's a via right there and a big ground plane. Scrape away solder resist as needed to solder in the caps.

author: SteveThackery
author_rank: Super Contributor
timestamp: May 04, 2025, 09:07:41 pm
content: Oh my goodness, that schematic is AWFUL!Where do beginners get the idea that boxes and labels are the right way? It's fine if you are using the schematic solely as an input to your favourite PCB design program, but very difficult for a human to follow.EDIT: Ooops, sorry! Been discussed already.

author: Its wednesday my dudes
author_rank: Contributor
timestamp: May 06, 2025, 04:17:50 pm
content: Quote from: eugene on May 04, 2025, 06:13:21 pmSir, your intuition was right! I've had some time today and went back to it. I removed both capacitors and now I am able to turn on both motors at the same time. I've added them because they seemed to reduce noise a lot, so I thought they might be a good idea. I will continue programming and testing with this board but I will rework the board layout around the drives for the next iteration.Thanks to all the people helping here!

author: pcprogrammer
author_rank: Super Contributor
timestamp: May 06, 2025, 04:26:15 pm
content: Quote from: Its wednesday my dudes on May 06, 2025, 04:17:50 pmNormally capacitors of 100nF or less are used for this. You can try it with your board and see with what values it still works and enough noise reduction given.