Good relay for controlling forward-reverse-off with a two-wire motor

There was a Humane Society sale today and I was able to get a number of motors and servos from a few remote control cars (none of them had radio controllers, and i am not well versed enough in electronics yet to determine what parts are what on the cars' PCBs (I'll post a picture of the boards in a future post to get some more info if anyone can provide).

I currently have some relays, two of them are Omron G5SB-14 (SPDT, 5-pin), the other is a Zettler AZ8222-2C-5DSE (DPDT, 8-pin).

I am trying to get controlling a motor in both forward, reverse, and full off. What I am unsure of is if I can use a single relay from the three that I have, or if I can just use the two Omron SPDT relays, one controlling forward/off, the other controlling reverse/off.

Any suggestions on how to wire them up to a single motor? I can get them wired up individually, but I am unsure of how to wire a single motor to both of them.

Also, both motors appear to have a Capacitor soldered between their individual positive and negative. I say "Capacitor" because they are those small, disc shaped components, much like a small, non-cylinder Capacitors. Is there a special reason for that to be there, or can I simply remove both of them from the motors?

Also, both motors appear to have a Capacitor soldered between their individual positive and negative. I say "Capacitor" because they are those small, disc shaped components, much like a small, non-cylinder Capacitors. Is there a special reason for that to be there, or can I simply remove both of them from the motors?

That one I can answer. Those caps are for noise suppression as DC motors using brushes can create a lot of electrical noise and can even interfere with the radio receiver reception range for the car. They probably aren't as important for usage with an Arduino, but they do no harm and I would just leave them in.

Lefty

One possible way of using two relays. The limit switches/diodes are probably not necessary for your useage.

awesome, thanks for the schematic. Took me awhile to get it wired up properly. Either the relay wasn't seated properly on the breadboard, or one of the solderless wires was bad, or whatever, but after a few retries and making sure that i could swap relays and the single circuit would work, i was able to get both relays working flawlessly. I now have full forward, reverse and off.

Now to start looking into controlling the speed of the motor via PWM. With a TLC5940 PWM chip, can I just skip over the Relays and use the IC directly, and can I feed in an alternate power supply to the IC (breadboard mounted power supply) but still have the Arduino control the IC and it's outputs?

Lastly, if I was looking to use a motor to spin a 3 - 5 foot long threaded metal rod (1 - 1.5 meters). I had this odd idea to make a track outside that I could hang a flower basket from. When the sun is out a photosensor would detect the light level, trigger the motor which would spin the threaded rod. The basket would be hung from a hook attached to a threaded block that is on the rod. Due to the rod not moving except for rotation, and due to the weight of the pot pulling down on the block and rod, the hook/block would either move out into the sun, or back under the porch roof, carrying along with it the flower basket. In theory it works, but I am unsure of what strength of a motor I would need. I can provide more specs tomorrow once the sun is up.

Still new to the Arduino and electronics work in general, but not new to programming overall. Ever since getting this at Maker Faire Detroit, I have been brainstorming all sorts of practical and even some impractical projects.

For a good amount of torque, you might consider hacking he below AS600 cordless screwdriver. At my local WalMart it is less than $10.

http://www.google.com/search?q=black+decker+as600&hl=en&num=100&lr=&ft=i&cr=&safe=images

The TLC5940 is not the right chip for controlling a motor, although if you wanted to drive lots of motors I guess you could add drivers to it. To drive a single motor, all you need is one N-channel logic level power mosfet, a diode (1n400x should do if the motor takes no more than 1A), and a resistor:

  • connect the -ve side of the motor supply to Arduino GND
  • also connect the mosfet source to GND
  • connect the mosfet gate to an Arduino PWM pin through a 100 ohm resistor
  • connect the mosfet drain to one side of your relay-motor-relay circuit
  • connect the other side of your relay-motor-relay circuit to the +ve side of your motor supply.
  • connect the diode across the relay-motor-relay circuit, anode to mosfet drain, cathode to +ve side of the motor supply

I've assumed there is nothing stopping you connecting the -ve side of the motor supply to Arduino ground.

You can also turn the motor off using this arrangement, so you could use a single DPDT relay to do the motor forward/reverse switching if you have one.

zoomkat:
For a good amount of torque, you might consider hacking he below AS600 cordless screwdriver. At my local WalMart it is less than $10.

black decker as600 - Google Search

Nice. Thanks. I notice it uses 4x AA batteries.

Now another question: could I use those 4x AA batteries, have them be Ni-Cad rechargables, connect a Solarbotics solar cell to them to act as a recharge during the day, AND have them (the batteries) also power the Arduino? I watched a Matt Makes video where he attached a solar cell to a remote control allowing it to recharge in sunlight, but I am unsure about having both the motor AND the arduino connected to the same power source.

At minimum, the motor would need to move the basket into and out of the sunlight once each per day, with any extra extending and retracting happening due to storms and such, so the majority of the power, I am guessing, would be used by the 24/7 operation of the arduino. I am thinking I would only need to poll the sensors once every 5-30 minutes, and even then I would only be polling the light sensor (unless I wanted to get really creative and have a set of moisture sensor probes in the basket as well.

I don't plan to add anything like ethernet, wifi or RF communications to it. Just the motor, a few sensors, a solar cell, the arduino itself and maybe some LEDs for status information.

so you could use a single DPDT relay to do the motor forward/reverse switching if you have one.

That would require the limit switches, but may be a good idea as the limit switches may be required if no other position feedback is available. With a DPDT relay a fail safe position either in or out could be used. As to the solar recharging, I'd look for a cheap ready made charger like below.