Just a quick question, what is the difference between using the microUSB port over the 4 pins for data input for the Neo-6m gps module by ublox? or for any other sensor.

  1. Does this affect the current/voltage withdrawn from the source?
  2. Affect the raspberry pi?
  3. Any drawbacks over using the 4 pin?
  4. Or it will only prevent us from using Serial communication since the 4 pins are of UART( arent they?)

1 Answer 1


Although I focus on the Neo-6M, this answer applies to most sensor break-outs that provide both a UART and USB interface. A "sensor break-out" refers to a circuit board which encapsulates a sensor chip of some kind. There may be many such break-outs commercially available, all of which feature the same sensor chip. Hence, if you do a quick online search for "neo 6m gps" you will find a variety of different looking boards.

what is the difference between using the microUSB port over the [UART] 4 pins for data input

They are not the same thing. The first is a USB 2.0 host hub, the second is a UART transceiver.1

Note that not all break-outs featuring the Neo-6M have a USB connector, point being, the chip itself probably (I did not check) has a UART interface, and not a USB one.

A break-out which includes a USB interface to this chip (the Neo-6M) presumably uses a USB to serial UART converter. You can get these separately in the form of a cable with a USB A male connector at one end and a small (possibly encased) break-out with the four UART wires exposed at the other; this is commonly called a "serial cable" although that can refer to various other things, and UART can involve up to six wires (the extra ones are for hardware flow control). Sometimes there isn't actually a cable, it is more like a dongle.

If you plug such a thing into a computer it provides a UART port. In the case of your Neo-6M breakout this is built-in. In other words, it will be the same interface as using the actual UART (there will be a /dev/ttyUSB0 or some such representing it). This does require software support on the Pi in the form of a kernel module, but this should be loaded automatically.

To reiterate: A USB port is not the same thing as a UART bus, but can be used as one via additional hardware, often provided as part of the package on a break-out board.

But the converse is not true, at least in general: No addition of hardware can convert a UART port such as the one(s) on a Pi into a fully functional USB host port, simply because they are not fast enough. Converting a sensor UART bus to a slave USB interface, such as done on the break-outs under discussion, is a different beast, since this interface does not have to accommodate all the features a USB 2.0 host does.

Does this affect the current/voltage withdrawn from the source?

I would guess the USB jack can be used to power the Neo-6M break-out as well. The + wire in a UART connection is actually not necessary and usually used just to provide a voltage reference. Which brings me to an important...


UART does not have a universal logic level, like USB 2.0 does. They are commonly 3.3 or 5V. The pi is the former, so if you are going to connect the GPS that way, make sure first the break-out UART is also 3.3V. If not you will need a level shifter. Ignoring this risks permanent damage to the Pi.

  1. It's not clear here whether you mean a microUSB port on the Neo-6M break-out you have or on a Pi (eg. the Zero). I assume the latter, although the explanation works out much the same, since either the microUSB on the Neo 6M board is just for power (in which case the whole discussion is moot), or it is for data (or both data and power), in which case you would be connecting it to a USB-A 2.0/3.0 host port on a Pi (which is what the microUSB on a Pi Zero functions as under its default configuration).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.