Logic Level Translation - Recommended devices ?

srnet

Senior Member
I need to mix two SPI devices, with different supply voltages, 3.0v and 3.9v on the same PICAXE circuit.

The devices are an RFM22 transceiver (100mW) and a RFM23BP transceiver (1W)

I have a working circuit board that uses both devices on a 3.0v regulator, but to get the full 1 Watt out of the RFM23BP, its needs to be run direct off the battery supply, 3.9v.

I need 6 lines of level translation;

Outputs from 3.0v to 3.9v, SDI, SCK, NSEL,Shutdown, GPIO pin.
Input from 3.9v to 3.0v, SDO

Minimum part count is essential, so a single IC in SOIC or TSSOP would be best.

Bi-directional level translation is not needed, and the PICAXE is only run at 8 or 16Mhz.

Anyone tried this and have a device they would like to recommend ?
 

srnet

Senior Member
I had not thought of using discrete devices.

If I needed to add pullup resistors, I would likely run out of space on the PCB.
 

MFB

Senior Member
Might be worth looking at schematics for SparkFun breakout boards. I seem to remember that some include level shifting and it would be interesting to see which devices they use.
 

westaust55

Moderator
Have a look at the 74LVC245A which is a bidirectional 8-bit wide transceiver with 5V tolerant inputs when used on 3.3 V.
You will need an extra PICAXE pin for direction control and may need to configure a couple of channels so you get inputs when others are outputs (hence 8 channels could be good)

I have used these in the past. Available form Futurlec in SOIC SMD package
 

Goeytex

Senior Member
I wonder why a 3.0 volt input won't work with the RFM23B operating at 3.9 volts. Have you tested and found that it fails? I am guessing that the input threshold level would be somewhere between 1.5 and 2.0v.

I looked at that RFM23B datasheet and could not find anything that stated that it needs 3.9 volts to achieve maximum rated output. It simply gives an input voltage range from 3.3v to 6v. If it were me, I would be tempted to run everything at 3.6 volts and be done with it. However, since the RFM23B draws 500ma at max TX power, I would make sure that the regulator was rated at 700ma or more.

I would assume that the 74LVC245A would not operate from the 3.0v but rather from the 3.9v through a Schottky type diode that drops the voltage to to ~3.6. Certainly 3.6 volts would be enough?

Edit:
Further review of the datasheets show the 74LVC245A can accept supply voltage up to either 7.0v or 6.0v depending upon
manufacturer and that it is advertised as "ideal" for 3.6 volts. So 3.9v should not be a problem.
 
Last edited:

srnet

Senior Member
I wonder why a 3.0 volt input won't work with the RFM23B operating at 3.9 volts. Have you tested and found that it fails? I am guessing that the input threshold level would be somewhere between 1.5 and 2.0v.
It does actually, work as far as writing to the device, although reading from it seems to cause an issue. However the data sheet spec calls for a logic 1 minimum of VDD - 0.6v (3.3V), I would rather not operate on the edge of the spec if it can be avoided, as its for use in a 'harsh' environment.

I looked at that RFM23B datasheet and could not find anything that stated that it needs 3.9 volts to achieve maximum rated output
Neither can I, but then neither does it say what the power output is at various voltages. I know by measuring that the power output goes up by 5-6dBm between 3.0v\3.3v and 3.9v.

However, since the RFM23B draws 500ma at max TX power,
Hope Data sheet is wrong again, its about half that.

Further review of the datasheets show the 74LVC245A can accept supply voltage up to either 7.0v or 6.0v depending upon
manufacturer and that it is advertised as "ideal" for 3.6 volts. So 3.9v should not be a problem.
Interesting ......
 
Last edited:

westaust55

Moderator
Edit:
Further review of the datasheets show the 74LVC245A can accept supply voltage up to either 7.0v or 6.0v depending upon
manufacturer and that it is advertised as "ideal" for 3.6 volts. So 3.9v should not be a problem.
The Philips/NXP variant is suitable for a "Supply voltage range of 2.7 V to 3.6 V" with absolute max of 6.5 V.
http://www.datasheetcatalog.com/datasheets_pdf/7/4/L/V/74LVC245.shtml

