Skip to content

๐ŸŽ๏ธ Arduino-based BMW OBD2 RGB tachometer that transforms real-time RPM data into stunning LED visualizations with rainbow effects, redline warnings, and customizable brightness controls. Perfect for car enthusiasts and makers!

License

Notifications You must be signed in to change notification settings

Arsalan134/BMW-OBD2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš—โšก OBD2 RPM LED Visualizer

Arduino C++ BMW License

Transform your car's RPM data into a stunning visual experience! ๐ŸŒˆ

๐Ÿš€ Features โ€ข ๐Ÿ“ท Demo โ€ข ๐Ÿ”ง Installation โ€ข โš™๏ธ Configuration โ€ข ๐Ÿค Contributing


๐ŸŒŸ What is This?

Ever wanted to see your engine's RPM in real-time with a cool LED strip? This project reads OBD2 data directly from your BMW and creates a dynamic RPM tachometer using WS2813 addressable LEDs!

๐ŸŽฏ The Magic

  • Real-time RPM visualization ๐Ÿ“Š
  • Color-coded performance zones ๐ŸŒˆ
  • Warning blinks at redline โš ๏ธ
  • Plug-and-play OBD2 connection ๐Ÿ”Œ

๐Ÿ“น Demo

๐ŸŽฌ See It In Action!

https://github.com/Arsalan134/BMW-OBD2/blob/master/๐Ÿš™%20bmw_rpm.mp4

Watch your BMW's engine come alive with real-time RPM visualization!

๐ŸŒˆ What You'll See:

  • Smooth Color Transitions: Yellow to red gradient based on RPM
  • Real-time Response: Instant LED updates as engine speed changes
  • Warning System: Dramatic red blinking at high RPM
  • Rainbow Standby: Beautiful flowing colors when engine is off

๐Ÿ“Š Performance Zones:

๐ŸŸก Idle Zone (700-1500 RPM)    โ†’ Yellow/Green LEDs
๐ŸŸ  Cruise Zone (1500-3000 RPM) โ†’ Orange LEDs  
๐Ÿ”ด Power Zone (3000-5000 RPM)  โ†’ Red LEDs
โš ๏ธ Danger Zone (5000+ RPM)     โ†’ Blinking Red Warning!

๐Ÿš€ Features

  • ๐ŸŒˆ Real-time RPM Visualization: Dynamic LED strip that fills up based on engine RPM
  • โš ๏ธ Redline Warning: Aggressive blinking when RPM exceeds safe limits
  • ๐Ÿ”† Adjustable Brightness: 4 brightness levels controlled by a physical button
  • ๐ŸŽฏ BMW Optimized: Pre-configured RPM ranges for BMW engines
  • ๐Ÿ”ง Dual Environment: Test mode for bench testing without a running engine

๏ฟฝ Installation

๏ฟฝ๐Ÿ› ๏ธ Hardware Requirements

Component Specification Purpose
Arduino Uno ATmega328P Main controller
OBD2 Shield/Module CAN Bus compatible Read vehicle data
WS2813 LED Strip 9 LEDs (configurable) Visual display
Push Button Momentary switch Brightness control
Resistors 10kฮฉ pull-up Button debouncing

๐Ÿ”Œ Wiring Diagram

Arduino Uno    โ†’    Component
Pin 3          โ†’    LED Strip Data (WS2813)
Pin 7          โ†’    Button (with 10kฮฉ pull-up)
5V             โ†’    LED Strip VCC
GND            โ†’    LED Strip GND + Button GND
OBD2 Shield    โ†’    Stacked on Arduino

๐Ÿ“Š RPM Mapping

The LED strip responds to different RPM ranges with stunning visual effects:

๐Ÿงช Test Environment (Bench Testing)

  • Idle Range: 700-2000 RPM โ†’ Smooth yellow-to-red gradient
  • Warning Zone: 2300+ RPM โ†’ Aggressive red blinking
  • LED Count: 9 LEDs for precise visualization

