Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Arduino + OBDII(VPW only) > 20x4 LCD display on: February 06, 2011, 05:30:09 pm
Im working on a standalone OBDII scanner and display for my car using an Arduino Uno. The car is a 1999 Pontiac Trans Am which uses the VPW protocol so ill be using an OBD VPW to RS232 interpreter chip. I think ill be powering the Arduino off the 8v off the 78L08 voltage regulator and tie arduino ground to chassis ground.

My questions are:
Are there any major software problems I may run in to?
Do I have enough power and signal isolation to protect the arduino (and my cars ECU)? (Do I need an opto-isolator or something?)
Any other foreseeable problems?
Thanks

2  Using Arduino / Sensors / Re: Vehicle temperature sensor reading on: January 31, 2011, 06:15:20 pm
Thanks for the help!
Here is my code

void loop()
{
  val = analogRead(A4);    // read the input pin
  volt = (0.004887585*(val));
  res = ((1000*volt+5000)/volt);
  temp = (-0.04472*res+145.148);
   Serial.println(val);
   Serial.println(volt);
   Serial.println(res);
   Serial.println(temp); 
   Serial.println("--------");
 
  delay(1000);
}

Im not sure how to get the right numbers to set the temperature though. I found a data sheet on the thermistor and it says
2.1k-2.6k ohm @248F
0.65k-0.73k ohm @176F

I used those 2 data points to make a linear fit equation but it doesnt seem to work. Im assuming the temperature/resistance relationship isnt linear. Is there another way to do this or am I going to have to get a thermometer and make a chart?

im getting data like this:

52
0.25
20673.08
-779.35
--------
50
0.24
21460.00
-814.54
--------
52
0.25
20673.08
-779.35
--------
3  Using Arduino / Sensors / Re: Vehicle temperature sensor reading on: January 30, 2011, 07:17:50 pm
I cant open it up, its a copper cylinder like this:


But I think I may have figured it out. I put it in a voltage divider arangement like so
5V---Thermistor----A0 input----1k resistor----GND
and I connected the 5V to Pin 3 of the thermistor and the copper exterior of the thermistor to A0.

My data is now consistant jumping around only +/- 2  and increasing when I heat up the thermistor.

Now my question is how to adjust the data to reflect actual temperature values? The data im getting now is around 50(at ambient) and increased to around 100 when I heated up the thermistor.

Would getting two known points like 100F and 200F and finding their relative arduino readings (maybe 60 and 150) then doing some interpolation work?
                                
4  Using Arduino / Sensors / Re: Vehicle temperature sensor reading on: January 30, 2011, 06:44:38 pm
Alright, I hooked the analog input to the 5V and 3.3V, im getting 1022-1024 @ 5V and 698-709 @ 3.3V. So I think my software should be fine. Im not sure how else to hook up the  wiring. There is only three pins.
5  Using Arduino / Sensors / Vehicle temperature sensor reading on: January 30, 2011, 05:53:40 pm
As part of my first Arduino ECU/Datalogging project im trying to read the coolant temperature on a CBR600RR motorcycle engine (for FSAE). The temperature sensor has 3 pins; pin 1 receives 5V from the ECU, pin 2 connects to ground through the ECU, and pin 3 goes to the gauge cluster. Ive read the "Decoding thermistor characteristics table" post but it seems overly complicated for what I need to do.
The temperature range will be between 100-250 degrees F and I only need an accuracy of around 5 degrees F and a reading only about once every 5-10 seconds.
So, I connected the sensor directly to my arduino with Pin 1 to 5V, Pin 2 to ground, Pin 3 to analog input 1(A0). Here is my code


int val = 0;           // variable for value read
int temp = 0;

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

void loop()
{
  val = analogRead(A0);    // read the input pin
  Serial.println(val);   
  temp = map(val, 0, 1023, 100, 250);     //scale input value to temperature
 // Serial.println(temp);
 
  delay(2000);
}
 

I know I need to get the min/max resistance of the thermistor so I can set up the scale part right. But my problem right now is that im not getting a consistant reading (anything from 250-500) even though temperature is not changing.

Is this likely to be a software or wiring problem? Or maybe out of range of the thermistor (its at ambient for this test)?

Im a mechanical engineering student so I have only basic knowledge of circuits and software so I would appreciate any help/suggestions.
Thanks
 
Pages: [1]