2
\$\begingroup\$

I managed to salvage a couple of motors from a worn down old printer, and I'm unsure of how to get about connecting it to a breadboard and then to a Raspberry Pi. I've got a cobbler kit for my Pi that allows me to connect it up to the breadboard. I'm also unsure about what kind of motor it is, DC or Stepper. The motor looks like: http://imgur.com/a/PLmKw

Thanks!

\$\endgroup\$
  • 1
    \$\begingroup\$ That looks like a DC brush motor. You'll need a driver and protection circuit, but first you have to figure out the power requirements, either from knowledge of the printer or just experimentally by using increasing numbers flashlight cells and then measuring the current when you get to something reasonable. \$\endgroup\$ – Chris Stratton May 15 '13 at 14:50
2
\$\begingroup\$

Using the Cobbler kit to break out your pins, take one of the IO to control a relay. You want to use an external power source to driver the motor. Read up on relays if you're not familiar, but it should be your best bet.

schematic

simulate this circuit – Schematic created using CircuitLab

Credit to Scott for mentioning the Pi can't drive the current necessary to turn on the relay. Therefore, I added an npn transistor. Also diode was added for pin safety. From my understanding, the Pi has an accessible 5V from the Cobbler kit? I suggest using this for the collector of the transistor.

I left V1 arbitrary, perform tests to see what voltage needs to turn the motor. That, or find the Datasheet. V1 is where the DC motor will attach to.

Finally, the motor looks like a normal DC motor.

\$\endgroup\$
  • 1
    \$\begingroup\$ You can't just connect a mechanical relay to the pi though! \$\endgroup\$ – Chris Stratton May 15 '13 at 14:57
  • \$\begingroup\$ Perhaps I misunderstood, but could OP not simply use one of the 8 GPIO that the cobbler kit breaks out? \$\endgroup\$ – Nick Williams May 15 '13 at 15:03
  • 1
    \$\begingroup\$ The Pi can't provide enough current to drive a relay-- and without a diode you'll do bad things to the port. Suggest you add a snubbing diode to your fig. \$\endgroup\$ – Scott Seidman May 15 '13 at 15:40
  • 1
    \$\begingroup\$ Don't people normally have diode protection on the relay coil? @user92466: I wouldn't spend months developing your own relay unless learning relay construction is your primary goal. \$\endgroup\$ – RedGrittyBrick May 15 '13 at 15:41
  • 2
    \$\begingroup\$ @ScottSeidman Thanks for explaining; perhaps an npn transistor would suffice? I'll add this and a diode to the diagram. \$\endgroup\$ – Nick Williams May 15 '13 at 15:44

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