Using 3V3 boards

My project uses a Wemos D1 Mini, which has 3V3 outputs.

I'm using I2C to communicate with ....

1, an I2C Serial to Parallel LCD display converter (1602-I2C) : Vcc = 5V
2. a Tiny RTC (DS1307) Module : Vcc = 5V

First question - Will it work without 5V 3V3 level shifters ?
Next - To where should I attach the SDA/SCL pull-up resistors, to 5V or 3V3 ?

TIA

For a while but eventually something will burn out.

Next - To where should I attach the SDA/SCL pull-up resistors, to 5V or 3V3 ?

When you use a level shifter you need pull-ups on both the 3.3 and 5V side

Hmmm, the introduction of the 3V3 boards has certainly complicated the issues on circuit design ....

I suppose the QR701 TTL Thermal printer on Software Serial should also have level shifting, although it works fine with the 3V3 Tx driving the printer's Rx pin, and the printer's Tx pin going to Wemos Rx via a 1K2/2K2 voltage divider.

If I use the LC04 shifter module, the pull-ups are provided on the module, each to respective voltages, yes ?

image

Well there has been plenty of time to get used to them.

Arduino introduced the 3.3V Pro Mini in 2008.

Yes R3 and R4 are the pull-ups

That't not I2C.
That works OK for serial on some devices if the baud rate is slow. It may not work at all on other devices

The baud rate on the printer is 9600, so pretty slow by today's standards.

And as I said, I've tested it reads the 3V3 Tx from the Wemos just fine.

I'll incorporate an LC-04 type device on my PCB for the I2C bus.

Thanks for your comments, always good to get confirmation of my jumbled thoughts ....

If the serial works reliably, then no need for shifters.
The I2C can work at 100kHz or 400kHz so shifters are almost always needed.
Are you making a PCB?
If so, there are alternatives.
The BS138 is the simplest

Yes, I'm designing a PCB....

I tend to go for the modular approach, buying in ready-made devices like buck converters, RTC modules etc. So I'll just design in an LC04 LLC as another module.

It greatly reduces the chance of me goofing, as I'm just connecting up the pins of modules.

Not got into SMT yet, so having the modules using SMT components is a sort of "half-way house" to saving board space.

Just working on the changes to the PCB layout now.

That is fine. It's actually the simplest solution
Good luck with the design.

Be aware that GPIO15 has to be low at boot, so you can't use (permanent) pullups on that pin.
And unfortunately that's the serial TX pin if you do swap.

I’m slightly less pessimistic than @jim-p. I was using 5V with a Nano working with a cheap 433 MHz transmitter module, which was specified as a 3.3V device. I supplied the module’s +V pin with 3.3V but it was a week or so before I realised that I was sending its data input pin direct from the data output pin of the Nano. Strictly bad I assume, but still running OK.

Are you saying it's OK for @abtrain to apply 5V signals to his D1 mini?

Might run well, might not. Even your car is running well using sunflower oil in engine. But your milage will be different compared to mf recommended engine oil.

" Are you saying it's OK for @abtrain to apply 5V signals to his D1 mini?"... I would never do that....

For 5V to 3V3, a potential divider is what I would have used, but the LLC module is a better solution.

Since the module I'm going to use is the Sparkfun BOB-12009, which has 4-channels (it looks to have the smallest footprint), I'm going to connect the printer serial through it as well as SDA/SCL, and doing so will gain a bit of board space by not having the potential divider on the printer's Tx. Might as well make full use of the module's channels.

There is another option. In the RTC board replace the DS1307 IC by a pcf85263a. It's pin compatible and better. It involves getting the IC and soldering, but should be easy.
Or otherwise use some other RTC module at 3.3V.

And for the LCD, I would find also something that works at 3.3V.
I think that nowadays is better and easier in general to stick to 3.3V, when possible.

and you never should.

My QR701 printer is TTL on Rx and Tx, so I've got to do some level shifting anyway,

The level shifter module is by far the easiest solution, as it's 4-channel, and I need SDA, SCL, Tx, and Rx... perfect match ...

1 Like

Wait a minute, you didn't say you were going to also use it on the serial port. The BS138 type level shifter is designed for open collector busses like the I2C it may not work with the serial port.

Open collector - or push-pull.