Author Topic: Cheap computer -> output?  (Read 4038 times)

0 Members and 1 Guest are viewing this topic.

Offline MaltiKTopic starter

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Cheap computer -> output?
« on: February 09, 2009, 02:35:21 PM »
Is using a Max232 and connecting say a 12v DC solenoid, and of course 12v and GND into the V+ and GND, to the output of the Max chip as easy as I describe it?

How would I invoke the output's high?

Please don't suggest a Phidgets, as my budget is beyond maxed.
Warranty

paulstreats

  • Guest
Re: Cheap computer -> output?
« Reply #1 on: February 09, 2009, 02:57:05 PM »
do you mean that you want to drive a solenoid with a max232?

Offline MaltiKTopic starter

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Re: Cheap computer -> output?
« Reply #2 on: February 09, 2009, 03:09:07 PM »
yes, is this possible, and does a springed dc solenoid need pwm?
« Last Edit: February 09, 2009, 03:12:49 PM by MaltiK »
Warranty

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Cheap computer -> output?
« Reply #3 on: February 09, 2009, 05:18:32 PM »
Not tried it - but sounds feasible.

Just a few thoughts off the top of my head ... If using PWM then I guess you would have to use a lowish frequency due to the mechanical movement in the relay. And would the spring add some kind of contact bounce? If so - it would effect the accuracy of your motor control - assuming that is important.

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline MaltiKTopic starter

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Re: Cheap computer -> output?
« Reply #4 on: February 09, 2009, 06:13:27 PM »
Well it isnt very important, and I dont understand why a simple 12v NPN transistor wont suffice, I only need one direction cuz its springed
Warranty

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Cheap computer -> output?
« Reply #6 on: February 09, 2009, 06:47:56 PM »
Hi,

The MAX232 haven't got the power required for a relay.
Just go ahead with your transistor, but remember a free wheeling diode to catch the inductive kick from the relay coil, or your transistor will be toast.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline MaltiKTopic starter

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Re: Cheap computer -> output?
« Reply #7 on: February 09, 2009, 06:50:30 PM »
Alright, but how do I invoke/call it? What command do I use? Since its not programmable, how does it work?
Warranty

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Cheap computer -> output?
« Reply #8 on: February 09, 2009, 07:23:53 PM »
Alright, but how do I invoke/call it? What command do I use? Since its not programmable, how does it work?

Check my previous link for a design to drive it by a transistor. Then use PWM for speed control or just an I/O pin if you only need stop/start.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline MaltiKTopic starter

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Re: Cheap computer -> output?
« Reply #9 on: February 10, 2009, 05:18:43 AM »
Alright, but my question is how do I call upon the high/low of the transistor? Do I use hyperterminal, what?
Warranty

paulstreats

  • Guest
Re: Cheap computer -> output?
« Reply #10 on: February 10, 2009, 06:24:35 AM »
are you using a microcontroller?

Offline HyperNerd

  • Robot Overlord
  • ****
  • Posts: 139
  • Helpful? 5
  • N3rd1n80r
Re: Cheap computer -> output?
« Reply #11 on: February 10, 2009, 10:00:45 AM »
if you're using a PC with a serial port them you will need a microcontroller to 'decode' the signal. I.E the computer tells the uC to move the solenoid, then the uC turns on an output pin connected to the transistor, which then powers on the solenoid.

PC -> Max232 -> uC -> Transistor -> Solenoid

Hope this helps :)

 -HyperNerd
There are 10 types of people in the world - those who understand binary, and those who don't.

Offline MaltiKTopic starter

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Re: Cheap computer -> output?
« Reply #12 on: February 10, 2009, 02:03:29 PM »
Ahhh ok so I guess that was my real question... thanks a bunch guys
Warranty

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: Cheap computer -> output?
« Reply #13 on: February 11, 2009, 10:59:05 AM »
as long as you do not intend to use a recent version of windows it is fairly easy to control the pins on a PC parallel port individually.
you'll need to do a small amount of programming in C or C++ and drive any loads of more than a few mA through a transistor but it is fairly simple.
i did this some years ago under Linux.

things become far more complicated if you are using windows NT, XP or vista but i believe it is still possible.
there's quite a bit of information on hot to do this online. eg: http://www.epanorama.net/circuits/parallel_output.html#windowsprogramming


although it is not the correct way to use the serial port it is theoretically possible to control the logic of some of the signal pins on the serial port as well.
look into setting the level of the RTS and DTR pins.
i don't know how easy it would be (or if it's is possible in windows) but it would be worth looking into if you don't have a parallel port.

as HyperNerd says, the more correct way to use a serial port is to use a microcontroller to decode what is being sent from it. that way you can get far more useful output.


dunk.

Offline MaltiKTopic starter

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Re: Cheap computer -> output?
« Reply #14 on: February 25, 2009, 07:18:12 AM »
So would I connect said solenoid voltage wire to pin #14, with a transistor of course?



And connect the GND to the GND of the chip.

I read up on the side dunk, and it was rather confusing.

My PC is running vista, so HyperTerminal is not a problem, how would I go about writing a C# proggy for making an output high to the chip?
Warranty

Offline HyperNerd

  • Robot Overlord
  • ****
  • Posts: 139
  • Helpful? 5
  • N3rd1n80r
Re: Cheap computer -> output?
« Reply #15 on: February 25, 2009, 02:09:56 PM »
The MAX232 chip is just a converter to allow the microcontroller to communicate with the PC. The data pushed from pin 14 of that chip is of no use without a microcontroller, as it is stream of 1's and 0's, not a solid on or off signal - what you need to drive the solenoid. Also I reccomend the MAX233. Although more expensive, the wiring is simpler, as you don't need the external cap's.

To use this chip with a microcontroller, connect pin 11 of the MAX232/233 to the Rx pin on the uC, and pin 12 to the Tx pin of the uC. Then connect pin 14 to pin 2 of a serial connector, pin 13 to pin 3, and ground to pin 5. Then upload a UART test program to the microcontroller, and see if it works!

EDIT:
Also, check out Admin's Tutorial :D

 -HyperNerd
« Last Edit: February 25, 2009, 02:12:13 PM by HyperNerd »
There are 10 types of people in the world - those who understand binary, and those who don't.

Offline MaltiKTopic starter

  • Robot Overlord
  • ****
  • Posts: 300
  • Helpful? 2
Re: Cheap computer -> output?
« Reply #16 on: February 25, 2009, 06:48:40 PM »
Look at these:

http://wwwold.ecs.tuwien.ac.at/lehre/Microcontroller/Docs/IOBoards.shtml

It seems that I could use one of them to connect directly as an output...

If not, then can anyone provide a source code... preferably a commented one
Warranty

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Cheap computer -> output?
« Reply #17 on: February 26, 2009, 11:52:20 AM »
Hi,


You could use this http://That.Homepage.dk/PDF/DTR_to_Relay.pdf and then go to beyondlogic.org for a good read.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here