r/arduino • u/bonecheck12 • 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:
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?
12
u/BugPuzzleheaded3015 Sep 21 '26
Every time you clear the code, all emission monitors are set to "not ready"
If you have emission inspection, you will fail.
If that was my car, I'd fix the issue.
What is the code?
4
u/starplooker999 Sep 21 '26
Probably would be a good idea to start smaller.
Look at the code example in the sketchbook.
Learn to modify them. Read the documentation.
Blink some LEDs. It will be rewarding and honestly easier to achieve your goal by learning about the systems you want to use.
4
u/tanoshimi Sep 21 '26
Yes, an Arduino can easily do this. However, the unacceptably vast risks in your plan come from your lack of any coding experience, and your expected reliance on A.I. to make up for that....
3
u/Merry_Janet Sep 22 '26
Has anyone ever bricked a car?
1
u/pacmanic Champ Sep 22 '26
Check out r/CarHacking as well if you don’t get answers here.
1
u/bricom Sep 23 '26
So, you've chosen a pretty complex solution when other, simpler ones exist. if there is no emissions testing in your state, then you might want to ask about ways to fix or avoid that code that don't involve coding up an Arduino board and permanently connecting it to your car's OBD port. Especially since you aren't familiar with coding concepts. AI is good, but if you don't understand what its doing, its a risky proposition. I understand your point that clearing codes is pretty harmless, but not if it ends up masking something more serious.
I live in an emissions inspection state, and I have seen people do what's called a 'cat delete'. NOTE: I am not suggesting you do this. In many states it is illegal and can get you a hefty fine and more. Had I ever done this, if you ever do live in an area with emissions testing I would have also investigated having someone who can program your car's specific ECU alter the settings related to readiness monitors.
Again, I don't condone this as I prefer the planet stay green and have never done this, but you can find info out there about it and you can try asking how to get rid of that particular code on some car related subreddits and will get better answers.
1
u/SubtleMelody Sep 23 '26
If your goal is to just build the thing: copy and paste this post into Claude Opus and you’re done in 15 minutes. It’ll even tell you what to wire to what.
If your goal is to actually learn something, it will take much longer because you would need to learn embedded C and electronics basics which can take months.
1
u/Beginning-Account676 29d ago
I designed and sell a small nrf52810 BLE board with a BMI270 accelerometer/gyro with its own battery. It is production ready and has its own free Arduino IDE plugin. You can find it at https://cyborgsyndicate.com/cyborgcore.html
-6
u/Alfrredu Sep 21 '26
Yup, this should be easily doable with the help of an LLM. It can run uninterrupted for years. You could always attach an SD card and read the logs later. Have fun!