GithubHelp home page GithubHelp logo

marleau / daq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chiuwe/daq

0.0 2.0 0.0 1.6 MB

car data acquisition

License: GNU General Public License v3.0

Python 27.45% JavaScript 55.66% HTML 12.09% CSS 4.81%

daq's Introduction

DAq

DAq uses a Raspberry Pi 3 and various sensors to collect car performance data.

The data points collected are:

  • Engine load (%)
  • Coolant temperature (°C)
  • RPM (RPM)
  • Speed (MPH)
  • Intake temperature (°C)
  • MAF (grams/sec)
  • Throttle position (%)
  • Timing advance (° before TDC)
  • Acceleration (Gs)
  • GPS position

Hardware Components

  • Raspberry Pi 3
  • MMA8451 Accelerometer (I2C)
  • Ultimate GPS Breakout V3 (miniUART)
  • OBDII ELM327 (Bluetooth)

Raspberry Pi 3 Setup

Additional Packages

# OBD python library
sudo pip install obd

# I2C support
sudo apt-get install python-smbus

# GPS support
sudo apt-get install gpsd gpsd-clients python-gps

Changes to sudo raspi-config

  • Enable I2C
  • Enable Serial

Setup Bluetooth OBDII

bluetoothctl
power on
agent on
scan on
# Look for OBDII <MAC>
pair <MAC>
trust <MAC>
quit

Setup Serial GPS

Remove reference of serial0 from /boot/cmdline.txt:

dwc_otg.lpm_enable=0 console=serial0,1152 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

to:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

edit /etc/default/gpsd:

START_DAEMON="true"
USBAUTO="false"
DEVICES="/dev/ttyS0"
GPSD_OPTIONS="-n -G"

for older Pi's please refer to link for setup: https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/pi-setup

Add the following lines to /etc/rc.local

# Needed to connect bluetooth to serial port
# 00:1D:A5:00:17:08 is the MAC address of the OBDII bluetooth device
# & is needed to fork this call because it doesn't return (blocking call)
sudo rfcomm bind rfcomm0 <MAC> &

# Setting up I2C
sudo chmod 666 /sys/module/i2c_bcm2708/parameters/combined
sudo echo -n 1 > /sys/module/i2c_bcm2708/parameters/combined

Reboot Pi:

sudo reboot

If your GPS has a fix then running cgps -s should result in some GPS relate data.

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.