+ Post New Thread
Results 1 to 15 of 15
  1. #1
    Advanced Member level 5
    Points: 33,433, Level: 44
    Achievements:
    7 years registered

    Join Date
    Sep 2008
    Location
    cambridge
    Posts
    6,947
    Helped
    509 / 509
    Points
    33,433
    Level
    44

    NPN is bahaving as oscillator when used with DALI comms bus

    Hi,
    We have a DALI communication setup. To be brief, DALI is basically square wave transmissions at 1200Hz.
    A DALI bus is pulled down and released at the 1200Hz frequency, as in the attached schematic. (LTspice sim also attached)

    In our DALI circuit, the node RA3 is following the transmission of the DALI bus, and is obviously an inverted form of it…however, within the high-going pulses at RA3, there is an approximately 120kHz oscillation….which is rendering the comms not working.

    I believe that this 120kHz oscillation is caused by the fact that due to the bridge rectifier, the DALI bus is not fully getting actively pulled down (after the bridge) for the “Low” pulses, and therefore the NPN at RA3 is turning on and off repeatedly at 120kHz as its base current starts to fall to around its off level.

    Would you agree, that the best way to stop this oscillation would be to reduce the Base_emitter resistor down to 1k? (This would also mean reducing the resistor R18 down to 2k2 so that the voltage isn’t divided down so much. R18 and R19 are 0603 size)

    The attached simulation doesn’t show this unwanted 120kHz oscillation happening.
    (by the way, there is also a 60W offline led driver SMPS on the same PCB as the DALI receiver part of the circuit shown)

  2. #2
    Super Moderator
    Points: 261,960, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,785
    Helped
    13916 / 13916
    Points
    261,960
    Level
    100

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    The transistor has no feedback and can't act as an oscillator. It can only amplify interfering voltage already present at it's input, e.g. SMPS crosstalk.

    I think the problem is brought up by the receiver circuit design. Besides lower load resistance for the rectified bus voltage, I would provide low pass filtering and hysteresis.


    1 members found this post helpful.

  3. #3
    Advanced Member level 5
    Points: 33,433, Level: 44
    Achievements:
    7 years registered

    Join Date
    Sep 2008
    Location
    cambridge
    Posts
    6,947
    Helped
    509 / 509
    Points
    33,433
    Level
    44

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    Thanks,
    We can actually put a 1206 resistor across the DALI bus, to give the lower load resistance (there is a not-fitted 1206 footprint there, which we intended either for a resistor or a capacitor.)
    Also, we were wondering if it is best to put a filter capacitor on the rectified DALI bus, or rather put say a 100pF capacitor on the RA3 node, which connects into the micro?

    Incidentally, when we have the same setup as above, but without the bridge rectifier between transmitter and receiver, we then dont have the 120kHz oscillation problem.

    By the way, our DALI circuit is based on page 3 of the following.....
    http://ww1.microchip.com/downloads/e...tes/01465A.pdf
    Last edited by treez; 1st June 2019 at 13:19.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 261,960, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,785
    Helped
    13916 / 13916
    Points
    261,960
    Level
    100

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    A filter without succeeding Schmitt trigger function won't necessarily suppress the interferences. But 120 kHz ringing edges would be normally filtered out by the receiver UART. Are you quite sure that it causes communication errors?


    1 members found this post helpful.

  5. #5
    Advanced Member level 5
    Points: 33,433, Level: 44
    Achievements:
    7 years registered

    Join Date
    Sep 2008
    Location
    cambridge
    Posts
    6,947
    Helped
    509 / 509
    Points
    33,433
    Level
    44

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    Yes....here is a scope shot of what the noise looks like at RA3.........top is what we should see, bottom is what we get.
    The micro isnt responding to the comms...presumably due to this noise
    Last edited by treez; 1st June 2019 at 13:40.



  6. #6
    Advanced Member level 4
    Points: 7,600, Level: 20
    Achievements:
    7 years registered

    Join Date
    Jul 2010
    Location
    Sweden
    Posts
    1,020
    Helped
    388 / 388
    Points
    7,600
    Level
    20

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    Please measure the rectified DALI bus with the scope, and also the base voltage and the voltage that the pull-up resistor R24 is connected to.
    The 120 kHz should be visible on one of these signals.

    Is you circuit isolated with opto-counplers as in the Microchip application note, or is the supply voltage isolated from all other units on the bus?
    If you don't have optocouplers and some units share a ground connection, strange things will happen.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  7. #7
    Super Moderator
    Points: 261,960, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,785
    Helped
    13916 / 13916
    Points
    261,960
    Level
    100

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    I didn't read from your post that the 120 kHz is permanently. This shouldn't happen with reasonable circuit dimensioning.

    Besides inadvertent ground connection suspected by std_match, this can be also capacitive injection of high frequent common mode voltage.


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  8. #8
    Advanced Member level 5
    Points: 33,433, Level: 44
    Achievements:
    7 years registered

    Join Date
    Sep 2008
    Location
    cambridge
    Posts
    6,947
    Helped
    509 / 509
    Points
    33,433
    Level
    44

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    Is you circuit isolated with opto-counplers as in the Microchip application note, or is the supply voltage isolated from all other units on the bus?
    Thanks, No optocouplers. There are no other receivers on the dali bus.
    The 60W SMPS has an earth connection, but does have full isolation between primary and secondary…the dali receiver is grounded to the secondary of the 60W smps.
    The DALI transmitter is supplied by its own internal offline SMPS, and I think its secondary is earthed…will check this.
    We also have an isolated USB connection from a laptop to the micro that’s receiving the DALI signal at RA3 (so that we can communicate with the micro).
    We also have a “ DALI sniffer” connected to the DALI bus so that we can read what is being sent on the DALI bus and confirm that its what was sent.
    Maybe amongst all this gubbins we have a huge earth ground loop that’s injecting the noise?
    Having said that, I think if the post bridge rectifier DALI bus was getting fully pulled down to ground, then I suspect we wouldn’t have the problem.



  9. #9
    Advanced Member level 5
    Points: 33,433, Level: 44
    Achievements:
    7 years registered

    Join Date
    Sep 2008
    Location
    cambridge
    Posts
    6,947
    Helped
    509 / 509
    Points
    33,433
    Level
    44

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    Thanks to all, what about the following adjustment to the DALI receiver circuit?…now we have reduced the gain of the first NPN stage, making it a follower. We have also made the base_emitter resistor 10 times less.
    (pdf schem and LTspice sim attached)

    (Incidentally, On the previous board, the original circuit of the top post worked absolutely fine, but we did not have the bridge rectifier then.)



  10. #10
    Full Member level 1
    Points: 2,148, Level: 10
    Achievements:
    7 years registered
    Nik_2213's Avatar
    Join Date
    Jul 2010
    Location
    UK
    Posts
    98
    Helped
    23 / 23
    Points
    2,148
    Level
    10

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    Um, I don't know about DALI, but the configuration looks a lot like MIDI, where opto-isolation was obligatory, even for the shortest, simplest connection.

    We're talking 'Murphy's Law' here: Otherwise, you'll get ground loops, ringing, stray EM, 'motor boating' and/or ultrasonic oscillation...



  11. #11
    Advanced Member level 5
    Points: 33,433, Level: 44
    Achievements:
    7 years registered

    Join Date
    Sep 2008
    Location
    cambridge
    Posts
    6,947
    Helped
    509 / 509
    Points
    33,433
    Level
    44

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    We're talking 'Murphy's Law' here: Otherwise, you'll get ground loops, ringing, stray EM, 'motor boating' and/or ultrasonic oscillation...
    Thanks, On the previous board, the original circuit of the top post (without optocouplers) worked absolutely fine, but we did not have the bridge rectifier then.

    - - - Updated - - -

    we are hoping, in the first instance, that we can solve it by just putting a 3k9 across the dali bus (post bridge) and also by reducing base_emitter resistor to 1k (that means we have to reduce the top resistor to 2k2 so as to reduce the potential divider effect)....these changes we can do without re-spinning the board.
    If it doesnt work, then we will have to come in with series diodes in series with the base of the npn on the re-spun board, , and also possibly a base_emitter capacitor of some 1nF.
    The added diodes in series with the npn base will block leakage current which has obviously been coming through the zener.

    - - - Updated - - -

    The attached (pdf schem and LTspice sim) are all the possible ways of fixing this DALI comms (Tx and RX) circuit.....we hope we only have to resort to circuit "A"



    •   AltAdvertisement

        
       

  12. #12
    Super Moderator
    Points: 261,960, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,785
    Helped
    13916 / 13916
    Points
    261,960
    Level
    100

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    I would expect a positive effect of lowering resistor values. RC filters should have time constants with meaningful relation to DALI bit time, e.g 50 to 100 us.


    1 members found this post helpful.

  13. #13
    Super Moderator
    Points: 82,003, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,450
    Helped
    4487 / 4487
    Points
    82,003
    Level
    69

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    I can't see any source of oscillation in the schematic but that doesn't exclude the possibility of it emanating somewhere else.

    If the DALI bus voltage is likely to be unpredictable or noisy, there is an alternative method that might work: use a comparator to compare the instantaneous bus voltage against the average bus voltage. It's easy to do and you can set it to respond to any reasonable change in bus voltage (the data!) while the idle state voltage can drift or change according to load conditions. The detector would work in a similar way to a data slicer in other serial comms situations.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

  14. #14
    Advanced Member level 5
    Points: 33,433, Level: 44
    Achievements:
    7 years registered

    Join Date
    Sep 2008
    Location
    cambridge
    Posts
    6,947
    Helped
    509 / 509
    Points
    33,433
    Level
    44

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    Thanks, by the way, the following circuit also works fine, but we dont want a bulky opto in there as we dont need the isolation.
    (ltspice and pdf attached)


    1 members found this post helpful.

  15. #15
    Super Moderator
    Points: 261,960, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,785
    Helped
    13916 / 13916
    Points
    261,960
    Level
    100

    Re: NPN is bahaving as oscillator when used with DALI comms bus

    Using an opto coupler without utilizing its isolation feature is useless, I think. You can achieve the same effect by a respective dimensioned single transistor circuit.


    2 members found this post helpful.

--[[ ]]--