Outputs go over the range 0 to Vcc. I have operated them at 3.3 V with the PICAXE IO at 5 V.

What are the input tolerance and type (TTL or ST) for both the devices you are connecting.
That might determine whether voltages are high enough to be seen as a "1" in the high state.
ST needs a higher voltage (about 0.8 * Vcc) level before it is seen as a "1" state.
 

westaust55

Moderator
Input high state must be >= Vcc - 0.6
That is a fairly rigid/steep requirement.

The 74LVC245 would in theory need to operate at the same voltage as the RFM23BP module (3,9V).
On inputs a valid high can be >= 2V but there is the problem of outputs at 3.9 V into the 3.3 V device.


Seems the 2N7000 FET and a couple of resistors on the signals lines akin to the Philips/NXP i2c app notes (as mentioned earlier in this thread may the the safest option.
 

srnet

Senior Member
The two radios need to share a common antenna socket and there is an antenna switch on the PCB. There is room for another PCB on top but it complicates the wiring a fair bit.

There is not room for a pile of MOSFETs and resistors (on the single PCB) hence the search for a 'magic' IC.

One thing I will check is what are the actual logic levels are that the higher voltage device requires, the data sheets are not accurate in several other respects so maybe the logic level thresholds are incorrectly specified also.
 

hippy

Technical Support
Staff member
Input high state must be >= Vcc - 0.6
That is a fairly rigid/steep requirement.
the data sheets are not accurate in several other respects so maybe the logic level thresholds are incorrectly specified also.
That would be my suspicion. The spec is otherwise too onerous for it to be used with anything else powered from the same VDD.
 

srnet

Senior Member
An initial check does suggest that the data sheet is not completely accurate.

With a 3V PICAXE and the high volts radio at 5V, it appeared to work well enough.

I need to modify the working PCB for a real check, but will first need to go over the park and record the field strength from the 2 radios, before doing a PCB mod, so I can confirm the effect of the changes.
 

Paix

Senior Member
Silly question, but will the snow noticeably affect the readings on your antenna range (park) . . . PS, it's very cold out there too!
 

srnet

Senior Member
Silly question, but will the snow noticeably affect the readings on your antenna range (park) . . . PS, it's very cold out there too!
It probably has an effect yes, wet grass seems to.

However its the relative values that are significant, both radios will be affected by the current conditions in the same way, for the record at 50M and 3v supply the RFM22 was measured at -67\67.5 dBm and the RFM23 at -62dBm, so a differance of 5 - 5.5dBm.

It was quite balmy actually, at least 2C.
 

Paix

Senior Member
I was thinking that your comparison might be with a previous set of figures, which was why I had a concern. That extra 5.5dBm will be very useful.

I'm only just contemplating knocking the snow off the car . . . :(
 

srnet

Senior Member
I was thinking that your comparison might be with a previous set of figures, which was why I had a concern. That extra 5.5dBm will be very useful.
Could be very useful.

The only testing I can really do has to be comparative\relative, as conditions can vary from day to day.

When I have both devices working on the same PCB, I will do a packet range test. Slug the antenna with a dummy load and check the distance at which packet reception stops for both radios with my handheld receiver.

Whats Ironic, is that most of the radio testing, for distances, reception modes, fine tuning of packet reception has been done by myself over the park and the local mountains. The students in the US have an anechoic chamber to play with;

http://www.moreheadstate.edu/content_template.aspx?id=11372
 

hbl2013

Senior Member
You might look at the older CMOS devices, like the 74C04 or its 4000 series equivalent. I have used those in the past when I had to interface a 3.3V Micro Processor to 5V standard TTL devices. Much depends on your partsbox and real estate available.
 

srnet

Senior Member
The logic level translation proved not to be necessary, a PICAXE running at 3.0v or 3.3v seemed quite happy top talk to a RFM23BP module running at 4V, it was reliable, no failures to write or read detected in several hours of running. The only component added was a series resistor between the RFM23BP SDO output pin and the PICAXEs SDI input pin.
 
Top