jangleboom / RTKBaseStation

Real time kinematics base station (ESP32 + ZED-F9P)
GNU General Public License v3.0
27 stars 6 forks source link

Sparkfun zed f9p with nodemcu esp8266 #1

Closed davidlsilveira closed 4 months ago

davidlsilveira commented 4 months ago

Hello dear, I need help for one project. My idea is use zed with base station, and need that nodemcu capture rtcm data in zed and send for one ntrip caster and now I use snip ntripcaster. For this port comunication in zed is sda and scl and nodemcu port d2 and d3. Can you help me in this project?

jangleboom commented 4 months ago

Hi David, I would recommend the ESP32 over an ESP8266, because of the power and cores. But if you want to use an ESP8266 for the Base Station, with an minimum of functionalities it should be possible too. But the configuration website on the local server in this project here could be cost too much. Port communication between zed and esp should be same. Just visit the datasheet to know which to use. Or did I miss the core of your question?

davidlsilveira commented 4 months ago

very tks for your retourn I have this code and receive error but not know that insert correction code:

include

include

define SDA_PIN D2

define SCL_PIN D1

SFE_UBLOX_GNSS myGNSS;

void setup() { Serial.begin(115200);

Wire.begin(SDA_PIN, SCL_PIN); Serial.println("Iniciando comunicação I2C com o ZED-F9P");

if (!myGNSS.begin(Wire)) { Serial.println("u-blox GNSS não detectado"); while (1); }

myGNSS.setI2COutput(COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3); myGNSS.saveConfiguration(); }

void loop() { if (myGNSS.getPVT()) { int32_t latitude = myGNSS.getLatitude(); Serial.print(F("Lat: ")); Serial.print(latitude);

int32_t longitude = myGNSS.getLongitude();
Serial.print(F(" Long: "));
Serial.print(longitude);
Serial.print(F(" (degrees * 10^-7)"));

int32_t altitude = myGNSS.getAltitudeMSL();
Serial.print(F(" Alt: "));
Serial.print(altitude);
Serial.print(F(" (mm)"));

Serial.println();

} }

Error in serial

11:13:42.441 -> ~ld

11:13:42.505 -> �� � �o�s��g|� l � l` c� �| s� l�o� �'� l ��s�$�l � �Iniciando comunicação I2C com o ZED-F9P

11:13:42.505 -> u-blox GNSS não detectado

11:13:45.822 ->

11:13:45.822 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------

11:13:45.822 ->

Em ter., 25 de jun. de 2024 às 07:44, jangleboom @.***> escreveu:

Hi David, I would recommend the ESP32 over an ESP8266, because of the power and cores. But if you want to use an ESP8266 for the Base Station, with an minimum of functionalities it should be possible too. But the configuration website on the local server in this project here could be cost too much. Port communication between zed and esp should be same. Just visit the datasheet to know which to use. Or did I miss the core of your question?

— Reply to this email directly, view it on GitHub https://github.com/jangleboom/RTKBaseStation/issues/1#issuecomment-2188579000, or unsubscribe https://github.com/notifications/unsubscribe-auth/A62OHF23Z2SZHYXBMIWMHC3ZJFCX5AVCNFSM6AAAAABJ2A2XHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBYGU3TSMBQGA . You are receiving this because you authored the thread.Message ID: @.***>

davidlsilveira commented 4 months ago

sorry What I need? I need rtcm data for send to snip ntrip client

Em ter., 25 de jun. de 2024 às 11:15, David Silveira < @.***> escreveu:

very tks for your retourn I have this code and receive error but not know that insert correction code:

include

include

define SDA_PIN D2

define SCL_PIN D1

SFE_UBLOX_GNSS myGNSS;

void setup() { Serial.begin(115200);

Wire.begin(SDA_PIN, SCL_PIN); Serial.println("Iniciando comunicação I2C com o ZED-F9P");

if (!myGNSS.begin(Wire)) { Serial.println("u-blox GNSS não detectado"); while (1); }

myGNSS.setI2COutput(COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3); myGNSS.saveConfiguration(); }

void loop() { if (myGNSS.getPVT()) { int32_t latitude = myGNSS.getLatitude(); Serial.print(F("Lat: ")); Serial.print(latitude);

int32_t longitude = myGNSS.getLongitude();
Serial.print(F(" Long: "));
Serial.print(longitude);
Serial.print(F(" (degrees * 10^-7)"));

int32_t altitude = myGNSS.getAltitudeMSL();
Serial.print(F(" Alt: "));
Serial.print(altitude);
Serial.print(F(" (mm)"));

Serial.println();

} }

Error in serial

11:13:42.441 -> ~ld

11:13:42.505 -> �� � �o�s��g|� l � l` c� �| s� l�o� �'� l ��s�$�l � �Iniciando comunicação I2C com o ZED-F9P

