MAX232 to control laser-pointer

Status
Not open for further replies.

mongoq

New Member
I have successfully built this data-cable: **broken link removed**


The MAX232 seems to be a handy device.
Now, I want to build a serial cable on/off switch for my laser-pointer based on the MBUS-cable-diagram.

How do I wire the MAX232, so I can send a command by the pc that turns the laser on or off, ie. continuos 3v or 0v are supplied ?
What are the settings and commands on the pc side ?
I want to write a little C-program.
 
If you just want to turn something on and off using the serial port you don't need a max232. You can just use a handshaking line to control a transistor...

If you give a bit more information about the laserpointer itself i can make up a scematic...
(supply voltage, ... ?)
 
The laser-pointer uses two 1,5v battery cells.
If possible, the power should be drawn entirely from the serial port,
not from batteries.

A diagram would be greatly appreciated !


And a little C code to run the circuit would be nice !!!
 
I'm sorry, but i'm getting errors when I try to upload the scematic, I'll try again tomorrow ...
 
The serial port can only supply a small current, certainly not enough to power a laser pointer, so you're still going to have to use the batteries...

Find the negative power supply in your laser pointer (the - that comes from the batteriers), cut this wire and connect it to the 'battery -' on the scematic. The 'Laser -' exit should then be connected to the other end...

about the software, is there any chanse you have visual basic? it whould be very simple to in VB...
if it really has to be C, then for wich platform? dos, windows ?
 

Attachments

  • rs232onoff.jpg
    17.9 KB · Views: 565
I'm getting 9,8v on the 7th and 5th pin of the serial connector when it's attached to the pcs serial port, whether the your c program activates the RTS thing/line or not ...
Why ?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…