Skip to content

BlueAndi/RacingLapTimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Racing Lap Timer

A racing lap timer, based on a laser sensor.

License Repo Status Release Build Status

RacingLapTimer

Motivation

For line follower competitions a racing lap timer shall be used. It doesn't only measure the lap time, it shows it nice via web interface, inclusive automatically result table generation.

Initial Startup

If the system starts up the first time, it will spawn a wifi access point with the SSID RacingLapTimer. Connect to it, it will request a password (default: "let me in"). Configure there the wifi network SSID/password to which the system shall later connect.

After configuration, the system will try to establish a connection. If the connection is not successful, the access point will be spawned again. Otherwise the credentials will be stored to persistent memory and loaded the next time automatically.

Electronic

Schematic

Schematic files can be found here. These have been developed using KiCAD 6.

MCU

MCU

  • Digital signal of laser sensor is connected to D1/GPIO_5 of the Wemos D1 Mini.
  • Power is supplied by USB 5V directly to the Wemos D1 Mini

Laser Power Supply

Power Supply

  • Laser module Vcc shall be 3.3V, because MCU is only 3.3V tolerant.
  • THT or SMD resistor options are provided. DO NOT PLACE ALL RESISTORS.

Laser Sensor

Power Supply

  • Pin header for Waveshare Laser Sensor.

PCB

v1.0

PCBv1.0

  • It is recommended to give the Laser Sensor some kind of support in order to protect the pin header from breaking. The height of the support depends on the pin headers used.

Software

Preparation

Install the serial driver for the Wemos D1 Mini board. Find the latest drivers here: https://www.wemos.cc/en/latest/ch340_driver.html

IDE

The PlatformIO IDE is used for the development. Its build on top of Microsoft Visual Studio Code.

Installation

  1. Install VSCode.
  2. Install PlatformIO IDE according to this HowTo.
  3. Close and start VSCode again.
  4. Recommended is to take a look to the quick-start guide.

Build Project

  1. Load workspace in VSCode.
  2. Change to PlatformIO toolbar.
  3. Project Tasks -> Build or via hotkey ctrl-alt-b

Update of the device

Update via usb

  1. Connect the Wemos D1 Mini board to your PC via USB.
  2. Build and upload the software via Project Tasks -> Upload.
  3. Build and upload the filesystem via Project Tasks -> Upload File System image.

Used Libraries

  • Arduino - ESP framework.
  • WifiManager - ESP8266 WiFi Connection manager with fallback web configuration portal.
  • WebSockets - A WebSocket Server and Client for Arduino based on RFC6455.

System Context

SystemContextDiagram

Issues, Ideas And Bugs

If you have further ideas or you found some bugs, great! Create a issue or if you are able and willing to fix it by yourself, clone the repository and create a pull request.

License

The whole source code is published under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.