Lil' Blackbox

Coding => v1.0 - v1.1 => Topic started by: Rx7man on November 07, 2015, 04:54:55 PM

Title: Reading from the VGT
Post by: Rx7man on November 07, 2015, 04:54:55 PM
OK, since this is a pretty specific topic, I thought I'd start a thread on it...

Using the example in the can.h library, I incorporated it into my project and got lots of numbers flowing on the serial monitor...

Where to start?...
Well.. Lets start with the Message ID's...
So far I see 2 different ID's..
One is
ID | 18FF0A02 | Data Length | 8 | Data | 00 | FF | FF | FF | FF | FF | FF | FF
and is always full of "FF", it seems to be occurring every every 5th message.. some sort of timing thing I guess?  either way, it's not very interesting

The interesting one is
ID | 18FFC502| Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B

More as I figure it out
Title: Re: Reading from the VGT
Post by: Rx7man on November 07, 2015, 04:55:48 PM
Here's an example of the readout I'm getting


ID | 18FF0A02 | Data Length | 8 | Data | 00 | FF | FF | FF | FF | FF | FF | FF
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FF0A02 | Data Length | 8 | Data | 00 | FF | FF | FF | FF | FF | FF | FF
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FF0A02 | Data Length | 8 | Data | 00 | FF | FF | FF | FF | FF | FF | FF
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FF0A02 | Data Length | 8 | Data | 00 | FF | FF | FF | FF | FF | FF | FF
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FF0A02 | Data Length | 8 | Data | 00 | FF | FF | FF | FF | FF | FF | FF
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
ID | 18FFC502 | Data Length | 8 | Data | 01 | B1 | 01 | 4E | 00 | B2 | 01 | 7B
Title: Re: Reading from the VGT
Post by: Rx7man on November 07, 2015, 06:52:34 PM
OK..

the 1st byte seems to always be 0x01.. perhaps another identifier?
the 2nd and 3rd bytes are the low and high bytes of the ACTUAL position respectively
the 4th byte is the temperature... again.. not sure how it's scaled.. looks like Celcius - 40 degrees.. need more research
the 5th byte seems to always be 0 in my testing anyhow... error flags maybe??
the 6th and 7th bytes are the low and high bytes of the COMMAND position respectively
the 8th byte is the motor command direction/magnitude.. byte value -128 (or perhaps 127?).. either way, it'll tell you what the motor is currently doing.

The sketch is attached..
you can uncomment a section in the 'readMessages' to see the raw data, and play with the minimum and maximum VGT values, as well as the timer interval to see how yours behaves..
right now it'll cycle the vanes from full open  to full closed once per second.. if you set it to once every 200ms it should go into "safe" mode for a couple seconds and then resume for a few more seconds..
Title: Re: Reading from the VGT
Post by: Rx7man on November 07, 2015, 07:50:56 PM
Looking into the first byte a little deeper, it looks like a bitflag... bit 0 is the "OK" flag, bit 2 (3rd bit) is the "error" flag... that one seems to get raised (and bit0 unset) when it either times out or you give it a bad value to go to... haven't figured out the rest of them.. .there may be an over-temp and over/under voltage in there somewhere.. it didn't seem to get raised when I jammed the vanes though.

I haven't been able to trigger any other errors
Title: Re: Reading from the VGT
Post by: Rx7man on November 09, 2015, 10:18:36 PM
So I'm using the VGT temp as the engine temp... should be reasonably close (same coolant flowing through both) (once I figure out the scaling)... it'll give me a warmup mode where it keep the vanes a little more closed to load the engine.

I don't know if I can "ask" the turbo about any other parameters.. or things I can set (like the default position, PID controls, etc).. I sent an email to cummins turbo technologies and Holset.. fat chance of getting a response from them.
Title: Re: Reading from the VGT
Post by: hakcenter on November 10, 2015, 07:34:28 AM
I don't think that'll end up being coolant temp, when I took my board apart there was no thermistor. I asked Steed awhile back and I don't think he's using the values either. Most likely it is board temperature ?
Title: Re: Reading from the VGT
Post by: me78569 on November 10, 2015, 09:42:56 AM
Yea it is board them. 

