Cars engine rpm

i cant build a sensor on. so i need to take the signal from the ecu or from the obd2.