Author Topic: control servo via parralel  (Read 2115 times)

0 Members and 1 Guest are viewing this topic.

Offline harpoTopic starter

  • Jr. Member
  • **
  • Posts: 40
  • Helpful? 1
control servo via parralel
« on: May 04, 2011, 02:30:08 PM »
hello and welcome to my post.
i am kind of a noob when it comes controling things with my laptop
and i think this would be a good place to learn any ways....

i need a way to control a servo motor from a parralel port or usb port on my lap top (with out a servo controler)
also how would i use a sensor such as a photo cell?

i am asking for a tutorial on how to do the listed.

good by and thanks for reading this post!

Offline georgeecollins

  • Full Member
  • ***
  • Posts: 58
  • Helpful? 3
    • Backyard Robots
Re: control servo via parralel
« Reply #1 on: May 04, 2011, 03:52:23 PM »
Well you can't control a servo from your laptop without some additional circuitry in between.  I would recommend using this:

http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/595/Default.aspx?txtSearch=servo+controller

That is well documented and really easy to use.  It also seems to be on a sale price of $32, which is pretty cheap. 

You need to run a USB cable from your laptop to the servo contoller.  Hook a battery into the terminals of the servo controller and plug the servo into the controller.  You can communicate with the servo controller via any serial terminal program.  Parallax has a free one to download that way.  You can control up to 16 servos that way.   

Offline harpoTopic starter

  • Jr. Member
  • **
  • Posts: 40
  • Helpful? 1
Re: control servo via parralel
« Reply #2 on: May 04, 2011, 05:35:30 PM »
ok then if i have to have a sc for that can some one tell me how to use a photo cell as a sensor and see the light amount(like 0-500 or somthing) on my laptop?

Offline MikeK

  • Full Member
  • ***
  • Posts: 97
  • Helpful? 5
Re: control servo via parralel
« Reply #3 on: May 04, 2011, 06:06:52 PM »
You don't want to use a microcontroller?  You can get a 12F683 for less than $2 and receives commands from the PC.  A PICAXE  can also do this and doesn't require a hardware programmer.

If you're providing the servo separate power, you could probably control it via the parallel or serial (RS232) port if they're 5V signals and you're able to write control software on the PC.  I think only DOS has hardware access to the parallel and serial ports, but there are libraries available to get around that.  But you'd still want interface circuitry at the very least to protect your PC from being damaged, since it costs much more than a servo.

Offline georgeecollins

  • Full Member
  • ***
  • Posts: 58
  • Helpful? 3
    • Backyard Robots
Re: control servo via parralel
« Reply #4 on: May 04, 2011, 08:21:57 PM »
Whoops-- I didn't see the part where you were asking about a photocell.  Yeah, as MikeK says this is a classic application for a microcontroller.  You could use the servo controller to detect a photocell. you just need to wire it with a resistor.  But that probably isn't the easiest way.  I also think it would be a bit of a hassle to start with just a picaxe.  You can, and you would learn a lot.  But I would try to start with a more well documented controller board with output you can use for a servo and analog input for a photocell. 

I would suggest one of these:
http://www.pololu.com/catalog/category/8

A baby orangutan is only $20, but you will have to do some soldering and I think you have to get a plug to connect it to USB.  But you get the I/O to move a servo and check a photo cell.  It is well documented and AVR and Arduino have lots of code examples. 

Offline georgeecollins

  • Full Member
  • ***
  • Posts: 58
  • Helpful? 3
    • Backyard Robots
Re: control servo via parralel
« Reply #5 on: May 04, 2011, 08:39:00 PM »
Another idea might be to try Phidgets.  You can get a module that detects light and one that controls a servo or servos.  It's not the cheapest way to do it, but it may be easier. 

http://www.phidgets.com/index.php

Another relatively easy way to do what you are trying to do is with some variation of a BASICStamp. 

Offline MikeK

  • Full Member
  • ***
  • Posts: 97
  • Helpful? 5
Re: control servo via parralel
« Reply #6 on: May 05, 2011, 04:10:16 PM »
The "lowly" PICAXE is still capable of reading a photocell and driving a servo.  If you want support then go with the Arduino...much wider support and fan base than Pololu's entry, although I've not used either one.

Offline georgeecollins

  • Full Member
  • ***
  • Posts: 58
  • Helpful? 3
    • Backyard Robots
Re: control servo via parralel
« Reply #7 on: May 05, 2011, 06:27:59 PM »
 Again, MikeK, you are totally right.  I was just thinking that someone who comes on a forum and asks that kind of question may have limited skills in either electronics or programming.  You can do everything he wants to do with a PICAXE, but I didn't think it is the easiest way if you are limited in either regard. 

Offline MikeK

  • Full Member
  • ***
  • Posts: 97
  • Helpful? 5
Re: control servo via parralel
« Reply #8 on: May 05, 2011, 07:46:59 PM »
Well, the PICAXE is targeted at the same users as the BASIC Stamp, and those are marketed to primary/secondary school kids.  You can program them in a form of BASIC as well as through creating a flowchart.  I just see them as cheap enough to be worth trying.  I have no connection, I've just used them a number of times...and they have a large forum with a huge archive.

The Baby Orangutan looks interesting, but it looks like it requires soldering, using the more complicated AVR Studio, and also requires a hardware programmer.  But I'd be happy if the OP got interested in any of the microcontrollers.