[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 258: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 320: mysqli_free_result(): Couldn't fetch mysqli_result
rusefi.com The most advanced open source ECU 2017-05-14T23:45:34 https://rusefi.com/forum/app.php/feed/topic/1234 2017-05-14T23:45:34 2017-05-14T23:45:34 https://rusefi.com/forum/viewtopic.php?t=1234&p=25947#p25947 <![CDATA[Re: My (stupid) questions to Jared]]>
A PWM with a big cap should still work with ADC. You probably want another small-ish resistor, maybe 10Ohm or so in series with the transistor.
The pullup resistor charges the capacitor. When PWM goes low, the transistor discharges it via the 10Ohm reistor. So you get a high-frequency sawtooth-like voltage.

Statistics: Posted by stefanst — Sun May 14, 2017 11:45 pm


]]>
2017-05-14T14:04:57 2017-05-14T14:04:57 https://rusefi.com/forum/viewtopic.php?t=1234&p=25940#p25940 <![CDATA[Re: My (stupid) questions to Jared]]> Statistics: Posted by puff — Sun May 14, 2017 2:04 pm


]]>
2017-05-14T10:40:47 2017-05-14T10:40:47 https://rusefi.com/forum/viewtopic.php?t=1234&p=25932#p25932 <![CDATA[Re: My (stupid) questions to Jared]]>
Thanks! Just one question: are you using this approach with a newer cluster, where the needles of these gauges are driven by stepper motors?
The thing is, from my understanding, the output varies from 0 to 10th, and I am not sure, how ADC filtering is implemented on these inputs of the cluster. I mean to say, in this way the generated signal is way different from the original one.
I'm using it with an old-school analog gauge. I am *guessing* it would also work with a digital gauge, but of course there's no guarantee.
How hard is it to set up? If you have the arduino at hand and the cluster available, just (very slowly) run through the range of PWM outputs (0-255) and see what happens. You may want a fairly large capacitor to buffer the PWM signal a bit though.

Statistics: Posted by stefanst — Sun May 14, 2017 10:40 am


]]>
2017-05-14T07:24:08 2017-05-14T07:24:08 https://rusefi.com/forum/viewtopic.php?t=1234&p=25931#p25931 <![CDATA[Re: My (stupid) questions to Jared]]> The thing is, from my understanding, the output varies from 0 to 10th, and I am not sure, how ADC filtering is implemented on these inputs of the cluster. I mean to say, in this way the generated signal is way different from the original one.

Statistics: Posted by puff — Sun May 14, 2017 7:24 am


]]>
2017-05-13T23:04:28 2017-05-13T23:04:28 https://rusefi.com/forum/viewtopic.php?t=1234&p=25922#p25922 <![CDATA[Re: My (stupid) questions to Jared]]>

Code:

