Skip to main content
Commonmark migration
Source Link

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. [![zener resistor clamp][1]][1]zener resistor clamp
(source: repetae.net)

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Edit just noticed you were using the newer 3.3V arduino, so just invert what I said above, the zener resistor trick will still work although apparently some of the i/o lines on the due may be 5v tolerant, there seems to be some disagreement on the forums. The teensy 3.1 is also a nice little ARM board that has all 5V tolerant pins and is less than half the cost of the due and better designed IMHO http://www.pjrc.com/store/teensy31.html [1]: https://i.sstatic.net/jASwD.png

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. [![zener resistor clamp][1]][1]
(source: repetae.net)

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Edit just noticed you were using the newer 3.3V arduino, so just invert what I said above, the zener resistor trick will still work although apparently some of the i/o lines on the due may be 5v tolerant, there seems to be some disagreement on the forums. The teensy 3.1 is also a nice little ARM board that has all 5V tolerant pins and is less than half the cost of the due and better designed IMHO http://www.pjrc.com/store/teensy31.html [1]: https://i.sstatic.net/jASwD.png

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. zener resistor clamp
(source: repetae.net)

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Edit just noticed you were using the newer 3.3V arduino, so just invert what I said above, the zener resistor trick will still work although apparently some of the i/o lines on the due may be 5v tolerant, there seems to be some disagreement on the forums. The teensy 3.1 is also a nice little ARM board that has all 5V tolerant pins and is less than half the cost of the due and better designed IMHO http://www.pjrc.com/store/teensy31.html

broken image fixed (click 'rendered output' or 'side-by-side' to see the difference); for more info, see https://gist.github.com/Glorfindel83/9d954d34385d2ac2597bbe864466259f
Source Link

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. zener resistor clamp http://repetae.net/zenerresistor.png[![zener resistor clamp][1]][1]
(source: repetae.net)

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Edit just noticed you were using the newer 3.3V arduino, so just invert what I said above, the zener resistor trick will still work although apparently some of the i/o lines on the due may be 5v tolerant, there seems to be some disagreement on the forums. The teensy 3.1 is also a nice little ARM board that has all 5V tolerant pins and is less than half the cost of the due and better designed IMHO http://www.pjrc.com/store/teensy31.html [1]: https://i.sstatic.net/jASwD.png

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. zener resistor clamp http://repetae.net/zenerresistor.png

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Edit just noticed you were using the newer 3.3V arduino, so just invert what I said above, the zener resistor trick will still work although apparently some of the i/o lines on the due may be 5v tolerant, there seems to be some disagreement on the forums. The teensy 3.1 is also a nice little ARM board that has all 5V tolerant pins and is less than half the cost of the due and better designed IMHO http://www.pjrc.com/store/teensy31.html

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. [![zener resistor clamp][1]][1]
(source: repetae.net)

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Edit just noticed you were using the newer 3.3V arduino, so just invert what I said above, the zener resistor trick will still work although apparently some of the i/o lines on the due may be 5v tolerant, there seems to be some disagreement on the forums. The teensy 3.1 is also a nice little ARM board that has all 5V tolerant pins and is less than half the cost of the due and better designed IMHO http://www.pjrc.com/store/teensy31.html [1]: https://i.sstatic.net/jASwD.png

update based on the due.
Source Link

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. zener resistor clamp http://repetae.net/zenerresistor.png

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Edit just noticed you were using the newer 3.3V arduino, so just invert what I said above, the zener resistor trick will still work although apparently some of the i/o lines on the due may be 5v tolerant, there seems to be some disagreement on the forums. The teensy 3.1 is also a nice little ARM board that has all 5V tolerant pins and is less than half the cost of the due and better designed IMHO http://www.pjrc.com/store/teensy31.html

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. zener resistor clamp http://repetae.net/zenerresistor.png

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Another thing you should consider is whether you actually need level shifting at all. Many chips have 5V tolerant input pins even when running at a voltage lower such as 3.3. The atmega CPU also interprets anything above 0.6*Vcc or 3V for an arduino as a logic high, so a 3.3V signal can directly drive an arduino pin with no level shifting.

Assuming you are using a 5V arduino and need to talk to a 3.3V part, if the part has 5V tolerant inputs (many do nowadays), just connect em up and it will work. If your bidirectional line is an open collector design, such as i2c where the devices only pull the line low then just attach the pull up resistors to 3.3V instead of 5V and things will just work.

Otherwise all you need to do is make sure the line doesn't go above 3.3V, you can do that with a resistor and zener, put a resistor on the arduino line then a zener to clamp the voltage to 3.3V. zener resistor clamp http://repetae.net/zenerresistor.png

You may be tempted to live dangerously and just use the 10k resistor and nothing else. The reason this (sometimes!) works is that there is a clamping diode inside the recieving chip that shunts excess voltage to vcc or 3.3V. This diode will burn out if you try to pull the entire 3.3V line up to 5V through it (in addition to whatever damage caused by pulling that line to 5V), however with the resistor not much current will flow and assuming your 3.3V line has a non-trivial load on it it won't change the level of your power line substantially but there are lots of caveats. So, in general, don't do this unless you have a local, isolated 3.3V bus and really can't spare the extra two cents for the zener. I only mention it because you will see it in schematics for dirt cheap breakout boards you get on ebay and might be tempted to copy it, just don't let it sneak past the breadboard into a production design. :)

Edit just noticed you were using the newer 3.3V arduino, so just invert what I said above, the zener resistor trick will still work although apparently some of the i/o lines on the due may be 5v tolerant, there seems to be some disagreement on the forums. The teensy 3.1 is also a nice little ARM board that has all 5V tolerant pins and is less than half the cost of the due and better designed IMHO http://www.pjrc.com/store/teensy31.html

Source Link
Loading