Shop OBEX P1 Docs P2 Docs Learn Events
Help with connecting to a sensor, please... — Parallax Forums

Help with connecting to a sensor, please...

HughHugh Posts: 362
edited 2011-10-15 03:59 in Propeller 1
Hi,

I'm stuck. I'm getting old and am having difficulty thinking about things that seemed second nature a few years ago.

I need to connect to a prop a fuel flow sensor that produces a pulse every 5ml. It is powered by +5V and has an open-collector output. A few of my remaining grey cells are suggesting that I need a resistor somewhere, but some of the others are arguing about whether it would be sensor o/p to prop or a pull-up resistor.

Please could someone assist via a suggestion or two?

Many thanks
Hugh
circuit.png
478 x 352 - 7K

Comments

  • LeonLeon Posts: 7,620
    edited 2011-10-14 12:45
    Sensor data sheet?

    You probably need a pull-up resistor.
  • HShankoHShanko Posts: 402
    edited 2011-10-14 12:50
    Imho, because it is open-collector you need a pull-up resistor, but because the sensor is powered by 5v, if the sensor can in any way supply current from the 5v supply, a series resistor may be necessary.

    The Prop 1 can tolerate a small amount of current into the substrate diode to the 3.3v supply. A series resistor of 2.2K may be all that's needed in that case for the input current protection.
  • HughHugh Posts: 362
    edited 2011-10-14 12:58
    Thanks. I'll try both.
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-10-14 13:17
    For me open collector means that ... well ... the collector is open. So, the output can only be switched to GND by the sensor chip. The high potential is given by the pull-up. So, if you only pull up to 3,3V you don't need an additional series resistor.

    Am I wrong here?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-10-14 14:25
    I agree with MagIO2. Most 5V open collector circuits will work with the line pulled up to 3.3V. The Prop can also handle being pulled up to 5V if the resistor is large enough.

    Duane
  • HShankoHShanko Posts: 402
    edited 2011-10-14 16:51
    Of course, open-collector with pull-up to 3.3v would be best if the sensor is OK with the smaller swings, and the rate isn't too fast (RC time constant). I'd guess the pulse rate isn't too high; if not, the should be no problem with it. Out of curiosity, what distance is the sensor from the Prop?
  • Mark_TMark_T Posts: 1,981
    edited 2011-10-15 03:59
    Duane Degn wrote: »
    I agree with MagIO2. Most 5V open collector circuits will work with the line pulled up to 3.3V. The Prop can also handle being pulled up to 5V if the resistor is large enough.

    Duane

    If the sensor is remote and only 5V is available, use a 10k resistor to ground and a 4k7 resistor to +5V to simulate a 3k3 pull-up to 3V3...
Sign In or Register to comment.