siqu
Posts: 26
Joined: Thu Apr 11, 2013 1:50 pm

RS323 to pi ?

Thu Apr 11, 2013 2:58 pm

Hi all,

I m building a currentmeter and the data im getting from the adc need to be showen on a pc terminal.
I made it work fine with the PuTTy terminal but the point is that it schould work with RS323 and the data need to be shown on a pc terminal like ( hyper terminal win xp or so )

Any projekts similar, or ideas how to manage that .

Thanks.. ;)

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13102
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: RS323 to pi ?

Thu Apr 11, 2013 3:31 pm

I'm not sure if you want the PI to emit RS232 data to a PC that is used as a terminal, or that you want to PI to receive RS232 data from a measuring instrument, and show it with a terminal program running on the PI, but in any case you will need an RS232 tranceiver that translate 3V3 levels to RS232 levels and vice versa. The easiest solution for that is using a MAX3232 chip, which can be powered with 3.3V, so it interfaces directly to the PI's 3,3V UART signals RxD and TxD.

siqu
Posts: 26
Joined: Thu Apr 11, 2013 1:50 pm

Re: RS323 to pi ?

Thu Apr 11, 2013 3:38 pm

I have som data going into the pi, and i wont that data to be trasferd to a pc trough a RS232 interface. That data need to be shown in a pc terminal.

I found this projek, take a look.

http://homepage.eircom.net/~nigelbrooke ... Board.html

But my problem is that i cant found the ADM3202E any where. seems to be old komponent. But as you say i could use the MAX3232 ..

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13102
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: RS323 to pi ?

Thu Apr 11, 2013 3:57 pm

Yes, the MAX3232 is the most often used chip of this kind, and one of the first that could be powered with 3.3V, instead of the older chips that used 5V, like the original MAX323. you can't use those 5V powered chips directly as the PI cannot tolerate 5V on its GPIO pins. There are solutions to that (using two resistors) but the MAX3232 is simpler to use, although slightly more expensive.
Boards with the MAX3232 are sold by many different makers.

siqu
Posts: 26
Joined: Thu Apr 11, 2013 1:50 pm

Re: RS323 to pi ?

Thu Apr 11, 2013 4:06 pm

Thanks for you reply.

So you recomend me to use MAX3232 .

I found this projekt with the MAX323
http://poli.cs.vsb.cz/misc/rasp-pi-sp/

I just need to copy this and it will work right ?

Again, thanks.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13102
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: RS323 to pi ?

Fri Apr 12, 2013 9:13 pm

I just need to copy this and it will work right ?
yes, it should.

at least that takes care of the hardware.

The pi normally boots with the UART assigned to the OS as general purpose serial I/O for logging into the OS. so If you connect a PC's serial port to the PI, and run a terminal program on it, you can remotely control the PI with it.

If you want to run a terminal emulator on the PI, or another application that uses the serial port, you have to "take over" the UART for you application or terminal emulator.

details are often discussed in these fora

siqu
Posts: 26
Joined: Thu Apr 11, 2013 1:50 pm

Re: RS323 to pi ?

Fri Apr 12, 2013 10:26 pm

aha, thx alot.

Another fast question: is it possible to have a rs232 converter to usb and it will still work as if i directly connected the rs232 directly to the pc.. Hope u understod my question. Im from Danmark so my spelling isnt prety. :roll:

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13102
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: RS323 to pi ?

Sat Apr 13, 2013 11:00 am

USB RS232 controllers do work, but its not an optimal solution on a PI, as there are often communication problems between the PI's USB port and RS232 dongles. The USB driver of the PI is a bit of a "hack", and the PI's USB hardware was meant for USB-OTG, that is it was more designed to be for an USB peripheral than for an USB-master.
There are many posts about problems with USB RS232, I would advice to use the PI's hardware instead of going that route.

siqu
Posts: 26
Joined: Thu Apr 11, 2013 1:50 pm

Re: RS323 to pi ?

Sun Apr 14, 2013 8:08 pm

Im not sure that you understood my quiestion. Im talkin about convert RS232 signal to usb signal so it can be used to pc that dont have RS232 . Cuz, my dont have RS232 only usb, VGA HDMI etc.

Tjek picture and the red ring :oops:

