I'm going 1JZ

AliK

Vehicle Dating Officer
Staff member
Club Member
Hmmm - any chance of giving it a permanent +v feed without killing a car battery if laid up for say 3 weeks?
 

Russell

Club Member
Right! Just did a bit more searching online at everybody's favorite search engine. (apologies to the non technical for filling this part of the build thread with coding stuff)

So the motor itself only has 315 degrees of rotation. Its Zero point essentially involves slamming itself into its stops to acknowledge it has turned as far as it can. Having looked at some other projects, some have the jitter more than others so need to look into the library I am using and see if there is a better approach to getting to this point less aggressively.
The command on the library is simply Motor.zero(); so I need to understand how that works first.
 

AliK

Vehicle Dating Officer
Staff member
Club Member
I was thinking it loses the zero point position data in volatile memory when the power goes off. So once it found the zero point, providing you don't power the controller down, then the position data is preserved a all you have to do is give it the sweep command when the ignition comes on.

Having said all that, I see Franky's point and now thinking it's cool too ;)
 

Russell

Club Member
Found a way around it.

The zero command simply turns the stepper motor anti clockwise it’s maximum steps. As it pretty much starts at zero it just bounces off its stop until it times out.

I just remove the initial zero command as without speed input it zeros itself. Therefore it will always start at zero as long at I don’t turn the engine off when I’m rolling.

Taking a similar approach with the tacho so will probably use a capacitor of some form that will keep it alive for long enough to reset to zero when the tacho input stops when it’s turned off. I could just keep the ignition on for a second or so before I turn it off but that isn’t good enough for me.


Sent from my iPhone using Tapatalk
 

AliK

Vehicle Dating Officer
Staff member
Club Member
Good man!!! [emoji106][emoji106][emoji106][emoji106][emoji106][emoji106][emoji106][emoji106]

I knew you'd find a way! And I love the capacitor solution, simple and effective!
 

toopy

Club Member
I have absolutely no idea what your talking about, but it looks good all the same, i quite like the jitter aspect on start up :thumbs:
 

Russell

Club Member
I have absolutely no idea what your talking about, but it looks good all the same, i quite like the jitter aspect on start up :thumbs:

I like the sweep but the jitter was annoying. Worked out now though.

Waiting for my second screen to arrive now so I can continue.


Sent from my iPhone using Tapatalk
 

Russell

Club Member
Still working on the speedo and as per my previous comments I wanted to incorporate as much as I possibly could into the original platform and have it feeling as OEM as possible.

Well I have very nearly achieved it after a lot of work. Without getting too technical, the code is reasonably complicated and made harder as I’m trying to fit it all into an Arduino nano and then it has to fit into the original speedo without looking out of place.

The reason for any of this is because I want the inside of the car to be as original as possible and the original speedo mechanical drive won’t work with the digital speed sensor in the new gearbox.

I could just find the correct mechanical speed sensor from an early Supra, screw it in and be done with it but that seemed to difficult.
Much easier to spend months designing, coding, experimenting, going back to the drawing board and generally banging my head on the table.

Anyway, here is what it currently looks like
7822c20b8cd9cf0aa621228c4058f9b6.jpg


The basic parts are;
Arduino nano - for the non technical its a kind of mini computer that handles everything plugged into it.

Speedo face - currently cardboard and behind it is a GM stepper motor.

Small screen - This goes behind the main ODO and simply displays the cars mileage. Every time the handbrake is applied, it saves the mileage to the Arduino memory.

Large screen - This goes behind the trip counter and displays all of the functions I have been working on. More on those shortly.

Rotary encoder - This turns like a volume knob and presses to select “things”. This goes into the original trip reset location with the original knob so everything looks OEM. As well as resetting the trip, it is also the main input device.

To the left is the Power supply (all runs at around 5v) and a frequency generator which allows me to simulate the input from the gearbox.

4db6916316c570cb6ea5db67d192697f.jpg

Trip time in Minutes from when the engine was started

c4a8f25e1f5d855054937b35461224ad.jpg

Digital speed readout

b9f50da1fc7dfe5c232e872fea00e6ee.jpg

Trip counter which is reset by pressing to rotary encoder

ed0f2d1d7518c593eed941c1907ad0f9.jpg

0-60 timer. Final bit of code I need to work out. It’s not quite right and I want it to be as automatic as possible. Just stop the car, nail it and it will tell you how quickly you got to 60mph

39878b686ca3de1d11e94f65ff7ef204.jpg
0-100 timer. See above

ca87e98dceed8808794cf0804980e064.jpg
This is the rotary encoder

b08cf4f5cc9cc4794fa0a22a94885a01.jpg

This is the ODO

Next steps are to get the 0-60 and 100 timer code working properly, design the final circuit, power supply and fit it all into the original speedo.

Oh, and finish the rest of the car!

If anyone happens to be an Arduino whizz and wants to help with the 0-60 timer, I would be eternally grateful!


Sent from my iPhone using Tapatalk
 

AliK

Vehicle Dating Officer
Staff member
Club Member
Just superb!! A supra mechanical fix wouldn't have been anywhere near as satisfying or fun!!!!

Love the 0-60-100 timer, a clever add-on!
 

Russell

Club Member
Just superb!! A supra mechanical fix wouldn't have been anywhere near as satisfying or fun!!!!

Love the 0-60-100 timer, a clever add-on!

Cheers, open to incorporating other ideas if people have them.

Just need to get the event timing right so it starts, stops, displays timings, best time etc. All with only a tiny bit of memory left on the arduino.

630 lines of code so far!
 

Russell

Club Member
You are a clever man Russell!

Can you calibrate easily for accuracy and changing tyre size, diff ratio etc?

I have a sensor on my diff that was used for a rally tripmeter I reckon that could be used for your device. https://www.brantz.co.uk/product-page/brantz-high-temperature-wheel-sensor

I certainly can and no reason to use a new sensor as there is one in the gearbox.

It will end up being much more accurate than any cable driven speedo.

Here's how the Arduino knows how fast you are going;

Eveytime the prop rotates, the speed sensor sends 4 pulses which are picked up by the Arduino.
All I have to tell it is how many Pulses it should receive per mile - Worked out with a bit of Pi, diff ratios etc. and thats my figure. Takes 2 seconds to update and can take into account any combination or wheel size and diff ratio.
The Arduino takes the Pulses per mile and calculates speed, distance traveled etc.
I then use this information to drive the speedo needle and all of the other functions.

For testing I simply have a frequency generator that sends out a square wave signal. I have a simple spreadsheet I put together which I input the speed I want and it tells me the frequency. This allows me to simulate whatever speed I want. I have taken it up to a few thousand MPH so far while I was making sure the mileage counted correctly and didn't want to wait too long.

I have been trying to think of other useful functions and may add a 1/4 mile timer as well.

If anyone has ideas for useful/fun functions, let me know. Essentially, if it can be calculated with Distance and Time, I can add it. There isn't enough memory or spare inputs to add other factors.
 

AliK

Vehicle Dating Officer
Staff member
Club Member
What about 1/4 mile runs!? You already have speed and odo readings so it shouldn't b a lot more code, right?

And with segment splits too!?
 

Woody928

Events Officer
Staff member
Club Member
Looks very trick dude, seriously smart stuff there. How's the rest of the car progressing? ;)
 
Top