Toyota GR86, 86, FR-S and Subaru BRZ Forum & Owners Community - FT86CLUB

Toyota GR86, 86, FR-S and Subaru BRZ Forum & Owners Community - FT86CLUB (https://www.ft86club.com/forums/index.php)
-   DIY (Do-It-Yourself) Guides (https://www.ft86club.com/forums/forumdisplay.php?f=43)
-   -   Adding doors auto-lock and oil t° display to your FRS / BRZ / 86 (https://www.ft86club.com/forums/showthread.php?t=123339)

T0rt0r0 11-13-2017 11:46 AM

Adding doors auto-lock and oil t° display to your FRS / BRZ / 86
 
Hello everyone !

Since I bought my FRS a year ago, I was really missing two features : automatically closing the doors after starting to drive AND the oil temperature !
My old car that is almost 20 years old already had it ... so why Toyobaru did not make it from factory ?? Why !!? We'll never know ...

Seeing this, and because I didn't wanted to buy some chinese OBD plug to do that, I started to work on an open source solution based on Arduino.
For who's that don't know, an Arduino is like a "microcomputer" that you can program to do many things, and, in this case, to dial with the onboard CAN network.
Why using an Arduino ? Because it costs almost nothing and could be used for many other things than just locking/opening doors (like showing Oil t°, etc.).

I will not cover all the steps in this post, but just the main ones, so feel free to ask any questions, so others and I can respond to your requests accurately ;)
I'm assuming that you are aware of Arduino development, C++ and CAN/OBD protocols. If not, ask your friend that knows ^^


Step 1: Getting all the needed parts
First, you have to get an Arduino UNO !
For the Arduino to be able to read/write through CAN, you have to add an "extension" to it (a CAN shield) : http://www.ebay.fr/itm/SPI-MCP2515-E...8AAOSw2gxYrWH~
And then, you need a RS232/OBD cable (ebay again)

Depending on where you get the parts, you might have to do some (really easy) soldering.
You could add a nice box if you want to.

Step 2: Uploading the software to the Arduino
Once you have all the parts, you can download the CAN library and projects I've developped at : https://github.com/fontaromain/CANHelperLibrary
Choose the Arduino project of interest and open it with the ArduinoIDE.
You will have to copy the folder "CANHelperLibrary" next to the project ".ino" file in order to compile the project.
Then upload it to the Arduino and you are done.

Step 3: Install in car
Plug it to your car with the shield configured to get it's power from the OBD link (it's the car that will power the Arduino directly through the OBD cable) and drive !
You can put the Arduino behind the glove box or anywhere you want, it's up to you.

Explanation videos:
[ame="https://www.youtube.com/watch?v=xC93xSPRaQE"]FRS/BRZ/86 oil temperature display - YouTube[/ame]
[ame="https://www.youtube.com/watch?v=yW65quZttV8"]FRS/BRZ/86 Automatic doors lock - YouTube[/ame]

Future:
I'd like to get a cluster indicator to blink until the oil reach its correct temperature and to flash the shilftlight when too hot (to keep it plug and play with no needed car modifications).

So I'm also requesting some help: does anyone knows which are the ODB messages to use to:
- Make the shiftlight to blink ? (oil too hot)
- Turn on / off various led indicators on the cluster (I was thinking "snow" indicator on MT as it is never user but there are others...)
- Identify distant lock / unlock of the car so I can develop a power saving mode ?

I could reverse engineer Techstream OBD messages (that's what I already did) but it's not a fun task, so any help is appreciated :)

Sorry if some engrish is present in this post (don't hesitate to correct me :))

And have fun !

J Greg BRZ 11-13-2017 11:06 PM

Not much help, but there is a product similar to what you are trying to do. Has an OEM look to it, as well.

Oh, and it's not Chinese. lol.

Here's a link:
http://www.ft86club.com/forums/showthread.php?t=47749

T0rt0r0 11-14-2017 01:24 PM

Well, your solution cost is really far from mine ($15) and don't lock the doors :)

ermax 11-14-2017 02:14 PM

This is a very interesting project. So am I understanding correctly that you are able to manipulate the coolant temp gauge through the OBD2 port?

T0rt0r0 11-14-2017 02:52 PM

Yes, but only by 1/4, I did not found the way to drive it smoothly by little steps.
But for this particular application this is not an issue, for me at least (it's nice to know that the oil is not cold / too hot, the exact temperature does not matter as long as it stays in normal ranges)

Wyattkb 11-16-2017 04:56 AM

This is really cool. I had no idea you could do this type of thing with an Arduino.

Time to start learning how to do this. I have had an Arduino laying around forever with no use.

T0rt0r0 11-16-2017 02:42 PM

Thanks !
And you can do many more things through obd...

Updated first post to have a nicer youtube integration :)

spike021 11-16-2017 03:13 PM

Quote:

Originally Posted by T0rt0r0 (Post 3004106)
Hello everyone !

Sorry if some engrish is present in this post (don't hesitate to correct me :))

And have fun !

As a software engineer, this is super cool.

Are you able to get the speed from the car as MPH or only KPH?

I have a spare Uno lying around. Think I finally have a project for it :)

T0rt0r0 11-16-2017 03:43 PM

Quote:

Originally Posted by spike021 (Post 3005819)
As a software engineer, this is super cool.

Are you able to get the speed from the car as MPH or only KPH?

I have a spare Uno lying around. Think I finally have a project for it :)

The obd2 standard allows to get it in kph only but it's easy to do the conversion in the source code (obd2 standard pid).

If you are a software engineer I hope that my work matches you quality standards :)

