Shop OBEX P1 Docs P2 Docs Learn Events
It gets better... more motor interfacing ?''s... — Parallax Forums

It gets better... more motor interfacing ?''s...

ArchiverArchiver Posts: 46,084
edited 2000-07-04 02:20 in General Discussion
Hi group-
First, I should thank anyone who sent in a reply to my question about motors
and the Stamp resetting. I got a motor to work bidirectionally and turn on and
off using two output pins and a 7404 hex inverter chip. I know, it's not much,
but you gotta get your start somewhere. Anyway, here's my situation.

-> I bought my Basic Stamp to try out an experimental drivetrain, interface, and
program system, which I hope to patent once it's been tested enough, and
regardless of patenting develop for my high school’s FIRST Robotics
Competition team robot. For the system, I have some minimum req'ts, the most
important of which is four motors bidirectionally controlled. PWM is not
absolutely necesssary to test the drivetrain system, but without it the testing
options are severely limited. Four motor bidir control seems to require at
least 8 pins on my BSII. Add an RF module input, and that's another two pins.
Some debugging LEDs, 2 necessary encoders( at least 4 pins), an LCD, and the pin
situation becomes extremely cramped. Even worse, i just found that the BSII has
only one PWM output, which cannot run concurrently with anything else! In
addition, the setup with the HC04 inverter makes the motor driver inputs
reversed. This saves programming complexity and an I/O pin, but o!
nly allows a coasting stop, not a braking stop, which would probably require 3
I/O pins per motor.

So I'm kinda stuck here, scratching my head about the options I have. Here
goes:

-The easiest option? Suck it up and be limited. I don't like this option at
all...

-Ditch the Stamp and opt instead for the BasicX from NetMedia, a pin-for-pin
BSII replacement. The BX does multitasking, which could do the PWM I need
through software. And burying through the .docs, I noticed that indeed it does
support two hardware PWM channels. Getting warmer...

-Maybe, just MAYBE, some sort of circuit that uses a 555 timer to control PWM...
but this would use plenty of the I/O. I could get a serial I/O expander...
Getting more complicated...

-Use the easily available PWM coprocessors for each and every instance of PWM
motor control. Probably would be more expensive than I want, plus require board
space which don’t want to allocate

And then I thought a little more. The SE Electronics Serial Servo Controller II
must've been great for those Stamp owners out there who controlled servos
individually. The SSCII saved I/O, simplified programming and even made
connectors easier to do. On the net, I haven't found a single product that is
close to an SSCII designed for DC motor control. Offloading responsiblities from
the BSII to another processor while increasing capabilities has always seemed
like a great idea to me, which is why I just used the example of the SSCII in
the above. Especially with the BSII, it just makes sense. I'd rather have my
BSII handle the higher-level tasks like executing commands from a remote,
controlling a robot's behavior, and managing processes that are all vying for
processor time. Offloading the "menial," and repetitive stuff, like servo
control, motor control, or even keypad input, saves the BSII's cramped RAM and
EEPROM, and reduces running time nicely.

So? Program a processor to do multiple PWM output with a serial interface.
Even better? Make the microprocessor handle motor control (i.e. interface with
L293D(s)). For each motor unit on the chip, simply have 1 PWM out and two
outputs for the motor driver chip inputs.
And the best? Program the micro to accept serial commands. Put the motor
drivers on a circuit board. Have simple header pins for each motor.

AHEM!!!!
SCOTT EDWARDS, are you listening?
AL WILLIAMS, might you be able to develop something like this?
PETER H ANDERSON, have any ideas?

So I guess that all I want is a motor controller with many similarities to the
SSCII, only designed for DC motor control.

My solution for the moment is to use half of my I/0 pins for the motor control,
w/o PWM.

I'm doing a Senior Research Project this summer at an army lab, where I'm
programming a Motorola 68HC05 micro in assembly. I could pick up this project
myself, but I know there are others out there with more experience who would
make things far superior to those of this beginner, as in the names mentioned in
bold. I checked around on the Motorola and Microchip websites... apparently,
Motorola has plenty of chips with 4, 6, or 8 +5V PWM channels in the 68HC05,
'08, and '11 lines. Unfortunately, each of these would take up plenty of space
on a PCB, require some tough programming, cost lots to develop for, yada yada
yada. Microchip has some PICS with 3 PWM's, but these are the more expensive
18Cxx's. Some of the older 17xxxx series chips have 2 PWM's, come in a smaller
package, etc... have desirable characteristics. And I've seen lots of BSII
peripherals that utilize cheap little PIC micros. I don't have the tools or
experience with either of these, but if there are no oth!
er solutions, it might just be worth my while...

So here's a cry to all those BSII peripheral makers out there:
Motor control via a serial connection seems like a topic that has been
untouched. I know there is a market out there for this kind of thing, especially
if the motor drivers are integrated. At minimum, a chip that requires one BSII
line for a serial connection, can control 2 pwm channels, and has outputs for a
motor driver or motor itself would be ideal.

:[noparse]:sigh:[/noparse]: sounds like complaining. And two whole pages? I didn’t mean to
write so much.

Any other ideas? Feedback as to which option I should pick would be greatly
appreciated from anyone.

-Brandon Heller
Montgomery Blair High School, MD
Sign In or Register to comment.