I am working on a project for my truck. The TPS already has a "Gnd" & "+5VDC" from the ECU. It has a center output similar to a pot. I want to read the value with an analog pin.
Would I just connect the GND from the TPS/ECU to the Uno for reference?
Would I need some form of isolation for either the Gnd or Signal?
What would be the best way to go about this? The coding is working with a spare TPS, but I need to know how to connect it to the existing wiring.
Attatched is a diagram.
While you don’t necessarily need any thing else for a 5 V signal. Automotive electronic systems are very nasty environments. You might want some sort of voltage clamp to protect the UNO.
Just add some series resistance to the pin, perhaps 10k, and a 10nF to ground (to short
out any RFI). That will protect you from most evil out there(!)
OK, I have a voltage clamp schematic & can add to that simply. I was also thinking a simple LC filter, as I do not want to screw up the signal to the ECU. I see your RC filter & that might work. I can try both.
What about a reference for the .5-4.5 signal? If there is no ground or +5VDC connection on the Uno, what would it reference the signal to? I would think it needs a reference to be read.
There better be a +5 V connection on the UNO, or it won't work very well.
A 10k series resistor uses the internal protection diodes as the clamp, makes it much simpler.
OK, so the Uno uses the +5VDC for the reference to the Analog Pins, correct? The reason I ask is that the TPS already has a Gnd & +5VDC from the ECU. Those need to stay intact.
If you need a solid, noise free signal (Well, as much as is possible from a TPS), here's a good circuit for it in case it helps:
The GND and 5v that are at the TPS will need to be shared with the Arduino (vref or power).
So, connecting the Gnd & 5VDC to the Uno will nave no affect on the uno? What about the ECU? I truly appreciate your solution, but a replacement is $1600 + $600 for reprogramming & I would like to have it all correct.
Do NOT cross connect two separate power sources. The grounds must be connected, but not sources of power.
The 5V on D5 must be connected to the Arduino 5V. All of that is meant to protect the Arduino from noisy signals that may go over 5V or under 0V.
THank you very much. That's what I was thinking, but wasn't sure.
I would buffer the signal coming from the TPS before I worried too much about noise. You dont want to cause any issues on the vehicle side by loading down that circuit with resistors/ external circuitry.
note: you will obviously want to take care of any noise as well, but not at the cost of disrupting the existing circuit.
Wouldn't it be safer to use an op amp differential amplifier running off power external to the TPS ?
(WITH NO COMMON GROUND)(Just the TPS OUT and TPS GND as the two inputs to the amp)
I’m liking the op-amp idea. ANy others? Please keep them coming.
the differential op amp will also act as a buffer. I probably wouldnt take that approach, but the same principal of buffering is there.
Google op amp buffer. You will obviously want a single supply op amp unless you want to further complicate by using a virtual ground to get a negative supply voltage.
Personally, Id use an op amp buffer with the op amp being supplied by an external voltage regulator (being powered from the car's battery). That signal would run into the arduino analog input (through a low pass filter if noise is an issue). Then ground everything to the body of the car.
That sounds good to me. I will do some checking around & try it out.
This op amp was specifically designed for interfacing with 5V logic and runs off up to 36V from rail to rail.