PyOBD Gets Python3 Upgrades

One of the best things about open source software is that, instead of being lost to the ravages of time like older proprietary software, anyone can dust off an old open source program and bring it up to the modern era. PyOBD, a python tool for interfacing with the OBD system in modern vehicles, was in just such a state with its latest version still being written in Python 2 which hasn’t had support in over three years. [barracuda-fsh] rewrote the entire program for Python 3 and included a few other upgrades to it as well.

Key feature updates with this version besides being completely rewritten in Python 3 include enhanced support for OBD-II commands as well as automating the detection of the vehicle’s computer capabilities. This makes the program much more plug-and-play than it would have been in the past. PyOBD now also includes the python-OBD library for handling the actual communication with the vehicle, while PyOBD provides the GUI for configuring and visualizing the data given to it from the vehicle. An ELM327 adapter is required.

With options for Mac, Windows, or Linux, most users will be able to make use of this software package provided they have the necessary ELM327 adapter to connect to their vehicle. OBD is a great tool as passenger vehicles become increasingly computer-driven as well, but there are some concerns surrounding privacy and security in some of the latest and proposed versions of the standard.

Probing CAN Bus For EV Battery Info

The widespread adoption of the CAN bus (and OBD-II) in automobiles was largely a way of standardizing the maintenance of increasingly complicated engines and their needs to meet modern emissions standards. While that might sound a little dry on the surface, the existence and standardization of this communications bus in essentially all passenger vehicles for three decades has led to some interesting side effects, like it’s usage in this project to display some extra information about an electric car’s battery.

There’s not a ton of information about it, but it’s a great proof-of-concept of some of the things CAN opens up in vehicles. The build is based on a Citroën C-Zero (which is essentially just a re-badged Mitsubishi i-MiEV) and uses the information on the CAN bus to display specific information about the state of charge of the battery that isn’t otherwise shown on the car’s displays. It also includes a build of a new secondary display specifically for this purpose, and the build is sleek enough that it looks like a standard part of the car.

While there are certainly other (perhaps simpler) ways of interfacing with a CAN bus, this one uses off-the-shelf electronics like Arduino-compatible microcontrollers, is permanently installed, and has a custom case that we really like. If you’re just starting to sniff around your own vehicle’s CAN bus, there are some excellent tools available to check out.

Thanks to [James] for the tip!

Continue reading “Probing CAN Bus For EV Battery Info”

Raspberry Pi Hitches A Ride In A 1989 BMW Dashboard

It probably won’t surprise you to find out that a 1989 BMW 325i doesn’t have much in the way of electronic gadgetry onboard. In fact, what passes for an in-dash “computer” in this vintage Beemer is just a digital clock with a rudimentary calendar function. Not content to waste his precious dashboard space any longer, [Ryan Henderson] used his time in quarantine to replace the clock module with a Raspberry Pi.

Nestled in a custom laser-cut housing is a touch screen LCD module that connects directly to the GPIO header of a Pi Zero. Combined with some Python code, this provides a very slick multipurpose interface for pretty much anything [Ryan] wants. Right now he’s got it hooked up to a GPS receiver so he can figure out things like speed and acceleration, but the only real limit on what this little drop-in upgrade can do is how much code you want to sit down and write.

Thankfully, it sounds like [Ryan] has done a lot of the hard work for you. He’s put together a Python library that allows the user to easily draw analog gauges on the screen. The faces are parametrically sized, and even have custom minimum/maximum marks. Of course if you’d rather just throw some text and images on the screen, that’s accomplished easily enough with existing libraries such as PyGame.

[Ryan] says he’s also working on some code to better integrate the Pi into the vehicle’s systems by way of a Bluetooth OBD2 adapter. In the most basic application that would allow you to throw various bits of engine data up on the screen, but on more modern cars, you could potentially tap into the CAN bus and bend it to your will.

While the physical size and shape of this particular modification is clearly focused on this model and year of BMW, the general concepts could be applied to any car on the road. [Ryan] has recently started a GitHub repository for the project and hopes to connect with others who are interested in adding a little modern complexity convenience to their classic rides.

The reality is that cars become more dependent on their onboard computers with each passing year. Already we’re seeing Tesla owners struggle with cooked flash chips, and things are likely to get worse before they get any better. While undoubtedly there are some that would rather keep their daily driver as simplistic as possible, we’re encouraged by projects like this that at least let owners computerize their cars on their own terms.

Remoticon Video: Learn How To Hack A Car With Amith Reddy

There was a time not too long ago when hacking a car more often than not involved literal hacking. Sheet metal was cut, engine cylinders were bored, and crankshafts were machined to increase piston travel. It was all in the pursuit of milking the last ounce performance out of every drop of gasoline, along with a little personal expression in the form of paint and chrome.

While it’s still possible — and encouraged — to hack cars thus, the inclusion of engine control units and other systems to our rides has created an entirely different universe of car hacking options, which Amith Reddy distilled into his very popular workshop at the 2020 Remoticon. The secret sauce behind all the hacks you can accomplish in today’s drive-by-wire cars is the Controller Area Network (CAN), the network used to connect the array of sensors, actuators, and controllers that lie under the metal and plastic of modern cars.

Continue reading “Remoticon Video: Learn How To Hack A Car With Amith Reddy”

A Tidy Little OBD Display For Your Car

