Shop OBEX P1 Docs P2 Docs Learn Events
Open collector output and current sink of BS2p — Parallax Forums

Open collector output and current sink of BS2p

PhilipPhilip Posts: 11
edited 2004-10-30 23:25 in BASIC Stamp
I am attempting to interface the output of a receiver with pin 0 of my BS. The receiver has an open collector output and is active low, basically it demodulates a signal and the output transistor goes·"short circuit" to earth when the signal is present or goes "open circuit" when there is no signal. This arrangement can source 2mA and I've tried both a 10kOhm and a 50kOhm resistor with little or no joy when it comes to decoding the signal with the BS. I get the very occasional valid pulse. I realise my code could be at fault, it's my first ever PBASIC program, but the fact that I get the occasional valid pulse seems to indicate that the code is doing basically what i expect.

Clearly if the BS was needing a significant fraction of 2mA then I would be getting a significant voltage drop across my resistor and so might not be getting a reliable on/off indication as I believe the BS needs greater than 1.4V to see an "on."

I have seen a circuit which uses another transistor as an emitter follower and looks as shown in the attachment. (MSF is the "output" of the receiver) Is the additional transistor going to be necessary to make the receiver drive the BS or should it work with just the resistor in place?

Thanks for any suggestions, I'm very new to all of this and so still feeling my way.

Comments

  • K de JongK de Jong Posts: 154
    edited 2004-10-30 14:22
    Do you have a pull-up resistor?

    Maybe 4k7 from pin 0 to +5Volt. You will then have a nice and clear 'on' 'off' signal from your open collector output. It will be 1 mA at maximum.

    Klaus
  • PhilipPhilip Posts: 11
    edited 2004-10-30 15:43
    I have been using either 10k or 50k as a pull up, that is to say my BS pin 0 is where the BC547 is in the circuit above and there is no transistor present, but if the BS is going to draw 1mA then that is far too much current for my receiver module to cope with as the voltage drop even with 4K7 would be too great I would expect.

    Does that seem sensible or am I missing something silly? In the mean time I will try it with a 4K7 or similar resistor to see if that helps.

    The circuit of my actual receiver module is attached and it actually shows a pull up resistor on the time code output but note that this is external to the actual receiver and so I have to provide it.
    497 x 278 - 33K
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-30 16:45
    The BS2 uses a PIC, which has very high input impedance (10 MegOhm or so) on its pins when they are set as an INPUT.

    That assumes you've set the pin as an INPUT, of course, which disconnects the output drivers for the BS2. INPUT is the default state for the I/O state of a pin -- but I'd set it explicitly in the code.
  • PhilipPhilip Posts: 11
    edited 2004-10-30 23:25
    Thanks to everyone for their help with this one. I managed to get a scope across the output of my reciever this evening and it is producing lovely square waves of 5 volts, but their timing appears almost random. So, I am guessing that the BS is seeing a nice input in electrical terms but which is basically rubbish in logical terms.

    From this I am concluding that the receiver/demodulator is working just fine but that the RF it is getting isn't so hot. The shortest pulse I should be seeing, based upon the intended input signal, is about 100ms but most of the pulses I am actually seeing are in the 5 - 20ms region so it may be that I am just demodulating noise. Hopefully I will get a spectrum analyser across the output of my antenna, to see if there is any RF leaving it, at some point in the coming week.

    I knew having anything to do with RF was a bad idea, it's way to weird for me.
Sign In or Register to comment.