2001 Elantra 3,000 RPM Surge When Stopping

I own a 2001 Hyundai Elantra, bought used about a year ago. About 8 months ago I noticed that about every 20 startups the RPM would surge to just under 3,000 RPM for just a second or so when I started the car.
Then about 4 months ago the car developed a low-idle condition when warm, idling at about 500 RPM or so, just enough to make some vibration when idling at an intersection. No acceleration or stalling issues were present and the car otherwise continued to operate just fine. I used two tanks worth gas with fuel injector cleaner in each, plus throttle body cleaner, and gradually the low idle issue when away.
About the time the low idle issue was resolved, however, the car began experiencing an RPM surge to just under 3,000 RPM for 3-4 seconds whenever I would let the clutch out as I was stopping the car. It does the RPM surge whether one is in 3rd, 2nd or 1st gear when the clutch is released, and the condition kicks in after about 1km of driving on the first trip of the day (on a warm day), and thereafter is evident on subsequent trips each day of the car has not cooled off significantly.
The problem seems to be worsening such that when I let up on the gas when in motion and let out the clutch, the RPMs tend to stay at 2,000+ briefly and then the RPM's settle down slowly, or the surge occurs as I stop, and then the RPM's settle quickly to around 2,000 RPM and then more slowly to normal idle. Once in a while the idle just stays at around 2,000 RPM. If I engage the clutch and move forward a bit in 1st gear, this usually settles the RPM down. And I can end the surge by getting under way in 1st gear as well. But the surge as I said will end on its own but not immediately.
I wonder if anyone has any ideas on what the issue could be. I have sprayed the throttle linkage, clutch and brake cables under the engine hood and in the area of the pedals with WD40 in case it is a stuck cable, but no luck.
About 8 weeks ago I changed the spark plugs and put new platinum plugs in. At that time the plugs showed no evidence that would suggested any problem with any of the cylinders. This was when the low idle issue was present and the plug change did not help the low idle issue.
I am wondering as well whether I should remove the sensors in the throttle body and clean them, perhaps they clogged after the throttle body cleaner was applied. Is this a possibility?
Many thanks for any suggestions that may be offered as what this problem could be.
KR London, Ontario, Canada
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Check all you vaccuum hoses. I had a problem similiar to this. While having my brakes worked on the mechanic noticed a bad hose, replaced it and the problem went away. Total cost of repair for that problem under $5.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

There may be a reprogram to correct this. On U.S. models, there's a reprogram to correct excessive RPMs which occur when depressing and releasing the clutch pedal.
You may also have an intermittent poor contact in your throttle position sensor. This was a common problem in 2001-2002 models.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
hyundaitech wrote:

Thanks for the tip and also thanks to the other person who suggested I check for a vacuum hose issue. I connected an Innova 31a OBD-II code reader to the car and it shows code "P021 (Throttle Position Sensor Range/Performance" as the only set trouble code. I am wondering if this code being set is a definitive indication of the TPS being the fault. The Haynes manual says to measure the OHMs across terminals 2-3 and says that the value should be in the range stated by the Haynes manual with the throttle plate closed. The manual gives a value between 900 and 3,000 ohms, but it's not clear if that range is for the connection between terminals 1-3 or for the variable value when one connects to terminals 1 and 3. A further problem is that my car uses a different connector from the manual and identifying terminal 1 is difficult. Here are the measured values assuming terminal 1 is the top terminal and that 3 is the lowest (the connector is vertically mounted):
Pins measured as follows, top to bottom: 1 2 3
Resistance with closed throttle (engine off) between 1 and 2: 1900 Ohms Resistance with closed throttle (engine off) between 2 and 3: 900 Ohms
The Haynes manual says to measure the value between 2 and 3, but as I noted I am not sure whether Pin 1 is at the top or the bottom, so one of the above measurements will be the measurement wanted by the Haynes manual.
Resistance (engine off) between 1 and 3 from closed to open: 2600-1100 Ohms. This is a measurement that the Haynes manual says to test for, but only in terms of seeing whether the resistance changes smoothly, which it appears to, across the range stated.
Any help interpreting the above values would be appreciated.
KR London, Ontario, Canada
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

P0021 indicates a likely problem with the TPS. Check your PCV hose to be sure it doesn't have a hole in it.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Sorry. Make that P0121. I presume that's the actual code you have.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.