0

I am controlling a motor with an Arduino Nano, that motor is controlled by Cytron MD-10c motor controller.

i want to wire a momentary switch in parallel with the analog output PIN from the Arduino and PWM input on the MD-10c, the switch will connect the 5v output from Arduino to the PWN input on the MD-10c. Basically an override to go full power.

Is there any risk of damage with this sort of wiring with the switch?

  • 5
    why don't you do it properly .... use the switch as an input device to the Arduino .... then modify the software to output full power every time the switch is pressed – jsotola May 7 at 1:05
  • Not enough pins left on the arduino to accommodate this. – haxxor May 7 at 6:58
  • Mhh, if you do this, you definitely should save the PWM pin from sourcing too much current, when it goes to ground while the button is activated. I'm pretty sure, that the motor controller does not source much current, so you can simply add a current limiting resistor between button and PWM pin. Unfortunately I currently don't have an Arduino at hand to test this. – chrisl May 7 at 7:07
  • 1
    Slide switch with 3 pins should be the solution. It disconnects one pins and connects two others. So if we use pins like "(arduino) (motor) (5V)" when switch is "left" it connects (arduino) to (motor) and when it's "right" it connects (5V) to (motor) and the (arduino) is safely floating. – Filip Franik May 7 at 7:15
2

Yes, depending on the current that will flow.

If your PWM output pin is connected to 5V without a current limiting resistor, nothing will happen during the HIGH phases of the PWM, but you will short the input pin during the LOW phases.

According to the manual of your motor controller, you should be able to use a current limiting resistor to prevent this. Since the ATMega328P on your Arduino Nano can sink a maximum of 40 mA, that resistor should be at least 125 Ohms. A resistor larger than 1 kOhm should work fine.

The other option would be installing a diode between your Arduino Nano and the motor controller. This does not require the use of a current limiting resistor. The motor controller would still work, since the minimal voltage for the pin state to be detected as HIGH is 3V (1), much lower than the ~4.3V you're left with after a diode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.