Electromagnetic Interference from Motorbike

Hello everybody! I hope you are all having an amazing day.

Introduction:
So, I have been working on this project for around a month, and this project is sort of like a dashcam for motorbikes. Let me tell you about the main hardware components before I explain the project and the problem that I am dealing with:

Hardware Components:

  1. ESP32-CAM
  2. MPU6050
  3. LM2596 Step-Down Buck Converter
  4. 2 Li-ion cells attached in 2S with BMS to provide 8.4V

I have also attached the Circuit Schematic for a better understanding.

So, the LM2596 takes input from the Li-ion and outputs 5V to ESP32-CAM. The 3.3V on ESP32-CAM is used to provide voltage to MPU6050.

The ESP32-CAM is supposed to record the real-time footage and save it on the SD card. And also, at the same time it is supposed to send values it is getting from MPU6050 to a mobile phone app via Bluetooth. There is no charging of the battery being done by the bike as of now as I am currently facing this issue of radiated EMI, once solved I will try to go for that route. So, this system is completely standalone.

Casing:
The system is currently housed inside a 3D-printed enclosure (except for the battery and the BMS along with it) designed by a previous contributor. Some several modifications and additional components have been introduced by me into the circuitry, and the tight tolerances of the original enclosure can no longer accommodate the updated hardware. Therefore, the enclosure design will need to be revised in future iterations. However, I tried my best to accommodate all the hardware within the enclosure as much as possible.

The Problem:
This system tends to work perfectly until it is mounted on the backplate of the motorbike. The footage gets recorded and saved, the Bluetooth works fine, the values we get from the MPU6050 are correctly displayed on the mobile app. As soon as the bike is started and we rev the bike, the EMI disrupts the circuit so badly that the values from the MPU spikes and reaches a very high or very low (For example, if we were having a roll of 5° it might change to -15° or 25° depending upon how much we rev the bike).

Mitigation Attempts:

Aluminum Foil:
I wrapped the 3D-printed casing with aluminum kitchen foil from both the inside and the outside and then insulated it with black PVC electrical tape. Although a single wrapping on the outside would have been sufficient, the casing was also wrapped from the inside for additional shielding.

Shielded Cable & Ferrite Bead:
I then connected the one end of the shielded cable to the battery, and the other side was inserted into the 3d casing (obviously a small hole had to be made through foil). This shielded cable basically has a thick rubber coating inside which a drain wire is wrapped around the aluminum foil (this foil basically houses two cables red and white). Just before the entry point a ferrite bead is used. As soon as these wires enter into the 3d case the drain wire connects to the white wire (this white wire connects to -ive terminal of the LM2596 and with the aluminum wrapping of the 3d case). As for the red wire it is connected to the +ive terminal of the LM2596. The foil of the 3d case is only connected at one point which is mentioned above in order to avoid ground loops.

Some other components have also been used which you can clearly see in the schematic of the circuit.

Test Subject:
The subject on which the tests are being done is a 70cc cdi based bike. I did try on some other brand bikes of the same 70cc cdi category and there were slight differences in the results, some did not disturb the circuit as much as the one I am testing on. But the question is what am I doing wrong or what am I missing? After all that I have done, why is the EMI not being countered?

Possible Sources of Error:
Kindly give your valuable feedback on this:

  1. I believe there might be some leakages in the aluminum foil that might be causing this issue. Also, by increasing the foil’s thickness or maybe moving onto a steel metal case with maybe around 1mm thickness would that be a better solution to go with? (And would it block the Bluetooth communication, if yes then what can i do for that?)
  2. I placed the battery outside maybe that could be the issue, but would not it ultimately route the radiated EMI to the ground via the foil, or would it ultimately enter in the wires and maybe go through them to the internal circuitry (But I also placed a ferrite bead just before the entrance of the wires into the 3D casing).
  3. I did connect the oscilloscope in AC coupling mode on the 3.3V pins of the ESP32-CAM and when the bike was revved, I got a ringing wave. I believe this means that the EMI is inducing noise in the pins and it would be also inducing noise into the other pins as well.

