-1
\$\begingroup\$

So first of all, I don't have a background in electrical engineering, I got handed a project where having some automation would save so much of my time so now I am learning electronics from scratch.

I am working on a fluidic project using Arduino Mega 2560. I want to use multiple servos (8 servos, each carrying a three-way valve) that need to rotate at a specific time to switch flow direction. And fluid delivery is handled by a 12V peristaltic pump controlled with an L298N motor driver.

I power the servos using a 12V 5A adapter connecting to a 5V 5A buck converter. Since all 8 servos share this supply, I am worried about the current draw, especially if something goes wrong and all 8 servos and the pump run at the same time. Because of this, I want to add a MOSFET to turn on/off the power line to each servo when they are not in used. I am having a difficult time figuring out how to choose the right MOSFET and the proper way to connect them, so my main questions are:

  1. Should I forget about the whole MOSFET thing and just get a better power source? 10A?

  2. Is a P-channel MOSFET for high-side switching the better option here, and what ratings should I look for to safely power everything without risk?

  3. Is it 8 MOSFET for 8 servos or can I use one MOSFET to control 2-3 servos? For example, when the time point hits, MOSFET 1 will be ON, allowing servos #1 and #2 to rotate, then MOSFET 1 turns OFF, and MOSFET 2 turns ON for servos #3 and #4 and so on. Is that a thing that can be done or a completely stupid idea? I just thought having one MOSFET for each servo may require a lot of connections.

Any guidance would be greatly appreciated.

\$\endgroup\$
3
  • \$\begingroup\$ This is real. I get that. It's important. You need to write more about the situation, though. There seems to be a lot of moving parts going on. And none of us have your experiences or domain-specific knowledge . So you need to seriously spend time educating us. That probably means writing a lot more about the situation details. Otherwise, advice will likely be x-y (not a good thing.) Can you point us to literature about your situation? Or provide more details? You may imagine what you wrote is enough. But from my perspective it falls very short of what's needed. (Just me, perhaps.) \$\endgroup\$ Commented Oct 6 at 5:26
  • \$\begingroup\$ have you considered using a fuse? \$\endgroup\$ Commented Oct 6 at 6:42
  • \$\begingroup\$ Servos stall curent is aproximatively 2.2 A. \$\endgroup\$ Commented Oct 6 at 7:14

2 Answers 2

1
\$\begingroup\$

Before getting to the engineering, there are further questions to ask first:

Have you established that the problem you imagine, is one?

How much current do the servos draw when not changing position, for example? If the answer is significantly non-zero, they may well spring back to a default position when powered off. Is this an expected outcome?

And, if only during motion, is it feasible to stagger motion, or must they be synchronized?

Keep in mind that action may be sticky (static friction; hysteresis); rotating the servo might find it drawing steady current, holding force against a static position that it can't quite reach. It may be useful to overshoot position slightly (assuming this is acceptable for other reasons) and then relax by some margin, such that the "relaxed" position has little holding force.

And if the valves are sticky in this way, enough that they stay put regardless of fluid pressure/flow, you might further consider just getting better types of servo. Something with an enable or power-down, or torque control, so you can let it sit idle between moves and not worry about backlash and stiction.

Note that current draw is likely intermittent, over time scales of milliseconds; an oscilloscope with current sensor will be needed to measure total current draw. A DMM won't show the peaks.


Actually disabling / powering down devices is fine, broadly speaking, but is more of a cudgel, used when no other solution is available. For example, when idle / stationary current draw is low enough, the solution is trivial (no action required). Or when an enable / sleep / power-down pin is provided, and that mode is low enough (mA? µA?). Sometimes even when EN/PD/etc. is available, it's not low enough (e.g. ~µA, vs. a requirement of <1µA for long term storage on battery power), and an external switch is still required.

Driving a PMOS switch is also nontrivial, as its input (gate) voltage is referenced to the supply, requiring a level shifter (which incurs its own current consumption!). Sometimes this works out (if your ATMEGA and servos are common 5V supply), sometimes it doesn't (say they were 12V supplied, then what). "High side load switch" ICs may be attractive here.

Note that powered-down devices must be fully powered down, on all pins. Sometimes, input pins are fully open-circuit in this condition, but often there are clamp diodes that will (partially) parasite-power the device through an errant input signal. Ensure inputs are set to zero / low before power-down.

\$\endgroup\$
1
\$\begingroup\$

Further to Tim’s fine response, With most engineering problems, the first thing is to ‘qualify and quantify’ ie: servo current. What is the maximum we could expect? A product with a decent datasheet should tell you this. If not you can either guess or make a measurement. Solid evidence is always the best choice. Let’s say each servo might max out at 2A which is probably not too unreasonable for an average sized RC servo. Based on this we can state that max total servo current is 8 X 2A = 16A. Clearly in excess of the power supply.

To address this we can either solve or mitigate. Sometimes the ‘best’ solution is infeasible- too big, too expensive etc, so we look to mitigate. You’ve been down this path with looking to switch the power to the servos. Realistically a more suitable power supply would be the first path in my thinking as a 10 or 20A 5V power supply is not expensive or difficult to get.

If you wish to stick with your existing power supply, then you’ve already looked to ways you could mitigate the problem. You could use relays to switch the power to one or a number of servos and Tim mentions some gotchas with this. as well, you need to consider if the servos will ‘glitch’ ( as in move unpredictably) when you power them up again.

To answer your questions:

  1. I’d suggest getting a suitable power supply.
  2. You could use a MOSFET, but relays might be a simpler solution since you can purchase various relay boards suitable for Arduinos quite cheaply. An ‘off the shelf’ solution. 3.it would not be unreasonable to individually switch power to each servo or any combination thereof.

In summary, if you think or have demonstrated the power solution you already have is not sufficient, then go for a larger power supply. Workarounds just add complexity to a system. Inevitably you end up spending more time sorting out problems with the workaround than solving your core problem.

As well, do you really need a L298 motor driver or could you simply use a relay to switch power to the pump?

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.