Here are some logs from a pricey scan tool on a 6.7
Title: Re: Reading from the VGT
Post by: Rx7man on November 10, 2015, 12:40:39 PM
I don't know exactly how it's scaled, but it's proportional to the housing temperature... there's coolant flowing in there, so it's going to be pretty close to the coolant temp.. I warmed it up with a propane torch (just a little) and it rose.  It should be close enough to determine if  I want 'warmup' mode or not
Title: Re: Reading from the VGT
Post by: hakcenter on November 10, 2015, 08:20:19 PM
Well I'm pretty used to thermistor stuff on 5v ADCs. Usually input is inverted to voltage scale.
(http://repairguide.autozone.com/znetrgs/repair_guide_content/en_us/images/0996b43f/80/21/9a/fb/medium/0996b43f80219afb.gif)

They are generally non-linear, but its simple to just take a few points, and linearize between them. At the range you want it, its usually 160ohms sweep so its not really that inaccurate at the range you want, just pretty much -40 to 60 is super wide.
Title: Re: Reading from the VGT
Post by: Rx7man on November 11, 2015, 02:15:40 AM
This is doing the math inside the VGT.. and it's outputting something proportional to the temperature.. I haven't been able to figure out if it's in Fahrenheit or Celsius yet... but if it's about 20C ambient, it reads 80... so I gotta subtract 60, making the lowest it can read -60C (~-75F)... it would be as good a place as any.. pretty unlikely to ever see temps below that considering antifreeze will usually freeze by then and you're going to have other problems! 

I'll have to put it outside for a night when its freezing and see if I can figure out the curve on it better.. is there a mulitiplier?
Title: Re: Reading from the VGT
Post by: hakcenter on November 11, 2015, 07:58:44 AM
There could be all sorts of crap.

It could be 2x - 10, or -1.45x + 308, etc etc etc
Best to just map it out yourself in easy increments. By 10s or so.

Most likely its in Celcius too
Title: Re: Reading from the VGT
Post by: Rx7man on November 11, 2015, 08:35:08 AM
When I think of engine temps I think in F, everything else I'm in Celcius
Title: Re: Reading from the VGT
Post by: hakcenter on February 16, 2016, 09:27:28 AM
I've been monitoring the can data

data[0] slot, 0x07 I think means standby. Once you send it a command it goes to 0x01 online I assume

If its 0x08 I believe that means it needs to recalibrate
Title: Re: Reading from the VGT
Post by: Rx7man on February 16, 2016, 10:07:45 AM
Which message ID are you speaking of?
Title: Re: Reading from the VGT
Post by: Rx7man on February 16, 2016, 10:12:42 AM
And about the temperature sensor, I think the value you get is the raw ADC output, which is very non-linear, and really hard to figure out without knowing the type of sensor and bias resistor... I've been working on a sensor for the compressor outlet temperature, and it's not going very smoothly

Tell me more about this standby/recalibration required thing. 
Since I found out I bungled my assembly of the hot side and it was a little crooked (didn't get the clocking pin aligned), I think I should probably recalibrate it, so it would be a perfect time to see what kind of output that produces.
Title: Re: Reading from the VGT
Post by: me78569 on March 24, 2016, 08:45:32 PM
So how sure are you that byte 4 is coolant temp?  The logs I am looking at show almost no temp difference between warm up and WOT runs. 
Title: Re: Reading from the VGT
Post by: Rx7man on March 24, 2016, 09:35:50 PM
Moderately... It seems sensitive around cooler temps and doesn't change much at higher temps... I've had other fish to fry and haven't looked into it closely in a while... When I was bench testing it I warmed up the actuator unit with a torch and it was changing as it warmed up, and I heard there was a temperature sensor in the things.. I put two and two together.
Title: Re: Reading from the VGT
Post by: me78569 on March 25, 2016, 07:11:10 AM
the logs I have must have come from a truck that it was not working on.

I tested it this morning on the way in,  It is most def in C, but I am not sure about the linear part yet.  I believe it is a -40 offset
Also since the turbo is piped into the coolant lines for the heater core, I am sure that threw it off some.
Turbo in c    Coolant in F
51                57
71                125
80                 150
90                 170
100                181
112                196


Then the turbo went to 120 and held there, didn't cool down as coolant did. 

Know I am guessing that the strange readings are due to it being a PCB reading vs and actual coolant reading. 
Title: Re: Reading from the VGT
Post by: me78569 on March 29, 2016, 11:22:39 AM
The above readings seem pretty constant for each warmup cycle.  When the turbo reports ~90-100 I would say the truck is warm
Title: Re: Reading from the VGT
Post by: Rx7man on March 29, 2016, 12:07:52 PM
It's good enough for knowing if you're in warmup mode or not, but it certainly isn't a super accurate method.

If you want accuracy, I gotta say those thermocouples are the cats meow.  I haven't done everything I need to for testing yet, but they work well... for the compressor outlet temp I just slid the wire under the rubber coupler and tightened it back down, works great, I just need a longer one to get to the other side.
Title: Re: Reading from the VGT
Post by: hakcenter on April 30, 2016, 10:29:35 PM
I can verify it seems once the unit is about 100 value wise. My temp is at least on the gauge on my truck dash.

I'm only using it to be light on the turbo until I'm warmed up slightly.  Haven't really checked temperatures on a fully warmed motor but I don't even have coolant hooked up.


I'll be releasing experimental code for the base. It'll include talking to the turbo and getting values. Haven't bothered to map out the temp sensor. But there is some simple communication via serial data now in preparation for the Bluetooth 2.0
Title: Re: Reading from the VGT
Post by: Rx7man on May 01, 2016, 08:56:53 AM
Nice.. I'm not going to have BT on my truck... at least not until I get the Raspberry pi installed, and that's going to take some time for sure..