I have attached some pictures of the oscilloscope showing the results before the bike is revved and after it is revved.

Sorry for the glare on the last picture.

Improvements:
As of now I have taken out all of the circuit from the 3D casing, and I am temporarily using an aluminum foil food container for housing it.

  1. I have shortened the wire lengths (so they don’t act like antenna).
  2. I have twisted the following wires together in a pair:
    A. SDA and SCL wires going from MPU6050 to ESP32-CAM
    B. VCC (3.3V) and GND wires going from MPU6050 to ESP32-CAM
  3. I have placed a common mode choke between the output pins of LM2596 and the 5V and GND pins of ESP32-CAM. On these 5V and GND pins of the ESP-32CAM, I have also placed a 470uF Electrolytic Capacitor and a 100nF ceramic capacitor in parallel.

If you believe any further improvements or modifications can be made, I would appreciate your suggestions. Thank you for taking the time to review this.

All aluminum and particularly foil has an insulating oxide coating. You must cut through that insulation to make an electrical contact. That is why the screws holding aluminum housings always use star washers under the nuts to make an actual electrical connection to the aluminum metal. You are wasting your time wrapping with foil unless you use screws, nuts and proper washers to actually make electrical connections.

Use copper braid instead.

A crazy suggestion. Have you considered the possibility that it’s not actually an EMI problem, since you say that the measures you’re taking don’t counteract the EMI? Do they counteract it a bit or almost not at all? If they barely counteract it, consider the possibility that the real issue is mechanical vibration when you place it on the motorbike. It’s easy to find out: test your device close to the bike but not on it.

There are valid reasons automotive manufacturers use the more expensive metal enclosures and sometimes potting, you might look into that. If you are lucky @cheyenne1 found your problem.

Arduinos are designed for experimentation and learning, often used with breadboards and loose wires, which can become unreliable if vibrated. They are not built for harsh, dirty, or electrically noisy environments commonly found in industrial, automotive, or other commercial applications, making them unsuitable for such settings.

To ensure we can provide the most accurate assistance, please include detailed information about your setup. Specify the exact board, shield, wiring configuration, and power sources you are using. An annotated schematic is ideal, as it provides a clear overview of your setup, but be sure to also include links to the technical specifications of your hardware components.

Before posting your code, please review the forum guidelines and use code tags for better readability. Also, provide links to the technical information about your hardware, and include a preliminary schematic that shows all power, ground, and connections. For additional guidance, you can refer to this link: Useful Links and Tutorials. Note that in this context, breadboard diagrams are not considered proper schematics.

Thanks for the suggestion but I already did that test by placing the gadget close to the motorbike but not on the bike and the result was still the same the values got massive spikes and the Bluetooth got disconnected (most likely a brownout).

I checked the continuity at different points of the aluminum foil using DMM (Digital Multimeter) and it did pass the test. Do I still need to do what you suggested?

Thank you for your response. Just to clarify, I did not use any breadboard in my setup. I have already included all the details regarding my setup in the post. I would really appreciate it if you could kindly go through the post once more and let me know if there is anything related to my issue that I may have missed.

