Hi, I’ve been a lurker here for a while, first time posting. I’m Rowan Griffin from the JLR Driven team.
Also, essay alert!
Since the start of the season we’ve been working on a new electronics system and driver information display for our cars using an Arduino on the vehicle for sensors and motor control with a Bluetooth link to an Android phone for the driver display.
We started this project hoping that we could share the Android app with any other teams that would be interested, enabling a useful driver information display and data logging from a relatively simple and cheap Arduino and Bluetooth setup on any car. This is primarily a speculative post to see if there is interest in this - We know many teams have very well set up data logging etc, but we're also aware it's an area some teams struggle with and this app may help!
The app itself uses the phone’s GPS to track laps and give approximate lap times, as well as a map display to the driver showing a trail that the car has followed. Other views show available sensor data to the driver. The data displayed is dependent on what is being provided by the Arduino, but provisions for:
> Throttle position
> Temperature (intended as motor temp)
> Motor RPM
> Vehicle speed (calculated on the Arduino from wheel RPM & diameter)
These variables are logged in a .CSV file every 250ms on the Android device, as well as GPS position and the UTC timestamp.
The app should work on any Android phone running Lollipop or higher (5.1+) but we’ve only tested it on limited handsets so far (LG G3 and Nexus 5). The software isn't quite finalised yet, but there's a link to a development version below if anyone fancies taking a peek. We are (hopefully!) going to be running this on at least one of our cars for the second half of this season if anyone wants to take a look at a race.
6 Variable View:
4 Variable View:
Lap Breakdown View: (Will show a list of laps - hard to simulate stuck at a desk ;) )
6 Variable view with a load of nonsense randomised data being fed through it:
We have no user manual as such yet, but the buttons do the following (left-to-right):
Connect to Bluetooth device (must be named in settings)
Activate Launch Mode (this only works if you have defined an observer first by tapping on the map view)
For our lap timings, it's required to set an 'observer' point somewhere inside the race track. To do this go to the map view and tap on the map, it will drop a pin, tap it again to confirm observer and a box appears asking if the race is clockwise or anti-clockwise.
Launch Mode is for when the car is on the start line, it waits for 20% throttle, at which point it will trigger Race Start, lap timing and averaging.
Mandatory Disclaimer: This software is not in any way associated with Jaguar Land Rover and is provided ‘as is’ without warranty, implied or otherwise. There is no guarantee of support or updates.
Download Link:Driven Bluetooth v1.5
Having said that, we will aim to be as helpful as possible with any issues and questions etc people have. We also have a few more ideas for features to add to the app and are open to feedback! Please submit any bugs or crashes you find in this thread with as much detail as you can, including your device type, the version of Android you are running and what you were doing when the app crashed.
To support this from the vehicle side:
An Arduino Uno and HC-05 or HC-06 Serial Bluetooth module will be suitable for most applications and from Hobby Components cost less than £15. The Bluetooth aspect may sound scary, but using the HC-05/06 module it is quite literally plug and play. There are also hundreds of examples on google.
Hobbycomonents Uno: http://hobbycomponents.com/boards/522-hobby-components-arduino-compatible-uno-r3-and-usb-cable
Bluetooth Module: http://hobbycomponents.com/wireless/432-hc-05-master-slave-bluetooth-module?search_query=bluetooth&results=10
There are cheaper options available if you fancy ordering from China, but them actually working can be hit and miss!
The idea behind this is to keep the vehicle electronics as low cost and simple as possible. With loads of online resources, the Arduino is one of the most accessible microcontrollers to program, and a very good platform for learning with. I know they are quite common in Greenpower cars!
Communication with the Android app is one-way which means that there is no possibility of sending commands to the Arduino as regulation prevents us from using a battery powered device as a control system. Communication is achieved using 5-byte data packets and a comprehensive ruleset for maximum efficiency. As a result of this any values below 127 are sent with two decimal places (i.e. 123.45) but values over 127 are sent as integers (i.e. 130). Each data packet includes an 'id' to tell the app which variable it is sending. We will provide a C code function for the Arduino (or a library if we have time!) that handles the low-level packet building - sending data to the Android is done through one simple function call.
We may be jumping the gun a little posting this before we've run it on a car, but the idea of sharing this has driven a lot of the design decisions - responses to this, or lack thereof will influence the design in the future!