# Control 3.3V IC using Arduino?

I'm working with an IC that can't take more than 3.3V (+/- 0.2V), including on its I/O pins. I want to control it using Arduino, but its PIN's are 5V. Now I'm wondering if I can use PWM to archieve the 3.3V by setting the correct duty cycle. It doesn't seem that good a solution since the voltage will transiently be above 5V which might harm the IC.

So what is the best solution for this? Given I need to control 6 PIN's both in and out (two PIN's are only input to the IC whereas 4 are both in/out depending on the IC's state), I would prefer something involving as few components as possible since I will need to dublicate the solution 6 times!

Given the current draw will likely be very small, I'm thinking I could use a voltage divider on each PIN (= 2 resistors) to get the 5V down to 3.3V. Is that a good solution? Or is there a better one?

Another solution could be to put a 3.3 Zener in reverse from signal to ground (after the resistor)?

• Are you sure there is not a 5V IC that does the same function? It is really a problem to drive something that has not the same voltage reference from your MCU. Even more if the pins are IN/OUT. Commented Feb 14, 2015 at 12:13
• @Gleison: There might be 5V versions available but then I would have to wait weeks to get them ;-) But it would also be nice to know in general how to handle such situations. I suppose it isn't impossible -- why wouldn't the voltage divider work? Commented Feb 14, 2015 at 12:40

PWM will not solve the problem. The voltage will be 5V for 2/3 of the time, this will damage your IC.

The easiest option you got is the put voltage dividers between each pin. If you really don't want to place 12 resistors you can search for a 5V version of your IC. A lot of chips are produced as 3,3V and 5V versions.

• I don't see how the voltage divider will step up the 3.3V to 5v in the IC output pins. Still a problem. Commented Feb 14, 2015 at 13:22
• @Gleison: The analog pins on the Arduino, when run in input mode can measure the voltage compared to a reference, so one could simply put the threshold for a "one" so it corresponds to e.g. Commented Feb 14, 2015 at 13:28
• @Geurt: Did you see my question on using Zeners? Commented Feb 14, 2015 at 13:29
• @Morty Wait, do you mean the "analog pins" as the ADC channels? I think it is a little bit of overkill to use them, no? Commented Feb 14, 2015 at 13:39
• @GleisonStorto - an ATmega328p running at 5v has an input threshold for a logic "1" as low as many other parts running on 3.3v, so if the electrical environment is not particularly noisy, no boosting of the input signals may be needed. Commented Feb 14, 2015 at 22:23

One possible option can be emulating an open collector output in SW. That is, for "0", you set the pin to output with value "0" --> ~0V sink. For "1", you set the pin to "high impedance input" --> floating, allowing you to drive ~3.3V through a pull-upp resistor to the 3.3V supply.

This requires a bidirectional I/O pin though and no built-in pull up, but I guess all Arduino pins are I/O.

You need great care with the software though, since a mistake may drive the pin with 5V. This must be ensured also during startup thus it takes both care and experience to use this option.

On the other hand, check how many mA the actual pin can drive from the 5V. It is not unlikely that your 3.3V chip can survive it for short periods, often specified separately in the data sheet as non-operating but also non-damaging conditions.

When going from 5v down to 3.3v the resistive voltage divider is the popular choice.

There are also the 5v tolerant buffer chips like 74LVC245, 74HC4050, and others similar to these that can run with a 3.3v supply but can take 5v input signals.