11:13:42.505 -> u-blox GNSS não detectado

11:13:45.822 ->

11:13:45.822 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------

11:13:45.822 ->

Em ter., 25 de jun. de 2024 às 07:44, jangleboom @.***> escreveu:

Hi David, I would recommend the ESP32 over an ESP8266, because of the power and cores. But if you want to use an ESP8266 for the Base Station, with an minimum of functionalities it should be possible too. But the configuration website on the local server in this project here could be cost too much. Port communication between zed and esp should be same. Just visit the datasheet to know which to use. Or did I miss the core of your question?

— Reply to this email directly, view it on GitHub https://github.com/jangleboom/RTKBaseStation/issues/1#issuecomment-2188579000, or unsubscribe https://github.com/notifications/unsubscribe-auth/A62OHF23Z2SZHYXBMIWMHC3ZJFCX5AVCNFSM6AAAAABJ2A2XHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBYGU3TSMBQGA . You are receiving this because you authored the thread.Message ID: @.***>

jangleboom commented 4 months ago

Ok, your board was not detected - thats a bit difficult to debug from distance ;) Check your PinOuts of both boards and be sure to use the correct connections, sometimes its just a swaped SDL and SCL. You see the correct connections in my README, just adapt this to your ESP8266. You could check if you use pull-up resistors for I2C. You need pull-up resistors when using I2C with the ESP8266. The I2C protocol requires pull-up resistors on the SDA (data) and SCL (clock) lines to function correctly. These resistors ensure that the lines are pulled to a high logic level when no device is pulling them low, which is essential for proper communication.

Typically, the pull-up resistors are in the range of 4.7kΩ to 10kΩ. Some I2C devices come with built-in pull-up resistors, but if they do not, you need to add external resistors between the SDA and SCL lines and the 3.3V supply voltage. On the ESP8266 the internal pull-ups are not strong enough for reliable I2C communication, so external resistors are necessary to ensure proper functionality. Common practice is to use GPIO4 (D2) for SDA and GPIO5 (D1) for SCL. Here’s a simple connection diagram:

ESP8266    I2C Device

GPIO4 (D2) ----- SDA
GPIO5 (D1) ----- SCL
3.3V ---------- 3.3V (VCC)
GND ---------- GND

Pull-up Resistors:
SDA ----- 4.7kΩ ----- 3.3V
SCL ----- 4.7kΩ ----- 3.3V

Make sure to connect the ground (GND) of the ESP8266 and the I2C device together to have a common reference.

In main.cpp you will find the function: void setupRTKBase(bool surveyEnabled) - use debug output for further investigation. Good look!

davidlsilveira commented 4 months ago

how much for you work this project for me. I need help for configuration zed f9p in u-center, need code for ide arduino, and code need capture rtcm in zed, and send for one ntrip caster (snip). If need, I can send accept in my desktop notebook by anydesk

Em qua., 26 de jun. de 2024 às 13:03, jangleboom @.***> escreveu:

Ok, your board was not detected - thats a bit difficult to debug from distance ;) Check your PinOuts of both boards and be sure to use the correct connections, sometimes its just a swaped SDL and SCL. You see the correct connections in my README https://github.com/jangleboom/RTKBaseStation, just adapt this to your ESP8266. Good look!

— Reply to this email directly, view it on GitHub https://github.com/jangleboom/RTKBaseStation/issues/1#issuecomment-2192070893, or unsubscribe https://github.com/notifications/unsubscribe-auth/A62OHF2N6CY3ZGOQKHFDCDLZJLQ6FAVCNFSM6AAAAABJ2A2XHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSGA3TAOBZGM . You are receiving this because you authored the thread.Message ID: @.***>

jangleboom commented 4 months ago

Since this post has little to do with this project and I have told you everything I could think of about your problem, all I can say is: Good luck debugging your project and close the issue now.