Noise , emi or false trigger

Hello seniors, I need help on how to prevent the Arduino from false triggering and freezing at high engine rpm. My circuit uses an internal pull-up button input. Do you have any suggestions from seniors who understand my problem?

I guess I am senior enough. Tell us how you determined there are false triggering and freezing occurring.

(post deleted by author)

What is the relationship of engine rpm and speed in km/h? What are pins? And how do you know the Arduino is hanging and not in a loop you created?

Post a connection diagram and components used in your circuit.

Here is some information that may help. Automotive has about the worst possible electrical environment to work in. You need to post an annotated schematic of your system and a clear photograph showing it in the system. There are over a thousand possible causes for your problem, but we can only guess at this point as we do not know what you have.

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 https://vehiclefreak.com/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

These resources should provide a strong foundation for anyone involved in automotive electronics design. If you need further help or more resources, feel free to ask!

Here is more on EMI:

To protect a vehicle’s electronics from electromagnetic interference (EMI), especially if it's an older vehicle with sensors, lights, or a GPS, there are several strategies you can employ. EMI can cause malfunctions or degradation in performance if not properly mitigated. Here are some approaches you can consider:

1. Shielding

  • Shielded cables: Use cables with shielding (like braided metal or foil wraps) to reduce the amount of EMI they emit or pick up.

  • Enclosures: Place sensitive electronics in metal or conductive enclosures (Faraday cages) to block external electromagnetic fields.

2. Grounding

  • Proper grounding: Ensure that all electronic components and their enclosures are properly grounded to prevent stray electromagnetic signals from affecting them. Grounding can direct EMI away from sensitive components.

3. Ferrite Beads

  • Ferrite beads: Install ferrite beads on cables that run to and from sensitive electronics. These components help suppress high-frequency EMI by dissipating it as heat.

4. Twisted Pair Cables

  • Twisted pair wiring: If you're running wires, use twisted pair cables for signal lines. The twisting helps cancel out EMI that would otherwise be picked up by the wires.

5. Capacitors and Filters

  • EMI filters: Install EMI filters (low-pass, high-pass, or band-stop) on power supply lines or signal lines to prevent high-frequency noise from reaching sensitive electronics.

  • Capacitors: Capacitors between power lines and ground can help smooth out high-frequency noise.

6. Distance from EMI Sources

  • Separation: Keep sensitive electronics as far away as possible from sources of EMI, such as motors, ignitions, and power cables.

7. Proper Cable Routing

  • Avoid running signal cables near power lines, ignition systems, or any high-current cables to reduce the possibility of picking up interference.

8. Use EMI-Resistant Components

  • Whenever possible, use components that are specifically designed to be resistant to EMI, such as EMI-hardened sensors, controllers, and processors.

9. Suppress Noise at the Source

  • Suppress ignition noise: Use resistor-type spark plugs or ignition leads with built-in suppression to reduce EMI from the bike’s engine and ignition system.

  • DC-DC converters: For bikes with electric systems, install noise-suppressed DC-DC converters to minimize EMI from power supplies.

10. Suppress Noise at the SourceGood Read: https://www.nutsvolts.com/magazine/article/September2015_HamWorkbench?

By implementing a combination of these techniques, you can significantly reduce the impact of EMI on your bike’s electronics. If you need help with a specific part or scenario, feel free to provide more details!


This is my electronic circuit, the top part is the 12v button input, the bottom part is the output for the relay drive

On the input I'd use an external pullup resistor for some mA current when closed.

A rugged power supply is vital in a hostile environment like a car.

How fast are you pulsing the relay? What is the relay switching?

I move the relay as fast as 25ms/press the button using millis

Thanks you , I implemented your suggestion

So I’m guessing the 12V supply is from your vehicle.

Your diagram doesnt show how the Arduino is powered. I’d recommend using an external regulator as the “12V” may actually be considerably higher and have a lot of noise.

It also doesnt show any decoupling.

Please refer to this page for some advice

Yes, that's right, my 12v source is from the vehicle, for the power supply circuit from the 12v battery to the buck converter, set 9v to the Vin pin and I also added a decoupling capacitor near the Vin pin & the GND pin.

look also at how the grounds are connected as shown on my page

You can make a quick test : make a Faraday cage for your Arduino, make sure that relay is outside of the cage.

So it works OK at low RPM?
Then, it might be a software issue.

But he has optocouplers everywhere.. May be scope the power rail, to see if there any spikes when relay triggers?

.. i guess that noise also grows with RPM :frowning:

Yeah , its work in low rpm

Mmmm My PSU is from a series diode battery then a 1000uf 35v elco & 100nf capacitor to the stepdown then a 1000uf 16v elco and a 100nf ceramic capacitor to the Vin pin