3
\$\begingroup\$

So, I have a simple robotic arm that has a wire controller you plugin into it. The controller has 8 pins. I haven't played with it too much but I know that the far ends are power sources and the middle pins are to the motors. When a connection is made with one side to a middle prong a motor runs. The motor runs in the opposite direction when the opposite side's prong is used with the motor prong. Because the controller is made completely up of switches and no other components I figured it'd be relatively simple to create a circuit to replace it with the Arduino Uno. However, I'm unsure how I could replicate the switches with a circuit. I don't want to fry the Arduino by plugging the robotic arm right into it so I was considering using relays. But 10 relays would be kinda pricey and I'm not sure if there is an easier way. Does anyone else have any good ideas/advice?

I FOUND THE ROBOTIC ARM ONLINE: Link

EDIT: This is what I am replacing with my Arduino. It will plug right into the arm.

Notice How it has a plug that goes into the arm enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ What type of robotic arm is this? Can you post a picture of the circuit board inside. \$\endgroup\$
    – apnorton
    May 2 '13 at 19:31
  • \$\begingroup\$ I can try to tomorrow! \$\endgroup\$ May 2 '13 at 23:28
  • \$\begingroup\$ The provided schemtiacs don't really make any sense. Is this what you 'think' you should do or what is already in place? Are you saying there are two separate power supplies? Some cheaper RC cars would split the battery bank in half, switching the motor direction by switching which battery bank (and subsequent orientation) the motor was connected. You are sure these are basic motors and not servos? Servos would require a circuit to drive them, motors just need a power supply. \$\endgroup\$ May 3 '13 at 2:02
  • \$\begingroup\$ It's what I think could work. It's just a general idea; not a working circuit. By tomorrow I should have pictures and a better understanding of how the arm works. And like I said, I am simply taking the place of the controller. The controller is just a series of switches between all the wires sent to it. \$\endgroup\$ May 3 '13 at 2:24
1
\$\begingroup\$

From how I imagine this, I would try using NPN transistors (15 for about $3 at RadioShack).

For simplicity, lets say the "one side prong" and motor pin are prongs '1' and '2', the prong that makes the motor spin the other way is '3'.

Try wiring this up:

schematic

simulate this circuit – Schematic created using CircuitLab

EDIT: Following Kurt's advice, I scrapped the ground at the center motor node. Ground the Ardunio on the same grounds in circuit. Keep in mind, the way I presented the motor in this case is how it seems to be wired up given your situation.

First, get a multimeter and verify prong 1 is at a higher voltage than prong 3. If it is the opposite case, consider the positive to be prong 1 and the negative to be prong 3.

The two wires to the left connect to the outputs of the Arduino. The wires on the right connect to prongs 1, 2 and 3 from top to bottom. The Arduino will be grounded with the grounds in the circuit.

In theory, this circuit should work. In a generic sense, there is the NPN that simply connects prong 1 to prong 2. When this transistor is on, current flows from the 5V and powers the DC motor.

However, the negative portion is trickier. Basically, when Q3 is High (+5V), the Base of Q2 connects to ground and Q2 turns on (because prong 3 is at some negative voltage, ground is higher in comparison than the emitter of Q3). When Q2 turns on, the DC motor turns the other way.

Setting Q3 LOW, no current flows through and therefore, no voltage drops over R1: Q2 gets the negative voltage and turns off. This is because the voltage at the collector of Q2 is equal to its emitter.

So you only control Q1 and Q3 directly. Just don't turn both on transistors on at the same time! You'll create a short. The positive will short to the negative.

Try reading about "H-Bridges" if anything above seems confusing.

\$\endgroup\$
19
  • \$\begingroup\$ Sounds simple enough :) Do i need to have any current feed back into the Arduino's ground? Or is just using the pin's output enough? (probably a silly question) \$\endgroup\$ May 2 '13 at 20:42
  • \$\begingroup\$ Hey, I made a quick edit, but there is a ramification where turning on the 2nd transistor will be a little more difficult. The transistors turn on with a voltage difference between the base and emitter. \$\endgroup\$ May 2 '13 at 21:05
  • \$\begingroup\$ Please see my edit, this should take care of the ramifications your situation provides. \$\endgroup\$ May 2 '13 at 21:36
  • \$\begingroup\$ I need to do further testing but it appears the pins are somewhat like a negative, motor, ect. and then a positive. Like I said, I need to do more testing on the pins still but I believe it is somewhat like that. \$\endgroup\$ May 2 '13 at 23:27
  • 1
    \$\begingroup\$ This schematic is not correct. To start, BJT transistors need a resistor at the base because these are current controlled devices. Secondly, you have a "ground" symbol at the motor connection point. This doesn't make sense - turning on either BJT will short the power supply to ground. Did you mean one terminal (not prong) of the motor goes to this point and the other goes to ground? Also, unless the motors are very small, I doubt the BJT base current from a microcontroller will be large enough to allow the necessary C-E current through the motor. \$\endgroup\$ May 3 '13 at 2:09

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