Main Menu

My life, My coding

Started by Rx7man, May 27, 2015, 09:09:36 AM

Rx7man

I also want to change a bunch of the program flow... for example I have a whole bunch of stuff I want to do every 100millis.. but I think it would help the processor if I didn't do them all on the same 100 millisecond interval.. so I'll split it into 10 millis and do something different every time.

I'm still trying to wrap my head around how I'm going to update this all via serial.. especially the floating point stuff.. Just keeping track if it is going to be a nightmare, so I think I'm going to start a new minor version soon.. I'll have an array of ints that will hold ALL the global ints, with an enumerator so i can keep track mentally of which is which..  Repeat for the floats and bytes.. that will make serial parsing SO much easier as I'll just be able to reference it by index rather than having a million damn "if" statements... Another good thing is the enumerators copy over to VB very nicely, just have to remove the semicolons and you have the VB version, so I don't get confused that way either.
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

Rx7man

OK, here's 1500 lines of code so far, and I don't have the serial parsing done yet or the EEPROM saving.. I forecast another 500 lines for that, but that'll only happen after the rewrite I mentioned before.




Take a look at it and tell me what you think
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

Rx7man

You folks have sure been quiet recently..

Anyhow, I have a ton of outdoor work to do.. like going around a field 100 times cutting hay.. It gives me lots of time to think about how I'm going to solve a problem.

So I put pretty much all my global float typed variables into an array that I'm accessing by using an enumerator.. It is not helping readability on things that span 2 lines as it is, but I think in the long run it'll pay off, especially when trying to update stuff over serial port, and getting information back to the laptop.. I don't think I'll have the arduino send much periodic information over the serial port by default.. perhaps a few basics, RPM, boost, VGT position, but all the other advanced stuff the laptop will send a request for.  I really want to see how the PID system I have works, all I can say is I'm hopeful!...

The math is really complicated, and a lot of the PID components will probably be unnecessary in the final version, but it's easier to put them all in and set their sensitivity to 0.. I think for tuning I will start with all Proportional sensitivities at 1, and integral and derivative sensitivities at 0, then if it's too laggy, overshoots, or doesn't ever get to the setpoints, I can play with the 'I' and 'D' components
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

hakcenter

sometimes life gets you down haha
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

Yep, life gets in the way of doing what you want to do

I bought the  piece of tubing today I'm going to use to make my downpipe.. 4" all the way.. the turbo V band flange I'm going to cut myself on the lathe so it fits nice, and then I should be ready for the physical installation.. Yes, I need to get more stuff :rolleyes:
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

hakcenter

The 4" i got from DAP, barely BARELY fits. I mean like 1/16" between frame and transmission!
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

On mine all but the very first part of the DP is 4", and it fits nicely.. perhaps the routing is a bit different?
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

Rx7man

damn it's been hot here.. we had 100F in the shade yesterday, about 96 today, I was up til 4AM baling hay and in a T shirt the whole night.. was hoping for a touch of dew but that wasn't happening.. another couple days of this grind and it's done for a while.. then the irrigation goes like mad again
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

Rx7man

Well, I ran into something that is going to cause me problems down the road with the serial interface... not sure how I'm going to deal with it yet.. Serial.parseInt is a blocking function, which will wreak havoc in the timing of everything else, so I may have to do some serious thinking about how I'm going to work around it.. *grumbles*

I'm thinking of sending everything in binary format, but that makes for unreadable transfers, and in integer form I run into problems too
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

hakcenter

but blocking is super cool  :o
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

I hear Lego blocks too

it was another day of 96F, I was up til 4 am last night, and will be again tonight... and tomorrow night.. *sigh*...
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

Rx7man

Well, the haying is done.. now it's back to watering...

I spent a couple hours today on the lathe, I made my downpipe adapter, looks pretty good, and fits properly.. 4" is going to look huge in comparison to the 2 1/2 or whatever the HX35 is... I'll try and post a pic later.
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

hakcenter

Oh it's massive! I think the stock dp is like 3" at best.

You might want to like... make more on the lathe for other people that can't actually get a 351ve v-band cause all anyone sells is the cw's and calls it he351.

Btw you make me peanut butter and jelly having a lathe. I need a mill first... but damnit I should have a lathe too
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

The lathe is so nice to have.. I probably spend 100 hours on it a year.. and I'm supposedly a farmer... The adapter I made doesn't have a perfectly smooth finish like a CNC lath would have, but it'll do the job.  The lathe I have is a 40" bed, 10" max swing.. it's a taiwanese lathe, it came from the high school I went to... I have a VFD controlling the 3hp motor on it.. we don't have 3 phase power here, so we needed a drive for it anyhow, and well.. a nice Allen Bradley wasn't needed at a jobsite and it found it's way home here.. SUPER nice to get just the right cutting speed... though I do have to invest in more tooling for it, especially boring bars and carbide tool holders.

Since the mandrel bends aren't actually 4" OD on the bend, I tapered where the DP fits on from 4.05" to 3.9" so you have a good fit whatever the size is, and you have a groove to weld in. 
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

Rx7man

Here's some of the pictures attached
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles