GPS M9N only works when connected via USB to Arduino Nano Every. Ie Not with OLED

Purchased the Neo-M9N GPS (GPS-15712) from SF with uFL Molex Antenna (GPS-15246).

Attached to Arduino Uno Every via Qwiic Cable to A4 (SDA) and A5 (SCL).

When I run example sketch # 2 or #10 connected via USB, I get output on Serial Monitor.

I see Long / Lat data that seems reasonable for my location.

Then I add an OLED 1.5 inch display so I can go mobile with it. Added a power source (9V Bat) to Vin and GRD.

Unable to get any sketch to work unconnected from my Mac.

Attached is the code I am using - Modified SF example #10 to output to OLED.

Please help - GPS Newbe.

Ex 10 Code.pdf (36.6 KB)

Try commenting out anything having to do with printing to the serial monitor. It could be that the code is waiting for the serial port to become available and without being plugged into USB, it’s never available.

Thanks YellowDog. Unfortunately not appearing to be the issue. All 3 occurrences of Serial are commented.

Intermittently I will get output to the OLED - at least initially for an iteration or two. Then it stops. When connected to the computer via UBS I get consistent output to the OLED. Lat and Long are usually Zero as I am indoors.

Check your voltage; 9v batteries have very low current capacity so the voltage may droop too low with the load of the display and gps on it. If so, you would need a different battery.

/mike

n1ist - Bingo ! A new 9v battery did the trick. Many Thanks !!!

So. Would it be good to run two 9v batteries in parallel to provide longer time or is there a better way ? Also don’t want to fry the gps or Arduino.

Thanks again.

dauva:
So. Would it be good to run two 9v batteries in parallel to provide longer time or is there a better way ?

In general, batteries shouldn’t be installed in parallel. One will always be a bit higher in voltage than the other and it will attempt to charge the lower voltage battery. This imbalance leads to both discharging early. It might work for short periods of time but you’re probably better off finding a better power source.

4 AA batteries will probably work and can output more current than a 9 volt battery.

Thanks all.

Will give it a try.