Shop OBEX P1 Docs P2 Docs Learn Events
Problem with connecting an open collector circuit to BS input — Parallax Forums

Problem with connecting an open collector circuit to BS input

Skywalker49Skywalker49 Posts: 172
edited 2007-05-28 15:39 in BASIC Stamp
I have a circuit (DCF77 receiver ) with an open collector transistor (BC848C) at the output.
I connected the collector to +5VDC via a 22 K resistor. Ic should be less than 1 mA according the specs.

Collector is directly connected to BS Input P0.
The circuit works fine for a couple of days and then it breaks.
The first time I thought there was something wrong with the receiver and got it replaced.
Again it worked fine for 2 days and ... it breaks. mad.gif
Now, I have my doubts about the way I connected it to the BS. Should there be a resistor (220 Ohm )
in the input circuit? I have seen that (afterwards) in many other places but it is not clear to me why it is needed
in this case.

Anybody who can clarify what I'm doing wrong?
Thx, Ed

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2007-05-26 11:17
    Ed,

    If the transistor was NPN, and the emitter was connected to 0 volts, and the Stamp pin was an input, you should be fine. 1 mA is a tiny current, and probably your pull-up could be reduced to 10K or even less without harming the transistor. (if it were 5K, that would give 1 mA). The 220 ohm resistor is not absolutely necessary if the supply voltage is held closely to 5 volts.

    I'm not familiar with the DCF77; what is the transistor trying to tell the stamp? Do you have a diagram of your setup.

    Regards,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-05-26 14:43
    Is it possible that you've inadvertently set the Stamp's input pin to an output at some point? Without a 220-ohm series resistor, if you were to drive the Stamp pin high while the transistor was trying to pull it low, you could damage either the transistor, the BASIC Stamp, or both.

    -Phil
  • Skywalker49Skywalker49 Posts: 172
    edited 2007-05-26 18:37
    Tom, Phil, thx.

    Attaced is the scheme of the DCF77 receiver. It receives the date/time information from a signal
    transmitted in Germany (Frankfurt).

    Phil,

    As far as I know I never made the Stamp P0 an output and the documentation also states that when
    the BS is switched on, the pins are per default set to input. I should be safe that way.

    Also strang is that once the DCF output is broken (there is still signal but not the one expected)
    I contected the BS to the inverted output *DCF but also that output has not a good output signal.

    Normal output signal is as follows: output is low for 800 or 900 msec and then high for 200 or 100
    msec. 200msec means a digital one, 100msec a zero. In one minute, date and time information is
    transmitted.

    I'm really puzzled and since it happened twice I must find a reason before hooking up a new DCF receiver.
    Thx for your help,
    Ed
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-26 18:50
    1) You shouldn't have a problem connecting this as you described. Since you are having a problem, perhaps something is wrong with the connections in your hookup or there's a problem with the receiver.

    2) You can usually insert a 220 ohm protective series resistor between a Stamp I/O pin and an external circuit without affecting the circuit significantly. That's why Parallax uses that value on the HomeWork board. With the series resistor, you wouldn't worry about what the DCF receiver is doing or about mistakes in your program.

    3) It might help for you to describe the "broken" DCF output signal.

    4) The fact that DCF and *DCF both "break" does suggest that the problem is in the receiver.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-05-26 18:54
    Ed,

    Do you have a pull-up resistor on that collector? You state you have the I/O connected directly to the collector, but make no mention of a collector resistor.· I wonder if you are simply seeing the effects of a floating input.

    -Martin



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    StampPlot - GUI and Plotting, and XBee Wireless Adapters
    Southern Illinois University Carbondale, Electronic Systems Technologies
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-05-26 18:56
    So, it's the DCF receiver that's konking out?· And both outputs "DCF" and *DCF go bad?·

    What're you using for the receiver's +V (+UB)?·

    When it "breaks", do you still have the 3.3V across the zener diode (ZD1)?

    Update -- added Dwg.
    Skywalker49 said...
    I connected the collector to +5VDC via a 22 K resistor.
    Post Edited (PJ Allen) : 5/26/2007 7:04:49 PM GMT
    384 x 198 - 6K
  • Skywalker49Skywalker49 Posts: 172
    edited 2007-05-27 11:40
    All, thank you very much to convince me that there is nothing wrong with the DCF - BS interconnection.
    I agree that with both outputs not working .. that means as Mike says that there must be something wrong
    with the receiver.

    To make a long story short, I started moving around with the receiver and finaly got it working again.
    What still confuses me is that I did that before with no positive result.
    Anyway I'm convinced that it has to do with reception and not the hardware.

    Also, although a 220 Ohm resistor is not needed, I have put it in to protect both the receiver and the BS
    in case the BS pin is configured by accident as an output.

    Some·answers.
    Mike, attached is the signal when the receiver is working OK. It is captured·just by reading
    the IN0 in a long lasting loop. If the receiver is not working OK, the 0's and 1's are all over the place.

    The other is to PJ Allen.·The voltage across the zener is 4.07 V and not 3.3 V as in the scheme.
    Do I influence the set-up while measuring? I use a digital multimeter but have no·clue what the input
    impedance is.
    UB = +5V DC

    Again, thank you all for your input.
    Ed
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-05-27 12:42
    · I think that Station DCF is pretty much the same as WWVB (Boulder, CO) which broadcasts the time signal that updates all of the "atomic" clocks and watches.· Typically, these miniature·receivers with their tiny (modest ?)·antennas can only get sufficient signal inside a window of 3 hours before dawn -- as that's the nature of the medium (longwave radio.)· Running the radio, though, really sucks the battery and to conserve battery strength they turn on their radio right around that time, 2 A.M. local or so, and·wait for an update [noparse][[/noparse]barring a time-out.]·
    · Constant reception throughout the day isn't likely, in any event, without a much more sophisticated receiver and a considerable antenna.
  • Skywalker49Skywalker49 Posts: 172
    edited 2007-05-28 15:39
    PJ, indeed they are similar. I check the WWVB website and like the German one, these transmitters are 7 x 24 active and signal should be available.
    I agree that with the small antenna the signal is sometimes unreliable as my receiver demonstrated.

    That looks like a great challenge for a robot with a DCF receiver and RTC onboard,
    find a good position to receive the datetime signal and initialize the RTC.

    thx, Ed
Sign In or Register to comment.