Very Basic Ardunio Uno + SimpleRTK2B

Q&A forumCategory: QuestionsVery Basic Ardunio Uno + SimpleRTK2B
EarthImage asked 1 year ago
I mucking about for the first time with my SimpleRTK2B board and Arduino. I am just trying to get a simple example from TinyGPS++ working (I can with other UBlox units), but not with the SimpleRTK2B. I just can’t get anything to show up on the serial monitor. I’m pretty new to Arduino. This should be simple, but I am missing something. Some questions:

  1. Do I need to use ioref? If so should this be connected to 5v or 3.3v out?
  2. I am powering the board (5v in) from the 5v pin on the Uno and gnd to gnd.
  3. TX1 and RX1 are connected to Uno pins 3 and 4 (RXPin = 4, TXPin = 3).
  4. UART1 baud rate is 38400.

Board is working fine and I get a flashing gps_fix led. I have check in U-center that UART1 is enabled for NMEA messages and in the text console I see all the NMEA sentences streaming.

What am I doing wrong?

Thanks, Peter
 

clive1
replied 1 year ago

TX1 is the OUTPUT, needs to go to the Arduino side RXPin.
IOREF should be powered by the Arduino UNO R3 itself, I'd expect it to be 5V.
Software Serial?

EarthImage
replied 1 year ago

Hi Clive, thanks, what I was missing was IOREF connected to the input 5V. Now I get the serial output stream that I was seeking.

For those that are new to Arduino using the SimpleRTK2B and would like to get a very basic sketch going – to stream NMEA messages to the Arduino serial monitor – give this a try. If you can get this working then any of the examples from the Arduino library TinyGPSPlus will work.

Connections to an Uno:
5v_in to 5v (Uno)
gnd to gnd (Uno)
IOREF to 5v (from Uno)
TX1 to Digital Pin 4 (Uno)
RX1 to Digital Pin 5 (Uno) – not really needed.

Sketch:
#include
const unsigned int MAX_MESSAGE_LENGTH = 100;
static const int RXPin = 4, TXPin = 3;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup() {
Serial.begin(115200);
ss.begin(38400);
}

void loop() {

//Check to see if anything is available in the serial receive buffer
while (ss.available() > 0)
{
//Create a place to hold the incoming message
static char message[MAX_MESSAGE_LENGTH];
static unsigned int message_pos = 0;

//Read the next available byte in the serial receive buffer
char inByte = ss.read();

//Message coming in (check not terminating character) and guard for over message size
if ( inByte != ‘\n’ && (message_pos < MAX_MESSAGE_LENGTH – 1) )
{
//Add the incoming byte to our message
message[message_pos] = inByte;
message_pos++;
}
//Full message received…
else
{
//Add null character to string
message[message_pos] = '\0';

//Print the message (or do other things)
Serial.println(message);

//Reset for the next message
message_pos = 0;
}
}
}

Want to learn more about GPS/RTK?

1. Our engineering team will contact you to solve any questions
2. We will keep you updated about promotions and new product releases
3.You will only hear from us when we have important news, we won’t spam your email