February 2019

Smart USB Power Switch and Filter

The agony of constantly unplugging and replugging the USB cable every 5 seconds to power your project! It’s even more infuriating when you’ve exhausted all the front USB ports and have to awkwardly reach around to the back of the PC. This project seeks to alleviate this frustration by incorporating a simple button to toggle the USB power on and off, along with some additional convenient features.

While a USB hub with individual port power switches would be a straightforward solution, this project takes a more innovative approach. By utilizing the MIC2545A high-side switch with 3A adjustable current limiting and soft-start functionality, this design offers a more sophisticated solution. The switch is controlled by an ATtiny25V microcontroller, allowing for customized control of the switch’s behavior in short-circuit conditions. Normally, the MIC2545A would limit the current, but with the microcontroller, it can immediately shut off the switch upon detecting a short circuit, or use a small delay or low-pass filter to prevent tripping due to instantaneous current spikes. Additionally, ESD protection is added to the data and power lines, a noise filter…

Custom Rev Limiter Warning System and Gear Position Indicator

I’ve had my Toyota GT86 for a while, and I absolutely loved its built-in rev limiter warning and the thrill of flooring it until an elderly lady cancelled my insurance. However, I was fortunate enough to drive a BMW 430d M Sport courtesy of my insurance company for a few months. Currently, I’m behind the wheel of a 2006 Honda Civic Type-S GT hatchback, and I’m really missing that warning (and the rest of the 86’s goodies).

https://youtube.com/watch?v=pzZLg0P67D4

By leveraging Arduino and an affordable MCP2515 module, I successfully sniffed the communication between the ELM327 diagnostic tool and my Civic’s OBD-II port. I discovered that the CAN bus operates at a speed of 500Kbps, transmitting a multitude of standard 11-bit ID CAN messages. By sending the “010c” command to the ELM327 to request engine RPM data, I observed it sending extended 29-bit CAN messages with an ID of 0x18DB33F1, followed by a response ID of 0x18DAF110. (I won’t delve into the intricacies of OBD-II protocol’s physical and functional addressing here, but searching for these two hex numbers online will yield some fascinating results.) Excellent!…