Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is it possible to convert a pc serial port(rs232)to a 0-10v

Status
Not open for further replies.

siyamak

Newbie level 2
Joined
Aug 5, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,310
circuit of rs232 convert in parallel

Hello
I'm newbie in electronic
I have a pump that control manally with a potentiometer(I think with 0-5V DC)
can I replace this potentiometer with a convertor circuit that can be controlled with labview software and serial port of PC i.e, converting appropriate signal produced in this software to a 0-5v 0-10v or 0-20mA or 4-20mA that can be understand with pump.

Thank you
 

G4BCH

Full Member level 6
Joined
May 10, 2006
Messages
360
Helped
123
Reputation
246
Reaction score
96
Trophy points
1,308
Activity points
4,541
pc rs232 5v circuit

I think he simplest way to do this would be to use a microcontroller to receive commands from your Labview program.
The circuit will need an RS232 converter MAX232 or simillar, a microcontroller I prefer PICs, others amy dissagree ) to interpret the commands and reply with confirmation if needed, and a digital to analogue converter.

I have some routines already written for a PIC to do some of what you need, but do not have them to hand at the moment.

You have everal choices for D/A converter. Serial , parallel or use PWM from the microcontroler . Serial has has fewer wires to connect, and PWM needs more software. You may still need a driver amplifier depending on the load impedance.

Is this to be used in an industrial environment ? If so you will need to consider any possible electromagnetic interference.

I'll try to find any circuits I have this evening when I get home.

Peter
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,310
Reputation
4,622
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,416
convert 0-10v to rs232

If you are new to microcontrollers and really would like to have this job done in less than half an hour - go for PICAXE-08M (or any other PICAXE, 08M is 8-pin microcontroller based on PIC12F683) ..
Here is an example of 4-20mA tester:
http://
As this microcontroller can be directly connected to PCs serial port (requires only 10kΩ and 22kΩ resistors) you can issue commands directly from Windows Hyperterminal, for example, if you send (type) "000" (3 times zero) the output can be programmed to 4mA and if you send "999" (3 times nine) the output will be 20mA ..

Regards,
IanP
 

siyamak

Newbie level 2
Joined
Aug 5, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,310
how to converts rs232 to parallel port

Thank you for your response

let me explain my situation more clear
My system consist of two pump,one 1.5HP and the other a small 5-10watt or 60-120watt.I decide to buy an inverter to control the main pump(although I dont buy this until know,what inverter do you recommended which brand,altivar11 or altivar31 from telemacanique,or vacon ,lg ,abb)all of these inverters had a4-20ma analog output.
the small pump is controlled by a potentiometer,as I say I want to remove these potentiometer and with the 4-20ma signal of the inverter controll the pump,first I think that it is possible to convert the 4-20ma to 0-5v i found some suitable circuits and commericial products and so there Is no need to buy a seperate plc.
Then I think that if i want to add several small pumps later what can i do and because the labview is simple and powerfull software and is easy to operate i can use it but its cards are very expensive and the only situation remained is to use serial ports or usb and parallel ports that can be controlled these cheap small pumps.
as i say i newbie in electronic so plz if possible send more infomation,how can i find characteristic of that potentiometer and information to simulate it with any manner,how can i buy those microcontroler that dear IanP mentioned and if i cant find them in my area how can replace them with a suitable one and after that which other electrical components i must buy. and what is the estimated price of these project.
Pardon me for my bad english and Thank You again for your response.

siyamak
 

G4BCH

Full Member level 6
Joined
May 10, 2006
Messages
360
Helped
123
Reputation
246
Reaction score
96
Trophy points
1,308
Activity points
4,541
converter rs232 to parallel

I have no experience of the drives that you are proposing to use but they look like thay will power the size of motor that you have.
I assume the potentiometer that you want to replace is the reference potentiometer that looks like it controls the motor speed.
From the data sheet the input impedance of the unit is 40k ohms so it will not load the driving circuit significantly. I have put together a circuit and program that uses a prebuilt PCB a PICBlock MC28AD-16, I happen to be using one for job. You can find the details at :
https://www.plite.co.uk/

They are not very cheap about £60, and you have to buy your own PIC, but the boards are quite well made and easy to use. They make a cheaper board for a smaller PIC board that would suit your application.

I used PWM to generate 0 to 5V and added a simple filter cosisting of a 1k ohm series resistor and 100uF capacitor ( the first components of about the right value to come to hand ) to ground from RC2. Output from the juntion of the capacitor and resistor.
The processor was a PIC18F252. What I had fitted to the board already.
The program works with Labview, Ive tried it. you just write a byte to the RS232 port, 0 being min voltage FF being maximum.

To compile the program you will need to download Microchip's MPLAB, and to program it either make or buy a simple PIC programmer. PICKIT2 may be a good choice, it is cheap and one version comes with a development board and some lessons on how to program PICs. Here in the UK you would be probably be hard pressed to buy the parts for what it costs to buy the ready made programmer.

From the drive data sheet the 15V output can be used to power the board.

If you prefer the 4 - 20mA route and don't mind a little soldering then the PICAXE circuit looks hard to beat, it is certainly cheap, but then you will have perhaps to cost your time in buiding it as well.

It all depends on the compromises you can make.

There is nothing special aboutt he code that I've written. I'm not a programmer but it does work. I'm sure that someone will come up with a simpler solution. like doing it all in one 8 pin IC.

Peter
 

mennguyen2005

Newbie level 2
Joined
Mar 9, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
convert 0-10v rs232

I used 89C51 send mesage to pc serial port with MAX232 but pc not recive char. why?
 

cdcll

Full Member level 3
Joined
Feb 15, 2002
Messages
163
Helped
8
Reputation
16
Reaction score
1
Trophy points
1,298
Activity points
1,199
rs232 to 0-5v converter

mennguyen2005 said:
I used 89C51 send mesage to pc serial port with MAX232 but pc not recive char. why?

first of all, maybe you need to check if the COM port is correct one, and also check if the RX and TX of COM port connecting to your MAX232 is correct.

good luck!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top