blinkypiper
New member
Hello!
I've found this forum incredibly helpful in the past, but this is my first time reaching out with a question. I'm working on a project that seems like it should be simple, but I'm being deviled by a problem that I think is electrical, rather than rooted in the code.
I'm using a Teensy 4.0 to control two brushed DC motors, which a few electromechanical switches triggering different cases. The basic system is laid out below, BUT, I didn't end up using the coin cell battery AND there are 3 switches AND they are wired with external pullup resistors (10kΩ).
The 24V supply (MEAN WELL LRS-600N2) can supply 25A, the 5V (MW RS-15-5) can supply 3A. The motor driver (Cytron MDD-20A) can supply 20A per channel, and the motors are rated up to 80W @ 24V, but I'm running them at low speeds. The limit switches have wires that are ~6 feet long.
Here's what is happening: things work like they should when I have the USB cable plugged into my laptop (on battery) and two power supplies are getting mains power. I now know that I should cut the trace connecting VIN and VUSB on the MCU, but I have not done this yet.
When I do not have the USB cable connected to my computer, the system follows the basic logic, but the drive motor will randomly cut out, or both motors will stop until a switch is hit, triggering the next case. It's almost like something isn't getting enough current. BTW, I've removed all Serial calls in the code.
I would greatly appreciate any insight. I can post my code, but this really seems to be an electrical issue since things work fine sometimes.
I've found this forum incredibly helpful in the past, but this is my first time reaching out with a question. I'm working on a project that seems like it should be simple, but I'm being deviled by a problem that I think is electrical, rather than rooted in the code.
I'm using a Teensy 4.0 to control two brushed DC motors, which a few electromechanical switches triggering different cases. The basic system is laid out below, BUT, I didn't end up using the coin cell battery AND there are 3 switches AND they are wired with external pullup resistors (10kΩ).
The 24V supply (MEAN WELL LRS-600N2) can supply 25A, the 5V (MW RS-15-5) can supply 3A. The motor driver (Cytron MDD-20A) can supply 20A per channel, and the motors are rated up to 80W @ 24V, but I'm running them at low speeds. The limit switches have wires that are ~6 feet long.
Here's what is happening: things work like they should when I have the USB cable plugged into my laptop (on battery) and two power supplies are getting mains power. I now know that I should cut the trace connecting VIN and VUSB on the MCU, but I have not done this yet.
When I do not have the USB cable connected to my computer, the system follows the basic logic, but the drive motor will randomly cut out, or both motors will stop until a switch is hit, triggering the next case. It's almost like something isn't getting enough current. BTW, I've removed all Serial calls in the code.
I would greatly appreciate any insight. I can post my code, but this really seems to be an electrical issue since things work fine sometimes.