JulianG9
Posts: 6
Joined: Wed Oct 17, 2018 1:04 pm

Arduino how TTL Converter

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?

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Arduino how TTL Converter

Thu Nov 29, 2018 5:03 am

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.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
davidcoton
Posts: 4008
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Arduino how TTL Converter

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.
Signature retired

JulianG9
Posts: 6
Joined: Wed Oct 17, 2018 1:04 pm

Re: Arduino how TTL Converter

Thu Nov 29, 2018 1:00 pm

Thanks! I already knew the existence of those adapters but I needed a quick exit for the moment.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Arduino how TTL Converter

Thu Nov 29, 2018 2:21 pm

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.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

drgeoff
Posts: 9735
Joined: Wed Jan 25, 2012 6:39 pm

Re: Arduino how TTL Converter

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.
Last edited by drgeoff on Thu Nov 29, 2018 2:36 pm, edited 1 time in total.

MarkTF
Posts: 297
Joined: Tue Mar 03, 2015 4:59 pm

Re: Arduino how TTL Converter

Thu Nov 29, 2018 6:31 pm

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"
Last edited by MarkTF on Thu Nov 29, 2018 6:51 pm, edited 1 time in total.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Arduino how TTL Converter

Thu Nov 29, 2018 6:38 pm

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.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
HawaiianPi
Posts: 4530
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Arduino how TTL Converter

Thu Nov 29, 2018 6:46 pm

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
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
davidcoton
Posts: 4008
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Arduino how TTL Converter

Thu Nov 29, 2018 10:57 pm

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.
Signature retired

PhatFil
Posts: 1341
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Arduino how TTL Converter

Fri Nov 30, 2018 4:51 am

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?

User avatar
HawaiianPi
Posts: 4530
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Arduino how TTL Converter

Fri Nov 30, 2018 6:57 am

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.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “General discussion”