Line Pressure dead...
Line Pressure dead...
Cant get any line pressure reading in TS nor logged, checked the circuit on the board and is OK all the way to the 25 pin header (EGT2)
This is on the 4135 code.
BR//Tobmag
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Line Pressure dead...
I will have a look at this once I get the speedo output sorted (from another thread).
Lance.
Re: Line Pressure dead...
Dave
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Line Pressure dead...
I think I have this line pressure issue fixed, and the changes will be incorporated in the 4.136 code I will put in this thread shortly: viewtopic.php?f=4&t=781
Lance.
Re: Line Pressure dead...
0V = output of 2.
5V = a value of 10.
So on to calibrating these pressure sensors.
Thanks Lance.
Dave
Re: Line Pressure dead...
On the Line input there appears to be a 0.5V offset in the code.
When actual sensor input voltage reads 0.51 volts, the Line display in TS reads 0.01 psi.
When actual sensor input voltage reads less than 0.50 volts, the Line display in TS wraps around and reads 9.99 psi.
When you get back above 0.50 volts, it then starts reading 0.01 psi again and increasing with increasing voltage, but 0.5V low (offset).
This is with the stock ini file calibration of
linepressure = scalar, U16, 20, "psi", 0.010, 0.0
My sensor cal values are as follows:
psi Volts
0 0.240
106 1.300
When I plug these into the on-line slope-offset calculator at http://www.msgpio.com/manuals/mshift/adccalc.html
I get slope=0.488 and offset = -23.935.
When I plug those values into the ini file, my results are:
0 psi = 471 on TS readout
103 psi = 35 on TS readout
and as I reduce pressure, the readout spun 3 of 4 revolutions. So my scaling is obviously wrong.
I'll take another look at it tomorrow. Maybe attempt to load up some older versions of the code to see if there is a difference.
Dave
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Line Pressure dead...
Yes, the range for the default sensor is 0.5V (=0 bar) to 4.5V (=20 bar) so values under 0.5V will 'roll-under' (because they are not valid voltages with that sensor, and the pressure has been set-up to be always positive - I may change this though, as I can see how it can be very confusing).
I am not sure what is going on with your sensor values. It may be that they are out-of-range for the integer nature of the slope-intercept calculations. Could you try changing the pressure values by 10x (i.e. 0,1060) and 0.10x (0,10.6) and see what happens in each case? I will have a closer look at this in the morning.
Lance.
Re: Line Pressure dead...
I'll try your scalar test this evening.
Thanks.
Dave
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Line Pressure dead...
None of the values are hard-coded. The limits in the present code are that a 0-5V signal maps into 0 to 1023 ADC counts which in turn is mapped onto the line pressure (which must be positive from 0 to 655.35 psi in the current code, but I will change this for the next code).
The under-run is solely because the enter values calculate to negative numbers for voltages under 0.5 (since 0.5V = 0 psi and the slope is positive), and negative numbers are not allowed (the assumptions are that line pressure is always positive or zero, and the signal will always be within the sensor's range - less than 0.5V is not within the default sensor's range).
BTW, you can certainly have the ADC count reported. This is covered in the manual here: http://www.msgpio.com/manuals/mshift/V41tune.html#gi
Lance.
Re: Line Pressure dead...
Yes now its back on line, possible to add a user setting for smoothing factor?
Needle on the gauge is a bit too nervous now.
BR//Tobmag