Skip to content
Home » DIY-Build Your FoxLAP device

DIY-Build Your FoxLAP device

FoxLAP – The DIY version

This is what you will get at the end of this tutorial. A complete working GPS LAP timer…

A complete working GPS LAP timer, yes, but with some limits.
Limitations: No external sensors (rpm, temp, EGT), no accelerometer. We can add accelerometer, temp sensor, and rpm to this device, but we will see that maybe in another tutorial.
This device is not really (completely not) water resistant, no battery management (only a physical switch power button). And finally something ugly inside with manual soldering and hot glue. Of course this is a quick and dirty implementation, i’m sure you can do better than i did. This is what i’ve done to create the first prototype to be able to start programming the firmware. I did it again for this tutorial but didn’t invest much time to get a high quality build. If you improve this, please share

Even with these limitations, you will get your lap times, gap with best, speed, sectors, theorical best lap and so on… and you will be able to analyze your recorded GPS data (GPXRender software and with the online tool).

The goal of this tutorial is to create the simplest version possible. I started the development of this project on a version like this (in fact exactly the same). It brings back memories of going back to it.

This simple version is probably not the best, and it can be improved easily – we can obviously discuss choices i made, why blender?, why this display, why this MCU… But it’s there and it works So ready to go?

1- Required parts

This is what i used, mostly because i had most of these items available at home. some of this parts can be changed to more convenient, cheaper parts (depends on availability on your location). links to purchase these items are provided but i don’t have any interests on this… you are free to purchase where you want.

More & important informations:
1- Yes, it costs money. Prices have increased significantly between the time I started the project and the time I write these lines (the pandemic, wars and unbridled capitalism have, I am sure, improved your living conditions). Most of the budget is for the GNSS module. But you are trying to build a GPS LAP Timer… With a bad GPS module, you have a bad GPS lap timer, It’s that simple.

2- GNSS module: this tutorial is made to use the MatekSYS SAM-M10Q mounted inside the box. But you can use any Ublox GNSS module i guess. But please avoid cheap GNSS module replica, no, a 5 dollar GNSS chip can’t be good. You can find cheaper ublox GNSS modules like the m8n, but you will be limited to 10Hz (wich is not bad, alfano6 GNSS is 10Hz) and you will not be able to mount the GNSS inside the box.. it will be an external GNSS receiver, so you will have to adapt the 3D box model (i have 3D models for such cases). I had good results with this ublox m8n GNSS receiver: https://www.aliexpress.com/item/32748573256.html
This project is only compatible with ublox chips. maybe i will add some GNSS compatibility if they are proven to be good and affordable.

3- Display: this JLX 256×128 COG can be 5V or 3V. I used the 5V version because i already had it. The battery Shield used in this tutorial contains a 5V booster, so i used it to power the ESP32, the GNSS and the display. You can use the 3V version of this display but obviously don’t wire it directly to 5V. I chose the white backlight version simply because I prefer white backlights. This display must be the SPI model.

5- Micro SDcard: ESP32 can’t read SDcard FAT bigger than 32GB. So don’t use an sdcard larger than 32GB (or you will have to create a 32GB partition on it first). 16GB for this project is already huge, you don’t need so much space. But as the GNSS module, don’t use noname Sdcards, you will face a lot of troubles (read, write errors… complete headache with these cheap noname sdcards to finally throw them angrily in the trash).

6- Battery 18650: Also, don’t be fool, don’t purchase noname battery advertised as 12000 Mah, or you may have surprises. The battery +/- poles must be flat as the earth (it’s a joke, don’t send to me messages about this):

with batteries that have a button on the poles, it may be impossible to put the battery in the slot provided in the box.

2- 3D Print

  • STL files were created using Blender.
  • 3D Printer: Creality CR10s PRO.
  • Slicer: I used Cura to slice the 3D models
  • 3D filament: i used the 1.75mm ZIRO Filament PLA with carbon fiber. Amazon link: https://www.amazon.com/dp/B01IICFS4Y/
  • Print settings: 0.4mm nozzle, Standard quality (0.2mm), 40% infill, Support (zig zag support)
  • Print Speed: Usually I set the speed to 60% of the maximum speed the printer can achieve. Because I saw that the more I increase the speed, the more faulty prints I get.

