In my build i have a gsm module ( SIM800L ) connected to a RPI 0 W in this way:
I would like to get also the current position of my device, for do so i was thinking to buy a Gps module ( NEO-6M STM32 GT-U7 ).
I know that the sim800L is also capable to get it’s current location through the gps but actually it’s not working anymore becouse as i read this feature was based on a google services that is no longer aviable.
The problem is that the Gps module has to use the UART pins that are already connected to the sim800L. I’m trying to figure out before buying it if I can somehow share the UART pins, or convert other GPIO pins in UART pins, or maybe other things ?gpiopi-zero-wuartgpstroubleshootingshareedit follow closeflag asked yesterdayMat.C11122 bronze badges New contributor
- 4How about using a usb serial adapter? – CoderMike yesterday
- 1(1) Try SIM7600, which is “better” than SIM900, which is “better” than SIM800. I have tried SIM7600 and found their GPS stuff a little bit “worse” thanNEO. (2) I have tried NEO6,7,8. I think NEO8 is the best for hobbyists. You can find new NEOs but ver expensive from SparkFun, which I think is the most advanced and good for both newbies and ninja. (3) GPS communication using UART are low tech stuff, (though using NEO GUI helps a lot.) I have been using three WaveShare SIM7600 HAT at the same time with my Rpi4B buster. / to continue, … – tlfong01 yesterday
- 1For Rpi4B/buasterYou can have multiple on board UART and (almost) unlimited number of USB UARTs. There is no worry at all on limits of UARTs you can use. (4) In last two years or so, I have answered a couple of UART / AT command related questions on SIM800/9090, and using multiple 7600 HATs in this forum. You can search SIM800, SIM900, SIM7600 UART, AT commands, GPS /GPSD/NEO 6/7/8 in this forum (and also EE SE) for more details on my snswers.You might also direct newbie questions to @tlfong01 at EE SE. Happy learning. Cheers. – tlfong01 yesterday
There are a few ways you could go depending on how much space / weight you have spare and what skills you want to learn as part of your project. I have assumed you want to keep the USB port for something else.
First thing is to look at the voltages required by the Pi and compare them to the device – the last thing you want to do is fry the Pi or have communications issues to / from the devices.
The simplest solution is to use one of the numerous HATs that provide multiple serial ports to the Pi (I’ve seen up to eight ports on one card). Google / DuckDuckGo etc will provide links if your regular supplier does not sell one.
Normally GPS units are slow speed, transmit only so next simplest would be to use the Pi GPIO library (not as my brain calls it – the PIG PIO library) to handle the serial port in software. This is the lowest cost solution BUT does require you to interface this into your code – its written in C but often seen in Python programs and has wrappers for other languages detailed on the site.
Very crude python code to use pin 18 as a serial port (sorry but both the port and code needs to be checked before live use):
# Set up RXD port on pin 18 as 8-bit data at 9600 baud # import all the library functions for your program import pigpio # Set the port up as needed for the GPS gps_pin=18 gps_port = pigpio.pi() gps_port.set_mode(gps_pin, pigpio.INPUT) gps_port.bb_serial_read_open(gps_pin, 9600, 8)
You then use
bb_serial_read(gps_pin) to read the data and when done
Better examples can be found here.
Much more complex (esp from this software guys point of view) is to use a chip to provide dual serial ports switching via I2C – a ‘flat pack’ one is the NXP SC16IS752 / 762 BUT this needs you to be able to handle surface mount soldering. A search on Digi-Key (though other chip resellers are available) may provide a through hole equivalent.
Apologies to the esteemed author of this great library who may be along soon – I am an old hacker that had to use lots of Programmable I/O chips on the old Z80 / 6502 cpu boards so I instantly see PIO in the name)shareedit follow flag answered yesterdayAndyroo3,71133 silver badges2323 bronze badges
- There are breakout modules for NXP750 modules. Some two years ago I bought a couple of them experimenting. But the results was very disappointing. You might like to read more details about my results (1) NXP SC16IS750 I2C/SPI to UART Module Not Recommended for Newbies: raspberrypi.stackexchange.com/questions/98393/…. (2) My answer in this Q&A shows a picture of the NXP..750 module: raspberrypi.stackexchange.com/questions/96697/…. Cheers. – tlfong01 yesterday
- 2Waveshare use the 752 (thepihut.com/products/…) as does this dual port tindie.com/products/aauer1/… though this embeddedpi.com/documentation/multi-uart-serial-board/… uses the 740. I’ve not tried the 750 and TBH for this I’ll stick with the software version as my answer 🙂 – Andyroo yesterday
- 1I still remember my disappointment when trying 750 and saw bug reports by other users. I also reported that later I found that SparkFun discontinued sell this 750 module. So I said they might have a reason for stop selling it. I also reported that AdaFruit from time to time stopped selling an item they first recommended and replaced by another item, perhaps a “better” version. My lesson learnt is what the pro’s say: “Don’t be the first user.” – tlfong01 yesterday
- 2Or wear a fireproof suit. Bleeding edge can be OK if work funds the research and time 🤭 – Andyroo 23 hours ago
- 1I very much agree. Actually I repeated the “Don’t be the first user” warning for the newbies. My motto is “Before the first user” Actually I am a “Be Water” guy and I usually cut loss before my first blood. Actually around the NXP750 trouble, I was playing with other devices of big brands who won’t admit their “special features” until the some heavily bleeding pros made their their last cries before dropping to death. I learned the meaning of “special features” in the days of OS360 who unashamedly reported more than 1,000 new bugs every year, ./ to continue, … – tlfong01 22 hours ago
- 1(IBM (OK nobody knows who is IBM, except ok boomers like me) also reported that their multi-million lines long OS360 code took more than 10 man years (or 100 man years, I forgot) to complete, … At that time I read the book “The Mytical Man Months” and understood the software engineer trade a little bit more. This morning I read the following article: (1) Are You on the Cutting Edge or the Bleeding Edge? – Myers Barnes 2017jun09 myersbarnes.com/blog/2017/06/…, to remind my new bet of CM4 / to continue, … – tlfong01 22 hours ago
- 1(yes, I already made a pre order) I used to have a couple of bleeding edges falling on my head, but I do wear fireproof suits and check bleed fund balance (how many basket of unbroken eggs left) all the time, … 🙂 – tlfong01 22 hours ago