follow ft86club on our blog, twitter or facebook.
FT86CLUB
Ft86Club
Speed By Design
Register Garage Members List Calendar Search Today's Posts Mark Forums Read

Go Back   Toyota GR86, 86, FR-S and Subaru BRZ Forum & Owners Community - FT86CLUB > Technical Topics > DIY (Do-It-Yourself) Guides

DIY (Do-It-Yourself) Guides For all DIYs.


User Tag List

Reply
 
Thread Tools Search this Thread
Old 02-26-2019, 06:30 PM   #71
aznchris
Member
 
Join Date: Jan 2019
Drives: Scion 86 tS
Location: CA
Posts: 51
Thanks: 14
Thanked 6 Times in 6 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by T0rt0r0 View Post
The CAN shield can power the arduino BUT if you do that it will always be powered even with the car off and locked (like for an oft etc).

To avoid this issue, you could:
- use an obd cable with an on/off button and use it accordingly,
- power the arduino using for example the glove box power adapter +12v and put capacitors on the vin/gnd pins (see https://components101.com/sites/defa...in-Diagram.png).

There is a third option that is to develop some code to make the arduino to go to sleep mode when the car is off to avoid draining to much current but as the second option suited me well and as there is not really a lot of folks to use this ...

I'm still surprised that the obd connector don't provide both permanent and after ignition +12v wires

Hope this helps !
So I would have to use a 2.1mm DC to cigarette lighter to power the arduino and then have to get the caps and stick them straight in the vin and gnd holes? 2 of them fits in each of those holes? I don't need any additional wiring?

Thanks a lot for making this by the way! A couple weeks ago some crazy guy was road raging hard at me and because I set my car up to unlock both doors with the remote, I was scared he was going to climb in my car or something because he stopped in the middle of his lane to be next to me at a red light and then cut me off on the green. I never usually lock my doors either especially since I'd have to do it so often, but this would make it a lot more convenient and safer for me. Thank you!

Edit: Wait... I just realized that even if I plug in via the DC plug and use caps, wouldn't it still draw power via the obd2 while the car is off? Or does obd2 not provide power when the car is off, and if that's the case then why do I need the caps?

Last edited by aznchris; 02-26-2019 at 07:40 PM.
aznchris is offline   Reply With Quote
Old 02-27-2019, 12:55 PM   #72
T0rt0r0
Member
 
Join Date: Jun 2017
Drives: European gt86
Location: France
Posts: 92
Thanks: 36
Thanked 23 Times in 14 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by aznchris View Post
So I would have to use a 2.1mm DC to cigarette lighter to power the arduino and then have to get the caps and stick them straight in the vin and gnd holes? 2 of them fits in each of those holes? I don't need any additional wiring?
Yes exactly. Two won't fit but I recently tested with only one capacitor of 10000nF (cheap ebay one) and it worked perfectly. So it's up to you to either solder two small capacitors together or use a big one.

Quote:
Originally Posted by aznchris View Post
Thanks a lot for making this by the way! A couple weeks ago some crazy guy was road raging hard at me and because I set my car up to unlock both doors with the remote, I was scared he was going to climb in my car or something because he stopped in the middle of his lane to be next to me at a red light and then cut me off on the green. I never usually lock my doors either especially since I'd have to do it so often, but this would make it a lot more convenient and safer for me. Thank you!
You are welcome ! I totally understand why you want to install one

Quote:
Originally Posted by aznchris View Post
Edit: Wait... I just realized that even if I plug in via the DC plug and use caps, wouldn't it still draw power via the obd2 while the car is off? Or does obd2 not provide power when the car is off, and if that's the case then why do I need the caps?
OBD will provide power anytime no matter what but the OBD shield has a power switch button to use to power or not it from obd (if not it will be powered by the arduino board).

Hope it's clear
T0rt0r0 is offline   Reply With Quote
Old 02-28-2019, 12:25 AM   #73
aznchris
Member
 
Join Date: Jan 2019
Drives: Scion 86 tS
Location: CA
Posts: 51
Thanks: 14
Thanked 6 Times in 6 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by T0rt0r0 View Post
Yes exactly. Two won't fit but I recently tested with only one capacitor of 10000nF (cheap ebay one) and it worked perfectly. So it's up to you to either solder two small capacitors together or use a big one.



You are welcome ! I totally understand why you want to install one



OBD will provide power anytime no matter what but the OBD shield has a power switch button to use to power or not it from obd (if not it will be powered by the arduino board).

Hope it's clear
Thank you sooooo much!! I greatly appreciate your help! I would click the thanks button, but either my account doesn't have it unlocked or I'm just overlooking it. I swear I tried hard to find it too haha
aznchris is offline   Reply With Quote
Old 02-28-2019, 12:22 PM   #74
T0rt0r0
Member
 
Join Date: Jun 2017
Drives: European gt86
Location: France
Posts: 92
Thanks: 36
Thanked 23 Times in 14 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Lol no worries keep us updated
T0rt0r0 is offline   Reply With Quote
Old 03-03-2019, 02:58 AM   #75
aznchris
Member
 
Join Date: Jan 2019
Drives: Scion 86 tS
Location: CA
Posts: 51
Thanks: 14
Thanked 6 Times in 6 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by T0rt0r0 View Post
Lol no worries keep us updated

Hi sorry I need help. I tried this 2 different times before I drove to work and I can't figure out what I'm doing wrong. I've tried the "File > Examples > 01.Basics > Blink" and it seems to work. The LED on the arduino blinks and when I upload the AutoLockDoors ino it stops blinking and something else lights up. So... It compiles and uploads fine, but if it means anything, this is what shows up in the log thing after it finished uploading.
Quote:
In file included from C:\Users\Chris\Downloads\AutoLockDoors\AutoLockDoo rs.ino:8:0:

c:\users\chris\appdata\local\temp\arduino_build_81 8125\sketch\canhelperlibrary\connector\mcpcan\cmcp canconnector.h: In member function 'virtual bool CAN::CMCPCANConnector::ReadImpl(long unsigned int&, unsigned char&, unsigned char*)':

c:\users\chris\appdata\local\temp\arduino_build_81 8125\sketch\canhelperlibrary\connector\mcpcan\cmcp canconnector.h:159:79: warning: invalid conversion from 'int' to 'byte* {aka unsigned char*}' [-fpermissive]

return this->mCAN && this->mCAN->readMsgBuf(&pCANId, 1, &pLength, pReadData) == CAN_OK ;

^

In file included from C:\Users\Chris\Downloads\AutoLockDoors\AutoLockDoo rs.ino:1:0:

C:\Users\Chris\Documents\Arduino\libraries\CAN_BUS _Shield/mcp_can.h:116:11: note: initializing argument 2 of 'byte MCP_CAN::readMsgBuf(long unsigned int*, byte*, byte*, byte*)'

INT8U readMsgBuf(INT32U *id, INT8U *ext, INT8U *len, INT8U *buf); // Read message from receive buffer

^

In file included from C:\Users\Chris\Downloads\AutoLockDoors\AutoLockDoo rs.ino:8:0:

c:\users\chris\appdata\local\temp\arduino_build_81 8125\sketch\canhelperlibrary\connector\mcpcan\cmcp canconnector.h: In member function 'virtual bool CAN::CMCPCANConnector::SendImpl(long unsigned int, unsigned char, const unsigned char*)':

c:\users\chris\appdata\local\temp\arduino_build_81 8125\sketch\canhelperlibrary\connector\mcpcan\cmcp canconnector.h:171:70: warning: invalid conversion from 'const unsigned char*' to 'byte* {aka unsigned char*}' [-fpermissive]

return this->mCAN && this->mCAN->sendMsgBuf(pCANId, pLength, pData) == CAN_OK ;

^

In file included from C:\Users\Chris\Downloads\AutoLockDoors\AutoLockDoo rs.ino:1:0:

C:\Users\Chris\Documents\Arduino\libraries\CAN_BUS _Shield/mcp_can.h:115:11: note: initializing argument 3 of 'byte MCP_CAN::sendMsgBuf(long unsigned int, byte, byte*)'

INT8U sendMsgBuf(INT32U id, INT8U len, INT8U *buf); // Send message to transmit buffer

^

Sketch uses 9568 bytes (29%) of program storage space. Maximum is 32256 bytes.
Global variables use 1119 bytes (54%) of dynamic memory, leaving 929 bytes for local variables. Maximum is 2048 bytes.
I've added the following libraries too!


And when I clicked on both of the libraries, it even added these includes into the main AutoLockDoors ino
Quote:
#include <mcp_can.h>
#include <mcp_can_dfs.h>

#include <CGlobals.h>
When I plug it into my car I can see the RX led turn on on the CAN shield, but it's a bit hard to see what led is on on the arduino. I plugged in every available pin on the CAN shield to the arduino (everything that is a direct fit / pins that sit on top of each other, no wires running anywhere besides to the OBD2) and plugged it into my OBD2 via the port on the CAN shield.

I tried driving and it doesn't lock my door. I left it plugged in for my entire 1 hour commute to and from work and it doesn't do anything. What am I doing wrong?

Edit: Oh I forgot. I uploaded my entire arduino folder thing as is to github too so in case you want to see if I did something wrong in the filing thing. https://github.com/aznchrisx/frsdoorautolock
aznchris is offline   Reply With Quote
Old 03-03-2019, 12:57 PM   #76
T0rt0r0
Member
 
Join Date: Jun 2017
Drives: European gt86
Location: France
Posts: 92
Thanks: 36
Thanked 23 Times in 14 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by aznchris View Post
Hi sorry I need help. I tried this 2 different times before I drove to work and I can't figure out what I'm doing wrong. I've tried the "File > Examples > 01.Basics > Blink" and it seems to work. The LED on the arduino blinks and when I upload the AutoLockDoors ino it stops blinking and something else lights up. So... It compiles and uploads fine, but if it means anything, this is what shows up in the log thing after it finished uploading.


I've added the following libraries too!


And when I clicked on both of the libraries, it even added these includes into the main AutoLockDoors ino


When I plug it into my car I can see the RX led turn on on the CAN shield, but it's a bit hard to see what led is on on the arduino. I plugged in every available pin on the CAN shield to the arduino (everything that is a direct fit / pins that sit on top of each other, no wires running anywhere besides to the OBD2) and plugged it into my OBD2 via the port on the CAN shield.

I tried driving and it doesn't lock my door. I left it plugged in for my entire 1 hour commute to and from work and it doesn't do anything. What am I doing wrong?

Edit: Oh I forgot. I uploaded my entire arduino folder thing as is to github too so in case you want to see if I did something wrong in the filing thing. https://github.com/aznchrisx/frsdoorautolock
Did you use the Can library in the zip at https://github.com/aznchrisx/frsdoor...LD_LIBRARY.zip or a random one from the internet ?

The two includes that were added to the ino file should not be required and could cause issues

Will try with the arduino ide version you have too see if there are some new things that cause problems
T0rt0r0 is offline   Reply With Quote
Old 03-03-2019, 02:05 PM   #77
T0rt0r0
Member
 
Join Date: Jun 2017
Drives: European gt86
Location: France
Posts: 92
Thanks: 36
Thanked 23 Times in 14 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Just updated the code online to fix the warnings (did not saw them as the IDE hide them by default :/)

Tested with the 1.8.8 version of the IDE, the differences seems minor
Code:
1.8.2
Sketch uses 9530 bytes (29%) of program storage space. Maximum is 32256 bytes.
Global variables use 695 bytes (33%) of dynamic memory, leaving 1353 bytes for local variables. Maximum is 2048 bytes.
Code:
1.8.8
Sketch uses 9562 bytes (29%) of program storage space. Maximum is 32256 bytes.
Global variables use 1119 bytes (54%) of dynamic memory, leaving 929 bytes for local variables. Maximum is 2048 bytes.
So I don,'t see any problem with what you've done.

Which OBD shield are you using ?
And which Arduino exactly ?

I recently buy one for some testings but a "newer" one with the smaller chip (the one in this picture https://www.ebay.fr/itm/Arduino-Uno-...r=424240789688) and I wasn't able to make the code works with it. Seems that the shield I have and this board are not compatible on some hardware level ...

The original unit I used is like this one https://www.ebay.fr/itm/UNO-R3-ATmeg...r=472143030750

The other thing you could do for testing is to modify the file Globals.h and uncomment the line 8

Code:
//#define DEBUG_CAN         // Comment to turn off debugging messages for CAN Send / Receive
This way you will see all the debug messages that I left in the code through the Arduino IDE (serial monitor)


Hope this helps I'm sad that it did not work the first time
T0rt0r0 is offline   Reply With Quote
Old 03-03-2019, 03:49 PM   #78
aznchris
Member
 
Join Date: Jan 2019
Drives: Scion 86 tS
Location: CA
Posts: 51
Thanks: 14
Thanked 6 Times in 6 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by T0rt0r0 View Post
Did you use the Can library in the zip at https://github.com/aznchrisx/frsdoor...LD_LIBRARY.zip or a random one from the internet ?

The two includes that were added to the ino file should not be required and could cause issues

Will try with the arduino ide version you have too see if there are some new things that cause problems
I used the included CAN library that you left in there and went ahead and deleted the additional includes.


Quote:
Originally Posted by T0rt0r0 View Post
Just updated the code online to fix the warnings (did not saw them as the IDE hide them by default :/)

Tested with the 1.8.8 version of the IDE, the differences seems minor
Code:
1.8.2
Sketch uses 9530 bytes (29%) of program storage space. Maximum is 32256 bytes.
Global variables use 695 bytes (33%) of dynamic memory, leaving 1353 bytes for local variables. Maximum is 2048 bytes.
Code:
1.8.8
Sketch uses 9562 bytes (29%) of program storage space. Maximum is 32256 bytes.
Global variables use 1119 bytes (54%) of dynamic memory, leaving 929 bytes for local variables. Maximum is 2048 bytes.
So I don,'t see any problem with what you've done.

Which OBD shield are you using ?
And which Arduino exactly ?

I recently buy one for some testings but a "newer" one with the smaller chip (the one in this picture https://www.ebay.fr/itm/Arduino-Uno-...r=424240789688) and I wasn't able to make the code works with it. Seems that the shield I have and this board are not compatible on some hardware level ...

The original unit I used is like this one https://www.ebay.fr/itm/UNO-R3-ATmeg...r=472143030750

The other thing you could do for testing is to modify the file Globals.h and uncomment the line 8

Code:
//#define DEBUG_CAN         // Comment to turn off debugging messages for CAN Send / Receive
This way you will see all the debug messages that I left in the code through the Arduino IDE (serial monitor)


Hope this helps I'm sad that it did not work the first time
I tried your new CANHelperLibrary and that made the warnings disappear so that's cool haha.

But I'm using this CAN shield: https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

And this is my Arduino: https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

I guess I'm using the one that you said you tested it with and doesn't work. If this doesn't work, I'll order a new Arduino UNO R3 with the long black chip like yours and return this old one. I'm assuming the difference in the boards are only the long black chips. Anything else I should look for? Thank you for your help!

Edit: Yeah still didn't work. I ended up purchasing this now. It'll arrive in a day or 2. Hopefully it works. https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

Last edited by aznchris; 03-04-2019 at 03:11 AM.
aznchris is offline   Reply With Quote
Old 03-04-2019, 01:24 PM   #79
T0rt0r0
Member
 
Join Date: Jun 2017
Drives: European gt86
Location: France
Posts: 92
Thanks: 36
Thanked 23 Times in 14 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by aznchris View Post
I used the included CAN library that you left in there and went ahead and deleted the additional includes.




I tried your new CANHelperLibrary and that made the warnings disappear so that's cool haha.

But I'm using this CAN shield: https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

And this is my Arduino: https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

I guess I'm using the one that you said you tested it with and doesn't work. If this doesn't work, I'll order a new Arduino UNO R3 with the long black chip like yours and return this old one. I'm assuming the difference in the boards are only the long black chips. Anything else I should look for? Thank you for your help!

Edit: Yeah still didn't work. I ended up purchasing this now. It'll arrive in a day or 2. Hopefully it works. https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1
Did you had a try with the serial debug ?

Also you can also try something else before waiting for the new arduino. In this file https://github.com/fontaromain/CANHe...CANConnector.h at the line 58 instead of 10 you could write 9.

This settings depends on the can bus shield you have and can't be determined automatically by the code, and I totally forgot about it :/

Will add a troubleshooting section in the github !
T0rt0r0 is offline   Reply With Quote
Old 03-04-2019, 02:45 PM   #80
aznchris
Member
 
Join Date: Jan 2019
Drives: Scion 86 tS
Location: CA
Posts: 51
Thanks: 14
Thanked 6 Times in 6 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by T0rt0r0 View Post
Did you had a try with the serial debug ?

Also you can also try something else before waiting for the new arduino. In this file https://github.com/fontaromain/CANHe...CANConnector.h at the line 58 instead of 10 you could write 9.

This settings depends on the can bus shield you have and can't be determined automatically by the code, and I totally forgot about it :/

Will add a troubleshooting section in the github !
Yeah I tried the serial debug but all I get are a bunch of "???"s and random stuff. I tried to change that baud number but nothing readable really comes out. Oh and I forgot that when I try to uncomment that one debug line you told me it said something about some exe not being found or doesn't work or something I forgot.

I tried to change the "10" to 9 and will test soon. Hopefully it works. Thank you for the help!

Edit: Pin 9 still didn't work. ): Hopefully the new board that is coming in today works though!

Last edited by aznchris; 03-05-2019 at 04:07 AM.
aznchris is offline   Reply With Quote
Old 03-05-2019, 06:33 PM   #81
aznchris
Member
 
Join Date: Jan 2019
Drives: Scion 86 tS
Location: CA
Posts: 51
Thanks: 14
Thanked 6 Times in 6 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
I'm over this tbh. I tried with the new board I got and I don't know why but it wouldn't turn on via the obd2 port if I didn't bend the power pins a little and hold it there. Then it started messing with my instrument gauge lights and my rpms and water temp needles and stuff. Now I don't know why but my gas pedal has a bigger deadzone before it starts moving and when I rev my car in neutral a little it'll drop down to like 500 rpms feel like it's gonna stall or turn off then it by like vibrating a little then it goes back up to 700rpms. Also now I have a permanent U0073 code that I can't clear. There were like 3 other U0073 codes that I cleared, but I can't clear this permanent one.
aznchris is offline   Reply With Quote
Old 03-06-2019, 12:19 PM   #82
T0rt0r0
Member
 
Join Date: Jun 2017
Drives: European gt86
Location: France
Posts: 92
Thanks: 36
Thanked 23 Times in 14 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by aznchris View Post
I'm over this tbh. I tried with the new board I got and I don't know why but it wouldn't turn on via the obd2 port if I didn't bend the power pins a little and hold it there. Then it started messing with my instrument gauge lights and my rpms and water temp needles and stuff. Now I don't know why but my gas pedal has a bigger deadzone before it starts moving and when I rev my car in neutral a little it'll drop down to like 500 rpms feel like it's gonna stall or turn off then it by like vibrating a little then it goes back up to 700rpms. Also now I have a permanent U0073 code that I can't clear. There were like 3 other U0073 codes that I cleared, but I can't clear this permanent one.
Seems that you had a short circuit on your can bus.

Try disconnecting the battery for some time. The lazy pedal indicates that the ecu resetted itself and is now in learning phase.

I really don't understand why it happened, on the french forum other people built it without any issues :/

Keep us updated
T0rt0r0 is offline   Reply With Quote
Old 05-14-2019, 12:46 AM   #83
aznchris
Member
 
Join Date: Jan 2019
Drives: Scion 86 tS
Location: CA
Posts: 51
Thanks: 14
Thanked 6 Times in 6 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quote:
Originally Posted by T0rt0r0 View Post
Seems that you had a short circuit on your can bus.

Try disconnecting the battery for some time. The lazy pedal indicates that the ecu resetted itself and is now in learning phase.

I really don't understand why it happened, on the french forum other people built it without any issues :/

Keep us updated
I tried to pick up this project again and it's still not working. I'm not sure why it still doesn't work. Before it wouldn't power on the Arduino because the power pins were loose so now I soldered the pins onto the can bus shield. Still doesn't work. I've even tried to use an official Aruino Uno R3 with the long chip too and it still doesn't work. I tried my old Arduino and the new Arduino I just bought both with the long chip on CS pin 10 and 9 and they both don't work. I'm not sure why.

They compile and upload fine. But when I plug them into my car, on the Can Bus Shield the "PWR", "TX", and "INT" lights up and on the Arduino there's an "L" led and the "ON" led both light up. Sometimes all the LEDs have an obvious flicker that are in sync with each other and sometimes the flicker is very faint. Sometimes it goes fast then it either slows down or it goes really fast where the lights look like they are solid, but if you look very close it's still flickering.

Also I tried plugging in the ISP. I don't know what that is. I don't know if I need it, but it didn't help the situation anyways.

Here's some pictures of what I tried putting together. I've tried with only DC power, with only serial port power (not connected to the obd2), and both. No difference besides via USB on my PC.



Here's a picture of my hardware
[IMG]https://scontent-lax3-1.xx.fbcdn.net/v/t1.15752-9/60342133_2215865088675219_4591329501236953088_n.jp g?_nc_cat=110&_nc_oc=AQmpwYq4aeWVKqxhulneZvfw3o4z5 Hl_CdWOvoaMssIL59ubQN0kMmAPklzQKBPtPS8&_nc_ht=scon tent-lax3-1.xx&oh=d1ebcf95ed32a1***dfde06e94417d3c&oe=5D58CC F2[/IMG]
aznchris is offline   Reply With Quote
 
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto locking doors Thavash AFRICA 21 02-12-2019 01:23 PM
Auto locking doors Magyarman Issues | Warranty | Recalls / TSB 13 01-23-2019 08:25 PM
Doors won't lock. mynameis940 Issues | Warranty | Recalls / TSB 9 03-15-2018 02:05 PM
Auto Lock (Doors) pinoyplaya BRZ First-Gen (2012+) -- General Topics 67 11-13-2017 10:47 AM
Doors won't automatically lock adan Issues | Warranty | Recalls / TSB 18 03-01-2014 10:02 AM


All times are GMT -4. The time now is 03:26 AM.


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

Garage vBulletin Plugins by Drive Thru Online, Inc.