r/arduino • • Sep 21 '26

Getting Started Help with OBD2 Interface Project (never programmed anything in my life)

I've never programmed anything in my life, but I have a particular project I'd like to do. Long story short, my 2019 Subaru Legacy has a really dumb feature where if the check engine light goes off ALL of the car's safety features get disabled. Collision warning, emergency braking, lane keep assist, etc. They all disable any time the check engine is on. If your car's mass airflow sensor is faulty, I guess Subaru think the best thing is for you to slam into the car in front of you. Anyway, a particular ECU code that keeps tripping and it could be about two dozen different things that could be causing it. None of them are worrisome and I have no intention on tracking it down unless something changes performance wise. We've been driving the car for 4 years like this and nothing has gotten worse. Clearing the check engine code via a cheap $10 OBD2 reader instantly re-enables the safety features, regardless of if the car is in motion (no power cycle needed). The code in quest appears anywhere from every few days to a few weeks after being cleared.

Now to the project. I found a device that acts as an interface between a car's OBD2 system and an arduino. What I'm trying to accomplish is I'd like to make a device that scans for this particular code and when detected, automatically tells the car's computer to clear the codes. For example, I'd like it to check for the code on startup and then at intervals thereafter. The product I found has an "Audrino library" section on the product page that lists various things the device can do. One of them is clear Diagnostic Trouble Codes (DTCs), which is exactly what I want.

My question is, would an Arduino have the capability to do the remaining functions? Assuming it could read the DTCs and clear them, would it have enough capacity to do so on a continual basis when powered on? Could it be instructed to turn on an LED when a code that isn't the one I'm not concerned with is detected so that I still know if the check engine light is being tripped due to some other problem? Could it be instructed to keep logs of codes that could be checked later on?

To be clear, I do not know how to code. I took a course in college about 20 years ago where I made a variation on the game Pong but that's it. I would be relying heavily on AI and this community to create the code. I'm just trying to get a sense of if this seems feasible or not before I get into the weeds of it. Here is a link that describes the product:

Freematics OBD-II UART Adapter V2.1 (for Arduino)

3 Upvotes

23 comments sorted by

View all comments

24

u/Delta_G_Robotics Sep 21 '26

"Never programmed anything in my life" ... But I want to mess with my car's safety systems.

Don't see any issues with that?

-11

u/bonecheck12 Sep 21 '26

I'm not messing with my car's safety systems. The ECU shuts them off for any and all causes of a check engine light. For example, if there is a faulty air temp sensor that's giving too high or too low of a reading, that might be something to fix, but it shouldn't be something that turns off my safety features. There are lots of reasons why a CEL comes on, most of them are not immediate safety issues, and this one in particular is definitely not a safety issue. It has to do with the efficiency of the catalytic converter. I'm not changing anything in the car's programming. I'm simply making a device that clears the CEL light when that one particular code comes up. I specifically do NOT want it to clear any other codes. The safety systems disabling any time a CEL comes on is dramatically more unsafe than me clearing an emissions code, which can be done with any $5-10 Amazon OBD reader. I'm just saying I know what that code is for, it's not concerning in the slightest, it's not worth spending $3,000 to fix. I can continue clearing the code manually with the cheap code readers, but I'd rather just spend $75-100 and have something that clears that one code automatically.

Also, if we're being realistic, the reason they have all the safety features disable when a CEL is triggered is because they want you to freak the F out and go to the dealership, where they'll tell you your car needs a new engine, ECU, and who knows whatever else.

I've done my homework on the cause, it's not a safety issue. But not having the safety features enabled is a safety issue.

12

u/Delta_G_Robotics Sep 21 '26

And with your zero programming knowledge you are absolutely sure about your fix and that there is zero chance that it does anything unexpected?

I'd want someone who knows a little about what they're doing if it were my car. I'd want that if it were the car of someone driving towards me on the highway.

-10

u/bonecheck12 Sep 21 '26

If I were addressing the car's ECU directly, that would have much more risk. In this instance I'm not. Someone else who has enough knowledge to have created a device that can communicate with the car's ECU. A regular $10 OBD reader lets car owners scan for OBD codes and clear those codes, and that is a normal diagnostic process. For example, if you get a CEL and you think the issue is this or that, you replace that part and then you'd clear the codes to see if the code reappears. I can do that right now with any handheld or bluetooth code reader. All I'm doing with this project, is instructing the audrino to do that for me instead of me doing it manually. No part of the car's ECU/programming is being changed, I'm not addressing the ECU via Subaru's CAN protocols, I'm not accessing technician level ECU modules, or anything like that. The OBD protocol allows car owners, auto parts stores, mechanics, etc. to be notified if the ECU thinks something is off, and importantly, it gives all those groups of people the ability to clear those codes. The OBD protocol isn't capable of changing anything about how your car operates. You need more specialized interfaces/tools for that. With OBD you can reason sensor outputs, you can see codes, and you can clear codes. And that's about it. It's not like you could accidently disable your car's ABS system with it or cause your engine to suddenly redline. Again, I am not changing anything in the car's programming. I am automating the "clear codes" button of an OBD code reader. That's it. A more accurate description is "I want to create a device that clears the CEL codes without me having to click 4 buttons".

12

u/Delta_G_Robotics Sep 21 '26

Ok, well you are the one who said you had zero knowledge about it. Now you seem to think you know everything. Have fun. Hope we don't share the road.

1

u/hey-im-root Open Source Hero Sep 23 '26

Coding doesn’t have anything to do with automotive BTW. You can know one and not the other

10

u/tanoshimi Sep 21 '26

"I'm not changing anything in car's programming" You said you were going to use A.I. to write the code; with no coding experience to be able to check that, you have no idea what it will or will not do.

1

u/Lanyxd Sep 22 '26

Not sure if you’re state does testing, but be careful because you can still get in trouble at the state level for bypassing emissions control devices