Go Down

Topic: resistor value needed to project arduino input (Read 739 times) previous topic - next topic

vipergt

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

Wawa

Did the diode and internal pull up not work?

https://forum.arduino.cc/index.php?topic=486601.0

Leo..

edgemoron

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?

Grumpy_Mike

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.

raschemmel

Quote
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.

vipergt

#5
Jul 20, 2017, 07:44 pm Last Edit: Jul 20, 2017, 08:00 pm by vipergt
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.

vipergt

Did the diode and internal pull up not work?

https://forum.arduino.cc/index.php?topic=486601.0

Leo..
diode blocked the HZ signal arduino wasnt getting proper sensor data

Wawa

#7
Jul 20, 2017, 10:47 pm Last Edit: Jul 20, 2017, 10:51 pm by Wawa
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..

vipergt

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.

Wawa

#9
Jul 21, 2017, 12:52 am Last Edit: Jul 21, 2017, 12:54 am by 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..

Grumpy_Mike

Quote
the arduino does not have an internal pull up on the input im using.
What Arduino is this then?

vipergt

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.

Wawa

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..

Go Up