LoPy and custom PCB with L76-L GPS module
We're trying to implement custom PCB with the same module as used in PyTrack - Quectel L76-L.
This question might be a bit off topic but is it necessary to use level shifter to talk to this GPS module through I2C bus ?
We perform i2c.scan() and getting no response from connected and powered module while UART interface works perfectly.
Are LoPy I2C bus levels compatible with L76-L ?
@seb No luck with pull up resistors. There is also garbage when connected on P22/P21.
PyTrack connected to the same pins with the same settings goes smooth.
While connecting our L76-L there is no response on I2C ;-( only garbage response for i2c.scan().
Maybe you reconfigure L76-L chip through UART after mounting ?
Will try to connect oscilloscope and/or logic analyzer
Do you have pullup resistors on the SDA and SCL lines? You will need to connect a 10k resistor between those lines and 3.3V. It's also worth noting that on the Pytrack the I2C is sda='P22', scl='P21'.
robert-hh last edited by
@bobie It still looks like wrong signals. If you can do so, hook up an oscilloscope and check the signal quality.
bobie last edited by bobie
@seb We connected our Quectel L76-L pins:
L76-L .................. LoPy
VccInput ----------------- 3.3V VccOut
SDA ------------------------ P9
SCL ------------------------ P10
Then we initiated:
i2c = I2C(0, I2C.MASTER)
On our L76-L i2c.scan() produces empty array and multiple execution produces sometimes random adresses.
When we connected PyTrack PCB using only those 4 pins the L76-L from PyTrack gives proper response to i2c.scan()
What I did wrong ;-( ?
I just checked the Pytrack schematic and we use the i2c interface to the module and actually don't have level shifters, that must mean it works ok.
@seb OK, will try to use level shifter. Do Pycom use level shifter on its PyTrack module ?
Out modules output 3.3v which is above the maximum 3.1V specified there, to be safe I would include level shifters. Simple bi-directional level shifters can be made like so:
@seb We use LoPy4 so "device" is 3.3V I believe. Quectel says:
- I2C_SDA/I2C_SCL is pulled up to 2.8V inside L76-L module. There is no need to add a pull-up resistor externally.
- The voltage threshold of I2C is 2.8V. If the system voltage is not consistent with it, a level shifter circuit must be used.
Quectel I2C voltage characteristics:
This post is deleted!
Is the device a 5v or 3.3v device? If it is 5v you will need to use a level shifter. Do you have pull up resistors for the SDA and SCL lines?