Controlling 6V-200RPM-Torque-Gear-Box-Motor

Hi!
Anybody have some idea how to control this engine in a simple and cheap?
http://cgi.ebay.com/6V-200RPM-Torque-Gear-Box-Motor-New-/220765713796?pt=LH_DefaultDomain_0&hash=item3366a97584
Mainly, I wanted to change the direction (reverse polarity).

Thanks ;D

You can use an L293D or an L298N or a SN754410.

Aeturnalus:
You can use an L293D or an L298N or a SN754410.

LB1663 would work?
http://cgi.ebay.com/SANYO-LB1663-Unipolar-Brushless-Motor-Driver-10-PCS-/360313462857?pt=LH_DefaultDomain_0&hash=item53e45b2049

No. It's a DC brushed motor, not a unipolar brushless motor. You'd have to do some significant hacking to get it to work properly. Per motor, the SN754410 is cheaper than your proposed IC, anyways - it can drive two motors, whereas the LB1663 can only drive one, and its only a dollar more expensive.

Ok thanks ;)I got the datasheet, but the pins did not understand, could someone help me?

Follow the schematic.

If all you want to do is change its direction using a simple and cheap solution then use a manually operated DPDT switch

cheap and simple might be getting a servo like below and modifying it for continous rotation.

http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=9617

http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=16266

2 mosfets and some very simple code,

both off = stop
one on one off = foward
one off one on = reverse
NEVER BOTH ON THOUGH

some small caps (after the fet before the motor) and just change the duration of the pulses and you have a nice simple motor controller.
I have used this setup many many times.

what I mean by pulse is this

digitalWrite(pin, HIGH);
delay(time);
digitalWrite(pin, LOW);
delay(time);

if you just want simple foward/reverse with no power control. forget the caps and the code.

$3 (usd) solution and it is easy.

zoomkat:
cheap and simple might be getting a servo like below and modifying it for contentious rotation.

http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=9617

http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=16266

or just buy a conteous rotation servo and not have to mess with it.

Sparkfun sells them under the name Fullrotation servos.

http://www.sparkfun.com/products/9347 that is a large one.

Hey guy thanks!

Use 360 Continuous Servo is a great ideia.
With this code:

// Controlling a servo position using a potentiometer (variable resistor) 
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> 

#include <Servo.h> 
 
Servo myservo;  // create servo object to control a servo 
 
int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin 
 
void setup() 
{ 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
} 
 
void loop() 
{
  myservo.write(val);                  // sets the servo position according to the scaled value 
  delay(15);                           // waits for the servo to get there 
}

My new question is...
If val is 90, the continuos servo is stopped
If val is 0, it rotates in a direction at maximum
If val is 180, it rotates in another direction at maximum
?

Thanks :wink:

Aeturnalus:

Follow the schematic.

Can you please make this picture bigger?

mattcf:
2 mosfets and some very simple code,

both off = stop
one on one off = foward
one off one on = reverse
NEVER BOTH ON THOUGH

some small caps (after the fet before the motor) and just change the duration of the pulses and you have a nice simple motor controller.
I have used this setup many many times.

what I mean by pulse is this

digitalWrite(pin, HIGH);

delay(time);
digitalWrite(pin, LOW);
delay(time);




if you just want simple foward/reverse with no power control. forget the caps and the code.

$3 (usd) solution and it is easy.

I was thinking about MOSFET
But making this way, I would not have a short cut?

xanok:
But making this way, I would not have a short cut?

What?

mattcf:

xanok:
But making this way, I would not have a short cut?

What?

How would you do the links this way?

Oh, first you need 2 free digital pins. then connect one of the gates of the Mosfet to a digital pin, then the other one. now connect the source of the MOSFETS to Ground. and connect the drain to diffrent sides of the motor. put a 100k ohm resistor in between the gate and source (one per fet, this keeps it off when it should be) and connect +Vcc (how ever many volts) to both sides of the motor.

when you set one of the mosfet pins HIGH that "GATE" will activate and let current pass through set it low again and it will stop letting current through.

and again ONLY ONE FET ON AT A TIME.

Oh, first you need 2 free digital pins. then connect one of the gates of the Mosfet to a digital pin, then the other one. now connect the source of the MOSFETS to Ground. and connect the drain to diffrent sides of the motor. put a 100k ohm resistor in between the gate and source (one per fet, this keeps it off when it should be) and connect +Vcc (how ever many volts) to both sides of the motor.

You got a link to a schematic of this? Sounds like a dead short setup. :astonished:

4 Mosfets are needed 2 N chan and 2 P chan
You may be able to use only 2 digital pins on the arduino. (pends on the p chan fet you get)

idk what I was thinking when I said 2 fets

Here is the schematic http://over-the-earth.blogspot.com/2011/05/request.html

Click on the pict its oversized sry.

I fail to see how a discrete-component H-bridge is any simpler than the SN754410 IC (which is essentially two complete H-bridges) I suggested earlier. Also, the schematic posted needs flyback diodes to be considered complete - MOSFET's don't like back-EMF much either.