Tuesday 26 November 2019

GPS & IMU Data Expansion

Following on from the DIY CAN-Bus data logger, I wanted to continue and build the next module in the data-logging chain. I wanted to add a module which could acquire GPS data at high data rates so that it would be useable for track data analysis. The GPS data logged via my mobile phone on previous trackdays had shown promise but the update rate (1 Hz) was too slow and the accuaracy to low to really make the data useful for track use.

I decided to use a GPS breakout board that is capable of 50Hz update rates.
I also added an IMU module to the board to try and see if any useful data on accelerations, pitch & roll angles could be extracted. If not, the module could be disabled or removed in a future revision.

Similar to the datalogger module, the GPS/IMU module uses a Teensy 3.2 controller for the data processing. No data is stored in the GPS/IMU module. The data is collected from the sensors, assembled into CAN messages & transmitted on the bus to be picked up and recorded by the datalogger module.

The module is a bit larger than the datalogger as I have used breakout boards for the GPS & IMU rather than mount the chips directly. A 3v coin cell battery is included to allow 1s hot starts of the GPS module. That way a fix can be acquired very soon after the module is powered on.




Data is currently polled at 20Hz and passed directly to the CAN Bus. This is to simplify the software & prove out the concept. If everything works and the data looks useful I would like to add a Kalman filter to the data.

The pillion seat replacement cover currently installed on the bike makes an ideal mounting point for the GPS antenna. The antenna is mounted on the base plate but underneath the outer fairing. This way the antenna is hidden from view but has a direct line of sight to the sky for optimum reception.



Having tested the unit, the GPS works very well. Even without filtering, the data rate seems fast enough to get relatively stable position & speed data. With the hot start function, position data is available as soon as the datalogger is ready to start.

The IMU module has not been quite as useful. The unit is a Bosch BNO055. While standing still the orientation looks quite good. However, once the bike is moving, accelerating, turning, the unit seems to lose track of which way is up and so the pitch, roll & yaw angles don't make any sense. There is a possibility that I may need to mount the module more securely so that it is held in a stable position but is isolated from spikes in acceleration caused by bumps in the road.

No comments: