Go Down

Topic: Arduino Pro mini DIgital pins voltage tolerance question (Read 4594 times) previous topic - next topic

dmjlambert

Hi Paul__B, sorry about that.   I did just have some additional questions about the voltage dividers, as I had some past observations that were relevant to the resistor values being discussed.   

The diode idea is also interesting.   Do you think any handy general purpose diode a person happens to have around would be suitable for this purpose?  Or is the 1N4148 particularly attractive for this use because of some characteristic it has?   Are any of the on-board resistors of a typical HC-05 or HC-06 backboard important to have in series with the diode, in case we want to use a bare HC-05 or HC-06 module without a backboard?   Or are there any typical usage tips or other circuitry required when using a diode in this manner?   

Netoperz


Paul__B

The diode idea is also interesting.   Do you think any handy general purpose diode a person happens to have around would be suitable for this purpose?  Or is the 1N4148 particularly attractive for this use because of some characteristic it has?
No, the 1N4148/ 1N914 simply is a handy general purpose - generic - diode.

Are any of the on-board resistors of a typical HC-05 or HC-06 backboard important to have in series with the diode, in case we want to use a bare HC-05 or HC-06 module without a backboard?
Frankly, I am not aware of "on-board resistors of a typical HC-05 or HC-06 backboard".  There would be no reason whatsoever to put any resistor in series with the diode.

In those articles there is everything You may want to know about digital voltage level shifting.
Except that they all omit the simple use of the diode which we may presumably credit to Lady Ada.

It turns out to be a quite brilliant solution!

When the input from the Arduino (or other device) is pulled LOW, the diode pulls the output LOW within 0.7 V.  The diode impedance is very low (tens of Ohms) and 0.7 V will be well within the tolerance of any 3.3 V device as a logic LOW, so delay at this point is negligible.

Correspondingly, when the input from the Arduino (or other device) is pulled HIGH, either the built-in pull-up of the 3.3 V device (as in the ESP8266) will itself pull the input up to its own HIGH level, or in case this is not sufficiently fast, a pull-up to the 3.3 V supply can be added.  Given that it is an Arduino pin driving the circuit, the pull-up can be as low as necessary to achieve the required speed, down to 330 Ohms or so.

The arrangement is both simple, and immediately fills all requirements for level shifting.

pwillard


dmjlambert

#19
Mar 10, 2016, 12:51 am Last Edit: Mar 10, 2016, 06:40 am by dmjlambert
Ok, so Lady Ada is presumed to be the first cow that trampled the grass, then Paul__B is following.   If I were to follow along, I think that if the device/pin on the 3V3 side of that diode should  have a pull up.  If it does not have an internal one, add an external one.   The HC-05 has a weak internal pull down on the RX line, so I  need to just add that external pullup to 3V3, probably with a 1K resistor.   

Go Up