I have seen similar transient as shown on your scope when the contact points open on an ignition coil. This is also possible with some simple electronic controllers. I am assuming it is powered from the vehicle and it is in close proximity so that brings up both radiated and conducted EMI. Here is some reading that will take a bit of time but should help.
Valuable Resources for Automotive Electronics:

  1. STMicroelectronics Application Note AN2689:
    This application note provides guidelines on protecting automotive electronics from electrical hazards, focusing on design and component selection. Reading this will greatly enhance your understanding of automotive circuit protection.
    Read AN2689

  2. Analog Devices: Automotive Electronics Design:
    This article distills key insights into designing automotive electronics, offering practical advice for engineers.
    Read the article

  3. Diodes Incorporated: Transient Voltage Suppression in Automotive:
    Learn about techniques to protect automotive circuits from transient voltage, which is critical for ensuring reliable operation in harsh conditions.
    Read the article

  4. AEC-100 Standards Webinar:
    This webinar from Monolithic Power Systems provides a detailed overview of AEC standards, essential for understanding automotive electronics requirements.
    Watch the webinar

  5. Understanding Automotive Electronics, An Engineering Perspective by William B. Ribbens:
    This comprehensive book offers an in-depth look into automotive electronics from an engineering perspective, making it an invaluable resource.
    Access the book

  6. Check this for OBD ISO9141 Code Meaning & How To Fix OBD negotation initialization procedure https://cdn.standards.iteh.ai/samples/16738/20ff360c25c6462b811ebc0c9256eee0/ISO-9141-2-1994.pdf Then there is https://github.com/muki01/OBD2_K-line_Reader PID codes: OBD-II PIDs - Wikipedia

  7. Load Dump and Cranking Protection for Automotiv Backlight LED Power Suppl https://www.ti.com/lit/an/snva681a/snva681a.pd

  8. Quality requirements:

Client Challenge.

Looking at your photo you do not have any real shielding and lots of antennas.

At the moment, the system is not powered from the bike’s electrical system. It is currently powered by a separate Li-ion battery, so there is no electrical connection to the bike’s power lines.

We intentionally set it up this way so that we can first focus on identifying and mitigating radiated EMI, since the device is mounted in close proximity to the bike. Once we have a better understanding and control over the radiated interference, we may later integrate it with the bike’s electrical system.

If conducted EMI becomes an issue at that stage, we will address it accordingly. For now, however, the primary concern we are investigating is radiated EMI.

Thank you for your observation. However, I would appreciate it if you could clarify why you believe there is no effective shielding in my setup.

The aluminum foil enclosure is connected to ground at a single point, so it is not floating. My understanding was that if the foil were floating, it could potentially behave like an antenna, but since it is grounded, it should act as a basic shield.

Could you please explain what aspect of the setup prevents it from functioning as proper shielding?

Your “schematic” of your decoupling chain is poor, that is not the way to do it correctly.

You need to use a Pi filter arrangement for each component and not chain them like you have. Look at my decoupling tutorial in the tutorials section of the forum.

I've held off from replying because I don't have experience with what you are doing. I have some comments though.

You foil doesn't appear to cover the whole circuit, so there's plenty of places for interference to get in. I suggest as a minimum you get a metal box for the electronics and ground the box to the motorbike chassis. You should do this even while testing off the bike.

Follow @Grumpy_Mike recommendations for the wires and feeding them into the box.

Just a thought.
Have you tried an old AM radio near the bike?

Just an update for everybody!

For anyone facing similar EMI issues, here’s what worked for me and might help resolve your circuit problems:

  • I moved the entire circuit into an aluminum food container to act as a shield (I believe this has continuity and is a thicker material than that of aluminum foil.

  • I added a common-mode choke right after the output of the LM2596.

  • After the choke, I placed two capacitors (as shown in the schematic) between the 5 V and GND pins of the ESP-32CAM.

  • I shortened all wire lengths and twisted critical pairs together, such as SDA/SCL and GND/VCC (3.3 V) going from MPU6050 to ESP32-CAM.

After these changes, I’m no longer experiencing noise and notably, I didn’t even need to close the front of the foil; leaving it open still worked effectively. My next step is to connect the Li-ion battery with the bike’s battery to see if that introduces any conducted EMI. Thank you everyone for your support.

I'm pleased you are having success

You should not twist those things together, they are different signals that should be kept apart. Twist each one with a wire connected to ground.

Basic principle is that the path for current to and from something should be together, the path for different things should be apart.

What is ground? Is it the battery, bike, earth, ???