Blog · 2026-11-10
Can I modify my car so that the OBD II port doesn't supply any power unless the car is turned on?
Stefan Bogdanescu
Founder & Senior Architect
Can I modify my car so that the OBD II port doesn't supply any power unless the car is turned on?
Many vehicles provide a constant 12V feed to the OBD-II diagnostic port, even when the ignition is off. This design allows for features like keyless entry or security system monitoring. However, it creates a significant problem for developers building IoT projects: if your device draws current while sleeping, it will eventually drain the battery. You don't want to wake up to a dead car in the morning because you left a BLE scanner plugged into the port overnight.
The goal is straightforward: isolate the power supply so that the scanner only receives voltage when the vehicle's ignition is active (or at least when the accessory circuit is live). There are three primary approaches to solving this, ranging from hardware isolation to firmware-based power management.
Hardware Isolation with a Power Relay
The most robust solution for a permanent fix involves adding a relay between the car battery and your scanner. You can wire the scanner's input to the OBD-II port's Pin 16 (Constant Battery) only after verifying that Pin 40 (Ignition Switched) is active.
In this configuration, you use a small automotive-grade SPDT (Single Pole Double Throw) or SPST relay controlled by the car's ignition signal. When the key turns to the "ACC" or "ON" position, voltage appears on Pin 40. This triggers the relay coil, closing the switch and allowing battery power from Pin 16 to flow to your Veepeak BLE scanner.
When the car is off, Pin 40 has no voltage, the relay remains open, and your scanner receives zero volts. This effectively cuts power completely, eliminating parasitic drain. The downside is that you must physically splice into the OBD-II connector or run a separate harness to access Pin 40. If you prefer not to cut wires inside the car's dashboard, you can source a universal OBD-II pigtail adapter that exposes these specific pins and mount it externally near the battery, then wire the relay logic there.
Firmware-Based Sleep States
If modifying the wiring feels too invasive or risky for future diagnostics, consider whether your scanner hardware supports deep sleep modes. The Veepeak BLE series generally includes a wake-on-connection feature, but they do not typically support "wake-on-voltage" via GPIO pins directly exposed on the standard OBD header in a way that allows automatic power cycling without a physical switch or relay.
To achieve this purely through software, you would need to write a custom firmware stack (likely using Arduino/ESP32 SDK) that monitors the VIN pin (Pin 16). However, most cheap BLE scanners lack the ADC capability on their MCU to read external voltage drops reliably enough to trigger a sleep state automatically. Even if they did, the wake-up latency might be too high for real-time telemetry collection immediately after starting the engine.
The "Always-On" Compromise
If you cannot physically modify the wiring, you must accept that the device will see constant 12V. In this scenario, your application logic becomes critical. Your scanner firmware should enter a deep sleep state (e.g., Sleep() or DeepSleep() in ESP-IDF) as soon as it finishes its initial connection handshake.
When the car is turned off:
- The OBD-II port still supplies 12V.
- The scanner wakes up briefly to check for a valid CAN bus or UART heartbeat from the ECU.
- If no heartbeat is detected (indicating the car is off), the MCU immediately transitions to deep sleep, drawing microamps rather than milliamps.
This approach requires careful calibration of the sleep timeout. If the timeout is set too short, you might miss data collected right after starting the engine. If it's too long, you risk waking up unnecessarily during a parking lot where the car is off but the system is still initializing.
Long-Term Considerations for Mechanics
While splicing into the OBD-II port seems permanent, mechanics often rely on the standard 16-pin layout. If your modification involves cutting the main power line or adding bulk relays inside the connector housing, it can interfere with future diagnostic scans performed at a dealership. A cleaner implementation is to install the relay logic outside the vehicle entirely, using a separate harness that taps into the existing OBD-II pins without altering the factory wiring integrity.
For your specific use caseâtracking fuel levels and tire pressureâthe hardware isolation method offers the highest reliability. It ensures zero power draw when the car is parked, preserving battery health indefinitely. If you choose the firmware route, ensure your sleep logic handles edge cases gracefully so the device doesn't accidentally wake up due to transient voltage spikes in the parking lot.