0
\$\begingroup\$

I am trying to design a circuit to cut the power to a servo to prevent the servo from overheating on the occasional circumstance that it stalls. The servo can draw almost 4A at 7.5V on stalling and unfortunately the design could allow this to happen. I plan on ultimately adding a temperature sensor that will trigger a MOSFET to cut the power to the servo to prevent it trying to maintain position and continuing to draw a large current and heat up. (It's OK for the servo to lose position). As a total novice, I've searched for similar designs and have come up with the following circuit by combining advice from different sources - (Hopefully all correct!). The temperature sensor is to be added later:

Arduino MOSFET servo saver

I haven't bought the components yet so wanted to check with those who know what they're talking about that this looks like it will work. Specifically, the MOSFET IRF530 - Will this provide the correct specifications I need? The datasheet suggests the specs are plenty high enough but I could be making a total beginners error:

https://datasheet.lcsc.com/lcsc/1810271711_Infineon-Technologies-IRF530NPBF_C2565.pdf

Thanks for any advice!


Thanks for the advice. Plan B is for a highside PFET switch for the servo power. Based on what I've found when trying to learn about this, my new schematic is:

Plan B:

Arduino MOSFET Servo

\$\endgroup\$
8
  • \$\begingroup\$ V1, Uno and servo should all share a ground, Use a highside PFET switch for the servo power, with a RDSon specified at 5 V, not 10 V. Highside will mean an extra transistor as a level shifter, but they're cheap and small. Search for how to drive high side switches, loads of info out there. \$\endgroup\$
    – Neil_UK
    Commented Oct 22, 2021 at 18:25
  • 3
    \$\begingroup\$ Usually disconnecting the ground wire of a high power device that has data connection to other devices is a very bad idea, usually worse than disconnecting VCC. The supply pins are the same though so maybe not so bad in this case, but in general giving the servoa a PWM signan while either GND or VCC is disconnected may load the MCU PWM pin if the servo has low impedance path to the disconnected supply pin. It might be better to detect the movement being stopped and stop driving the PWM, since you already seem to somehow know when to turn the servo power OFF. \$\endgroup\$
    – Justme
    Commented Oct 22, 2021 at 18:28
  • \$\begingroup\$ Thanks for the advice. Plan B is for a highside PFET switch for the servo power. Based on what I've found when trying to learn about this, my new schematic is added above as plan B. \$\endgroup\$
    – GWiz
    Commented Oct 24, 2021 at 18:54
  • \$\begingroup\$ You probably don't need to cut power. Just stop sending pulses and most servos will stop driving the motor. \$\endgroup\$ Commented Oct 24, 2021 at 19:03
  • 1
    \$\begingroup\$ I wonder, wouldn't a resettable ptc work here? No need for manual control of power and you could use a weak pullup from the servo vcc to the microcontroller to sense when it happens. \$\endgroup\$
    – Passerby
    Commented Oct 24, 2021 at 19:11

1 Answer 1

1
\$\begingroup\$

If you would use an IRL540 or IRL530 as a low-side switch, you can connect an analog read pin A0, between the Mosfet and the Servo and use the on-resistance of the Mosfet as a current sense resistor. The Mosfet will have about 80 to 120mOhms resistance in the On-state. You'll have to measure the on-state resistance of your specific Mosfet once you get it. The spec is "120mOhms max" so not exact. If you want it to shut off at 4 amps, and assuming your Mosfet is 80mOhms, then the voltage across the Mosfet will grow to 0.080 ohms x 4amps = 0.32v. If your analogRead value exceeds, 256 * 0.32/5 > 16, you need to shut down your servo.

If you find a Mosfet with slightly higher on-resistance, you'll get a bigger analog value before you need to shutdown and better noise margins. There are heating issues with a higher on-resistance and less voltage to the servo in normal conditions (because of higher voltage drop across the higher on-resistance of another Mosfet model).

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for the detailed info, but I don't necessarily want to cut power to the servo at a certain current, only if it is held there for long enough to generate a lot of heat. It may be that the servo undergoes several cycles of stalling for different lengths of time which is OK for my application unless it happens often enough to start to cook things. \$\endgroup\$
    – GWiz
    Commented Oct 24, 2021 at 23:45
  • \$\begingroup\$ But you can program your Arduino to check voltage drop (current), set a time stamp when your current is excessive with millis() and then keep checking as you go through your loop. If the current exceeds your limit for too long (you decide), then you can cut power or do what you want. \$\endgroup\$ Commented Oct 25, 2021 at 2:18
  • \$\begingroup\$ @GWiz Using heat as the stall indicator won't be very precise and could easily result in a fried servo. Measuring high current will be much more accurate way to detect a stall state. You can determine the current threshold and how long you want to wait. Heat really is the wrong way to do this. \$\endgroup\$ Commented Feb 27 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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