GithubHelp home page GithubHelp logo

gasplund / esp32-trip-meter Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 187 KB

A system for tracking trip data on an ESP32

Home Page: https://gasplund.github.io/esp32-trip-meter/

C++ 92.81% C 7.19%
arduino esp32 fuel-consumption mpg

esp32-trip-meter's Introduction

ESP32 Trip Meter

An ESP32-based trip meter primarily made for measuring fuel efficiency.

Background and motivation

I started this project in search of a solution for measuring the fuel efficiency on my '97 Volvo 940. The only real solution I found prior was the MPGuino, but I quickly realised it wasn't for my needs. What I wanted was to have a solution that was as clean as possible, so having a separate display that I had to mount somewhere was out of the question.

Instead, I built it around a standard Bluetooth OBD-II interface, which would allow any device to get information and display it in any way they want. This was perfect for my use case, as I wanted to display all the information on my phone or Android stereo via the Torque app.

Features

  • Measure fuel efficiency (L/100km)
  • Measure velocity (Km/h)
  • Measure fuel injection speed (L/h)
  • Display data through an emulated ELM327 (OBD-II) interface

Connections

  • The negative side of the injector is connected to corresponding input on the board
    • NOTE: Must be a saturation-type injector (read below)
  • A pulsed signal of the vehicle speed sensor (VSS) is connected to VSS+
    • Variable reluctance (VR) speed sensors do not seem to work

Power and ground

The ground reference and power is currently given by the USB port on the ESP32. This may change later due to being a limiting factor.

Injector types

This project is mainly made to support saturation-type injectors. If your engine uses other types of injectors, such as peak-and-hold injectors, this project will not work.

The easiest way to check this is to measure the resistance of an injector; If it has a resistance of around 12Ω, it is a saturation-type injector. If it has a resistance of around 2-3Ω, it is likely a peak-and-hold injector.

Also note that injectors that are connected for batch injection may be connected in parallel, and may in some cases display a resistance that is lower than normal.

The reason why peak-and-hold injectors will not work, is that they work differently from saturation injectors. While saturation injectors simply open while the signal is active, a peak-and-hold injector, like its name suggests, sends a high voltage signal which forces the injector open (peak). After that, a lower-voltage signal (normally around 12 volts) is pulsed through the remainder of the opening time (hold).

Platform compatibility

Since the project currently uses ESP32-specific platform code a lot, it would be difficult to port to using normal Arduino implementations. It may be possible to port it to ESP8266 devices, but they would need a discrete Bluetooth module.

esp32-trip-meter's People

Contributors

gasplund avatar

Stargazers

 avatar

Watchers

 avatar  avatar

esp32-trip-meter's Issues

Esp32 crashes after couple seconds of reading

Im currently Testing this in on my old but trusted bmw r1200gs from 2004. I'm printing the readings via the Logstream function. Its looks like its reading the injector fine. When i give gas the L/h starts rising. But after about 1 minute of reading it looks like the esp32 crashes and i have to cycle the power to get it to start logging again. Any thoughts? I'm using the esp32 wroom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.