Skip to content

Particle Photon based 12v car battery monitor. Useful for alerting you that the battery is becoming discharged.

License

Notifications You must be signed in to change notification settings

MBadberg/battery-monitor

 
 

Repository files navigation

Car Battery Monitor

Particle Photon based WiFi 12v car battery monitor. The idea is to monitor the battery voltage in order to get early warning that the battery is becoming discharged. The project is intended to be directly connected to the battery via its main terminals.

I used IFTTT to send notifications to my phone for the low battery events generated by the program.

Another method I used to collect data was ThingSpeak using a Particle webhook. See webhook-thingspeak-template.json for a template which only needs your ThingSpeak API key and Particle device id adding.

The program uses the deep sleep mode of the Photon between voltage measurements, in this state the current draw from the battery is ~1mA. It takes about 15 seconds to wake-up, connect to WiFi, take a measurement and send an event containing the measured voltage. With a sleep time of 1 hour, a 1mA current should have negligible impact on charge state of the battery in a car which is driven every day.

Over the air (OTA) firmware update is supported by the node.js script ota-update.js, which when the Photon wakes, sends an event to prevent it going back to sleep. Updated firmware can then be flashed using Particle Dev or Particle Build. To run the script add a file auth.js containing:

module.exports = {
    username: '<your email>',
    password: '<password>',
    device: '<deviceId>',
    token: '<auth token>'
};

Circuit

circuit diagram

The 20V Zener and the ratio of R1/R2 means that the voltage seen by the Photon at A0 cannot exceed 1.8V.

Completed Project

project

Installation

The project needs to be installed somewhere near the engine bay where the WiFi signal will not be blocked the body of the car. On my car a good place was behind the front bumper (plastic).

BOM

  • Particle Photon
  • Traco Power TSR-1-2450 DC/DC Step-Down Converter
  • 1N4747 Zener Diode, 20V, 1 Watt
  • 1000uF 35V Electrolytic Capacitor
  • 0.1uF 50V Ceramic Capacitor
  • 150uH RF Choke, 4.2Ω, 175mA max
  • 1KΩ Resistor
  • 220KΩ Resistor
  • 22KΩ Resistor
  • In-line fuse holder and 250mA fuse
  • 2 core cable (2 Meters)
  • Solder tags (6mm ID) x 2
  • Waterproof box (with silicone rubber seal)
  • Silicone sealant (for cable exit)

References

I used the following to design the components which provide protection from noise in the car electrical system caused by the alternator and hopefully more severe events like jump starting.

About

Particle Photon based 12v car battery monitor. Useful for alerting you that the battery is becoming discharged.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 72.6%
  • JavaScript 27.4%