Solution for the 5V vs 3.3V problem

Also take a look at our Arduino Playground - LeoShield which is another pin adaptor.

Dale
www.GorillaBuilderz.com

OsuDan:
Hey guys,

I've been looking into something like this for a while as well. One thing that caught my eye was this pin converter shield for the UNO/Leo to go between the old pinout and 1.0

Go Between Shield | Mayhew Labs

Something like this could be implemented with logic converters between the connection points. This could also leads in some other interesting directions as well:

  • Being able to select/designate individual pins as 5v or 3.3v logic
  • Integrating dynamic pin assignment so the pinout could be adaptable to older shields configurations
  • And if you really wanted to get crazy, you could even wire the whole thing up to be driven by an integrated IC so you just add a library to your sketch and assign the pinout and voltage in software.
  • And since I've already gone way out in left field, to complete the prefect conversion shield, add either an IC to linearly scale the analog inputs or a separate 5v 12 or 16 bit ADC

EDIT: Just read the post about the GTL2000 and it got me thinking there has got to be a chip that could route pins and shift logic levels... Yup.

http://www.intersil.com/en/products/audiovideo/video-switching/unbuffered-crosspoint-switches/CD22M3494.html

Thoughts?

leoshield-perspective-320x320.jpg

Ok so here's the diagram of the circuit as I see it. Let me know what you guys think

Circuit for pins who's position might need to be changed

And here is for the other pins who's position is fixed

For both the CD22M3494 (crosspoint) and the SN74LVC16T245 (logic shifter) I think the buses can be 16 bit wide. As for going with the SN74LVC16T245 over the TXB0108, the advantage I see is that with the SN74LVC16T245, you can select each pin's output so some pins could interface with 5v logic, while others with devices at 3.3v. Might as well keep the shield dynamic as we can, especially if things really are moving towards 3.3v logic. Just my two cents, what's your guys reaction?

Dan

the advantage I see is that with the SN74LVC16T245, you can select each pin's output

I can't see where the data sheet says this is possible, apart from two OE and two DIR pins there are no control signals.


Rob

CrossRoads:
Here's the schematic & layout, please create a version with the parts you are suggesting.
Top & bottom mount surface mount headers would be one way to keep the physical board the same size, as long as its cut back from the USB header.

I tried the TXB0108 and finally gave up.
The blue boxes in the attached picture contain 3 pcs pf TXB0108.
I made the beta board and tested it.
While I test the TXB0108 5V output with voltmeter, the voltage is 3V.
However, I test it with oscilloscope, the output is 5V. I touch the wire or chip with my finger, the voltage became unstable.
Well, I think, the TXB0108 is easy to go into self-excited oscillation process. And the load capacity is small. If I connect other devices to it through long cables, such as a digital sensor, the output may have problem. However, if I intert the sensor in the header of the beta DUE board directly, it works fine.
I tried many time but still didn't success.
Not sure if the TXB0108 performs not good enough.

Graynomad:
I can't see where the data sheet says this is possible, apart from two OE and two DIR pins there are no control signals.


Rob

Hey Rob,

Guess I had an optimistic read on that datasheet, you are right. Here is my solution.

With the setup, each pin can be selected as 3.3v or 5v through the MUX, then routed through the logic shifter if it is 5v. After that, the crosspoint handles the pin reassignment if needed. How about this? We getting close?

Dan

I assume that all the data busses are 8 bits. I don't get how the Logic shifter has bi-directional signals. What's on the 3v3 side?

TBH I'm treating this as an academic exercise because it's interesting, personally I really can't see much use for such a complex shield but I'm happy to help with a design if you do.


Rob

I have not looked at the circuits to evaluate....but i want one of these!

i want one of these!

Maybe there is a market after all, I always was 180 degrees out of phase with the consumer :slight_smile:

Dan, my last question? How does the logic shifting circuit have bi-directional IO?


Rob

Graynomad:
Maybe there is a market after all, I always was 180 degrees out of phase with the consumer :slight_smile:

Dan, my last question? How does the logic shifting circuit have bi-directional IO?


Rob

I would say if there is a market for the Due - then there is a market for this shield. To choose the Due over the raspberry pi the main feature is the general purpose IO and the existing shields. But to use either of these such a board is extremely useful.

Not only would a significant percentage of Due purchasers want such a shield- there would also be a market of people who current do NOT choose a Due to to shield incompatibility!

I just thought I'd resurrect this thread because I now have a good reason to actually do something like this.

Did anyone take this any further?

Going back to something I missed in the original post by giantsfan3

the above level-translator IC based solution should work bi-directionally, for all signal types (digital I/O, PWM, analog lines, Serial, SPI, I2C),

Does the GTL2000 pass analog OK, it's only a few FETs so I would assume so but haven't tried it.


Rob

I posted the question of how I can convert my 5 volt output from the hall effect sensors to a 3.3 volt output that the due can read. I posted this in another forum.

I've been looking at these low voltage translators and I don't think I can use these.

I want the 3.3 volts to change linearly as the 5 volt changes...ie when I am getting 2.5 volts from the sensor the arduino should be reading 1.65 volts.

I'm not sure if I should just use a voltage divider because I'm concerned with accuracy to a certain degree.

Could you please help me out...this is for my senior design project.

I don't think I can use these

Probably not, I can't see that they are linear.

I'm not sure if I should just use a voltage divider because I'm concerned with accuracy to a certain degree.

A voltage divider is the easiest and probably the best way to do this. I see no reason to think there would be accuracy problems if you use good resistors.


Rob

Just for interest, here is a board I am working on to interface Due to a 3D printer controller (RAMPS)


It is application specific, I am using TXS0108 to adapt some signals, with some gate drivers for MOSFETS.

I had trouble finding connectors with the same height, but they seem to connect ok.

Source files on github bobc_hardware/RAMPS-FD at master · bobc/bobc_hardware · GitHub

Thanks for that Bob, looks interesting.

FWIW I think I've found a way to do this with very good compatibility for all/most shields.

BTW, nice Due pinout diagram you have there :slight_smile:


Rob

Looks like i'm using a voltage divider....Thanks Rob for your help.

Hello, read through those comments and is amaze with it. But i still got doubt. Please help me. Im so wan the 12 bit PWM provided by the I/O pins from this arduino due. But my concern are:

  1. whether those logic level converter IC can work this 12 bits PWM? because im doing with hall sensor geared motor, worry that the accuracy will be affected.
  2. is those bi-directional converter? means if i attach all the digital pins to the converter, can i read/write data as other arduino board?
  3. can those work with analog pins?

Guys please check the level translator from below link

http://www.tenettech.com/product/3263/bi-directional-logic-level-converter

I find this shield very usable. I would like to use it as interface for drivers of stepper drivers. These drivers require 5V, and arduino due can output only 3.3V.

So where is this "way to do this with very good compatibility for all/most shields"?
Schematic? Pcb ?

Can this shield be bought somewhere already? It's old post...

OK I found this guy: https://digistump.com/wiki/digix/tutorials/levelshifter

I see it costs 14$ in USA, but i'm from Europe, can somebody suggest me similar shield and to be able to buy it here in old continent :slight_smile: ?

regards,

Graynomad:
Thanks for that Bob, looks interesting.

FWIW I think I've found a way to do this with very good compatibility for all/most shields.

BTW, nice Due pinout diagram you have there :slight_smile:


Rob

Sorry zhivkec but that was 2.5 years ago, I have no idea what I was referring to at the time.

I do remember having a complicated design that required MUXes and analogue switches, but this is pre history to me these days.