Pages: [1]   Go Down
Author Topic: Voltage range for logic level  (Read 1835 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 2
Posts: 81
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just a quick question: what voltage rnge can I apply to digital input for HIGH on a 5V or a 3.3V Arduino? I would like to use a RTC using 5V and a OLED display using 3.3V
If the RTC takes 3.3V as HIGH and the microcontroller@3.3V takes 5V as HIGH without problems, I needn't use a logic level shifter ...
Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12164
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Almost all CMOS logic chips require the input voltage to be > -0.5V and < Vdd+0.5V - Certainly the microcontrollers used in Arduinos are no exception.

If the RTC is reliable with 3V3 signals you can connect it using I2C bus with pull-up resistors to 3V3 (_not 5V_)  - the I2C bus is open-drain so only the pull-ups define the high voltage level.  The DS1307 will work with signals above 2.2V, for instance.

The microcontroller in the Arduino will work with 3V3 input signals when powered at 5V (the threshold is 3.0V)
Logged

[ I won't respond to messages, use the forum please ]

Show Your Work
Offline Offline
Edison Member
*
Karma: 14
Posts: 1098
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This has been linked before but it is well worth adding to your bookmarks if you haven't yet:

http://www.interfacebus.com/voltage_threshold.html
Logged

I have only come here seeking knowledge. Things they would not teach me of in college.

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5494
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just a quick question: what voltage rnge can I apply to digital input for HIGH on a 5V or a 3.3V Arduino? I would like to use a RTC using 5V and a OLED display using 3.3V

What OLED is it? A lot of the 'modules' take 5V, no problem.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Jr. Member
**
Karma: 2
Posts: 81
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This one:
http://www.ebay.de/itm/Error?errid=5&item=251110441587pt=Bauteile&var=550175401939&hash=item3a797823c2

I removed two resistors in the back to make it work via SPI. It does work with 5V when testing, but I am not sure it won't reduce the lifetime.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5494
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There's not a lot of information there ... but I don't see a regulator on the board and at that price I wouldn't expect any extras. It's just a bare SSD1306+display.

Best to stick to 3.3V.

The Arduino has a 3.3V output for power and you can use a simple resistor divider to bring 5V down to 3.3V for the SPI clock/data lines. The arduino should be happy with 3.3V on its input pins (it will see "HIGH" at that level).

PS: These are a lot nicer/easier to use and have a regulator plus a secondary controller chip with some high-level functions for things like drawing text (no need to mess around with font data - the chip already has it): http://www.ebay.com/itm/170842973484

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Jr. Member
**
Karma: 2
Posts: 81
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks ... ok, I'll just add a voltage devider.

I know there are other displays, but those come at nearly two times the cost. For abstraction, the Adafruit Library works very well for my purpose. Don't see any problem there.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5494
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For abstraction, the Adafruit Library works very well for my purpose. Don't see any problem there.

Fair enough.

It's a bit resource hungry though - more than 1K RAM, a load of flash, a lot of CPU/SPI bus time ... not suitable for everybody.

those come at nearly two times the cost

Pedant: One's in dollars, the other's in Euros. It's only 40% more (about four Euros).
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Pages: [1]   Go Up
Jump to: