I have an Arduino Board, to be precise many models, but let say I want to interface a ATmega328p with another integrated circuit (all is running at 3.3 V). In this case I want to connect Arduino with a A4988 microstepping Driver. As everybody knows each output pin of the Arduino Board can source or sink max. 40 mA of current. Looking in the datasheet of the driver I find such electrical characteristics:

Figure 1

which clearly state that the max current 20 uA is.

Now, I don't know whether under those circustances possible is, to connect each Arduino Output Pin with the control logic of the driver directly or not. So here a few questions:

  1. If is it possible to connect both devices directly, how can I make sure that the arduino board doesn't source 40 mA into the driver destroying it? Comparing max current of input and output is the right way to be sure, that nothing is going to fry??
  2. If the current must be sinked to max. 20 uA (because the motor driver is the weakest component in this simple circuit), then I would insert a resistor. But how to dimension it? All what I know is that the output of the arduino board can output 3.3 V as Voltage and max 40 mA. At the input's side I know that a logic O is any voltage between 0 and 0.99 V (3.3 x 0.3 as per datasheet). So I would write:

\begin{equation} R = \frac{(V_{output} - V_{input})}{I_{max_{driver}}} = \frac{(3.3 - 0.99)}{(20 * 10^-6)} \approx 120 k\Omega \end{equation}

Is this consideration right or I'm missing something very important or doing a mistake somewhere??

I'm not really sure about the 2nd idea because in the datasheet there is a clear example on how it should be connected with a microcontroller: Picture 2

But is the depicted example real or is a really simplification which cannot be used but just reconsidered for each different possible microcontroller?

  • 1
    \$\begingroup\$ The depicted example is likely real. Just imagine the legal liability if manufacturers published schematic diagrams with lots of parts with real values, but something critical missing, without printing a big warning. Inputs consume the amount of current they need. Imagine the difficulty of making something work where an ability to supply more than enough current broke the device using the current. Your mobile phone charger would blow up when you plugged it into the main; mains can supply, maybe, 60Amps, but the phone charger only needs 0.05Amp. A car battery would blow up a headlamp, etc. \$\endgroup\$
    – gbulmer
    Commented Jan 25, 2016 at 0:56

2 Answers 2


Power sources don't force their specified maximum current into a load - the load will just draw what currrent it requires. This applies to logic inputs and outputs just as well as to power supplies and their loads.

In almost all cases, logic inputs and outputs are designed to be used together, with no extra components, provided the input and output voltages are compatible.


An input pin is a High-Impedence device. It will typically only draw the current it needs. For the most part, you can assume it has a high resistance value in series with it's logic, as noted by the 20 MOhm resistor here.

enter image description here

If you attempt to inset that 120KΩ resistor inline, you may cause a logic high from the ATMega (~3.3V) to be read as a logic low. You are dropping 2.3 Volts over it, in your calculation, putting it below the Input Logic Low maximum. You will never have a logic high there.

Typically, you can directly connect a microcontroller's GPIO to an input pin directly without any issues.


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.