# OttoTrail

> OttoTrail is an EV trip logger built for the Tata Punch.ev. It reads the car over an OBD adapter, turns the gaps between snapshots into drive and charge legs priced at the real cost of the energy in the battery, and scores the health of the battery pack.

A project by [AshterNext](https://ashternext.com), a software development studio in Nashik, Maharashtra, India. Project write-ups are written in the first person by the founder, Malik Bagwala.

## Overview

- **Page:** https://ashternext.com/p/ottotrail
- **Source code:** https://gitlab.com/MalikBagwala/ottotrail
- **Tech stack:** Flutter, Dart, TypeScript, GraphQL, PostgreSQL
- **Built by:** AshterNext (https://ashternext.com)

## Write-up

### Features

#### 🔌 Reads the Car over OBD

OttoTrail talks to cheap ELM327 adapters over Bluetooth Classic or BLE. The Punch.ev's standard OBD responder only answers with zeros, so the app queries Tata's own battery and vehicle modules over UDS for state of charge, battery health, pack temperature, odometer, voltage, current and cell readings.

![OttoTrail Diagnostics](https://images.ctfassets.net/ij35tfpwroqj/1vUV8vVb00xo4STEmI3VvK/1eb1e916f0c3af817d0db6106d5918c0/ottotrail-obd.webp)

#### 🛣️ Trips, Legs and Real Costs

Each snapshot records the car's charge and odometer. The gaps between snapshots become drive and charge legs, each priced at the average cost of the energy in the battery, and trips group legs together. Insights sums it all up.

![OttoTrail Trips](https://images.ctfassets.net/ij35tfpwroqj/5auVFIwjL7Y8SRHb2mpmBv/e016cd4d2421dfbc32febc677ef59e0f/ottotrail-trips.webp)

#### 🔋 Battery Health Score

The Battery tab scores the pack from 0 to 100 using battery health, cell balance, temperature and charging habits, and explains in plain sentences what the numbers mean.

![OttoTrail Battery and Insights](https://images.ctfassets.net/ij35tfpwroqj/xvR1TvTrIfLbNYFtyNyY7/4461c88d6526c41dba4691cbd7ae6e6f/ottotrail-battery.webp)

#### 🛡️ Read-only by Design

Only reads ever reach the car. A command policy blocks clearing codes, writes, resets and session changes, because switching the battery module into an extended session has been found to cut regenerative braking on the road.

#### 🎙️ Recordings and an Emulated Trip

Every connection can be recorded as JSON Lines and decoded again later, so new signals can be tested against an old drive without the car. A built-in emulator replays the real car's answers, including a full Pune to Vadodara trip with charging stops.

## About AshterNext

AshterNext is a software development and digital solutions studio based in Nashik, Maharashtra, India, founded by Malik Bagwala. We design and build customer-first software products (apps, websites, SaaS platforms and design systems) that are easy to use and good to look at, and that help people and brands reach their business goals. We lead with product design and an understanding of the user, then pick the technology that delivers the best solution for the business.

Contact: [malik@ashternext.com](mailto:malik@ashternext.com) · More projects: https://ashternext.com/index.md
