Author Topic: TTL voltage converter from 5 to 3.3 volts  (Read 6315 times)

0 Members and 1 Guest are viewing this topic.

Offline sean87Topic starter

  • Regular Contributor
  • *
  • Posts: 150
  • Country: nl
  • EE WannaBee
    • EMBEDONIX
TTL voltage converter from 5 to 3.3 volts
« on: September 04, 2012, 09:30:55 am »
Hi guys,

I want to do some hacks on my Roomba :D The problem is my serial controller is using 3.3 volts but Roomba uses 0-5 volt for both TX and RX.

I sure know that I need a step down atleast for the TX pin of roomba (wich will be RX on my serial chip). Can you name  a nice voltage shifter chip? I wanted to go with normal resistor driver but I guess it will cause problem in high speed transmition.

Also Do I need to have a voltage step up from 3.3 to 5V for the roomba's RX (my serial chip's TX) ? I heard that anything above 2.4 volts should considered high. what do you think?

Thanks!
EMBEDONIX - Embedded Systems, Linux and good stuff!
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: TTL voltage converter from 5 to 3.3 volts
« Reply #1 on: September 04, 2012, 09:43:55 am »
yes the step up shoulds be fine, and the step down you should be able to do passivly, for serial to a roomba somehow i doubt you will be getting fast enough to need to worry about impedence matching,
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 10269
  • Country: nz
Re: TTL voltage converter from 5 to 3.3 volts
« Reply #2 on: September 04, 2012, 09:44:56 am »
Most micros will consider anything above about 0.8V as high so your Roomba RX should be happy with 3.3V signaling

A voltage divider on the Roomba TX will work fine for lowering the voltage to 3.3v and wont cause any issues for serial communications. Normal serial port isn't a high speed connection.

If you want to add extra protection you can add a 3.3V zener after the voltage divider
but really, it shouldn't be needed as a 5k voltage divider for example, will limit the current to safe levels anyway.

« Last Edit: September 04, 2012, 09:50:00 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Short Circuit

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: nl
    • White Bream electronics R&D
Re: TTL voltage converter from 5 to 3.3 volts
« Reply #3 on: September 04, 2012, 10:45:31 am »
Most micros will consider anything above about 0.8V as high so your Roomba RX should be happy with 3.3V signaling
0.8V is the Vil usually, meaning less than 0.8V is taken as logic low.
However, the Vih is much higher; usually 0.7*VDD, which is 3.5V. Often lower voltage works too, but build enough devices working over a variety of temperatures, and you encounter a lot of communication failures.
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 10269
  • Country: nz
Re: TTL voltage converter from 5 to 3.3 volts
« Reply #4 on: September 04, 2012, 11:24:35 am »
Yeah, it's not guaranteed, so not for production.

In my experience, for hobby stuff the micro pins normally become true pretty soon after the Vil.
Except for a few exceptions, like micros were you can use special pins (reset/xtal) for extra i/o. Those tend to be different.

What i meant to say, is for hobby hacking of a Roomba it will work fine
« Last Edit: September 04, 2012, 11:29:02 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
Re: TTL voltage converter from 5 to 3.3 volts
« Reply #5 on: September 05, 2012, 04:49:06 pm »
Down: Smack a 2k2 resistor between the 5V output and 3.3V input and be done with it, input protection diodes will clamp it to 3.3V for you...

Up: You could use two small jelly bean BJTs to move up the voltage without inversion (NPN driving base of PNP that switches 5V onto the input and a pulldown resistor).

I have also seen comparators with TTL compatible output used as a level converter.

Good enough is the enemy of the best.
 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: TTL voltage converter from 5 to 3.3 volts
« Reply #6 on: September 05, 2012, 07:21:27 pm »
There's an app note from Philips/NXP on how to do this with an N-channel MOSFET, here: http://ics.nxp.com/support/documents/interface/pdf/an97055.pdf

Might be overkill for your application, but still quite simple, and might be useful for other stuff (the app note specifically targets I2C applications).
my random ramblings mind-dump.net
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf