Hi, I am fairly new to the forum so you will have excuse my lack of knowledge around this issue as I am far from mechanical minded.
Basically my 2004 e46 320cd had a starting issue a few days ago. As soon as I turned the key to ignition point two (all lights on cluster come on) my coolant temp needle shot straight to the other side of the gauge...(never seen this before), I then turn the engine over to which it fired up as normal then within 3 seconds the revs struggled to stay over 1k then eventually died off (needless to say I then knew I was going to be late for work at this point). Upon opening the bonnet I found what appeared to be the sound proofing under the bonnet has been in contact with the hot engine and a small section of the foam has set itself on fire coating my engine bay cover in a bronze/silver powdered finish. 1425547_10151810775707966_460999099_n.jpg

Upon further inspection is looks as if the foam that has set on fire has dropped down into the engine bay itself and onto sections of my engine around the oil filter/dipstick area and glow plugs. I have gone about removing the inlet manifold in order to gain access to the coolant sensor to inspect and replace as I believe the fault lay in that region due to the temp gauge going off into red as soon as the ignition is turned over to ign point two. Upon finding the sensor I found issues, it appeared the wire (ground I belive) has somehow burnt away-possible due to a small section of foam landing on the exposed wire and burning it apart. Here is a picture of what the wire from the loom to the sensor looked like:
Here is also a picture of the sound proofing and the area to which it has burnt away:

So at this point it is clear the wire connecting to the sensor is broke and a replacement must be fixed in order to re-create the circuit.

I was lucky and found a replacement sensor with the connector plug/wire running from the loom off a breakers yard.
Lacking a soldering iron I crimped the wires together with my loom and connected up the sensor.
Moment of truth in turning the key to see if the issue is fixed but to my disappointment the coolant temp gauge went straight into the red upon putting the key in the ignition

I have tested the voltage reading from the output running from the wire off my loom and found when the ignition is powering the car I get a reading of 0.13v and when the car power is off it drops to 0.03v. I understand that the sensor (with power on) should be gaining around 5v in order for the sensor to work. I have checked all fuses in the glove box and none are blown. I am really at a loss now with this problem as can not understand where to go now. I do not understand why the voltage output is so low to the sensor as all the circuitry has been fixed>? What would be my next steps?? As I say I am far from having any exceptional knowledge within the diagnostic field and any help/assistance will be highly appreciated