spike021 11-16-2017 04:41 PM

Quote:

Originally Posted by T0rt0r0 (Post 3005832)
The obd2 standard allows to get it in kph only but it's easy to do the conversion in the source code (obd2 standard pid).

If you are a software engineer I hope that my work matches you quality standards :)

Haha it’s alright, I don’t code in C/C++ normally :)

I didn’t get a chance to read through all the docs yet. Can you use the e-brake engagement for the unlocking mechanism?

T0rt0r0 11-16-2017 05:04 PM

Yes the e-brake could be done (because i saw the information in techstream).
However, I did not reverse engineer this specific obd message so it's not present in the current code.

As a side note, I use the e-brake in traffic jams everyday, so I'm not sure it's a really good option :)
But I can note that down for my future experiments.

socal_48 11-17-2017 10:58 AM

Can I use the new arduino r3 boards that they have now and attach the db9 serial port on top and get power through the serial to the board? This is what I was looking at adding. Really interested in this project.
https://www.amazon.com/MakerFocus-CA...BK7M303R553HZZ

spike021 11-17-2017 01:28 PM

Quote:

Originally Posted by T0rt0r0 (Post 3005867)
Yes the e-brake could be done (because i saw the information in techstream).
However, I did not reverse engineer this specific obd message so it's not present in the current code.

As a side note, I use the e-brake in traffic jams everyday, so I'm not sure it's a really good option :)
But I can note that down for my future experiments.

Hmmm, fair enough. Maybe e-brake engaged and power off? Just trying to think of the most natural way and right time to unlock the doors to make sure it's when I'd actually need them unlocked :).

T0rt0r0 11-17-2017 01:31 PM

Quote:

Originally Posted by socal_48 (Post 3006147)
Can I use the new arduino r3 boards that they have now and attach the db9 serial port on top and get power through the serial to the board? This is what I was looking at adding. Really interested in this project.
https://www.amazon.com/MakerFocus-CA...BK7M303R553HZZ

You can ! In the video it's already how it's done :)

T0rt0r0 11-17-2017 01:31 PM

Quote:

Originally Posted by spike021 (Post 3006211)
Hmmm, fair enough. Maybe e-brake engaged and power off? Just trying to think of the most natural way and right time to unlock the doors to make sure it's when I'd actually need them unlocked :).

This should work well :)

socal_48 11-17-2017 02:12 PM

Quote:

Originally Posted by T0rt0r0 (Post 3006214)
You can ! In the video it's already how it's done :)





