Hoping that someone can help me.
I'm looking to create a lap timer for a go-kart. Yes, i know it's been done before, however i'm trying to make the display more informative and intuitive for the driver.
My background is design engineering, with limited coding experience. I've been involved for many years in various motorsports categories (up to Formula 3), but had most success as the Team Engineer for a 2 time British Championship winning endurance kart team. My passion was the analysis of data, from various kart data logging systems, being able to give the driver advice on how to change their driving style to reduce lap times.
I'm after advice on whether what i want to do is possible and what components i need to put a proof-of-principal system on a kart to try, with a leading UK kart engineering company.
The system needs to have the following capability:-
Setup screen
- track selection
- number of sectors
- driver selection
- tyre circumference
- session type
On-track screen
- record both lap & sector times (pickup from magnetic loop in the track)
- record wheel speed & distance travelled (@10Hz) (again using a reed switch or hall effect sensor on the wheel rim, with tyre circumference)
- log times for each outing (stored on an SD card)
- display last completed lap time
- display current sector & time delta vs fastest same sector
- display time delta via sum of all fastest sectors
Now, sometimes the S/F line has a magnetic loop between it and the pit exit on some tracks. Capability required to delay track pickup, ie: prompt on screen for driver to press before crossing the line or time delay after wheel speed increases. Open to offers on this one,
When on track, the display will look like the attached picture.
If current lap sector times are quickest, then the delta numerical value is green, if not then red.
Same for the lap time delta vs the theoretical fastest lap (all fastest sectors).
In terms of "hardware", this is the list i'm putting together.
Adafruit STM32F405 Feather Board (maybe overkill?)
DS3231 Precision RTC
Lipo 3.7v 2500mAh
Adafruit Micro Lipo board (charge via USB-C)
2 x hall effect/reed switches (magnetic loop pickup & wheel speed sensor)
4.3" 4D Display (GEN4-ULCD-43DT-AR) or maybe something slightly smaller
Pressure/Humidity/Temperature sensor
Ideally, all the electronics will be housed behind the display on the steering wheel. Only 2 leads to each of the sensors will come out of the display housing. I chose a Feather board to keep everything as compact as possible. I'm open to using another micro controller board if it would be more beneficial.
When the driver completes the session, the idea is that he/she can touch the screen to complete the session. Session data (in CSV format) can then be downloaded with a USB cable to a PC.
Data per lap:
TRACK, DRIVER, SESSION, LAP NUMBER, LAP TIME, SECTOR 1 TIME, SECTOR 2 TIME, SECTOR 3 TIME, TEMP, PRES, HUMIDITY.
Also, speed vs distance per lap (10Hz)
TRACK, DRIVER, SESSION, LAP NUMBER, TIMESTAMP, SPEED, DISTANCE TRAVELLED
I've seen numerous projects based on Arduino boards, so i'm pretty sure it's possible, but want to do a sanity check with experts before embarking on it...
Any help would be appreciated, thank you in advance.
James
Lap Timer project - Help Required Please
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- tg7384
- Posts: 2
- Joined: Tue May 24, 2022 10:06 am
Lap Timer project - Help Required Please
- Attachments
-
- Untitled.JPG (570.98 KiB) Viewed 303 times
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Lap Timer project - Help Required Please
What you want is generally possible, but each feature will be its own project.
As a general rule of thumb, it's usually a good idea to start with the output system and work backwards from there. The output is a natural test system for the inputs and calculations, and using the output to test development will make it easier for you to tune the output to what you want for the final system.
As a general rule of thumb, it's usually a good idea to start with the output system and work backwards from there. The output is a natural test system for the inputs and calculations, and using the output to test development will make it easier for you to tune the output to what you want for the final system.
- tg7384
- Posts: 2
- Joined: Tue May 24, 2022 10:06 am
Re: Lap Timer project - Help Required Please
Really appreciate your repose Mike.adafruit_support_mike wrote:What you want is generally possible, but each feature will be its own project.
As a general rule of thumb, it's usually a good idea to start with the output system and work backwards from there. The output is a natural test system for the inputs and calculations, and using the output to test development will make it easier for you to tune the output to what you want for the final system.
I will be taking the project step-by-step as you advise.
Quick question for you, if i forget about the HC-12 transceiver, but want wifi/bluetooth capability to download the data after he session, would you think that the Adafruit HUZZAH32 – ESP32 Feather Board, with Adafruit Adalogger wing would be a good starting point, with a 3.7v Lipo?
The Nextion display needs a 5v supply, but i'm thinking a VERTER 5V USB Buck-Boost - 500mA from 3V-5V / 1000ma from 5V-12V would do the trick?
Any advice would be welcomed, thank you.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Lap Timer project - Help Required Please
As a general principle, WiFi is easier to use than the protocol now known as Bluetooth Classic.tg7384 wrote:Quick question for you, if i forget about the HC-12 transceiver, but want wifi/bluetooth capability to download the data after he session, would you think that the Adafruit HUZZAH32 – ESP32 Feather Board, with Adafruit Adalogger wing would be a good starting point, with a 3.7v Lipo?
BT-C is openly unfriendly to hackers. Among other things, devices have to transmit a Vendor ID that cost around $5k/year last time I checked. A dozen years ago a company offered to let hackers use a subset of their VID space, and the BT Working Group invalidated their license.
The protocol named Bluetooth Low-Energy (BLE) is a separate and incompatible protocol managed by the BTWG, and is much more friendly to independent developers. It doesn't require VIDs or dictate what hardware is allowed to do. The down side is that BLE is slow (the upper limit is a few tens of kilobytes per second), and BLE doesn't have specific device support on any device. In general, you need a program that knows how to detect, connect to, and interpret the data it gets from a BLE device. Some more or less general purpose apps out there, but if you want specific features you'll probably need to write your own code.
WiFi is a generic network protocol with a huge amount of existing software support. In most cases WiFi ends up being a connection layer for HTTP, the transport protocol for the Web, and pretty much every networked device that humans touch these days has a web browser. WiFi is fast and can carry large amounts of data wihout any trouble.
Our AirLift ESP32 coprocessors make adding WiFi support to projects relatively easy:
https://www.adafruit.com/product/4201
https://www.adafruit.com/product/4264
You can also program ESP32 boards directly, but it can be a little more difficult to keep your main code and the WiFi code from interfering with each other. Among other things, the ESP32 runs a simple OS that keeps all the radios running, and which will force a reboot if it can't swap over to the radio firmware often enough. All of that lives in ROM, and there's now way to change it.
That depends on the kind of battery you plan to use.tg7384 wrote:The Nextion display needs a 5v supply, but i'm thinking a VERTER 5V USB Buck-Boost - 500mA from 3V-5V / 1000ma from 5V-12V would do the trick?
Buck-boost converters like the Verter are for applications where your battery voltage can be above or below the required output voltage. A 4xAA battery will start arround 6.8V with brand-new cells, drop quickly to about 6V, then end up at 3.6V by the time the AAs are 95% discharged, for instance. That's where a 5V system will need both boost and buck capability.
If you plan to use LiPos, either the boost or buck section will be unnecessary. Single LiPos start at 4.2V, drop to 3.7V, then fall to about 3.3V by the time they're 95% discharged. All they need in a 5V system is a boost converter like a PowerBoost:
https://www.adafruit.com/?q=PowerBoost&sort=BestMatch
The next step up is a 2S LiPo battery (two 3.7V cells in series -- do NOT try to build one yourself, they tend to catch fire) that starts at 8.4V from a full charge, drops to about 7.4V, then falls to about 6.6V when 95% discharged. All you need there is a buck converter.
We don't carry 2S batteries or higher, but they're common in RC devices. If you choose to get one, get a charger from the same source. Under normal operating conditions LiPos hug the line between 'energy storage device' and 'incendiary device', so they require specific and tightly-constrained control of their charge/discharge cycle. That control is usually built into devices that have a LiPo, but the DIY world strips that layer of protection away. That means it's important to know and respect the fact that LiPos are much less forgiving than other kinds of battery.
Please be positive and constructive with your questions and comments.