go_away

Author Topic: Controlling motors and servos from PC or Mac  (Read 3021 times)

0 Members and 1 Guest are viewing this topic.

Offline bryan922Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Controlling motors and servos from PC or Mac
« on: December 18, 2008, 11:32:32 PM »
Hey everyone - first post...

I've looked through various websites, books, etc., and I'm a little overwhelmed. I know there's lots of ways to do things, but I don't want to reinvent the wheel when it comes to controlling motors or servos.

Basically, I want my robot brain to be programmed in C on a PC (preferably a Mac though). I don't need any help on C coding - I've got plenty of experience there. I also don't need much help on fabrication, mechanical design, etc.

What I do need help on is to be pointed in the right direction for choosing off the shelf premade boards for controlling motors and servos. Let me give a simple example: I want two servos to provide pan and tilt to a video camera. The servos will take direction from my C code which exists on the PC (or Mac). Presumably, (I'm not sure here), the code communicates to the board via the parallel port, or perhaps a USB port.

So, that would be great if someone could recommend some great (and time tested) products that will allow:

-- Easy plugging in of servos or motors to a motor controller board
-- Easy interfacing to a computer via the parallel port or a USB port
-- Options for power to come from the computer or externally
-- It would also be great if the flexibility of daisy chaining or stacking for the ability to add many more motors/controllers and still communicate through the one port existed
-- Not terribly expensive

Am I right to assume that the Roboduino is a good option? What are other alternatives?

Also, what is the best way to interface miniature video cameras to a PC (or Mac)? What I mean is: I suppose I could buy a webcam and use their software SDKs, but I'd rather not have the plastic shell which a webcam is mounted in. Yes, I might be able to remove the plastic shell, but if a more raw camera is available which can still be interfaced to the PC and its input put into a buffer which can be accessed via program code, that would be great. Any info?

One more question: I'm sure many of you are familiar with the MIT Personal Robots Group. On that site, they mention voice coil-type electromagnetic actuators. Do any of you have experience with these types of actuators? Are they readily available, and do controller boards as described above exist to control them?

Link to actuators at MIT Personal Robots Group: http://robotic.media.mit.edu/projects/hardware/actuators/overview/overview.html
« Last Edit: December 18, 2008, 11:36:05 PM by bryan922 »

Offline SeagullOne

  • Robot Overlord
  • ****
  • Posts: 248
  • Helpful? 0
  • Humans and Robots working together for our future.
Re: Controlling motors and servos from PC or Mac
« Reply #1 on: December 19, 2008, 12:01:25 AM »
Hmm...well if you're using a mac, roborealm isn't an option. I'm thinking about using my mac to controll my personal robot, NINA, but using Bootcamp to run windows and, respectively, roborealm...its really too bad roborealm doesn't run on macintosh.  :(

As far as camera software out there is concerned, you might try the CMU cam. You can program your own vision algorithms with C in it, and it plugs into a microcontroller...but it might be a little expensive though.

Anyone else?
I think the chauffeur did it.

.......

He did.

Offline bryan922Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: Controlling motors and servos from PC or Mac
« Reply #2 on: December 19, 2008, 12:23:38 AM »
Roborealm link here: http://www.roborealm.com/ (making notes to myself)

The CMUcam looks interesting. Link here: http://www.cmucam.org/

Thanks for the info. CMUcam is kind of expensive though, as you said...

Also, I've just recently discovered this site, and it looks like there's lots of good info here. I've just now been reading about the Axon microcontroller. Will it work with a Mac?
« Last Edit: December 19, 2008, 12:25:37 AM by bryan922 »

Offline darkloaf

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: Controlling motors and servos from PC or Mac
« Reply #3 on: December 20, 2008, 10:58:07 AM »
Servocity has heaps of good stuff:

Pan and tilt servos:
http://www.servocity.com/html/spt200_pan___tilt_system.html

A Roboduino would be fine, or just get an Arduino with a motor shield:
http://www.ladyada.net/make/mshield/

Think that will do what you need, there are loads of people who have done similar projects to this.

Nick D

Offline MaltiK

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Re: Controlling motors and servos from PC or Mac
« Reply #4 on: December 24, 2008, 06:39:58 AM »
Warranty

Offline reSpawn

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 0
Re: Controlling motors and servos from PC or Mac
« Reply #5 on: December 24, 2008, 07:33:50 AM »
Also, what is the best way to interface miniature video cameras to a PC (or Mac)? What I mean is: I suppose I could buy a webcam and use their software SDKs, but I'd rather not have the plastic shell which a webcam is mounted in. Yes, I might be able to remove the plastic shell, but if a more raw camera is available which can still be interfaced to the PC and its input put into a buffer which can be accessed via program code, that would be great. Any info?
You said C programming is not something difficult for you. You should take a look at OpenCV for Computer Vision. Getting frames from the camera is easy as loading an video from your pc :)

Offline cooldog

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: Controlling motors and servos from PC or Mac
« Reply #6 on: December 24, 2008, 10:08:22 AM »
try Phidgets

this will control a servo
http://www.phidgets.com/products.php?product_id=1000

you can also get ones that control motors
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline bryan922Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: Controlling motors and servos from PC or Mac
« Reply #7 on: December 24, 2008, 11:33:45 AM »
Everyone, thanks for the info.

I've settled on the Arduino board for prototyping motor controlling and sensor reading. OpenCV looks interesting.

What I'd really like to find is a USB camera without the webcam plastic shell - something like the CMUCam, which is a candidate, except for the price.

Offline cooldog

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: Controlling motors and servos from PC or Mac
« Reply #8 on: December 29, 2008, 06:21:44 PM »
take a usb camera out of it's shell
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: Controlling motors and servos from PC or Mac
« Reply #9 on: December 29, 2008, 10:11:29 PM »
What kind of specs for the web cam do you need?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline jamort

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 2
Re: Controlling motors and servos from PC or Mac
« Reply #10 on: December 29, 2008, 10:24:39 PM »
you could buy a kind of cheap laptop....
also if you have a pretty new mac you can install windows on some now
my english teacher once said, "dont talk about what you dont know in public...."

so I replied the truth, " Exactly why I dont ever talk about English."

 


Get Your Ad Here

data_list