GAS TURBINE ECU help please! CLEVER CODERS ENTER!

I am biulding a GAS TURBINE ecu. (biulding the gas turbine too) I know its alot to bite off and chew, but I have been biulding gas turbines for years and have done heaps of electronic projects and stuff like this in the past, but coding in arduino to me is NEW. My brain aint so young anymore so im struggling.
I worked out the coding to make the rpm work and temp sensors work, (pretty simple, mostly just taken off the learning pages) but to make this work, is going to be a big bit of code. Im looking for someone who can help me get a start on it, some kind of structure, the LCD page set up so i can get started and take it all the way.
I have so far a MEGA and a prototype on top (for my sensor and power supply components, etc)
and a TFTLCD shield on top of that.
Ive loaded up the usual TFT test stuff from the suppliers website, test graphics, touch, load images from SD card, etc, all pretty cool.
Ive seen the scooterputer display, and think thats pretty cool. I would like a display similar to that, with things on it like RPM, TIT, TOT (turbine inlet temperature, turbine outlet temperature) IGN ON or OFF, GAS on or off, fuel throttle (in %) and starting, running or shutdown status, and also driver parameter inputs such as warmup idle time, idle rpm, gas/fuel switchover time, etc, or a second page (menu) to scroll thru the settings. Batt voltage too would be helpfull.
Is any of this making sense?
Now, I know what i basically want it to do, and ive hooked up in test form all the circuits needed, they are as follows...
ten
Two (or three maybe not sure yet) K type thermocouple inputs, using AD595 chips
RPM input up to 60 000 rpm (using a 4017 divide by chip to relieve the mega of some of the load of counting all those pulses from the rpm sensor)
A simple PWM display (LED) to test a motor control output (gas turbine's starter motor)

Anyone interested in offering a bit of help?
plenty fo credit to be given to the person who helps on any upcoming youtube vidoes of the finished product!!
I am yet to biuld the motor control side of it, it shouldnt be too hard, i simply take a PWM output from the arduino to motor drive mosfets etc.
It will also have Ignition control (ill use an optocoupler just to be safe) , and fuel pump control (another PWM, 0 to 100% throttling)
and it will have a gas solenoid and fuel solenoid to switchover at start up.

Sorry about the poor editing, my screen is acting up, when the page gets bigger than 12 lines or so shrug
So I will list a few things here...
INPUT LIST
Start button ( have a nice big fat green start button on the shelf)
System on or off (emergency stop button)
pressure transducer (gas turbine will probably run up to 15psi boost pressure at full throttle)
Turbine inlet temperature,
Turbine outlet temperature,
Throttle input, 0 to 100% (simple three wire 5k pot on the loud pedal)
Afterburner button (yes even louder)
Input data from LCDtouch to enter parameters?

OUTPUT LIST

PWM Starter motor 0 to 100% (probably fire up the gas turbine at 100%, will know the settings after first testing of the turbine with LPG gas)
PWM fuel pump
GAS solenoid
FUEL solenoid (it starts on gas to warm up, then switches over to liquid fuel to run)
Ignition (coil spark etc)
LCD display
Proximity switch on starter clutch to avoid startup unless shaft is engaged (just in case its out and comes in when its running, could be messy)

The logic goes like this

START... gets rpm, temperature, displays it, says (starting...)
ramp up starter motor to "start rpm" target, upon reaching that, turn on gas solenoid and ignition
upon "x" seconds, wait for rise in RPM, (confirm igntion) if this fails in time, shutdown. display "igntion failed"
else, ramp up starter motor to idle rpm target.
wait for warm up time, then switch over to liquid fuel, wait further warm up time,
then turn over control of fuel pump to the throttle pedal input 5k pot, and allows engine to run controlled from this pot, at predeterminded ramp up and ramp down settings (if the fuel pump is ramped up or down too quick, you get flameouts or choking black smoke)
then when the driver presses "shutdown" or selects it on the touchscreen, fuel is shut off..and starter motor spins engine at cool down rpm (only 2000rpm) to cool engine. (this isnt definete yet as im yet to see if i can find a starter motor that will handle the RPMs of the engine, might be some other arrangement yet)
anything above is probably going to be changed as the project evolves:)

on and yes its going on a go kart.

No ones not got anything to offer?

60 000 rpm is only 1kHz - why bother dividing it down?

because it needs to use an interrupt I think. Thought I needed to relieve the processor of it to leave it time to do all the other things to do?

It's a 16MHz processor; a 1kHz interrupt shouldn't be any trouble at all.
Why don't you post your code, then we can see where to concentrate the help.

My recommendation, when working on a giant project like this, is to master each hardware and software component individually in isolation first. Then integrate them one at a time into an ever-larger system.

Beyond that, people tend to get their most useful input in response to specific questions, like "What is the best way to accomplish X specific thing?" or "Here is my code, which I expect to do X but instead it does Y, can someone help me understand why?"

Yes all very good I completely understand what your all saying, but like i said, im NEW to arduino programming, and ive tried to get a start but its just not that simple for a newbie. I stare at new lcd code, none of it makes sense. If i posted my code i have so far it wouldnt be any help, it would have no purpose, other than to simply take a k thermocouple reading and a rpm signal and output it to a screen( which isnt even the right screen)

Hence this post, i need help from someone who knows how to write the first bit of code to put the basics up on the screen, as i have already stated. There isnt anywhere near enough description abd comments in some code example files to help ppl like me, we just get stuck.

