To preface I am currently an first year engineering student, so if it sounds like I have no idea what I am talking about, it is because I don't.So I got back to the lab and set all unused pins on the MSP as outputs and set to high, and it made a MASSIVE difference. The whole system doesn't trip out when the motors are running, so this DOES mean the noise from the motor current was indeed coupling with the pins on the MSP, because by default reflashing the controller sets all unused pins as high impedance by default. I was going to do this eventually, I just didn't think that was the issue!
Praise the sun! Internet please witness this solution as it may resolve your quarrels.
This doesn't completely fix the issue though. The system is much more stable but a few times, maybe 1/10 times (previously 9/10 times), attempting to stop the motor via a distance reading from an ultrasonic sensor still causes the system to freeze. By freezing meaning the motors won't stop, sink even more current, possibly reducing voltages across the system and causing instability. I'm going to look at some waveforms on the oscope and see what's up.
Is my board design an issue? I have an internal split ground plane, where power and digital ground are met by a single low impedance path. See attachments.
I apologize. In my lack of sleep I uploaded a completely unrelated simulation for a different project.
I am using the L298N motor controller with 2 driver motors acting as wheels for a robot in one of my design classes. We are using a bread board and a raspberry pi pico for all of the circuity so nothing really complicated. When using the sample code we were given for the motors, the output consistency is terrible. When turning on the motors, they will buzz for a time, then sometimes the wheels will spin at different speeds independent of each other, then seconds later going to full power and driving in the unintended direction. If this problem can be fixed by the solution you defined above, I would be glad to try it but I am curious what the MSP output pins are and how I would turn them off. With the motor drivers footprint on KiCad, I can only see two unused pins on the driver, being the Sense_A and Sense_B pins.
Mod: link to old thread.
https://forum.allaboutcircuits.com/...ictable-behavior-in-robot.147227/post-1254372
Last edited by a moderator: