Converting a 3v signal to 5v

Hi everyone,

I'm trying to convert a 3v serial line using the circuit below for use with the Arduino.

The original circuit I found uses a LF353 but as far as I can tell the LM358 should do the same job (I had one lying around).

The problem is I can only get 3.6v out when 3v is applied even with different resistor values.

Is this the best way to perform the conversion? I don't have any transistors around and it'll be ages until i can get to the shops for any!

Thanks in advance.

It sounds like you need a P4B Serial to TTL adapter

I think you can get it for about $5 plus shipping from wulfden / modern device

I am not sure if you can do this with the LM358

:slight_smile:

Hm, the gain should be 3 with these values. What's the op-amps supply voltage ?
Is it 5V or more ? Is the output already saturated ?

Vout
| ******************* 3.6V ?
| *
| *
| *
| *
|*
|--------------------------> Vin

Maybe using an opamp is overkill. Sparkfun.com has a schematic for this job with just a fet and a few resistors: http://www.sparkfun.com/datasheets/BreakoutBoards/Level-Converter-v10.pdf

I think this would be cleaner solution and quite affordable :slight_smile:

It can be easily ordered online or you can build your own on a breadboard if you had to

http://moderndevice.com/Images/P4_400.jpg

If you want bidirectional shifting from 3 volts to 5 volts you can do it with 25 cents worth of components using the circuit shown in figure 2 here: http://www.standardics.nxp.com/support/documents/i2c/pdf/an97055.pdf

I use 3.3k ohm resistors for the pull-ups and 2n7000 for the FET.

The problem is I can only get 3.6v out when 3v is applied

That's because that op amp will not give you a rail to rail swing. You can get these but they are expensive. However you don't need to go to anything like as complex as an op amp. Just use a switching transistor with a small resistor in the base. The signal will then be upside down so you will need either a second transistor or an inverter to get it hte right way up.

Mike, why use two semiconductors when one will do. The circuit in my previous post uses a single low cost mosfet ( I use the 2n7000)

Ah yes mem - using these new fanged FETs is a much better idea if you have one. :slight_smile:

Mike and mem have good solutions (although I'm not crazy about the 2n7000 because it's so freakin' ESD sensitive).

If you'd rather buy a module than wire it yourself, sparkfun has one. Maxim also has some specific ICs to do the job (I think "level translator" is the search term to use there).

As gnu_linux pointed out, if it's RS232, you can use a 3.3V to RS232 translator, but with a USB arduino that means you also need a 5V to RS232 translator for the arduino end of the connection.

-j

Wow, thanks for all the information everyone.

Just for interest the 3v signal is generated by an iPod so I'm not sure if the RS232 translator option would work.

I'll go FET-hunting and try that.

I'm finding not having a stock of various electronics a bit limiting and paying delivery on a 38p component can work out to be a little steep!

Thanks again.

FET hunt over. My local Maplin have them in stock!

fwiw, The BSS138 may be the better choicd for ESD protection, although I have never had a problem with ESD using 2n7000 fets

although I have never had a problem with ESD using 2n7000 fets

to be honest, the only time I've had a problem is when they were used as an RS232/TTL inverter, so that the FET pin was exposed to the outside world on a DB9 pin. I have blown several of them on one device, and I'm not the only one. The designer found an ESD-protected 2n7000, and switched to a "real" RS232 transceiver on later designs.

-j