Go Down

Topic: Is this motor shield sufficent for controlling 2 (formerly) rc heli motors? (Read 6569 times) previous topic - next topic


Depends on how small =).

For small robots, this combination works well:

Motors: Two Solarbotics GM8 or GM9 motors: http://www.pololu.com/catalog/product/187
Driver: L293D quad half h-bridge OR TI SN745510 quad half h-bridge (they're pin compatible, but the TI chip handles greater currents and is cheaper.  Any tutorial for the L293D will work for the TI, but beware: both require external flyback diodes if you hook them up correctly - tutorials which claim the L293D doesn't need them aren't valid.  )

Would http://cgi.ebay.com/Low-Cost-Gear-Motor-2-Pieces-DC-robot-chassis-/280581321548?pt=LH_DefaultDomain_0&hash=item4153f3334c#shId be suitable? as it is half the price of the solarbotics gearmotors and I'd like to keep this cheap being a jobless teen.

edit: Also if I don't purchase a motor shield how would I go about implementing flyback protection? (I understand that if It only travels in  a single direction you only need one diode across the motor contacts, however with bidirectional control, this wont work?).


Those would be fine (they're like a dollar or so cheaper, total - you're not saving much, especially since you'll need to pay shipping on the motor driver too.  Sparkfun may be better for you - it's got more basic electronics).

The adafruit motor driver shield is just a few L293D's with associated LEDs and flyback diodes - it's not like you can't make your own, for a much cheaper cost. 

Schematic for TI SN754410/L293 with flyback diodes:

Thanks for the help, I actually save around 5~6 dollars because of the shipping if i buy the solarbotics ones.
edit: is there a higher resolution copy of that diagram?
edit again: over here for anyone eles who might need it http://www.google.com.au/url?sa=t&source=web&cd=1&ved=0CEQQFjAA&url=http%3A%2F%2Fwww.societyofrobots.com%2Fmember_tutorials%2Ffiles%2FDC%2520Motor%2520Driver%25201A.pdf&rct=j&q=1A%20DC%20motor%20driver&ei=AR62TfKiBJKCvgPIrdGnDw&usg=AFQjCNF36Of5vR_u9iGYWihcTnu7iE-qvw&sig2=Op3xLjUcIzkrxPPgSzlijA&cad=rja

edit again again: I'm assuming if i get 2x 1A diodes and wire them in parralell they will equal to a 2A diode?
edit again again again: Can I use BC 548 transistors instead of BC108Bs?


You could put diodes in parallel, yes, although you should probably just go and spring for a 3A diode or something (they're pretty cheap... just pick them up at a local electronics store, or steal them from a dead [wtv]), just in case.  In this particular application, you're probably fine.  Note that you don't actually need the transistor portion of the diagram: You can just use an extra pair of GPIO lines from the Arduino instead.  If you look at the schematic, the BC108Bs act as a signal inverter - just run all for IN lines to your Arduino, and it'll work fine. 

I don't really understand what you meant by this
just run all for IN lines to your Arduino


I'm sorry, I meant all four IN lines.  There are four IN pins on the IC (marked 1A, 2A, 3A, and 4A on the datasheet), and two enable lines (1,2EN and 3,4EN). 

When I refer to "IN" lines I mean the 1A, 2A, 3A, and 4A pins, and by "OUT" I mean 1Y, 2Y, 3Y, and 4Y.  Enable pins refer to 1,2EN and 3,4EN. 

The enable lines can/should be connected to PWM outputs on the Arduino, letting you use analogWrite() to set the duty cycle, while the four IN lines can be connected to any digital output on the Arduino.  IN1A and IN2A control outputs 1Y and 2Y - if 1A is HIGH and 2A is LOW, and the motor is connected to 1Y and 2Y, the motor will run in one direction at a speed roughly proportional to the PWM duty cycle on 1,2EN.  If you swap 1A and 2A such that 1A is LOW and 2A is HIGH, the motor will run at the same speed in the opposite direction. 

In the schematic, 1A and 2A are connected to a single IO line, with a transistor inverting the signal such that 1A and 2A are always opposite.  This behavior allows you to use fewer IO lines to control motors, at the cost of losing the ability to brake: when 1A and 2A are both HIGH or both LOW, the motor contacts are shorted and the back-EMF generated from the motor will act as a rudimentary brake.  In order to do this, the Arduino must individually control the IN lines - thus why I say you should just connect all four of the IN lines to your Arduino.

Thanks for the help, I'm going to be making an IR remote car first, once I get all the stuff.

I've since purchased the motors and a cheapo multimeter, however as I realised if I purchase SN754410s from ebay, I will not be able to purchase other neccessary components, could I use 2 of these? http://focus.ti.com/docs/prod/folders/print/drv8832.html. I realise that they are surface mount components, but I'm up for the challenge.
Also, with the i2c version, is it controllable through the wire library?
edit: skimmed the datasheet of the i2c version and it seems that all is needed is to send values throught the wire library?


I haven't actually used that particular IC before, or its I2C version - you'll be on your own as far as support goes.  Looking at the website you sent, though, it appears that all of the specifications are fine, so I doubt there will be issues.  For the I2C, the Wire library should suit your purposes, but you'll have to use the datasheets to write your own interface code.

Thanks, I assume that I still need to have flyback diodes as the datasheet doesn't seem to say anything about flyback protection. Instead of using schottky diodes, could I just use rectifier diodes like the IN4004?


All things considered, schottky diodes are much better when used for flyback protection - they have faster response times.  Better to have rectifiers than nothing, though.  You won't get as much flyback protection, of course, but it's doable.

Just to make sure, but I dont have to use any resistors with the i2c chip right? Just connect motor and flyback diodes then i2c connections and power sources?


You may need two 4.7K I2C pull up resistors: one from each of the data lines to +5v.  Normally the internal pullups in the Arduino are sufficient, but for motor control you may want to use a stronger pullup (internal ones are 20K).  I don't believe you need any other passives for this IC though.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131