not sure if i need to use a single resistor as shown in the diagram or if i need to use a voltage divider type of Resistance circuit with resistors on either side of the lead going out to the arduino
diagram in attachment
not sure if i need to use a single resistor as shown in the diagram or if i need to use a voltage divider type of Resistance circuit with resistors on either side of the lead going out to the arduino
diagram in attachment
Did the diode and internal pull up not work?
https://forum.arduino.cc/index.php?topic=486601.0
Leo..
If the sensor output is open collector NPN you may only need a pullup resistor, if PNP you may need a voltage divider.
Can't tell without seeing the datasheet, can you post a link?
edgemoron:
If the sensor output is open collector NPN you may only need a pullup resistor
And you can use the built in pull up resistors at that.
Ditch the 12V.
Ditch the 12V.
Agreed.
Your schematic must be wrong because the sensor output is SHORTED directly to 12V.
Post a link to the vendor for the sensor.
cant find a link for it regarding electrical specifications but someone else did and posted it info in the attachments.
ALSO the 12v isnt straight 12v its a pull up to 12v with a 5k resistor, thought i put that in
I cant ditch the 12V as that is the vehicle ecu, the arduino does not have an internal pull up on the input im using. Looking at a couple other projects using the same sensor and only the arduino (no ECU) they had to wire in a 5v pull up separate from the arduino input. so i just need some help figuring out a resistor circuit that will prevent the arduino from being damaged, i assume a series 10k would probably solve the problem if that.
Wawa:
Did the diode and internal pull up not work?Diode/ frequency signal interuption - General Electronics - Arduino Forum
Leo..
diode blocked the HZ signal arduino wasnt getting proper sensor data
Define "not good sensor data". Show a scope picture.
Did you connect it with the cathode (ring to the sensor), and use the internal pull up of the pin.
And you did use a small/fast diode, like the recommended 1N4148.
If so, and you didn't get a good signal, then it isn't an NPN output.
Leo..
i dont have a scope picture all i know is that the screen hooked up to the arduino to read fuel content no longer reads fuel content when the diode is in the correct direction, hooked in the other direction it works but doesnt protect from 12v, im just going to get rid of the 5v pull up and use the 12v pull up off the ecu i just need to know if a series resistor will work or not.
Just saw the diagram in post#5.
If correct, then connect a (~4k7) pull up resistor between Arduino pin and Arduino 5volt.
And connect the sensor output directly to the Arduino pin.
If this sensor is also connected to another unit, then only use a (~4k7) resistor between sensor output and Arduino pin. No internal pull up on the pin.
Leo..
the arduino does not have an internal pull up on the input im using.
What Arduino is this then?
Wawa:
Just saw the diagram in post#5.If correct, then connect a (~4k7) pull up resistor between Arduino pin and Arduino 5volt.
And connect the sensor output directly to the Arduino pin.If this sensor is also connected to another unit, then only use a (~4k7) resistor between sensor output and Arduino pin. No internal pull up on the pin.
Leo..
the only problem is that the second input that the sensor is connected to has an internal pull up to 12 volts nothing i can do about it, so i am forced to use a resistor or something of the kind to limit power to the arduino, and i am unsure of the model helping a buddy out and its not really important.
vipergt:
the only problem is that the second input that the sensor is connected to has an internal pull up to 12 volts
Then the diode and internal pull up, as explained in your other post, must work.
Leo..