Thanks for the reply. I am unable to view the youtube videos where I am at right now. But I plan on getting this project done when I get back home.

pgranberg11 11-18-2017 12:37 PM

I'm no software engineer, but I did do some coding in college a few years ago. It's funny that you added the auto door lock feature... I have a 2000 Toyota Celica, and when I bought my brz, I was so surprised it didn't have an auto lock feature.. that was one thing that I absolutely loved. So, correct me if I'm wrong, is this as easy as buying the parts you need, and then simply loading the software onto the arduino and that's that?

Edit: I also think it could be potentially really cool if you were able to adapt a small lcd screen on the arduino and have the code spit out literally just oil temp on the LCD screen. (Not sure how difficult that would be).

T0rt0r0 11-18-2017 01:54 PM

Quote:

Originally Posted by pgranberg11 (Post 3006623)
I'm no software engineer, but I did do some coding in college a few years ago. It's funny that you added the auto door lock feature... I have a 2000 Toyota Celica, and when I bought my brz, I was so surprised it didn't have an auto lock feature.. that was one thing that I absolutely loved. So, correct me if I'm wrong, is this as easy as buying the parts you need, and then simply loading the software onto the arduino and that's that?

Edit: I also think it could be potentially really cool if you were able to adapt a small lcd screen on the arduino and have the code spit out literally just oil temp on the LCD screen. (Not sure how difficult that would be).

Yes it's as simple as that. I have done the hardest part for you already :)
Didn't knew that the celica had it ... !

Adding an lcd on top is easy but I don't have one, so it's hard to develop in theses conditions ^^

If there is a lot of demands why not, as long as the arduino can handle both can and lcd together

T0rt0r0 11-22-2017 01:33 PM

Measured the power consuption of the whole thing today.

At 12.8v it draws 48mA, so with a 55Ah battery it will last more than a month.

This is really correct and could be improved with a power saving mode :)

AfterFXNinja 11-22-2017 03:09 PM

Hey,
This is really cool. I have a turbo'd FR-S so I was wondering if it was possible for me to display boost rather than the current oil temp. If it is possible mind letting me know how? Also what is the refresh rate for the displayed data?

Thanks!

T0rt0r0 11-22-2017 05:26 PM

Quote:

Originally Posted by AfterFXNinja (Post 3008461)
Hey,
This is really cool. I have a turbo'd FR-S so I was wondering if it was possible for me to display boost rather than the current oil temp. If it is possible mind letting me know how? Also what is the refresh rate for the displayed data?

Thanks!

It's possible BUT I can't make the water temperature needle to move gradually and smoothly.

The obd messages I know of (reverse engeneered from techstream) only allow to drive it by 1/8 or something like that.

So until I or someone else finds a ways to do it this is the limitation :)

toyubie 12-03-2017 01:48 AM

Is this type of data communication available over Bluetooth OBD adapters? If so, I wonder if the code could be ported into a Torque add-on...

T0rt0r0 12-03-2017 05:32 AM

I wrote the code to be used anywhere, not only on an arduino. So if torque gives us an sdk that could be used to develop an IConnector class it could be easily done.

Do you have some links to how to make a torque addon ?

toyubie 12-03-2017 04:09 PM

From a quick search it seems like development documentation is sparse but there are plugins that seem to be able to communicate with the car like the "Remote EX for Nissan" listed here: https://torque-bhp.com/wiki/Plugins

There is also this wiki page that includes a link to a forum thread that might have some good info: https://torque-bhp.com/wiki/PluginDocumentation

JoeC 12-03-2017 04:28 PM

While I understand that some cars have the feature of locking the doors when you are driving, what purpose does it serve? Is it to prevent being car-jacked?

Also, kudos to you on your execution.

toyubie 12-03-2017 09:36 PM

Quote:

Originally Posted by JoeC (Post 3012039)
While I understand that some cars have the feature of locking the doors when you are driving, what purpose does it serve? Is it to prevent being car-jacked?

Also, kudos to you on your execution.

Safety is a concern, most police departments encourage driving with the doors locked. Another issue could be children opening the doors while in motion, etc. I found this article that goes into more detail:

