Looking for ideas for controlling 10-variable speed DC motors

Discussion in 'The Projects Forum' started by TrevorP, Jul 28, 2010.

  1. TrevorP

    Thread Starter Active Member

    Dec 8, 2006

    I'm just seeking ideas on ways of interfacing an ATMEL AVR microcontroller with 10-bidirectional motors. I will be making the h-bridges and associated circuitry for each motor. The control lines required for each bridge will be FORWARD, REVERSE, and a PWM signal for speed adjust. The bridges will be protected from opening in both directions in hardware. The PWM frequency required is around 20kHz (above audible but not too high that I have to pay more for faster components).

    Here is my idea:

    A standard AVR with four ports -> 32 pins would require 30 pins to be used up for motors alone, and I'll need other pins to control some video multiplexers and sensory equipment. The AVR will also be sending and receiving over UART. As a result I'm thinking of having the AVR communicate with separate motor and sensor cards which plug into the main board. Each card would have it's own AVR or any other chip that can communicate over an I2C or SPI bus. Basically I need some sort of two-directional bus, preferably something built into the AVRs.

    What do you guys think? How might you go about this?

    Thanks for any suggestions,

  2. windoze killa

    AAC Fanatic!

    Feb 23, 2006
    Some AVRs have an RS485 bus. This would be a good option as you could address each of the motor controllers individually. You could have positional feedback as well. It seems you have most of it under controll already.
  3. TrevorP

    Thread Starter Active Member

    Dec 8, 2006
    Hmmm thanks...I'll look at that. 485 is probably a bit overkill for inter-component connections so close together, I'm using 422->TTL to actually communicate with the chip remotely. Each motor module would definitely have its own address, which I'll have to look at how AVR's do TWI but I'm pretty sure I can set my own addresses. I'm gonna need temperature and current readings from each motor and possibly other stuff, so I can't just make them slaves.
  4. tom66

    Senior Member

    May 9, 2009
    How about a multiplexer? One with a latching mode would work well. Or, you could use a multi-chip system, one slave controlling the motors and the master handling everything else.