Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

NPN is bahaving as oscillator when used with DALI comms bus

Status
Not open for further replies.
T

treez

Guest
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)
 

Attachments

  • DALI COMMUNICATION.pdf
    11.3 KB · Views: 104
  • DALI problem.txt
    4.7 KB · Views: 83

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.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
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.....
https://ww1.microchip.com/downloads/en/AppNotes/01465A.pdf
 
Last edited by a moderator:

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?
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
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
 

Attachments

  • 120kHz oscillation in DALI pulses.jpg
    120kHz oscillation in DALI pulses.jpg
    116.6 KB · Views: 124
Last edited by a moderator:

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.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
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.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
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.
 

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

Attachments

  • improved DALI circuit.pdf
    11.8 KB · Views: 90
  • improved DALI circuit.txt
    5.2 KB · Views: 77

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

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"
 

Attachments

  • DALI circuit improvements.pdf
    29.5 KB · Views: 90
  • DALI circuit improvements.TXT
    30.6 KB · Views: 73

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.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
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.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
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)
 

Attachments

  • DALI opto circuit.pdf
    12.2 KB · Views: 97
  • DALI opto circuit.txt
    4.8 KB · Views: 75
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.
 
  • Like
Reactions: Nik_2213 and treez

    T

    Points: 2
    Helpful Answer Positive Rating

    Nik_2213

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top