simple adc interface to rs232

Thread Starter

markotitel

Joined Jun 12, 2010
6
Hello, this is my first post here.

i found this very simple circuit for analogue data logging on PC.

http://www.tmworld.com/article/talkback/325653-Test_Ideas_Serial_port_controls_ADC.php#74496

Im not so good in programing and electronics, can someone help me in understanding the code for reading data from mcp3201.

Do I have to tell mcp to send me data, or will it continously send it to max232 and to RS232 after?

I cannot get any data on screen but value which is the same wheter circuit is attached or not to com port.

Im trying to build simple voltmeter, but without utilisng micro controlers, PIC or other circuits.

Is it even possibile with this setup?
 

Thread Starter

markotitel

Joined Jun 12, 2010
6
Hm but in the text there is schematic with mcp3201 and max232 so these two can work with rs232 acording to document I left a link.
 

eblc1388

Joined Nov 28, 2008
1,542
beenthere is right about the interface of the MCP3201, which is SPI.

The original author of the above design idea use the other signal lines of the RS232 port to mimic the timing and function of a SPI interface. You can see that the regular RX and TX connections is not used but the DTR, RTS and CTS used instead.

The datasheet MCP3201 is available from the chip manufacturer Microchip and I suggest you download it and have a look. It contains very detailed explanation of what to do in order to obtain the converted data from its pins.

The author has also provided the C# source code for the HOST PC interface and you need to compile it into an EXE program in order to be used.
 

Thread Starter

markotitel

Joined Jun 12, 2010
6
Ok thank you, I have datasheet, but I dont have knowledge to understand it very well.

Can you advice me how can I make something similar but without PIC circuits just plain A/D and max232 ?
 

eblc1388

Joined Nov 28, 2008
1,542
Can you advice me how can I make something similar but without PIC circuits just plain A/D and max232 ?
I don't understand why you have to ask this question.

You can get the ADC conversion result into your PC via the serial port using just the A/D chip and Max232 chip. Of course you have to run a program on the PC end in order to get the data.

As I have replied in the above post, the author has provided the required source code on that same webpage and all you will need is to do is to compile it into an EXE program to run on your PC.

Tell us which part of the process you are having difficulty with or do not understand?
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
I would suggest going with a true RS232 interface. And if your real ambitious or you have high timing requirements, then consider USB or ethernet.

You might also want to investigate some of the industry standards in data aquisition. This would help dramatically on the controlling software end of things.

A very simple and widely supported protocol is Modbus. This is a master / slave arrangement where the master polls an addressable slave with a command word. The slave resolves the command and returns data.
 

Thread Starter

markotitel

Joined Jun 12, 2010
6
thank you for your help everyone, I dont need fast system, once in a 5 minute interval is fine. or once i a minute. So I thought I make it as simple as it cen be made.
 

Thread Starter

markotitel

Joined Jun 12, 2010
6
Hello again,

I ordered same part mcp3201 and made circuit like on the web site, Link is at the first post.

I compiled c# code, but problem is that I always get the same result. 4.99..... no matter what.

Only difference is I compile the code in linux with MONO. Can you give me a clue?
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
Disconnect your device, short your CTS line to grnd (pins 8 -5) on the serial cable to simulate a data set of 0x00. Your program should now return a 0.00
 

Thread Starter

markotitel

Joined Jun 12, 2010
6
Now I took brothers PC with Windows XP, I compiled program and run it successfully, in windows I always have reading that is ZERO, as analog signal i use 80mVolts I think it should be enough to detect and read.
 
Top