Quote:

I don't think it's safe to drive with the doors locked because you'll be trapped in a burning car if there's an accident. You won't be able to get out and rescue workers won't be able to get in. My husband disagrees with me. We have a Ford Edge and the doors lock automatically once you start driving. I always unlock them. — Karen, Ottawa

If you're driving with unlocked doors, you never know who'll try to get in — or out, police say.

"There've been incidents where doors have gone open while the vehicle was in motion because a child pulled on the handle," says Ottawa Police Const. Chuck Benoit. "There've also been incidents of forcible confinement — where a person enters the vehicle while you're stopped or driving slowly in traffic and takes over."

It's a good idea to drive with doors locked, police say.

"We recommend it," Benoit says. "But there's no rule or law that says you have to."

Ford Canada says automatic locking is a safety feature. If it's turned on, doors will lock when you're driving faster than 20 km/h.

"The locks will unlock when the driver's door is opened," says spokesperson Rose Pao in an email. "In the event of an accident where air bags are deployed, the door locks will unlock automatically."

In a car crash, the doors need to stay closed because they absorb the impact, keep you from being thrown out, and help keep the roof from crumpling like a soda can. Locks might help, police say.

"If the vehicle does roll over, the lock is a secondary means to ensure that the door stays closed," says Ontario Provincial Police Sgt. Peter Leon.

And, even if you're driving with unlocked doors, you could still be trapped in a crash anyway.

"When there's an impact, a lot of time the doors are pushed in and don't open," says Ottawa Police's Benoit. "Whether they were locked or unlocked, the impact damaged the door and made it jam anyway."

Rescue workers will have to get you out — or you'll have to break out yourself.

"There are glass-breaking tools available, automotive companies carry them, and they'll break the glass very easily," says Leon. "They do come with a cutting blade that would let you cut your seatbelt if you needed to."

In the movies, most car crashes end in a deadly blaze, but U.S. statistics show that only about four per cent of motor vehicle deaths happen in fires, says the Canada Safety Council.

"Being trapped in a burning car is certainly a very vivid thing to worry about," Safety Council spokesperson Lynn Lau says in an email. "But (it's) an exceedingly unlikely catastrophe."

T0rt0r0 12-04-2017 02:54 PM

Quote:

Originally Posted by toyubie (Post 3012032)
From a quick search it seems like development documentation is sparse but there are plugins that seem to be able to communicate with the car like the "Remote EX for Nissan" listed here: https://torque-bhp.com/wiki/Plugins

There is also this wiki page that includes a link to a forum thread that might have some good info: https://torque-bhp.com/wiki/PluginDocumentation

Thanks for the links !
As far as I understand, torque does not offer a plugin system that is compatible with the c++ code I wrote. It's maybe not impossible to rewrite everything to java/torque script but I won't do it :)

Quote:

Originally Posted by JoeC (Post 3012039)
While I understand that some cars have the feature of locking the doors when you are driving, what purpose does it serve? Is it to prevent being car-jacked?

Also, kudos to you on your execution.

Yes it's to prevent being car-jacked in my case.
And thanks :)


I'm currently testing an lcd display coupled with the arduino to be able to display various informations. Some ui designer here ? I'm using a nextion touchscreen for fun

dostoyevsky 12-04-2017 04:58 PM

Ive been looking for this for quite a while! Thank you!

Is there anyway to make it like newer cars that If I pull the handle from the inside it auto unlocks?

toyubie 12-04-2017 06:50 PM

Quote:

Originally Posted by dostoyevsky (Post 3012431)
Ive been looking for this for quite a while! Thank you!

Is there anyway to make it like newer cars that If I pull the handle from the inside it auto unlocks?

Might be possible by adding a switch or sensor to the handle; AFAIK there's nothing to detect the handle has been pulled right now, but at that point you'e pulling off panels and running wires.

T0rt0r0 12-05-2017 01:35 PM

Quote:

Originally Posted by dostoyevsky (Post 3012431)
Ive been looking for this for quite a while! Thank you!

Is there anyway to make it like newer cars that If I pull the handle from the inside it auto unlocks?