๐Ÿ Real Environment (In-Vehicle)

  • Operating Range: 3000-5000 RPM โ†’ Dynamic color mapping
  • Danger Zone: 5200+ RPM โ†’ Critical warning blinks
  • Engine Off: <100 RPM โ†’ Rainbow standby mode

๐ŸŽฎ Controls

  • Short Press: Cycle through 4 brightness levels (5, 50, 150, 255)
  • Long Press (1s+): Reserved for future features
  • Auto-Off: LEDs turn off when engine is stopped (<100 RPM)

๐Ÿš€ Quick Start

1. Environment Setup

# Install PlatformIO (if not already installed)
pip install platformio

# Clone the repository
git clone <your-repo-url>
cd BMW-OBD2

2. Choose Your Environment

Edit include/main.h:

// Comment this line for real BMW testing
#define isTesting  // For bench testing

// Uncomment for real vehicle use
// #undef isTesting

3. Build & Upload

# Build the project
pio run

# Upload to Arduino
pio run --target upload

# Monitor serial output
pio device monitor

4. Installation

  1. Connect your Arduino to the BMW OBD2 port
  2. Mount the LED strip in your desired location
  3. Secure all connections and test functionality

๐ŸŽจ Visual Modes

๐ŸŒˆ Rainbow Mode (Standby)

When the engine is off or RPM is below threshold, enjoy a mesmerizing rainbow pattern that flows across the LED strip with dynamic brightness variations.

๐Ÿ“ˆ RPM Visualization Mode

  • Yellow Zone: Low RPM - Efficient driving range
  • Orange Zone: Medium RPM - Performance driving
  • Red Zone: High RPM - Maximum performance
  • Blinking Red: Danger zone - Protect your engine!

โš™๏ธ Configuration

๐Ÿ”ง Customize RPM Ranges

// Edit in main.h
#define RPM_MIN 700               // Start visualization
#define RPM_MAX 2000              // Full LED strip
#define BLINK_RPM_THRESHOLD 2300  // Warning threshold

Adjust LED Count

#define NUM_LEDS 9  // Change to your strip length

Modify Blink Speed

#define BLINK_DURATION 75  // milliseconds

๐Ÿ“š Libraries Used

  • OBD2 Library - Communication with vehicle ECU
  • FastLED - High-performance LED control
  • Arduino CAN - CAN bus communication

๐Ÿ” Troubleshooting

Issue Solution
No RPM data Check OBD2 connection and vehicle compatibility
LEDs not responding Verify wiring and power supply
Incorrect RPM values Adjust RPM_MIN/MAX in configuration
Button not working Check pull-up resistor and wiring

๐ŸŽฏ Future Enhancements

  • Multi-Parameter Display: Show speed, coolant temp, fuel level
  • Wireless Connectivity: Bluetooth/WiFi data streaming
  • Mobile App: Remote monitoring and configuration
  • Data Logging: SD card storage for performance analysis
  • Custom Profiles: Different visual themes per driving mode

๐Ÿค Contributing

Feel free to contribute to this project! Here's how:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for full details.

What does this mean?

  • โœ… Commercial Use - You can use this code in commercial projects
  • โœ… Modification - You can modify and improve the code
  • โœ… Distribution - You can share and redistribute the code
  • โœ… Private Use - You can use it for personal projects
  • โ„น๏ธ Attribution Required - Just include the original license notice

The MIT License is one of the most permissive open-source licenses, making it easy for others to use and contribute to this project!

๐Ÿ‘จโ€๐Ÿ’ป Author

Arsalan Iravani

iOS Developer & Electronics Enthusiast passionate about bridging digital and physical worlds

โš ๏ธ Disclaimer

This project is for educational and entertainment purposes. Always ensure safe driving practices and comply with local traffic laws. Modifications to vehicle electronics should be performed by qualified professionals.


Made with โค๏ธ for BMW enthusiasts and Arduino hackers alike!

About

๐ŸŽ๏ธ Arduino-based BMW OBD2 RGB tachometer that transforms real-time RPM data into stunning LED visualizations with rainbow effects, redline warnings, and customizable brightness controls. Perfect for car enthusiasts and makers!

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •