1
\$\begingroup\$

I've been trying to design capacitive discharge ignition circuits using a microcontroller ARM (Texas and ST) without success. Each circuit using them presents intereference problems during spark generation that I can´t solve...

I believe that my main problem is a GND plane and layout, but I don´t know how to separate efficiently the power ground and logic ground when I use a thyristor (because the terminal K is common in power circuit (A-K) and control (G-K).

All examples that I found and I used as reference are based in PIC or AVR feed 5V. I basically copied the circuit by changing only the microcontroller. Is the STM32F103 sensitive to use in this kind of circuit? Is it possible to live with this noise coupled (when spark is generate) without loss in my circuit?

Because for more than I tried, I can´t eliminate this noise in GND and I believe it is responsible for crashing the uC...

My last PCB layout (used in my tests):

enter image description here enter image description here

To increase information about my instalation: enter image description here

My analysis (maybe I made have be wrong in green point): enter image description here

This part is the CDI circuit (In my test I used a external Charging Coil - AC CDI): enter image description here

Power supply and power latch(to save important data before microcontroller power off): enter image description here

Microcontroller connections: enter image description here

Inputs and Outputs (connector) used in my system: enter image description here

\$\endgroup\$
  • \$\begingroup\$ This is closely related to your previous question: "How to reduce spike in Power Supply and GND (SCR + Ignition Coil)" which is still open and being discussed. Some people might even call it a duplicate, since you're asking about the same problem in both questions. Please be careful not to waste the time of readers by asking about the same issue in multiple ways. You already deleted your first question after some people (including me) had invested time understanding it. IMHO your "multiple questions" approach seems flawed, but good luck. \$\endgroup\$ – SamGibson Jan 8 at 19:42
  • \$\begingroup\$ In fact, the two questions are about the same problem but with a different focus, the first message deleted was described as a very generalistic question according forum, for this reason it was deleted and I tried to divide in another questions more specifics, so sorry if I take your time in vain, I have had dificulty to expose my doubts due my lack of experience, English is not my first language, maybe I can´t be accurate in my posts... If you continuing help and give me some guidance I will be very greatful, thank you so much! \$\endgroup\$ – Fabio CRJ Jan 8 at 21:49
  • \$\begingroup\$ You have a great many unconnected pins on your processor. Are they all set to do something safe (set to output and pulled high, for example?) Floating input pins next to a source of noise is a recipe for random actions from the processor. \$\endgroup\$ – JRE Jan 9 at 13:12
1
\$\begingroup\$

The example you linked to in a comment is layed out far differently from yours.

Before I try to explain what I think is causing your problems (and what you can do about it,) I'm going to list some a assumptions I've made based on things gleaned from your questions and the linked source of the original circuit. These things should have been in your question(s.)

  1. You are generating about 200Vdc on board using a UC3843.

  2. The 200Vdc are used to charge a capacitor (1.5uF)

  3. The capacitor is discharged through an SCR, generating a high current spike to drive the ignition coil.

  4. The high voltage for the spark is not actually generated on board - the ignition coil is probably the one originally used in the vehicle.


You have a problem with the discharge current. As far as I can tell, the discharge current flows through the ground plane under and around your processor.

Given that the point of a capacitor discharge system is to drive a high current through the ignition coil, the discharge current will be pretty hefty.

That current can cause voltage differences across your ground plane, and induce currents in other traces.

These voltages and currents can cause your processor to do strange things.

To top it off, you have many unconnected pins on your processor. These can pick up the induced currents and voltages.

What you need to do is to keep the high discharge current away from your processor.

You should try the following:

  1. Use separate ground planes under the processor and the CDI section. These two are electrically connected, but only at a single point, and that far away from the high current areas.

  2. The discharge path should be as short as possible, and it should not cross the path of anything sensitive. Imagine a line from the CDI output, through the SCR, through the ground plane, and out to your ground wire. No sensitive parts should be close to that line, and no sensitive traces should cross it or run parallel to it.

  3. You need to connect all of those floating pins on your processor. Tie the inputs to pull ups. Any interrupts must also be pulled up. Check the processor's datasheet to see what it recommends you do with unused pins.

  4. Check that you have adequate bypassing on all power supply pins for you processor. The datasheet should tell you what to use. Put the capacitors as close as possible to each pin, and use the shortest traces possible - and connect the ground side of each capacitor directly to the ground plane.

The layout of the original is rather higgledy-piggledy, but manages to keep all of the high current activity away from the processor. It uses something like star grounding (accidentally, I'm sure) in a way that routes all the high current from the discharge around sensitive sections.

You have large ground planes that appear to be completely shared between the processor and high current sections. Those let the high currents flow where ever they want to. They will go (mostly) by the most direct route, but the discharge will cause really sharp edges that pretty much "broadcast" RF noise all across your board.

\$\endgroup\$
  • \$\begingroup\$ Thank you for the lesson! In your opinion I could to try correct/modify my circuit to compensate my mistakes in layout design or I will need to create a new layout? I don´t know if my wiring harness can contribute with this problem, I´m not sure that I did the best, I have dificult to identify ground loop, even because the vehicle is very small dificulting assembly... \$\endgroup\$ – Fabio CRJ Jan 9 at 21:44
0
\$\begingroup\$

Let's examine THREE topics.

1) have a solid sheet of copper under the MCU. No slits under the MCU.

2) Now we compute the induced Electric-field voltage, from 25,000 volts that has 1 microsecond rise or fall times, located 10cm away from the MCU's clock/Crystal or other sensitive nodes.

To compute the injected current, assume distance is 10cm, and assume the area (for parallel-plate capacitance model) is 2mm by 20mm. (We use parallel-plate math because it is conservative, and is valid in a rats-nest of traces and wires, such as your CD system).

Capacitance is E0 * Er * Area/Distance. For Er = 1 (for air), we have C = 9e-12 Farad/meter * (2mm * 20mm) / 100mm

C = 9e-12 * 2mm * (1meter/1000mm) * 20mm/100mm

C = 9e-12 * 0.0002 * 0.2 = 9e-12 * 0.00004

C = 9e-12 * 4e-5 = 45e-17 Farad

Now we compute the upset into the XTAL oscillator, with an assumed 20pF on that node.

Our ratio is 45e-17/20e-12 = 2e-5, or 1part in 100,000. And we have 25,000 volts.

Thus we will (conservatively) induce 1/4 volt into the XTAL circuit. Conservatively. You need some electro-static shielding over the XTAL and the MCU.

3) Now for magnetic field.

Assume you have 10 amps switching in 100nanoSeconds, located 1cm from the MCU (because of poor ground layout (yes, you are learning)). And the victim loop area is 1cm by 5cm.

How big a glitch is induced? Use this

Vinduce (magnetic) = MUo * MUr * Area/Distance * dI/dT

which for MUo = 4*pi*1e-7 Henry/meter, and MUr = air = 1, becomes

Vinduce = 2e-7 * Area/Distance * dI/dT

Vinduce = 2e-7 * 1cm*5cm/1cm * 10 amps/100nSec

Vinduce = 2e-7 * 0.05 * 10 amps/0.1 microsecond

Vinduce = 2e-7 * 0.5 amps /1e-7 second

Vinduce = 1 volt of upset. You need to keep the switching curren away from the MCU. 1volt is a problem

\$\endgroup\$
  • \$\begingroup\$ Thank you so much for your detail explanation! But in this context, why this kind of project presented in this link (for example: transmic.net/2016/07/17/dc-cdi-16f628-v2) works without this kind of specific protection (cover crystal and microcontroller)? This reason is the uC PIC utilization, another clock frequency? Because when I make a simple analyse I can´t see so much protection, however it works... :( \$\endgroup\$ – Fabio CRJ Jan 9 at 13:11
  • \$\begingroup\$ You mention wiring-harness. Update your question (edit it), and add a diagram showing what signals (logic, power, high-current, fast-switching-current, etc) are in the wiring-harness. You need to explain to us where are the high-current wires, the bypass capacitors on those high-current-wires, where those capacitors are connected to ground, how those Grounds connect in the harness and between the boards. And sketch the same diagram, for the high-voltage wiring. YOU have to identify the electric field and magnetic field interferers. I merely showed you how to compute the strength. \$\endgroup\$ – analogsystemsrf Jan 10 at 3:14
  • \$\begingroup\$ What if EFI or HFI couples into the MCU RESET pin? \$\endgroup\$ – analogsystemsrf Jan 10 at 3:15
  • \$\begingroup\$ I tried to put a new picture in my post but I don´t have reputation score required, I don´t know identify what kind of interference the circuit have, based in my experience I believe that electric and magnetic, but at this time I couldn´t separated and identify how to contributed each one... I obserbed that microcontroller all the time it is RESET (brownout detect). \$\endgroup\$ – Fabio CRJ Jan 10 at 11:45
  • \$\begingroup\$ If the MCU is always in Brownout Detect, then the voltage across the MCU is being disturbed: either the GND is rising or the VDD is falling. \$\endgroup\$ – analogsystemsrf Jan 10 at 16:37

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.