I’m not a 3D print guru, I had my best results printing the STL models this way. I assembled all the STL parts only to show you how I placed them but actually I printed the STL parts piece by piece, not all together as shown in the screenshot.


There is also 2 other parts printed with flexibale filament. You will need 2 parts for the M8 flat washer… It will help you to mount the Lap timer on your wheel. But this filament even if it’s a good filament, is expensive and you will probably don’t want to purchase a complete coil for just 2 small pieces. You can try to print them with regular PLA.

Here is the STL files you must print:

593 KB

  • 01-FOXLAP-DIY-Overlay.stl: 1 print (you can use a different color for this part)
  • 02-FOXLAP-DIY-box-top.stl: 1 print
  • 03-FOXLAP-DIY-box-bottom.stl: 1 print
  • 04-FOXLAP-DIY-buttons.stl: 4 prints
  • 05-FOXLAP-DIY-buttons-support.stl: 2 prints
  • 06-FOXLAP-DIY-flex-rond.stl: 2 prints

3- Assembly guide

Starting from here, you must have the printed box and the electronic parts in your hands. Here is the complete wiring schem. Even if it is a very simple schem, it requires a lot of wires.

3.1 Buttons assembly
Insert your 4 buttons in the buttons holder you previously printed.

Make sure that the buttons slide well without constraints, enlarge the holes if necessary (There can sometimes be excess material left from 3D printing)

Then now assemble the buttons holder part using M1.2*5 screws. Do it for the left and right buttons

Connect buttons ground pins together. connect them to the display “K” ground pin. Wire each button with a different wire color, it will help you to to solder them to the correct ESP32 GPIO later.

Use hot glue on all welds, remember vibration is our enemy. Leave enough length for your cables as you will have to solder them to the esp32 located in the other part of the box

3.2 Display assembly

put the display and screw it. You can add hot glue to adjust the display and make sure it don’t move.

Here is how you will need to connect the display to the ESP32. Prepare the cables on the display, but don’t solder them now to the ESP32. Again, leave enough length for your cables as you will have to solder them to the esp32 located in the other part of the box

3.3 Bottom part assembly

Place the power on/off switch and hot glue it.

Place the M8 30mm screw add regular glue at the top of the screw, then screw it.

insert Hot glue inside remaining space where the M8 head inserted.

3.4 Battery assembly

Take now your 18650 battery. Use a spot welder to add Nickel strips to your 18650 battery.

place your battery inside the box and add hot glue in order to get it stuck

follow this schem to add the Lithium battery charger.

You must now have something like that. Make sure the switch button is OFF during the following steps. You can also check now that you can charge the battery and can measure +5V at the 5V/GND pins of the Lithium battery charger board.

The 10K resistors from +/- will allow us to read the battery level using ADC. That’s clearly not the best way to get the battery level info, but remeber, this tutorial aims to create a simple and cheap version. It will gives you an estimation of the battery level.

3.5 GNSS assembly

Take your Mateksys M10Q. Prepare wires and solder them accordingly

3.6 SDCARD assembly

3.7 Wire to the ESP32

the sdcard reader module i used here is not exaclty the same as the one i gave in the parts list. This one is too big, but i had only this one when i wanted to reproduce the DIY device based on this tutorial, i did’nt want to purchase the required SDmodule just for that. Use the one provided before.
Or you can use an SDCard adaptor, yes it works…

Now solder your wires to the ESP32 related GPIOs. It is becoming quite ugly right? 🙂

Connect now the wires of the display and buttons to the ESP32

(Only after Point 4 and 5 have been completely done)

But before closing the box, you have to flash the board with the firmware. See Point 5. Firmware installation to do it.

Close the box and seal it with 6 M3 16mm screws. And also Glue the front panel. I printed it in yellow, but yellow is not mandatory 🙂

It must be working now… And it’s looking better when you don’t see what is inside.

4- Prepare your SDcard

More than 32GB partitions will not be recognized by the device. So make sure you are not using:
1- A bad no name SDCARD.
2- A partition more than 32GB. If your SDCARD capacity is more than 32GB, you will have to create a partition of 16 or 32GB and the extra space will be lost.

