I have an automotive fuel switching controller that is based on an 18F452 PIC. Among the inputs are standard GM temperature sensors (variable resistance based on temperature) running on voltage divider circuits to the ADC inputs. For a circuit diagram see here:
(diagram to follow, my imaging software is on the fritz, will post in a few hours)
For reference, voltage divider circuit & finding unknown resistance calculations:
**broken link removed**
Description - coming from +5v supply, power goes through a 2.49k resistor (known value resistor). From the other end of the resistor, there are two paths. One to the ADC input of the PIC and the other to the variable resistance temp sensor.
Not shown in the diagram is the ground for the temp sensors, which is to chassis ground in the engine bay.
My problem is this: When a load is induced that uses the same ground as my PIC (and therefore -Vref) the temperature readings are artifically changed. The higher the load that uses the same ground, the more the readings go up. I found this when I initially tried to splice the ECU ground into the thick grounding wire that I found out went to the blower motor. That changed the temperature readings based on how fast the fan was blowing - kind of funny in a way, but not really :lol:
Changing the ECU ground to go straight to a chassis ground fixed it and I got 100% normal temp readings.
However, I'm also using the ECU to switch some smaller loads through a pair of ULN2003AN darlington arrays. The max load it will sink (switching ground side of load, not power) is about 3 amps.
Now that the load switching code has been tested on the bench and is going into the test vehicle, I'm getting the same ADC issues.
I've throughly scoured the forums here and I think my issue has to do with "parasitic" capacitance and inductance on the ground line on my PCB and from the wire from the PCB to the vehicle chassis.
What are my options here?
As far as I see it, I could do the following, none of which I really like:
1) Run the grounds from the sensors back into the passenger compartment and hook them back into the ECU ground screw terminal. Messy, unprofessional, and extra wiring. Plus the parasitic capacitance/inductance on the PCB ground traces won't be equalized, only that from the ECU's post to the ground connection on the chassis.
2) Have two ground posts: One for the 5v power supply & ECU, and everything BUT the switched loads. The second one for only the switched loads. Each ground run would have a separate wire to a chassis ground. This would give the PIC a "clean" ground reference to chassis ground, the same reference as the temp sensors are seeing. However, it involves a PCB redesign (not a show stopper, but undesireable), as well as running two ground wires, which is additional hassle and work for the customer.
Are there any other options here that I'm not seeing?
Thanks,
Ray
(diagram to follow, my imaging software is on the fritz, will post in a few hours)
For reference, voltage divider circuit & finding unknown resistance calculations:
**broken link removed**
Description - coming from +5v supply, power goes through a 2.49k resistor (known value resistor). From the other end of the resistor, there are two paths. One to the ADC input of the PIC and the other to the variable resistance temp sensor.
Not shown in the diagram is the ground for the temp sensors, which is to chassis ground in the engine bay.
My problem is this: When a load is induced that uses the same ground as my PIC (and therefore -Vref) the temperature readings are artifically changed. The higher the load that uses the same ground, the more the readings go up. I found this when I initially tried to splice the ECU ground into the thick grounding wire that I found out went to the blower motor. That changed the temperature readings based on how fast the fan was blowing - kind of funny in a way, but not really :lol:
Changing the ECU ground to go straight to a chassis ground fixed it and I got 100% normal temp readings.
However, I'm also using the ECU to switch some smaller loads through a pair of ULN2003AN darlington arrays. The max load it will sink (switching ground side of load, not power) is about 3 amps.
Now that the load switching code has been tested on the bench and is going into the test vehicle, I'm getting the same ADC issues.
I've throughly scoured the forums here and I think my issue has to do with "parasitic" capacitance and inductance on the ground line on my PCB and from the wire from the PCB to the vehicle chassis.
What are my options here?
As far as I see it, I could do the following, none of which I really like:
1) Run the grounds from the sensors back into the passenger compartment and hook them back into the ECU ground screw terminal. Messy, unprofessional, and extra wiring. Plus the parasitic capacitance/inductance on the PCB ground traces won't be equalized, only that from the ECU's post to the ground connection on the chassis.
2) Have two ground posts: One for the 5v power supply & ECU, and everything BUT the switched loads. The second one for only the switched loads. Each ground run would have a separate wire to a chassis ground. This would give the PIC a "clean" ground reference to chassis ground, the same reference as the temp sensors are seeing. However, it involves a PCB redesign (not a show stopper, but undesireable), as well as running two ground wires, which is additional hassle and work for the customer.
Are there any other options here that I'm not seeing?
Thanks,
Ray