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:
- ESP32-CAM
- MPU6050
- LM2596 Step-Down Buck Converter
- 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:
- 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?)
- 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).
- 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.
- I have shortened the wire lengths (so they don’t act like antenna).
- 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 - 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.