It’s likely that many readers will have an OBD dongle through which they can peer into the inner workings of their car, but the chances are that most of us will have restricted our curiosity to the Bluetooth or USB interface it was supplied with. Not [Frederico Souza Sant’ana] though, because he’s modified his OBD dongle to expose the serial lines between its ELM327 OBD chip and its Bluetooth chip. These go to an Arduino, which powers a small information display to supplement the car’s dashboard. This can display a range of readings as can be seen in the video below the break, he has it monitoring the battery, the various temperatures in the engine bay, and the ignition parameters.

All the software and hardware details can be found in a GitHub repository. In hardware terms it’s a surprisingly simple unit, but it serves to remind us that OBD sniffer dongles are more versatile than we might at first imagine, and good for a bit more than hooking up our smartphones via Bluetooth. If OBD is something you’d like to visit in more depth, in the past we’ve featured an open-source OBD interface, and a retrospective look at the protocol.

Continue reading “A Tidy Little OBD Display For Your Car”

Juicing Up The Chevy Volt With Raspberry Pi

While Chevrolet’s innovative electric hybrid might officially be headed to that great big junkyard in the sky, the Volt will still live on in the hearts and minds of hackers who’d rather compare amp hour than horsepower. For a relatively low cost, a used Volt offers the automotive hacker a fascinating platform for upgrades and experimentation. One such Volt owner is [Katie Stafford], who’s recently made some considerable headway on hacking her hybrid ride.

In an ongoing series on her blog, [Katie] is documenting her efforts to add new features and functions to her Volt. While she loves the car itself, her main complaint (though this is certainly not limited to the Volt) was the lack of tactile controls. Too many functions had to be done through the touch screen for her tastes, and she yearned for the days when you could actually turn a knob to control the air conditioning. So her first goal was to outfit her thoroughly modern car with a decidedly old school user interface.

Like most new cars, whether they run on lithium or liquefied dinosaurs, the Volt makes extensive use of CAN bus to do…well, pretty much everything. Back in the day it only took a pair of wire cutters and a handful of butt splice connectors to jack into a car’s accessory systems, but today it’s done in software by sniffing the CAN system and injecting your own data. Depending on whether you’re a grease or a code monkey, this is either a nightmare or a dream come true.

Luckily [Katie] is more of the latter, so with the help of her Macchina M2, she was able to watch the data on the CAN bus as she fiddled with the car’s environmental controls. Once she knew what data needed to be on the line to do things like turn on the fan or set the desired cabin temperature, she just needed a way to trigger it on her terms. To that end, she wired a couple of buttons and a rotary encoder to the GPIO pins of a Raspberry Pi, and wrote some code that associates the physical controls with their digital counterparts.

That’s all well and good when you need to mess around with the AC, but what’s the Pi supposed to do the rest of the time? [Katie] decided a small HDMI display mounted to the dash would be a perfect way for the Raspberry Pi to do double duty as information system showing everything from battery charge to coolant temperature. It also offers up a rudimentary menu system for vehicle modifications, and includes functions which she wanted quick access to but didn’t think were necessarily worth their own physical button.

In the video after the break, [Katie] walks the viewer through these modifications, as well as some of the other neat new features of her battery powered bow tie. What she’s already managed to accomplish without having to do much more than plug some electronics into the OBD-II port is very impressive, and we can’t wait to see where it goes from here.

Today there are simply too many good electric cars for hybrids like the Chevy Volt and its swankier cousin the Cadillac ELR to remain competitive. But thanks to hackers like [Katie], we’re confident this isn’t the last we’ve seen of this important milestone in automotive history.

Continue reading “Juicing Up The Chevy Volt With Raspberry Pi”

This Cup Holder Crystal Ball Tells Your MPG Future

Hybrid vehicles, which combine an eco-friendly electric motor with a gasoline engine for extended range, are becoming more and more common. They’re a transitional technology that delivers most of the advantages of pure electric vehicles, but without the “scary” elements of electric vehicle ownership which are still foreign to consumers such as installing a charger in their home. But one element which hybrids are still lacking is a good method for informing the driver whether they’re running on petroleum or lithium; a way to check at a glance how “green” their driving really is.

[Ben Kolin] and his daughter [Alyssa] have come up with a clever hack that allows retrofitting existing hybrid vehicles with an extremely easy to understand indicator of real-time vehicle efficiency. No confusing graphics or arcade-style bleeps and bloops, just a color-changing orb which lives in the cup holder. An evolved version which takes the form of a smaller “dome light” that sits on the top of the dashboard could be a compelling aftermarket accessory for the hybrid market.

The device, which they are calling the ecOrb, relies on an interesting quirk of hybrid vehicles. The OBD II interface, which is used for diagnostics on modern vehicles, apparently only shows the RPM for the gasoline engine in a hybrid. So if the car is in motion but the OBD port is reporting 0 RPM, the vehicle must be running under electric power.

With a Bluetooth OBD adapter plugged into the car, all [Ben] and [Alyssa] needed was an Arduino Nano clone with a HC-05 module to read the current propulsion mode in real-time. With some fairly simple conditional logic they’re able to control the color of an RGB LED based on what the vehicle is doing: green for driving on electric power, purple for gas power, and red for when the gas engine is at idle (the worst case scenario for a hybrid).

Check out our previous coverage of OBD hacking on the Cadillac ELR hybrid if you’re looking to learn more about what’s possible with this rapidly developing class of vehicle

Continue reading “This Cup Holder Crystal Ball Tells Your MPG Future”