I'm designing a circuit with the IOIO-OTG board and a vibrating motor. The idea would be to have a digital pin on the IOIO board control the state of the motor (either ON or OFF).

The motor operates from 2.5 to 3.8 volts and the IOIO-OTG ports provide a 3.3 or 5V digital output (up to 5V if you use a drain circuit).

My current understanding is that I should be able to do something like this:

IOIO port @3.3V -> resistor -> motor @3V -> ground on IOIO

However, from what I'm reading, I should use a transistor and have the digital pin connect to its base. I remember from my electrical engineering classes that a BJT can be used as such a switch. However, I have a few questions regarding this:

  • What is wrong with my original implementation above? I assume it has to do with the safety of the board.
  • Is the proper implementation one with a transistor?
  • Are there any best practices I should be observing to protect the motor and the board for my little project?

1 Answer 1


Whether you need a transistor buffer or not will depend on the current capability of the IOIO-OTG board, and the current requirements of your motor.

A quick look through some of the IOIO_OTG documentation didn't reveal any IO current spec, but a photo of the board just shows one chip - presumably the PIC microcontroller, so I would assume the board can only safely drive a 20 mA load. I would expect any motor to require more than 20 mA so you will almost certainly need a transistor buffer to control it.

  • \$\begingroup\$ Yeah, the spec sheet for the motor says it operates at 75mA. So you're saying the transistor buffer is there to amplify the current (ie I'm using the transistor as an amplifier and not a switch)? \$\endgroup\$
    – nopcorn
    Sep 24, 2014 at 1:02
  • \$\begingroup\$ You would be using the transistor as a switch - but the transistor can handle higher currents than the PIC output port (I suppose some people might consider it as an amlifier...) \$\endgroup\$ Sep 24, 2014 at 1:04
  • \$\begingroup\$ So the improvement that the transistor buffer adds to the basic circuit above is that it allows a higher amount of current to flow to the motor correct? Does it provide any other benefits? Sorry for the beginner-esque questions \$\endgroup\$
    – nopcorn
    Sep 24, 2014 at 1:11
  • \$\begingroup\$ Another benefit of the added transistor is that it allows the device you are driving to be operated from a higher voltage than the pins of the microcontroller can safely handle-you could drive a motor requiring a 12 volt supply from the transistor, but the outputs of the microcontroller can only safely handle 3.3 or 5 volts. \$\endgroup\$ Sep 24, 2014 at 1:25
  • 2
    \$\begingroup\$ Using the transistor also protects your microcontroller. And because it is a motor, you want a diode keeping back-emf from reaching your micro. \$\endgroup\$ Sep 24, 2014 at 1:57

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.