So this is an inductive sensor, it has 3 wires ( black, brown, blue). According to the manual the brown is for VCC input (10-30v), blue is GROUND, black is signal(OUTPUT). This sensor is labeled as NPN NO (normally open).
First i did some test using 12V power source and from the output signal i got roughly about 12V.( Also if i use 9V vcc, i got output around 9V) So no problem so far.
Now i want to regulate that ouput signal from 12v to 5V. So i'm thinking to use LM7805cv voltage regulator to convert the output signal from 12V to 5V, nothing fancy ... But then here come the problem. As soon as i connect output signal from sensor (12V) to lm7805 input, the output that coming out from lm7805 is about 2-3V ( it's supposed to be 5V). So then i check the output voltage from sensor ( which is connected to the input of LM7805cv) and surprised that i got about 4-5v, it's supposed to be 11-12v right ?
If i disconnect the lm7805, the output from sensor back to 12V, but if connect to lm7805, that output from sensor drop to 4-5V.
I also check that there's nothing wrong with this lm7805. As i tried to connect it to 12v or 9v directly (without sensor) and i got 5V output.
Anything wrong? is it normal i got voltage drop that big? i'm not an electrical guy, i just know a bit about simple wiring. So anyone can explain this?