// These constants won't change.  They're used to give names// to the pins used:const int oilIn = A0;    // Analog input pin that the potentiometer is attached toconst int oilOut = 11;   // Analog output pin that the transistor is attached toconst int waterIn = A1;  // Analog input pin that the potentiometer is attached toconst int waterOut = 10; // Analog output pin that the transistor is attached to/*const float xOffsetOil = 20;const float xStepOil =  50;const float yValueOil [] = {  20.0,  40.0,  60.0,  80.0, 100.0, 120.0, 140.0, 160.0, 180.0, 200.0, 220.0};   const float yPressOil [] = {  96.1,  82.9,  69.6,  56.4,  44.2,  32.6,  22.8,  15.4,   9.3,   3.7,  -1.1};*/const float xOffsetOil = 100;const float xStepOil =  50;const float yValueOil [] = {  125, 128, 131, 135, 139, 144, 150, 157, 170, 189, 203, 238 };const float yPressOil [] = {    0,   3,   7,  11,  16,  22,  29,  37,  47,  59,  74,  92 };const float xOffsetWater = 60;const float xStepWater =  30;const float yValueWater [] = { -60,  10,  60,  92, 133, 146, 157, 165, 171, 176, 180, 183, 186, 189, 192, 195, 198, 201, 205, 209, 214, 219, 224, 230, 236, 243, 250, 255, 255, 255, 255, 255, 255 };const float yTempWater []  = { 310, 285, 264, 249, 237, 226, 216, 207, 199, 192, 186, 180, 175, 170, 165, 160, 155, 150, 145, 140, 135, 130, 124, 118, 112, 106,  98,  89,  78,  67,  55,  43,  31 };void setup() {  pinMode (oilIn, INPUT);  pinMode (waterIn, INPUT);  pinMode (oilOut, OUTPUT);  pinMode (waterOut, OUTPUT);    // initialize serial communications at 9600 bps:  Serial.begin(9600);   Serial.println ("Ready");}int lookup (float val, float lowX, float highX, float lowY, float highY) {  float retFloat = (highY - lowY)/(highX-lowX) * val + lowY + 0.5;  int retInt = retFloat;  return retInt;}void loop() {  // read the analog in value:  int sensorRawWater = 0 ;  int sensorRawOil = 0 ;  for ( int i=0; i<10; i++) {     sensorRawWater = sensorRawWater + analogRead(waterIn);     sensorRawOil = sensorRawOil + analogRead(oilIn);  /*   Serial.println(sensorRawWater);        Serial.println(sensorRawOil);    delay (500);*/  }  float  sensorRawWaterAvg = sensorRawWater / 10;  float  sensorRawOilAvg = sensorRawOil / 10;    float sensorValueWater = sensorRawWaterAvg-xOffsetWater;  int xIntWater = sensorValueWater / xStepWater;  int outputValueWater = lookup(sensorValueWater - (xIntWater * xStepWater) , 0, xStepWater, yValueWater [xIntWater], yValueWater [xIntWater+1]);    int outputTempWater  = lookup(sensorValueWater - (xIntWater * xStepWater) , 0, xStepWater, yTempWater  [xIntWater], yTempWater  [xIntWater+1]);      float sensorValueOil = sensorRawOilAvg-xOffsetOil;  int xIntOil = sensorValueOil / xStepOil;  int outputValueOil = lookup(sensorValueOil - (xIntOil * xStepOil) , 0, xStepOil, yValueOil [xIntOil], yValueOil [xIntOil+1]);    int outputPressOil = lookup(sensorValueOil - (xIntOil * xStepOil) , 0, xStepOil, yPressOil [xIntOil], yPressOil [xIntOil+1]);       if (outputValueWater <0) {    outputValueWater = 0;  }  if (outputValueWater > 255) {    outputValueWater = 255;  }  analogWrite(waterOut, outputValueWater);             if (outputValueOil <0) {    outputValueOil = 0;  }  if (outputValueOil > 255) {    outputValueOil = 255;  }  analogWrite(oilOut, outputValueOil);        // print the results to the serial monitor:  Serial.print("Water sensor raw = " );                         Serial.print(sensorRawWaterAvg);        //  Serial.print("\t sensor-offset = " );                       //  Serial.print(sensorValueWater);        Serial.print("\t xInt = ");    Serial.print(xIntWater);        Serial.print("\t output = ");          Serial.print(outputValueWater);     Serial.print("\t yTempWater  [xIntWater+1] = ");          Serial.print(yTempWater  [xIntWater+1]);       Serial.print("\t yTempWater  [xIntWater] = ");          Serial.print(yTempWater  [xIntWater]);      Serial.print("\t Temp = ");        Serial.println(outputTempWater);       // print the results to the serial monitor:  Serial.print("Oil sensor raw = " );                         Serial.print(sensorRawOilAvg);      //  Serial.print("\t sensor-offset = " );                       //  Serial.print(sensorValueOil);        Serial.print("\t output = ");        Serial.print(outputValueOil);     Serial.print("\t Press = ");        Serial.println(outputPressOil);     // wait 2 milliseconds before the next loop  // for the analog-to-digital converter to settle  // after the last reading:  delay(500);                     }  

Statistics: Posted by stefanst — Sat May 13, 2017 11:04 pm


]]>
2017-05-13T22:58:28 2017-05-13T22:58:28 https://rusefi.com/forum/viewtopic.php?t=1234&p=25921#p25921 <![CDATA[Re: My (stupid) questions to Jared]]>
Here's a link to the thread on miataturbo.net where I posted and explained it a little. https://www.miataturbo.net/megasquirt-18/water-temo-gauge-thermistor-values-74383/

Post 22.

This is a hacked together thing that was designed to fit on proto-board. It's been working for a few years now. I'm using it to actually linearize my oil-pressure and water temp gauges which are de-linearized on purpose from factory.

Statistics: Posted by stefanst — Sat May 13, 2017 10:58 pm


]]>
2017-05-13T20:40:12 2017-05-13T20:40:12 https://rusefi.com/forum/viewtopic.php?t=1234&p=25920#p25920 <![CDATA[Re: My (stupid) questions to Jared]]> Снимок экрана 2017-05-13 в 23.36.29.pngWill this work? We need 0V to 5V at output point, but it's pulled up to 10V through 320Ohms. How will this pullup affect the opamp?
Probably, the most appropriate approach would be just remove that pullup, or,even better - pull it up to 5V. But I am afraid of taking the whole thing apart.

