GR Yaris Gear position + CAN data Arduino project.

Reyanth

Fascinated Member
Joined
Mar 19, 2022
Messages
21
Reaction score
85
I was bored one day and I decided to start a arduino project for the GR. I really wanted to get a display to show gear position (and yes, I know this can be done via can bus) but, I really wanted to use something mechanical and with more faster response.

So, I did some research how tackle to extract gear position information and ended up with a hastily thrown idea with hall sensors. As the GR's shifter works with two wires, it was simple enough to transfer that movement into two linear axles... so to say...

I also needed something with deal with the information from the hall sensors and ended up choosing and old Arduino Nano v.3 I had laying around. First it was only suppose to be only a gear position display, buuut... the idea ended up growing a bit. And I didn't have any idea how to make the Arduino do what I wanted it to do.

So I went into the internet and learned some c++.

After a week or two, some early stage ideas of how it might look:

a4b9216e-04f4-4864-a56d-7d6ee2b00f15.jpg
b004c85e-21dc-49e5-9dd3-a731415207dc.jpg

I managed to get the code into a point that it was actually working at least somewhat like I wanted it to. I had 5 hall sensors, two measuring vertical position, two measuring horizontal position and one for reverse gear. Now I had the means to to tell the Arduino what gear I was in... thru' math.

Some testing vid: IG: HERE

Skipping a little, I made a bracket for two linear potentiometers which I connected to the shifter wiring with some rods.. Glued couple magnets onto the potentiometers which move "in fashion" depending on which gear you're in. Some magic happens in Arduino and it throws the gear on a display.

Video where the mechanism is seen in operation: IG: shifter mech

I cleaned the shifter stuff a little and made a small bracket for the display and installed it all in the car. IG: shift position display in operation

Well, like said before.. the idea kind of grew.. I really liked the idea of 3 screens but it was getting a bit too fiddly to get 3 displays working with the A-Nano. I did some research again and went to the internet to ordered some upgrades.

The new idea was to replace the Nano with Mega, add a multiplexer to run more than 2 displays and a can bus reader to able to import the data from the can for the Arduino.

The new plan and some prototyping:
tuning.png
9f3dcbc3-c249-45c0-ac4f-e9a1517005d2.jpg


At this point, I really wanted to be able to print my own 3D cases etc. parts needed for the project so I managed to score used Prusa i3 MK3S printer from a bud. Of course I didn't know anything about 3D printing or even 3D modelling so... I had to go to the internet again....

After few days or so, here is where I am currently:

696ed677-c112-48b7-a83a-5d8c8eda6647.jpg
IMG_20230409_062230.jpg

There is still power / ground distribution module missing from the "box", and I need to do some wiring etc to connect it all up.. Also the Arduino code still lacks the part "fetch can bus data" and "turn it into a readable stuff on displays". Also the triple display set is going to need a own new housing, which I need to 3D model up. I also need to decide am I to use 0.96" or 1.3" displays. Currently the ones I have are 0.96"'s but, maybe the 1.3"'s would be easier to read with more space.

I know I didn't share much of the detailed info about the whole project, sorry for that.. I haven't really done -that- much documenting and didn't feel like copy-pasting some Arduino code here (for example).. IF you're interested thou', happy to share and talk about the details.

Not sure am I gonna update the thread here but, I keep IG somewhat up to date also about this project.

Cheers!
 
Last edited:
Amazing tech spiral... :-)
I would love to pick some of it to fabricate my own Gear Indicator (outside of OBD)
Thx for sharing (y)
 
Amazing tech spiral... :)
I would love to pick some of it to fabricate my own Gear Indicator (outside of OBD)
Thx for sharing (y)

I'm planning on a ver.2 of the whole hall sensor bracket thingy, but perhaps with optical switch modules instead of hall's and 3d printed frame.. I can share the 3d print model as soon as I get it done and fitted and worked out the kinks, as well all the bits and bobs that are needed in case you wanna fiddle and tinker.

The bracket currently looking as such:
68c90c69-73fe-4c27-82c8-91c74296d83c.webp
 
I'm planning on a ver.2 of the whole hall sensor bracket thingy, but perhaps with optical switch modules instead of hall's and 3d printed frame.. I can share the 3d print model as soon as I get it done and fitted and worked out the kinks, as well all the bits and bobs that are needed in case you wanna fiddle and tinker.

The bracket currently looking as such:
View attachment 15498
just scratching the surface here, but I wonder if a couple of linear position sensors attached directly to the (2x) shift-cables could do the trick? Then the next question would be: would arduino read those signals and interpret those cable positions (intervals) and compute an output shift-position? Please keep us posted on any of your progresses... (y)
Anyone knows how the GR Corolla gets the current gear display? (from FPV videos I get the impression that may be some hardware involved - not purely computing motor RPM/ speed)


1681387133086.webp
 
just scratching the surface here, but I wonder if a couple of linear position sensors attached directly to the (2x) shift-cables could do the trick? Then the next question would be: would arduino read those signals and interpret those cable positions (intervals) and compute an output shift-position? Please keep us posted on any of your progresses... (y)
Anyone knows how the GR Corolla gets the current gear display? (from FPV videos I get the impression that may be some hardware involved - not purely computing motor RPM/ speed)

About the linear sensors, in theory: yes.. In practise, not so sure.. As they are linear it would be possible to just use two sensors (if they work within the needed distance). Also attaching things to the cables is a bit tricky, since the other at least moves a little on 3 axles. (forwards-backwards, left-right and roll or "twist"). Also if there's no enough space, the sensors might interfere with each other..

That's why I isolated the 3-axis movement to the sliders to make it as reliable as I could.. (A bit hard to explain what I mean but, in case you open the middle dash and look how the cables move around while moving the stick, I bet you understand.)

Couple example of digital hall sensors:
5pcs 3144E A3144 Hall Effect Sensor Hall Effect Sensor Module KY-003 DC 5V for Arduino PIC AVR
or google "TLE4905L hall sensor"


There might be some hardware involved (or good code and better processor than a potato) on the GRC, it really looked responsive in a video.
---

As a progress from today, soldered the "power distribution board" and pulled some cables to the "box".
(power dist. board can be seen on left picture, left side, middle board with red/white/black).
Basically splits 5v to 11 pins for anything that you might need it for.

555c4d64-781e-4231-b208-32c12c72d185.jpg


It's gonna get bit stuffed inside. There are 2 wires for power (5v and ground), 2 for can bus connection, 6 wires for the 3 displays (i2c bus) and 5-6 wires for the hall OR optical sensors.. (thinking of adding the 6th sensor for N, but let's see if I need it.)

9226fd73-83e6-4384-9656-2d6d74a6b020.jpg
 
Last edited:
A little update today.
Had a OLED frame test print 1 done and it seems I got the measurements about right. Moving onto the test print 2, with 3 screens and a bit more frame.

b4f15437-6e65-4e4f-b328-4b83c1c345bf.webp
e7e40efe-59ce-434e-85f1-56a411dd9005.webp
 
I did a thing! A little adjustment is required but, fits like a dick in a hand.
01e51199-53da-48ea-a8c0-d73a1b3d04fb.webp
4151ae40-427d-46fc-b6b3-7b19a48cd7a7.webp
 
Hi there, this is awesome - will be following closely!

I was wondering where on the loom you're connecting to get your CAN H/L input signal?
 
Back
Top