You are welcome :)

For the pull, I've never saw anything like this, could please be more precise ? (Maybe a specific car model that I could look into ?)

But if it needs extra sensors that the frs is not equiped with, you have your answer it's not possible :cry:

spike021 12-05-2017 01:53 PM

Quote:

Originally Posted by T0rt0r0 (Post 3012818)
For the pull, I've never saw anything like this, could please be more precise ? (Maybe a specific car model that I could look into ?)

BMW's M2 (2017 MY I think?) has it. You pull twice on the door handle and it unlocks.

chaoskaze 12-05-2017 02:32 PM

Thanks man, This is actually much better then the OBD2 thing most ppl are running.... Cuz I have an iphone LOL.
(aka only wifi with OBD2...means I don't have internet while running those apps that ppl trys to run)

dostoyevsky 12-05-2017 04:37 PM

Quote:

Originally Posted by spike021 (Post 3012828)
BMW's M2 (2017 MY I think?) has it. You pull twice on the door handle and it unlocks.

My dodge dart had it :L

ermax 12-05-2017 04:53 PM

Quote:

Originally Posted by chaoskaze (Post 3012840)
Thanks man, This is actually much better then the OBD2 thing most ppl are running.... Cuz I have an iphone LOL.
(aka only wifi with OBD2...means I don't have internet while running those apps that ppl trys to run)



This adapter works with iOS via BLE:
https://www.amazon.com/dp/B01MAURDGG

The key is to get the “Enhanced Version”. This version runs Bluetooth Serial Profile for Android but also runs Bluetooth LE for iOS connectivity. The description on this item fails to explain this but trust me it works. I have this version and it works great on my iPhone. I’ve tested it with Carista, DashCommand and Fusion. Fusion is the best hands down. Very similar to Torque. There is an in app upgrade that adds direct support for Toyota’s which gives it access to a ton of PIDs for our cars.

T0rt0r0 12-06-2017 01:31 PM

Quote:

Originally Posted by spike021 (Post 3012828)
BMW's M2 (2017 MY I think?) has it. You pull twice on the door handle and it unlocks.

Ok thanks I'll look into this when I'll have some time :)
But I don't remember any information about the door interior handle position so I think it will not be possible

T0rt0r0 12-30-2017 02:16 PM

Not a lot a free time since my last post but did not forgot about improvements ;)

Just to know, has anybody tried the code and succeeded ?

ermax 01-30-2018 12:31 PM

It would be interesting to know how you are reverse engineering Techstream. I would love to have access to the tire pressures.

darko 01-30-2018 12:45 PM

Could it be possible to close the windows when car ignition is turned off?

T0rt0r0 01-30-2018 03:08 PM

Quote:

Originally Posted by ermax (Post 3036153)
It would be interesting to know how you are reverse engineering Techstream. I would love to have access to the tire pressures.

I bought a obd y cable.
Plugged in the car and in a tactrix interface (for techstream) and in parrallel with my arduino board that just listened to the can trafic.

Then simply played with the diagnosis features of techstream and deduced the correct frames to use.

Not too hard but a lot of work when you don't really know what you are looking for :D

Quote:

Originally Posted by darko (Post 3036167)
Could it be possible to close the windows when car ignition is turned off?

Is it doable with the windows switches just after you turn off ?
If yes it might be ok as I successfully played with the windows (but with ign on)

ermax 02-19-2018 12:13 PM

I just ordered an Arduino UNO R3, the CAN bus shield, serial to OBD2 and a Y cable. My goal is to capture the traffic coming from Techsteam when putting the VSC/TRAC/ABS system into "inspection mode" so I can have a more permanent way (toggle switch) to disable TC/VSC. But I will also have the ability to do other creative things. I saw where someone replaced the clock with a small LCD screen and repurposed the clock buttons for controls to the Arduino. This is going to be a fun project.


All times are GMT -4. The time now is 04:46 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
User Alert System provided by Advanced User Tagging v3.3.0 (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.


Garage vBulletin Plugins by Drive Thru Online, Inc.