Statistics: Posted by puff — Sat May 13, 2017 8:40 pm


]]>
2017-05-13T13:25:20 2017-05-13T13:25:20 https://rusefi.com/forum/viewtopic.php?t=1234&p=25918#p25918 <![CDATA[Re: My (stupid) questions to Jared]]> probably, this might help when designing my own converter?

UPD: just measured those pins: 9.94V on both of them. So, it's not 5V ;-(((
UPD2: just measured resistance between the two 'upper' pins - it reads 647 ohms, which suggests that if both of these circuits are similar to each other, they are connected to 10V regulator through 320Ohm resistors?



btw, here's a couple of screenshots:
Clipboard01.jpg
Снимок экрана 2017-05-13 в 16.15.14.png
Test mode is turned on by holding down the trip reset button while turning on ignition.

Statistics: Posted by puff — Sat May 13, 2017 1:25 pm


]]>
2017-05-13T10:17:08 2017-05-13T10:17:08 https://rusefi.com/forum/viewtopic.php?t=1234&p=25910#p25910 <![CDATA[Re: My (stupid) questions to Jared]]> https://www.chipdip.ru/catalog/ic-digital-potentiometers
I guess, I'd need an opamp for that circuit? like our lmv324i?

Statistics: Posted by puff — Sat May 13, 2017 10:17 am


]]>
2017-05-13T08:19:22 2017-05-13T08:19:22 https://rusefi.com/forum/viewtopic.php?t=1234&p=25909#p25909 <![CDATA[Re: My (stupid) questions to Jared]]> 1k two channel digipot is somewhat 3$ here. But then again, I need schematics for analogue part - I doubt very much I can use digipot to directly substitute the fuel sending unit - if the pull-up to five volts in the cluster is 200ohm (how do I measure it without taking it apart?), and I set up digipot to 30ohm, the current would be 5/230=~20ma - will the digipot like it?

Statistics: Posted by puff — Sat May 13, 2017 8:19 am


]]>
2017-05-13T02:49:58 2017-05-13T02:49:58 https://rusefi.com/forum/viewtopic.php?t=1234&p=25908#p25908 <![CDATA[Re: My (stupid) questions to Jared]]> You could also use a digital controlled potentiometer. They're fairly expensive though.

Statistics: Posted by stefanst — Sat May 13, 2017 2:49 am


]]>
2017-05-12T23:46:11 2017-05-12T23:46:11 https://rusefi.com/forum/viewtopic.php?t=1234&p=25905#p25905 <![CDATA[Re: My (stupid) questions to Jared]]> Supposing, I have an Arduino that knows the level of fuel in my tank and stores it as int8, with 0 meaning empty and 255 meaning full, linear characteristic.
What's the proper way of feeding the signal to the cluster?
My plan is to check the voltage from the cluster (expect it to be 5v?) Then, use some small value resistance and measure the current, but then I have no more ideas...

Sent from my XT1058 using Tapatalk

Statistics: Posted by puff — Fri May 12, 2017 11:46 pm


]]>
2017-05-12T21:29:38 2017-05-12T21:29:38 https://rusefi.com/forum/viewtopic.php?t=1234&p=25904#p25904 <![CDATA[Re: My (stupid) questions to Jared]]>
Sent from my XT1058 using Tapatalk

Statistics: Posted by puff — Fri May 12, 2017 9:29 pm


]]>
2017-05-12T21:20:13 2017-05-12T21:20:13 https://rusefi.com/forum/viewtopic.php?t=1234&p=25903#p25903 <![CDATA[Re: My (stupid) questions to Jared]]>
Which program are you referring to?
In the picture you provided is shows a PC program with RPM and dwell. What is that program and what produce does that program work with?

Statistics: Posted by kb1gtt — Fri May 12, 2017 9:20 pm


]]>
2017-05-12T20:28:48 2017-05-12T20:28:48 https://rusefi.com/forum/viewtopic.php?t=1234&p=25901#p25901 <![CDATA[Re: My (stupid) questions to Jared]]>

Code:

/**+ * On single-coil or wasted spark setups you have to lower dwell at high RPM  * offset 336  */ float sparkDwellRpmBins[DWELL_CURVE_SIZE];

Statistics: Posted by AndreyB — Fri May 12, 2017 8:28 pm


]]>