Reading from Computer Serial Port

Good Afternoon to All,

First, I'd like to stat that I have looked extensively to find answers on my own.

I have an Absolute encoder connected to a bus, then to an RS232 adapter, then to the serial port of my computer.

I am trying to retrieve the positional information through the USB port of my Arduino Uno. Prior to this setup, I successfully used MATLAB code to retrieve this information through the USB port of my computer without the Arduino or RS232 adapter and used an SEI/USB adapter.

Is this possible? Any information is greatly appreciated!!

Moderator: removed crosspost

WHat is an absolute encode, please post a link to the datasheet.

JHANK:
I have an Absolute encoder connected to a bus, then to an RS232 adapter, then to the serial port of my computer.

I am trying to retrieve the positional information through the USB port of my Arduino Uno.

Do you mean the following

encoder ---- RS232 adapter --- PC serial port ---- PC USB port --- Arduino ?

If you just want to read the encoder with the Arduino and if the encoder has a TTL serial output then you could simply do

encoder --- Arduino.

The USB port on a Uno is a Slave, not a Host so you cannot connect other USB Slaves to it.

Post a link to the datasheet for your encoder.

...R

Hi,
An absolute encoder is also called a grey code encoder.

Absolute encoders
Absolute encoders provide an absolute numerical value for each angular position even over several revolutions. Even in the event of a power failure the present position is quickly and reliably detected.

They usually have parallel digital output.

//en.wikipedia.org/wiki/Rotary_encoder

Tom.... :slight_smile:

Here is the Absolute encoder

Data sheet for the encoder:

Robin2:
Do you mean the following

encoder ---- RS232 adapter --- PC serial port ---- PC USB port --- Arduino ?

If you just want to read the encoder with the Arduino and if the encoder has a TTL serial output then you could simply do

encoder --- Arduino.

The USB port on a Uno is a Slave, not a Host so you cannot connect other USB Slaves to it.

Post a link to the datasheet for your encoder.

...R

Similar yes, I have 3 encoders attached to a bus which leads to the RS232 Adapter. So essentially the same thing.

JHANK:
So essentially the same thing.

Does that mean that you are only asking how to send data from your PC to your Arduino ?

Have you got a program on your PC that can read the data from the encoders ?
What language is that written in ?

...R

Those encoders have an analogue output so you have to feed them into the analogue input of an Arduino. What is worst is that they have a 12 bit resolution but the Arduino only has a 10 bit resolution on the analogue input so you need a change in four levels in the encoder to give you one level change in the Arduino, and that is best case. There is bound to be some noise.
It looks like you are throwing away quite a lot by using an Arduino for these sensors, I bet they are not cheap.

Add an external SPI interface 12-bit ADC & get the full resolution.
http://www.digikey.com/product-detail/en/MCP3202-CI%2FP/MCP3202-CI%2FP-ND/305924
http://www.digikey.com/product-detail/en/MCP3204-CI%2FP/MCP3204-CI%2FP-ND/305926
SMD versions available too