cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Bus: Massive Noise on the bus when a power converter starts

KMew
Senior III

Hello,

We have been using CANbus as our form of communication for a system with multiple nodes. Each node was individually tested with CAN and all of them work without issue. However, when we started system integration testing, we noticed significant noise on the CANbus channel that caused data to stop. 

To give more details, we are running 2 battery packs, a power electronics DC/AC converters (to create a 120Vac signal) and a central supervisory controller, which are all using STM32 MCUs to communicate to each other via CANbus. We are using an STM32H7AGI6, STM32F401RE, STM32F303RE. When we send a CANbus command to start the DC/AC converter, that is when the noise appears and we cannot communicate with the MCUs until the DC/AC converter is turned off.

 

We have termination resistors at the end of the bus and I have verified that the 60 Ohm resistance is seen on the bus. I've also attached a copy of our schematic for the CANbus, which all of the nodes use (except that the 120 Ohm resistor is only populated in the two connected at the ends)

KMew_0-1717437769740.png

I've attached a picture of the waveform too, where the two "messy" segments are when we try to start the DC/AC converter. The picture below is the CANH line, with the probe grounded to the GND pin in the CANbus node.

 

 

KMew_2-1717437921269.png

 

Can anyone give me some tips to improve this or prevent this from happening?

 

1 ACCEPTED SOLUTION

Accepted Solutions

I have solved the issue.

 

Your suggestion about checking the BOR/POR led me down a good rabbit hole.

After doing extensive testing, we confirmed that the DC/AC creates a conductive noise in the CANbus (NOT irradiated noise). For conductive noise, the twisted pair and shielding on the cable made no difference for the issue we were seeing. 

So we focused on filtering out the conductive noise. We added 0.25nF capacitors from CANH -> GND and CANL -> GND. When we did this, the communication is stable, even when the DC/AC is on. 

 

We also added a common-mode choke for the CANH and CANL line, which further reduced the lossed packets in the communication. So while the capacitors were sufficient to solve the issue, the choke and capacitors combined are the full solution to our problem.

 

KMew_0-1718132700655.png



Edit:
I have been doing additional testing and have even further improved the quality of the CANbus. One problem we had, with the intention to simplifying the wiring, we accidentally created a "star formation" with our CANbus wiring architecture. We converted our CANbus to a complete daisy-chained formation, with all stubs being under 10cm, and the signal quality improved immensely. Even the noise on the bus reduced to a measurable level when using an oscilloscope. 

 

Take the CANbus architecture recommendations to heart! I was hoping that, because of our low baud rate (250 kbit/s) and our short wires (longest was 80cm), it would not be an issue, but I have been proven wrong. 

 

 

View solution in original post

27 REPLIES 27
MHoll.2
Senior

Hi 

The Can-Bus is normally very resistant in noisy environments. so if you lose completely the communication you could have one of this problems:
1) check that you have a good common ground on the system (Can is differential but need a GND path for the current flow).
2) check that the cables you are using are twisted and have a impedance of about 120 Ohm
3) if You still have problems you can use an isolated CAN Transceiver or try to reduce the interference generated by you DC/AC converter.

Martin

Hello MHoll.2,

Thank you for your reply. We are trying to avoid major harware changes like a new CAN Transceiver (it'll be our last resort, if we have to do it). So let's start with the easier things.

 

1) When you have "have a good common ground," can you please explain what you mean by that? We have a centralized "CAN Hub," which has the three pins (CANH, CANL and GND) all connected together for all the nodes. Is that what you mean?

2) Yes, we are using twisted pair cabling for all the wires (76030 TL001 cable) and the two ending nodes have a 120 ohm termination resistor. I verified the measurement, as I see 60 Ohm between CANH and CANL.

 

>>When you have "have a good common ground," can you please explain what you mean by that?

Well bonded, like the body/frame of a CAR, so it's very difficult for the units in the system to have a different ground potential with respect to each other. Not just some 25 AWG

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello Tesla,

Thank you for your explanation!
So in this scenario, we have a large metal plate for Earth Ground (for the 120V output connection, which normally has line, neutral and earth).
However, we will have multiple grounds in this scenario (power ground, digital ground, analog ground, etc.). If we want to maintain galvanic isolation, we do not connect the digital ground to Earth Ground. Is that not right, in this case?

Yes, I'd assume that requires significantly more caution. 

The point however being CAN was designed for cars, where the chassis was the ground everything shares.

What's the ground-vs-ground look like on your DC/AC converters case look like? Can that be remedied using smaller AWG wiring?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LCE
Principal

My guess (without having seen any PCBs or circuits): system problem, probably caused by the GND connections (loops!) as already mentioned, and probably noise created by the DC/AC converter.
If the system GND would be absolutely "identical" (zero impedance from node to node - which is virtually impossible), and there was some noise on system GND compared to "Earth", that would not matter, as all nodes ride on the same noise.

I would work on these things:
system design and GND connections,
the power converter and its exact flow of input and output currents,
use isolated CAN transceivers.

Concerning CAN, just for testing: have you removed the GND connections between nodes?

On the other hand, that project does not sound like there are hobbyists at work, so the power part should be generally okay...

It does not sound like an STM32 / driver / software problem at all. Which makes it more interesting. :D

Hello Tesla,

There is an option to change the ground wire size to something smaller. Would that help? Since that would add more impedance to the line, so there would be a larger difference between the DC/AC converter's ground plane and the earth ground?

Hello LCE,
Sorry for getting back to you so late. I wanted to try some additional tests to try and get more information. Here is some additional information:

 

- I did try to remove the GND wires from all the CANbus nodes. There was no change in results (the communication got no worse and did not get better either)

- I have confirmed that, at least, the signal I am seeing on the oscilloscope is not real. I put a CANalyzer on the bus instead of the oscillscope and, during that period that the DC/AC board is running, the CANalyzer does still see information on the bus. I do get periodic errors (stuff error, form error, etc.), but messages are still being sent. Additionally, after about 30-40 seconds of the DC/AC running, I do see that all communication stops as well. The CANalyzer stops seeing any data being sent from any node, which it is not supposed to (all nodes send their data approximately every 1 second).

- I took the setup outside of our enclosure and used a pre-twisted twisted pair cable ( https://www.digikey.ca/en/products/detail/alpha-wire/76030-TL001/12715466 ) and I do not see the communication getting dropped. So I do feel confident that there is some noise being injected and that is interfering with the CANbus. Note that this wire is not shielded, it's just a twisted pair.

- I did notice that the assembler made hand-woven twisted pair wiring, but all three wires (CANH + CANL + GND) are all twisted together, so it's not technically twisted pair

 

Does this information help at all? Because we have not been able to conclusively solve the problem

Karl Yamashita
Lead III

@KMew wrote:

When we send a CANbus command to start the DC/AC converter, that is when the noise appears and we cannot communicate with the MCUs until the DC/AC converter is turned off.


When you say turned off, is it turned off by CAN message or manually turned off? 

I'm trying to understand when the DC/AC converter is turned off, if all of a sudden CAN communication commence?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.