The first water test of my diy GPS is a succes. My goal was to make a simple low budget GPS logger with a ESP32 as brain. Minimal solderskills are needed, as just the GPS has to be soldered to the right pins. Total budget is around 40?. Some technical details :
ESP32 board with e-paper display (Lilygo TTGO T5, 15$)
Beitian BN220 / BN280 gps (ublox M8n engine), 10$
Lipo 2000 mAh, with protection, 10$
Sealed case, 5$
A log rate of 10 Hz is possible, format UBX NAVPVT.
On my first water test, I had 2 units mounted on each boom side. The actual speed and the actual run is directly visible while surfing. The BN280 is the blue plot, BN220 the red plot. Number of sats was 16 - 20, logged@2 Hz. Fot who is interested, I am willing to share the SW (arduino IDE). Next test, I will log@10 Hz.
Greetings, Jan.
great job does the board also log your sessions, how do you download the file ? For the display can you add categories like nm, hour, alpha etc?
Very nice!
Can you show us what a gybe looks like please. I'm very interested in what happens as one side gets a shadow from the sail. How much difference does it make?
Nice work
My first thoughts are that there may be much better correlation in the results and the speed graph fluctuations if you mount the two devices on the same place and plane, preferably on your body (head or bicep) so there is no independent/different movement.
Also interested to se if there is nbetter correlation @10Hz (or 5Hz)
Oh. I just saw that you posted a 10Hz car test in another thread. It's hard to tell from what I see, but do you think there is closer correlation? That result was from quite some time ago. Have you got any more insight to report?
great job does the board also log your sessions, how do you download the file ? For the display can you add categories like nm, hour, alpha etc?
All sessions are logged on a micro sd card. The ESP32 has wifi, I can download the file with ftp (file transfer protocol). On the sd is a configuration file, there I set the SSID and password of my private Wifi. As the logger is switched on, it searches for this SSID and connect. The other functionality then is "OTA", over the air update. This is with a simple build in webserver on the logger. For start and stop the logger, I use a reed switch and a small magnet. So, no need to open the case every time. Just charging the battery is still a issue, need to connect then with usb.
When the speed>3 knots, the actual run, actual speed and nr of sats is visible. With lower speed, total distance, 5*10s avg, best 100m, best nautical mile, best alfa is shown. Now, this is divided over 2 screens, which toggle every 4s. At the end of the session, these nr are saved to the sd-card. For now, the figures are well matchted with gp3s. Just the alfa, I still have some differences.
The logs on the alfa 500 shows the same numbers, the BN280 (blue)seems to be a little better.
I will compare the results@10 Hz the next session.
Greetings, Jan.
Today I had another session with the 2* diy GPS, one Beitian BN220, one BN280 and the gps on my phone with Windrace. The GPS was again mounted on the boom, so I could see my speeds while surfing. Results for the diy GPS was very stable, between 14 and 18 sats. Minor differences between the two :
Total distance : 52852 m and 52859 m, AVG 5*10s 47.12km/h and 47.18 km/h, 2s 48.72 km/h and 48.61 km/h
The app on the phone had large deviations, it only saw 7 sats. Phone was under my wetsuit, definitly not a good idea !
The calculated speeds on the diy GPS was almost exact the same as on the GPS-speedreader.
Session on gp3s : www.gps-speedsurfing.com/default.aspx?mnu=user&val=353453&uid=23556
Greetings out of Belgium !
I am interested in the software side, I guess that would take most of the time for development. So do you get input in ubx or NMEA and parse it on the fly with your algorithms ? which language suits the ESP32 board?
Correct, there is a parser that translate the ubx navpvt. The navpvt string is written to the sd. Then, the speed, the lon/lat gps-co?rdinates are saved in a array(3*6000 float pos). With every new message, al the values are calculated again. The library for the display is blocking (about 800 ms update rate), but the esp32 can be used with free rtos. I have one task for the display, the other task is for everything else. Everything is written in C++ in the Arduino IDE. It took me quite some time, but due to the lockdown there was plenty of time.... You can directly upload the ubx file to gp3s, it will be accepted. I believe that they do the calculations al over with "GPSResults".
Here you can see the connections to the GPS (all in blue). Because the power supply to the GPS is switched on/off by the ESP32, the GPIO 25,26 and 27 are used for this purpose (max current/GPIO is 20 mA, so in parallel now 60 mA).
A reed switch is used to switch the GPS on and off with a small magnet.
This E-paper has no speaker.....
Some links :
randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/
nl.banggood.com/LILYGO-TTGO-T5-V2_0-WiFi-Wireless-Module-bluetooth-Base-ESP-32-ESP32-2_13-e-Paper-Display-Development-Board-p-1332909.html?utm_source=googleshopping&utm_medium=cpc_organic&gmcCountry=BE&utm_content=minha&utm_campaign=minha-beg-nl-pc¤cy=EUR&createTmp=1&utm_source=googleshopping&utm_medium=cpc_bgcs&utm_content=xibei&utm_campaign=xibei-pla-beg-pc-nl-all-rm-purchase-0314&gclid=Cj0KCQiAqo3-BRDoARIsAE5vnaKYoZgxlM73rXGbu3h40D1M2PNrqnwA51Mmqw7G59YFVJHHVE1l_y8aAi3wEALw_wcB&cur_warehouse=CN
nl.aliexpress.com/wholesale?catId=0&initiative_id=SB_20210530115442&isPremium=y&SearchText=beitian
Greetings !
I found this is the best to start:
The ESP32 has 3 UARTs (serial ports). The first, on the pins Tx, Rx is connected to the USB (virtual serial port). The Arduino IDE uses this port for flashing and for the serial monitor. If you want to use it for something else, you cannot use the serial monitor anymore. Therefore, it is practical to use the second UART for the GPS connection.
The biggest font in the standard Adafruit GFX library was not big enough, but you can easily create your own fonts with this sw : / oleddisplay.squix.ch/#/home font-converter online, used for 96 pt font !!
If you wont to try out my SW, most easy is to use the example "Arduino OTA" webupdater. In this simple sketch, you can set your SSID and password. The ESP32 will then run a simple webserver, with the possibility to upload a new .bin file "over the air"
thanks is still too early for me, I was not familiar with Arduino, microcontrollers and RTOS, so it is just an opportunity to learn and have fun for now. Do you know if there is more information available about the pins ? this is all I found:
github.com/lewisxhe/Esp-badge/blob/master/schematic/T5_V2.3.pdf
For the pin mapping, I use the picture below. As you see, most of the pins are used for the Display, SD card, switch, battery voltage. The free pins are 21, 22 (SDA/SCL), 34, 32, 33, 25, 26, 27, 0. Pin 19 is connected to a green LED (on the latest version, the LED is not present anymore). Pin 36 is used for battery voltage (ADC0), pin 39 is connected tot the switch IO39.
You will find more general information over the GPIO if you google ESP32 GPIO. If you need >10 mA out of a pin, you can use the "high power setting": gpio_set_drive_capability(GPIO_NUM_25,GPIO_DRIVE_CAP_3);//see www.esp32.com/viewtopic.php?t=5840
I used this for the power supply of the GPS. Be carefull, max current out of 1 GPIO is 20 mA !
The display driver for the latest version is #include
The board is rather sensitive for the power supply : I blow 2 boards with testing the power supply range, just with lowering the voltage with my bench power supply ! (was testing what the minimal voltage was....). So, just use the USB or a stable 5V supply !
Greetings, Jan.
thanks Jan, I managed to set up the serial port and connect the GPS receiver, can parse the ubx pvt message using some code I found on youtube:
Good to hear that you already can parse the nav pvt ! For the SD, I used this setting :
#include "FS.h"
#include "SD.h"
#include "SPI.h"
#include "TimeLib.h"
#define SDCARD_SS 13
#define SDCARD_CLK 14
#define SDCARD_MOSI 15
#define SDCARD_MISO 2
void setup() {
sdSPI.begin(SDCARD_CLK, SDCARD_MISO, SDCARD_MOSI, SDCARD_SS);
if (!SD.begin(SDCARD_SS, sdSPI)) {
sdOK = false;Serial.println("No SDCard found!");
}
else {
sdOK = true;Serial.println("SDCard found!");
uint64_t cardSize = SD.cardSize() / (1024 * 1024);
Serial.printf("SD Card Size: %lluMB\n", cardSize);
}
}
If you wont to try my code, send me a pm. For the display, there are different versions of the T5. The last ones I received (no LEDs anymore, marking 20-5-26, T5_V2.3.1.13 ) have the GDE display, library to use is then #include
Greetings, Jan.
A really good comparison between different GPS can be seen here :
and here : www.iforce2d.net/tmp/gpsShowdownAnimationFull.mp4I fear it's more of a comparison of frontend/antennas because at the root of it, it's all the same chip. A lil' newer, a lil' more features but in the grand scheme of things, they haven't changed much.
I'm waiting for glue to dry so I watched the video he referenced:
The best is the ublox M8P.
As Julien pointed out, this conclusion is incorrect. He is using some rather fancy antennas and large ground plates for some of the modules. It's safe to assume that those are hooked up to the M8 units and not to the Beitians, since the BNs all have built-in antennas. The differences he describes are differences in the antenna and ground plate setup, not in the units. A screen shot from the video shows the differences in antenna size:
That is quite well known, for example in the u-blox paper about the effect of antennas. It's also easy to reproduce with external antennas and ground plates. One example is the using an M9 GPS with a chip antenna. In general, the M9 u-blox units perform at least as well as M8 units (at least below 10 Hz, before the M9 limits the number of satellites). But the worst performing u-blox type GPS chips I have ever tested was an M9 with a chip antenna. It performed significantly worse than all other Beitian or u-blox chips with ceramic antennas that I have ever used, except perhaps when using M8 chips that require active antenna with a passive antenna.
There's very nice correlation between the size of the antenna and the quality of the data. The M8P uses both a very large antenna and a large circular ground plate. The ground plate blocks all reflected signals, thereby eliminating "multipath noise" which leads to errors. The BN units have a much smaller ground plate under the (smaller) antenna. But since the ground plate does not extend a couple of centimeters (the wave length of the GPS signal) to the sides, it cannot block all of the reflected GPS signals.
With the Motion units, I think one of the reasons for the observed high accuracy is that the metal case also works very well as a ground plate, so the GPS gets a cleaner signal than, say, the GW-60.
For those who are interested in the DIY logger, I made a manual for this logger. You can find it here : docs.google.com/document/d/e/2PACX-1vQ7kR5tCX906ER15K-lsmmVZKAK3O7mNz37po92eMhcj7J5gWulg-c2lgcQfTCDV8037NtgWirQbFev/pub
Great effort Jan and thanks for the help so far. My first attempt resulted in a burnt board probably because of a cold solder joint on the GPS supply, using a BN-880 or using a TTGO T5 M21 instead of B74 or a combo of those. 2nd attempt with new B74 board and BN-220 worked immediately and went for a bike ride today (as no wind) to compare results with GW60. Both units got a fix simultaneously, and everything matched pretty much exactly. Had between 10 to 18 sats but mostly around 16. My box as pictured is a little big but was only thing locally available, better fitting box on order should come soon. Have got bits for another unit coming as the big display is much easier to read than the GW60 (or Apple Watch) and with a 2000mA battery life looks way better than anything you could handle physically. I had some issues with a 64G SD card but a 32G one worked fine. A 2hr logging session at 10 Hz was about 9Meg. Haven't as yet successfully got Wifi FTP working (I'm on Mac) but SD files upload to KA72 or GPSSpeed Reader no problem. Pretty impressive for only 7 solder connections.
My costs delivered to Perth Australia (AUD):-
$15.90 2000mAhr battery with protection
$29 TTGO T5 B74
$12.50 BN-220 GPS
$8 box
total $65.40 AUD
Pictures are inside so results displayed meaningless (and the reed switch not mounted yet). Have ordered a wireless micro USB charger Rx and TX for $11 to see if can charge unit without opening the case. Screen protector also not removed in photo.
Great Flex!!!!!
Where is the antenna in the box? If it's under the display, you could be loosing accuracy.
I'm surprised you aren't printing your own custom box
Hey Decrepit, in this dodgy first setup the antenna was top right, you can see the little lights on the gps. These LED's can probably be removed to save power but is satisfying knowing everything is working..even though totally redundant as Jan's display shows everything working. Really wasn't concerned at this stage with accuracy etc but still had 16-17 sats. Once the better sized box arrives was gonna put the gps horizontal at top of box 90 deg relative to the display. ie display towards me on boom with gps board above display at 90 deg looking up...if that makes sense. Since its not approved, for me its currently just a better way to see my speed and distance on a nice giant display. As for printing own box, printing good see through glass is really really hard and very very slow and for $8 delivered truly not worth the effort.
Shouldn't be a problem to get it approved, the BN220 should do a good job. Just send Daffy or me comparison files.
It's worth doing, especially if you only have a GW60. Your device should be more accurate than that. I'm not sure about the boom, there's a feeling that could give you some strange alphas
Shouldn't be a problem to get it approved, the BN220 should do a good job. Just send Daffy or me comparison files.
It's worth doing, especially if you only have a GW60. Your device should be more accurate than that. I'm not sure about the boom, there's a feeling that could give you some strange alphas
Yep. It should be able to be approved. Just send us a side by side files comparison with an approved device so we can see if it is working as expected.
Mounting on the boom is not approved however.......
Sailquik/Decrepit, read both your comments just before heading to sleep last night and came up with maybe a better non boom solution but still be able to read the great display. Still think Jan's boom mount is good for rookies like me who aren't really competitive in the serious numbers. My dodgy duct tape prototype seemed to work ok so whipped up a more substantial version on the printer which is coming off in 1/2 an hour or so. Not going to get a chance to finish or test tonight though. Lockdown is lifted so school holidays are on, meaning gotta go do the family thing for a while and leaving at 5am ma?ana. I.e. No testing or side by side files for a while. Anyway, this is Jan's baby so all credit to him.
The mounting on the boom has the disadvantage of also measuring the "chop". Here you see a speed graph of 2 loggers mounted on each side of the boom (analysis from sailquik). You see a nice correlated "sawtooth", which indicates that these are micro speed "changes". I would suspect that a GPS-watch should have the same issue, as the hands are attached to the boom. But the watches are not logging@10 Hz, I believe the best is the GW60 @ 5Hz. I plan to a test with 4 loggers, 2 on the boom and 2 on my helmet to have more data about this issue.
The other disadvantage is a complett loss of signal when the logger is submersed after a fall. Sometimes, you get weird spikes when the gps signal is very weak. I build in a filter (min sats, min sAcc) for the readings, but this need still some tweaking. In the logs, nothing is filtered, but that is taking care off when results are calculated in GP3S.
But for "recreationial" speeding, the boom position is my favorite !!