Page 1 of 1

Arduino how TTL Converter

Posted: Thu Nov 29, 2018 4:00 am
by JulianG9
Hello, i need a TTL Converter because i need communicated a raspberry with PC. Can i use arduino how TTL converter? I read that it is posible Removing ATMEL Chip, but my problem is the voltaje level of arduino (5V) and the raspberry (3.3V).

Can you help me?

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 5:03 am
by DavidS
JulianG9 wrote:
Thu Nov 29, 2018 4:00 am
Hello, i need a TTL Converter because i need communicated a raspberry with PC. Can i use arduino how TTL converter? I read that it is posible Removing ATMEL Chip, but my problem is the voltaje level of arduino (5V) and the raspberry (3.3V).

Can you help me?
I must assume you are attempting communicate with a PC through the builtin RS-232 port on the PC?

May I recommend instead using a USB-Serial adaptor that uses 3.3V signalling? You can get these from many vendors at fairly low cost, usually based on an FTDI USB Serial chip.

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 9:44 am
by davidcoton
DavidS wrote:
Thu Nov 29, 2018 5:03 am
May I recommend instead using a USB-Serial adaptor
Good idea
DavidS wrote:
Thu Nov 29, 2018 5:03 am
that uses 3.3V signalling?
USB runs at 5V, even on the Pi. RS232 runs with a differential voltage, between +/- 3V and +/-24V. 3.3V (as on the Pi's GPIO) does not come into it.

You could also use an RS232 driver that does run at 3.3V to connect to the Pi's serial port on the GPIO connector. Search for MAX3232E, there are several others.

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 1:00 pm
by JulianG9
Thanks! I already knew the existence of those adapters but I needed a quick exit for the moment.

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 2:21 pm
by DavidS
davidcoton wrote:
Thu Nov 29, 2018 9:44 am
DavidS wrote:
Thu Nov 29, 2018 5:03 am
May I recommend instead using a USB-Serial adaptor
Good idea
DavidS wrote:
Thu Nov 29, 2018 5:03 am
that uses 3.3V signalling?
USB runs at 5V, even on the Pi. RS232 runs with a differential voltage, between +/- 3V and +/-24V. 3.3V (as on the Pi's GPIO) does not come into it.

You could also use an RS232 driver that does run at 3.3V to connect to the Pi's serial port on the GPIO connector. Search for MAX3232E, there are several others.
RS-232 will not work at 3.3, that is outside the standard. Though there are serial adaptors that are 3.3v, and connect to the PC via the 5V USB.

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 2:35 pm
by drgeoff
DavidS wrote:
Thu Nov 29, 2018 2:21 pm
RS-232 will not work at 3.3, that is outside the standard.
The MAX3232E is specified to run from a supply voltage between 3 and 5.5 volts. It contains charge pumps to derive the requisite positive and negative voltages necessary to meet the RS-232 specification.

Although not guaranteed, my experience is that the serial ports on the handful of PCs that I've tried do work fine receiving signals that use +5 and zero.

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 6:31 pm
by MarkTF
I'm not entirely clear on the question you're asking, but this might be the answer:

The Arduino Uno has a USB to Serial converter on the board that is normally used to communicate between a PC and the Atmel microcontroller. If one removes the Atmel microcontroller (on socketed boards) or disables the microcontroller by connecting "RESET" to "GND" on the Uno, the "TX" and "RX" pins on the board are the TTL level serial signals from the USB to Serial chip. This is essentially equivalent to a dedicated USB to Serial converter as some have suggested above.

The remaining hurdle is that the TTL output (0 to 5 V) is incompatible with the Raspberry Pi input (0 to 3.3 V). The Uno serial output (labeled "RX" on the Uno (label is referenced to the microcontroller receive, but we're using it for the USB/Serial transmit)) normally has a 1k Ohm series resistance so a 2k Ohm resistor to ground will form a voltage divider giving an output of 5V * 2k/(1k + 2k) = 3.3V out. The USB/Serial chip will work ok with the 3.3 V RPi "Tx" output connected to the Uno "TX" input, so no signal conditioning is required on that connection.

In summary:
- Uno "RESET" connects to Uno "GND"
- Uno "GND" connects to RPi "GND"
- Uno "TX" connects to RPi "UART0-TXD"
- Uno "RX" connects to RPi "UART0-RXD"
- 2k Ohm resistor connects between RPi "UART0-RX" and RPi "GND"

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 6:38 pm
by DavidS
drgeoff wrote:
Thu Nov 29, 2018 2:35 pm
DavidS wrote:
Thu Nov 29, 2018 2:21 pm
RS-232 will not work at 3.3, that is outside the standard.
The MAX3232E is specified to run from a supply voltage between 3 and 5.5 volts. It contains charge pumps to derive the requisite positive and negative voltages necessary to meet the RS-232 specification.

Although not guaranteed, my experience is that the serial ports on the handful of PCs that I've tried do work fine receiving signals that use +5 and zero.
Yes +5v is in the range of the standard (though +3.3V is outside the range). As you said you need charge pumps to bring up the voltage to within standard.

I still think that a simple divided bias would be more than enough if the OP wants to go that way. Though a better option would be a USB to Serial device that uses 3.3v serial.

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 6:46 pm
by HawaiianPi
JulianG9 wrote:
Thu Nov 29, 2018 4:00 am
Hello, i need a TTL Converter because i need communicated a raspberry with PC. Can i use arduino how TTL converter? I read that it is posible Removing ATMEL Chip, but my problem is the voltaje level of arduino (5V) and the raspberry (3.3V).

Can you help me?
  1. How, exactly do you wish to communicate with the PC.
  2. What kind of PC is it, and what OS (Windows, Mac, Linux, another Pi)?
  3. What operating system on the Pi?
The official Raspbian OS has support for a serial console connection. This can be done from a Windows, Mac or Linux PC using an inexpensive USB-TTL adapter. I use CP2102 adapters from ebay that cost less than $2 (the CP2102 is 3.3V TTL, so it's compatible with the Pi GPIO).

Image
Image

Re: Arduino how TTL Converter

Posted: Thu Nov 29, 2018 10:57 pm
by davidcoton
DavidS wrote:
Thu Nov 29, 2018 6:38 pm
Though a better option would be a USB to Serial device that uses 3.3v serial.
The OP wants to connexct a Pi to the PC RS232 port -- or so we have all assumed. The USB connects to the Pi, the serial to the target PC RS232 port. OP does NOT want USB to 3V3 logic, he wants either 3V3 logic to RS232, or USB to RS232.

Although 5V/0V signalling will often work on RS232 ports, it is not in spec -- the spec requires symetrical +/- voltages of at least +/- 3V.

Re: Arduino how TTL Converter

Posted: Fri Nov 30, 2018 4:51 am
by PhatFil
If i understand the op correctly he is in need of a quick solution now using whats he/she has available rather than waiting for the delivery of a cheap ftdi import..

At hand he has an arduino with 5v logic ,,


so 1st thing i wold check is have i got a 3,3v-5v logic level shifter pcb in my bits box, and if so use that between pi and arduino

as the pi is vulnerable to over voltage, if no logic level shifters available knock up a voltage divider with 2 resistors to drop 5v to 3.3v on the pi Rx gpio, the arduino may well (iirc it should) pick up a 3.3v signal as High

not ideal but should work today while a better solution is sought for use tomorrow ( well next month if waiting for a slow delivery...)

However why not use ssh over wifi?

Re: Arduino how TTL Converter

Posted: Fri Nov 30, 2018 6:57 am
by HawaiianPi
davidcoton wrote:
Thu Nov 29, 2018 10:57 pm
The OP wants to connexct a Pi to the PC RS232 port -- or so we have all assumed. The USB connects to the Pi, the serial to the target PC RS232 port. OP does NOT want USB to 3V3 logic, he wants either 3V3 logic to RS232, or USB to RS232.
Well, you and DavidS assumed... My assumption is that any PC with an RS232 port is fossilized a few layers above the dinosaurs. So what we really need is a better explanation of what the OP actually wants to accomplish.