Image

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: RS323 to pi ?

Sun Apr 14, 2013 9:56 pm

If you want UART on Pi to communicate to a PC you have options

1/ If PC has RS232 use a RS232 converter between Pi and PC

2/ If PC has NO RS232 either

a) Use a USB to RS232 cable and RS232 converter

b) Use a chip solution like FT208RL to connect between USB and UART at 3V3 levels
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

IanH2
Posts: 79
Joined: Tue Dec 18, 2012 10:17 am

Re: RS323 to pi ?

Mon Apr 15, 2013 6:58 am

There is quite a bit of information about connecting up a Pi serial port at http://www.elinux.org/RPi_Serial_Connection, including links to a MAX3232 based converter, and details of USB - serial cables.

Ian
-----
https://github.com/IanHarvey

siqu
Posts: 26
Joined: Thu Apr 11, 2013 1:50 pm

Re: RS323 to pi ?

Mon Apr 15, 2013 10:10 pm

Dam good info :D

Another question is :

How do i found out what my sample frequency is on my circuit ?

Image

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: RS323 to pi ?

Mon Apr 15, 2013 10:52 pm

You can get a very good approximation (depending on how well the circuit is made and device variances) of the circuit bandwidth as it does not have a sampling frequency as it is a straight forward differential op-amp configuration, not any form of ADC.

Get the Unity Gain Bandwidth figure from the datasheet for the op-amp and divide by the Gain of that circuit, which looks like 1MHz divided by 186 just over 5kHz bandwidth .

What a current measuring circuit for at max 5V input voltage on any terminal, has to do with RS232 I have no idea and should have been a new thread
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13102
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: RS323 to pi ?

Tue Apr 16, 2013 11:42 pm

siqu wrote:Dam good info :D

Another question is :

How do i found out what my sample frequency is on my circuit ?

Image
What has this picture to do with anything?

At first glance it looks like a current detector with a differential amplifier
http://en.wikipedia.org/wiki/Differential_amplifier
Except it has a glaring omission!
A differential amplifier needs four resistors to work well (all having the same resistance normally), but this one has only three! So its function is imperfect. I can see that with a gain of 186x the fourth resistor isn't much needed, (the fourth resistor wouldn't change its operation much, as its not much of a voltage divider) but still it looks a bit wrong!

The main thing though is that it also has no relevance to your question!

siqu
Posts: 26
Joined: Thu Apr 11, 2013 1:50 pm

Re: RS323 to pi ?

Wed May 08, 2013 4:57 pm

techpaul wrote:You can get a very good approximation (depending on how well the circuit is made and device variances) of the circuit bandwidth as it does not have a sampling frequency as it is a straight forward differential op-amp configuration, not any form of ADC.

Get the Unity Gain Bandwidth figure from the datasheet for the op-amp and divide by the Gain of that circuit, which looks like 1MHz divided by 186 just over 5kHz bandwidth .

What a current measuring circuit for at max 5V input voltage on any terminal, has to do with RS232 I have no idea and should have been a new thread
Hi, and thanks for the reply..

So using our explanation will give me a sample freq of 5khz?

I forgot to tell that im conecting a mcp3008 ADC to the ouput of the opamp, and to the RPI, where the data will be logged with usb/Rs232 interface to, pc terminal.

siqu
Posts: 26
Joined: Thu Apr 11, 2013 1:50 pm

Re: RS323 to pi ?

Wed May 08, 2013 4:59 pm

mahjongg wrote:
siqu wrote:Dam good info :D

Another question is :

How do i found out what my sample frequency is on my circuit ?

Image
What has this picture to do with anything?

At first glance it looks like a current detector with a differential amplifier
http://en.wikipedia.org/wiki/Differential_amplifier
Except it has a glaring omission!
A differential amplifier needs four resistors to work well (all having the same resistance normally), but this one has only three! So its function is imperfect. I can see that with a gain of 186x the fourth resistor isn't much needed, (the fourth resistor wouldn't change its operation much, as its not much of a voltage divider) but still it looks a bit wrong!

The main thing though is that it also has no relevance to your question!

Hi again.

The circuit work well as i designed it.
I forgot to tell that im conecting a ADC mcp3008 to the output from the opamp.

Return to “Other projects”