Controller a DC motor through my computer?

Discussion in 'The Projects Forum' started by Solarius, Jan 22, 2007.

  1. Solarius

    Thread Starter New Member

    Jan 22, 2007
    9
    0
    I want to build a machine that can predictably launch ping-pong balls into cups. It's going to use a mounted webcam to locate the cups (I'm a CS major, so the machine vision stuff is the easy part =) and then I'm a little sketchy on the rest!

    Here's my current plan and questions:

    I want to put a laser pointer, webcam and catapult device onto a platter, and connect that to a DC motor so that it can spin freely on the vertical axis. The whole thing will spin until the laser pointer is on the target, and then the webcam will triangulate the approximate distance using the laser dot. A second DC motor will spin a spoon-like device to launch the ball.

    I want to make this as cheaply as possible, so I'd like to go directly out from my laptop to the DC motors. I'm looking into PWM to control the speed of the motors, but I'm not really sure what I'm doing. I'm thinking that serial or parallel port control would be the best option.

    Does this sound feasible? How exactly does the PWM work on a circuit level? I've only taken digital logic and intro to circuits, so I'm mostly out of my comfort zone here.

    Thanks so much!!
     
  2. mrmeval

    Distinguished Member

    Jun 30, 2006
    833
    2
    Check hacked gadgets, they have just several like that. One uses machine vision, others are USB controlled. :)
     
  3. Solarius

    Thread Starter New Member

    Jan 22, 2007
    9
    0
    Ok, I figured out how I'm going to do this, I need help from actual EE's.

    I'm going to output two bits: one for direction, one for on/off. The direction bit will be hooked up to an H-bridge around the motor, and the on-off will be attached to the control of a MOSFET next to my battery.

    My only question is: will the output of a data pin via the parallel port trigger a transistor to allow current to flow? I'm looking for MOSFETs on jameco and I notice that they have the property "on-state DS current (min)". Is this the minimum current to turn on the transistor?

    If so, it looks like the lowest one available is 0.05A, or 5 mA. It looks like the parallel port only puts out 2.6 mA. Will I not be able to turn my transistors on?
     
Loading...