I stare at new lcd code, none of it makes sense. I

So, don't use it...yet.
Use simple serial prints to display results - Serial is already debugged, so you shouldn't have any uncertainty about the results it is showing you whilst you're debugging the rest of the stuff.

The trick is to break down the problem into manageable, understandable lumps, otherwise you'll just stare at a daunting heap of problems, or, as seems likely in the case of your divider, you'll introduce complexity that isn't justified.

  1. You need to measure RPM
  2. You need to measure temperature
  3. You need to measure throttle pedal positions...
    and so on.

Yes I think your right. If i check which pins the LCD display has, and reserve them for it, and use the others i need for the sensors etc, I should be ok?
I will assemble what I can from the libraries and post it

If i check which pins the LCD display has, and reserve them for it

The great thing about an LCD is that it doesn't care what pins it is connected to. Figure out if the other things you are using do care, and connect the LCD to whatever is not reserved. Don't start with the LCD.

as long as they dont use the SPI? the TFTLCD sheild for uno and mega uses them I think. correct me if i am wrong:)

as long as they dont use the SPI? the TFTLCD sheild for uno and mega uses them I think.

You've never mentioned using a TFT before.

Stimps:
I have so far a MEGA and a prototype on top (for my sensor and power supply components, etc)
and a TFTLCD shield on top of that.

:grin: :grin:

Ive come across a hurdle...Ive got my LCD code stripped down to just displaying a box, and ive got the AD595 hooked up to a free pin.
Now, I can load the lcd code no worries, and then load the thermocouple code instead ok
but when i merge the two i get compliation errors, namely, "printFloat" was not declared in this scope
code structure stresses me :frowning: lol

This thermocouple reading code was courtesy of an experimenter from Instructables.

// Define which analog input pin we have connected to the temperature sensor
#define TEMP_SENSOR_PIN 0

// if you tie the Arduino's vRef to the 3.3 volt supply, change this to 3.3
#define ANALOG_VOTLAGE_REFERENCE 5

void setup() {
Serial.begin(115200);
}

void loop() {
// prints the currrent temperature with 1 place after the decimal point
printFloat(getTemperature(), 1);
// print a carriage return
Serial.println();
// rest 100 milliseconds
delay(100);
}

float CtoF(float c) {
// optionally convert from Celsius to Farenheit if you are into that sorta thing
return c * 9.0 / 5.0 + 32.0;
}

float analogInToDegreesC(int inputValue) {
// divide by 1023, the maximum possible input value, that scales the input between 0 - 1
// then multiply by the reference voltage, which scales 0-1 to 0-vREF (default is 5V)
// lastly, multiply by 100 to scale it to 10s of millivolts or degrees
return inputValue / 1023.0 * ANALOG_VOTLAGE_REFERENCE * 100.0;
}
float getTemperature() {
// read the analog input, convert to degrees C, and covert to F
return CtoF(analogInToDegreesC(analogRead(TEMP_SENSOR_PIN)));
}

// ---- This last function, printFloat isn't necessary to understand unless you want to
// ---- feel free to ignore it for now, and treat it as a built-in utility,
// ---- it prints out floating point point values

// printFloat prints out the float 'value' rounded to 'places' places after the decimal point
void printFloat(float value, int places) {
// this is used to cast digits
int digit;
float tens = 0.1;
int tenscount = 0;
int i;
float tempfloat = value;

// make sure we round properly. this could use pow from <math.h>, but doesn't seem worth the import
// if this rounding step isn't here, the value 54.321 prints as 54.3209

// calculate rounding term d: 0.5/pow(10,places)
float d = 0.5;
if (value < 0)
d *= -1.0;
// divide by ten for each decimal place
for (i = 0; i < places; i++)
d/= 10.0;
// this small addition, combined with truncation will round our values properly
tempfloat += d;

// first get value tens to be the large power of ten less than value
// tenscount isn't necessary but it would be useful if you wanted to know after this how many chars the number will take

if (value < 0)
tempfloat *= -1.0;
while ((tens * 10.0) <= tempfloat) {
tens *= 10.0;
tenscount += 1;
}

// write out the negative if needed
if (value < 0)
Serial.print('-');

if (tenscount == 0)
Serial.print(0, DEC);

for (i=0; i< tenscount; i++) {
digit = (int) (tempfloat/tens);
Serial.print(digit, DEC);
tempfloat = tempfloat - ((float)digit * tens);
tens /= 10.0;
}

// if no places after decimal, stop now and return
if (places <= 0)
return;

// otherwise, write the point and continue on
Serial.print('.');

// now write out each decimal place by shifting digits one by one into the ones place and writing the truncated value
for (i = 0; i < places; i++) {
tempfloat *= 10.0;
digit = (int) tempfloat;
Serial.print(digit,DEC);
// once written, subtract off that digit
tempfloat = tempfloat - (float) digit;
}

No, I can't see printFloat either.
Please use a code box using the # icon when you post code

so how come it works on its own???
strange....

Ignore that, found someone elses very simple quick and working code, put it in, worked straight away.

WOOT!!!
its dumping huge data to the screen thats ok tho:)

If you go back to your post with the code in it, you can highlight the code, then click on the # icon on the toolbar. This will post it in a code box, and avoid spurious formatting.
Also, before posting code, it is best to auto format you code using ctrl-t in the IDE.

It is good that you have found a partial solution to your problem, it would be great if you shared it.