Format your SDCARD using FAT32 filesystem. Once it is done, your sdcard is empty and you can insert it into the device.

5- Firmware installation

Download this zip file containing the firmware and the tools to flash the board.

Version 1.2 – release date 2024/06/05
What’s new in version 1.2:

  • UTC time zone configuration
  • Temperature unit configuration (Celcius/Fahrenheit)
  • Get weather information based on your location and rotax main jet recommandation
  • Fix sector’s time bug and other small bugs

7 MB

5.1 Flashing on windows operating system

Unzip the content of the downloaded archive. USB Plug your ESP32 board to your computer. then launch the file “flash_firmware.bat”. You will be prompted to enter the COM number to communicate with the board. Enter it like this: COM6 (obviously if the board is communicating with another COM number, change it accordingly… don’t contact me because COM6 is not recognized).

Or you can enter directly the following command

esptool.exe --chip esp32 --port COM6 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 foxlap.DIY.bootloader.bin 0x8000 foxlap.DIY.partitions.bin 0xe000 boot_app0.bin 0x10000 foxlap.DIY.bin

Now Hard reboot the board. OK, now the device must be working…

5.2 Install a new firmware on an exising and running device

Start your foxlap device. then select the menu “WiFi transfer” then “Start WiFi“. If you did not set a wifi password, do it on the device by selecting “WiFi transfer” -> “Set wifi password” (your password must be 8 characters length minimum.

Once it is done and your device is running in Wifi mode, you must see “Wifi Data Transfer” on the screen with the name of the created hotspot. (FoxLAP_xxxxxx). On your computer, connect the wifi to this hotspot (be careful, passwords are case sensitive)

Then open the software GPXRender (available on this website). Click on “synchronize device”. If your are connected to the device, a window will popup. Go to the “Firmware” tab, then select the new firmware file and then click on “Flash”. You are now able to flash device without the need of dismounting it

6- First launch and configuration

On the first launch, you must get this screen. If it is not already done, create a FoxLAP account here
You need to enter your name, select a password, etc. Some characters are not allowed, so be careful. You’ll need to enter this information into the device, and screen space is limited, so I had to make choices about which characters were allowed or not.

Only these characters are allowed at this time: 0-9, a-z, A-Z, ! # $ % & ‘ ( ) * + , – . @ : ; =

What you will need to enter on first launch is shown in this video. The device will must be able to connect to the internet, that’s why you will have to enter Wifi credentials. You can have some issues with passwords containing special characters not supported by the device, in that case, you can share your connection via your mobile creating a hotspot with a password containing characters supported by the device.

If the connection is unsuccessfull, shutdown the device and restart to retry

Once the connection is successfull, the device will retrieve the settings stored on your account available at that page https://foxlap.com/mydevice.php

You will be able to change settings and also select/unselect available tracks on your device. Don’t select all tracks. Only select tracks from your country or the ones you will use. The more you select tracks, longer will be track detection. don’t forget to click on “Save Track selection” when you change selection.

And, on the device, go to the “Synchronize” icon, then click on “Update track databse“.

What to do if your track is not available on the device?

I recommand to create your own track using the provided tool available here https://foxlap.com/track_creation.php

Once the track is created, go to https://foxlap.com/mydevice.php then select your newly created track in “My own tracks” category, then “Save selection”.
And also on the device: go to the “Synchronize” icon, then click on “Update track databse“.

A few tips:


I will add some info/tutorials on how to use everything. But remember:
– There may be bugs. The DIY firmware is a fork from the dedicated board firmware, and i have not tested everything on this DIY version (i’m not using it, the dedicated board is way much better). i will probably install a Bug Tracking Tool here where you will be able to share your issues.
– i can’t predict how good will be the GNSS reception at your location. Here in France, the signal quality is very good. I will add also in the next coming version a way to select yourself SBAS PRNs.
– before heading out to ride on the track, turn on the device and make sure reception is good. You must see in the bottom bar at least 12 satelites and HDOP (horizontal dilution of precision – HDOP must be less than 1 and 0.7 is the ideal. here in France i often get 0.6). turn on the device, leave it still to ensure good and stable reception.

I have some requests regarding commercial distribution. No, you cannot sell this DIY version. Commecial use of this DIY vesion is not allowed.
If you want to become a reseller, contact me.

That’s all for the moment,
Renan BROQUIN

Quick update:

1- Exhaust gaz probe is ready 🙂 the lambda probe is under development

2- The device is now able to retrieve your local weather and calculate the optimal main jet for your rotax engines. The jetting is based on Atmospheric Thermodynamics Calculation. Feature coming soon in the DIY firmware… is it good ?

And the foxlap in action (PCB version)… because it’s a lot of boring tech things here, don’t forget to get fun:

33 thoughts on “DIY-Build Your FoxLAP device”

  1. Hello! I have followed you since the beginning of the project, I am interested in the dedicated board, to be able to connect sensors When will it be available? Greetings, you have done a great job!

  2. hola buenas tardes me interesa, me gustaria adquirir esta vercion, para poder hacerla para uso personal y experimentar en la electronica, saludos desde argentina

  3. Stumbled across your project, wow you have put a lot of work into this.
    The DIY version looks great .
    I started building something a year ago to check what my motor is doing but life keeps getting in the way. When time permits I am still modifying and improving.
    So far I have RPM with LED indicator, temp and GPS data.
    Watching with interest as your project evolves.

  4. This is something!!! Currently printing and waiting for a screen. Would it be simple enough to adapt code for an e-ink screen? I think on an outdoor track would actually be the best readable kind of screen. When will firmware available? Thanks.

  5. I `m waiting for last part of the tutorial. Thank you for your help. If you accept if you want I pay you some beers! Thank you!

  6. Flashing the firmware on esp32 works like a charm. I still have to do some welding, and then test the device on track. I’ ll be back soon with the review.

  7. He probado por fin el dispositivo y es realmente increible y fiable, no me esperaba tal precision .
    Gracias por compartir el gran trabajo que has hecho.
    Si que es verdad que hay algun bug pero el trabajo es excelente sigo esperando nuevas versiones de firmware !

    Gracias y genial trabajo.

  8. Thanks, I was waiting and checking your website every week since I found it, I will try the DIY with my pitbike.

    Thankyou so much 🙂

  9. Hola de nuevo! Los principales errores que he encontrado son relacionados con la tarjeta SD cuando cargas perfil o tracks, hay veces que genera un bug y se debe resetear por completo el dispositivo ( incluso formateando la tarjeta SD), tambien me ha pasado cuando exportas los datos desde el dispositivo via internet que tambien ha habido que formatear todo perdiendo las sesiones guardadas, por lo que recomiendo antes de subir los circuitos hacer una copia en el ordenador previamente para no perder las sesiones.
    Mejoraria el sistemas de dashboard haciendo posible subir las sesiones desde el pc ( que esta la opcion pero no se puede ejecutar) y no via internet desde el laptimer ( es mucho mas lento y poco fiable).
    Tambien daria la opcion de subir archivos al dashboard con el formato de Alfano para poder comparar vueltas con los demas pilotos, o a traves de GPXrender algo mas intuitivo que te permita guardar la vuelta rapida como en web para poder comparar mejor.
    Insisto todo esto son criticas constructivas, el aparato es lo mejor que puede haber a nivel casero, y seguire probandolo e intentando ayudarte.

    un saludo! nos vemos en instagram @pitbikezaragoza

  10. This weekend I’ve tested the device,.it’s magical, works flawless without any bug. It is very precise and accurate. The online dashboard is also great you can analize and compare the lap times. This is for real.the best laptimer ever done.

  11. Hello, thank you so much for sharing this tutorial with us! This device is so amazing!
    I got one fault, when I tried to record an own track. The device always shuts down and reboots again.

    Can you tell me on which pin no the RMP signal can be attached? Or is it possible to get the scetch of the programm to customize it more and more to my preferences?

    Thank you so much!
    Best regards
    Achim

    1. I can confirm this problem, could this be because you don’t have any tracks nearby? Because when you are around one track, the recording function is working.

    2. The solution is to create your own new track using map editor, then synchronize your device and Update Track Database. The explanation is you can’t drive on a track that does not exist into your device. It’s just like you try do drive a car but you don’t have the maps loaded on to your GPS device.

  12. Hi, excellent and fun to start playing around with the device.
    As many had said before great job, and I look forward to test it on track.

    It looks like I need the 38 pin esp32 borad since you use the GPIO0 pin for display RST. Would you consider change that pin assignment if possible to make it 30 pin board compatible for the simpler DIY version.

    Regards Johan

    1. hi johan,
      correct, maybe i will do it if i have time to focus again on the DIY version. i made this DIY version in January 2022 to start the development and see if i can get interesting results (the extra pins are interesting to add sensors). I dropped the development board for a dedicated board in may 2022.

      1. This issue is really a nonissue, it was just that I had some 30 pin boards at hand and no 38. Now I have to wait a few days for new boards. 🙂

        Would you consider releasing the DIY version as opensource. You could put whatever licensing limitations on it as you want to keep people from doing stuff you dont want with your work. Then we tinkerers can do these small tweaks and perhaps even contribute to your product.

        For my part I just want the accurate gps tracking features. Will run dual devices for engine monitoring until I can get hold of a “fancy” one 🙂

        Regards
        Johan

  13. You are amazing, every week you come up with another magic function. Do you think you can post the new firmware this week? We are heading to our race on friday early in the morning. Thank you in advance.

  14. Hi,

    Is there circuit protection for the 18650 battery? Reason I ask is I was thinking of going with a protected 18650 but those all have the protruding top; not flat top. Is it possible to amend the 3D drawing to allow for some extra millimeters to accommodate a sightly longer battery?

    Thanks,

    1. you are afraid about over-discharge? the PCB is dealing with this issue; but the DIY version is a (too) very simple version. you can modify the 3D design if you want to add extra circuitry.

  15. I’ve flashed the new firmware, it’s great that it can be flashed by wireless. What algorithm is it used to calculate the main jet? On my phone a have two applications, the free one gives me a value of 115. and the payed one gives 122. The new foxlap feature gives me a 118 value, so it’ somewhere in the middle.

  16. Today is June 8th. I built my first DIY device and have already upgraded to firmware 1.2. So far without a case and without a GPS sensor. But it’s already working and I’m very happy about it. I am looking forward to the opportunity to connect the RPM of the engine. By then, I’ll probably have made my own case for it and connected the GPS. Question: Is there any button anti-shattering in the program? I often get false positives when pressed.

  17. Hi,

    For the display, I don’t see the model you mention on the N.American version of AE. I only see this – https://www.aliexpress.com/item/32818052799.html?spm=a2g0o.productlist.main.1.5399581bWezmxC&algo_pvid=ab72c4be-7784-451d-b43c-45a3a3bd73ad&algo_exp_id=ab72c4be-7784-451d-b43c-45a3a3bd73ad-0&pdp_npi=4%40dis%21CAD%2118.43%2118.43%21%21%2113.12%2113.12%21%402101e9a217186835696836000e4562%2167306057772%21sea%21CA%212851139477%21&curPageLogUid=DzOdIqsqyMI0&utparam-url=scene%3Asearch%7Cquery_from%3A

    The dimensions are slightly different to the one you used. Will this cause an issue with the 3D-printing?

    The dimensions for my version:
    Outline Dimensions: 79.4*62.8*6.4mm
    Active Area: 71.74*38.46mm

    The dimensions for your version:
    Outline dimensions: 72.1*56.4*6.1mm
    Active area: 66*37MM

  18. Hi,

    I am going to use a 3D printing service as I don’t have a 3D printer. In the configuration page, I am offered options such as Supports (Enabled or disabled), Wall count (Default 2), Top Layers (Default 2), Bottom Layers (Default 2), Ironing (Enabled/Disabled). Do you know what choices I should make for these options?

    Thanks,

  19. Hello,

    Congratulations excelent project, it is the best project in its category that I have ever seen.

    I maked a working prototype, but FOXLAP only shows a maximum of 10hz (I’m using the Mateksys SAM-M10Q GNSS module).
    HDOP is always close to 0.7.
    The SAM-M10Q datasheet states up to 20Hz for GPS+Galileo or 18Hz for GPS only.

    Could you tell me what the problem is?

    It seems to me that in firmware 1.2 I lost the Glonass signal, I already did the configuration and it didn’t solve the problem.

    How export GPX file from the FOXLAP website to analyze the Hz?

    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *