0
\$\begingroup\$

I've designed a PID fan control system which takes air quality measurements via sensors and sets the AC fan motor speed by changing the H bridge frequency.

Circuit is as below:

Full:

Full

Top:

top

Bottom:

bottom

Working principle: The Arduino gives a PWM signal that is two times more faster than the desired because the same PWM will control both half cycles of the AC signal.

The CD4013 inverts the output with each rising edge (that's why the duty ratio is limited up to 99.6 % but not 100 %.) The 74HCT08 is just an "AND" gate. It forces the output to turn off when there is no input from Arduino, that allows me to control the duty ratio. Pin10 and !pin10 are the outputs of the AND gates. They are applied to MOSFET drivers. The duty cycle of the PWM is related to the PWM signal frequency. There is a constant V/Hz ratio "220/50 = 4.4" to not overheat or underdrive the fan.

While I was testing the circuit, I used a 220 V neon light instead of a fan. I noticed that the light didn't light up, probably because the MOSFETs weren't firing. I saw 310 V across the capacitor as expected but the load wasn't taking it. One more thing I noticed was that when I plug the AC input in to outlet, the Arduino turns on but the OLED screen displayed only a portion of the text and rest of the screen was whitish grunge. This didn't occur with USB power. I thought it was because of the unstable voltage at the first instance when I plugged it in. I didn't care much because the screen was normal when the second page is loaded. The sensors were giving normal measurements and the display was showing that normal AC frequencies were being applied by the Arduino.

I prepared to take measurements. I plugged in the system this time I saw that the power supply LED, the Arduino power LED and sensor LED were blinking. I was surprised, I thought the power supply was corrupted and it was giving positive output then zero output in turns. I unplugged it but I couldn't think of what to do so I plugged it back in. The blinking occurred again, I didn't care this time, I just wanted to take measurements from the H bridge so I approached the system. When I sat down near it I noticed a burning smell and unplugged the system. I thought the power supply was just dead, it was a cheap low power supply after all (12 V 6 W 0.5 A LED driver.)

I was constantly touching the IR2110, CD4013, 74HCT08N and ATmega chip after I unplugged the system. They weren't hot. I didn't touch the voltage regulator during tests but I remember I felt hot air over it. I was concerned if it was going to affect the temperature sensor, I wasn't more concerned.

I waited for the capacitor to discharge, then I connected the Arduino to USB. I touched the regulator and it burned my finger. I removed the power supply and tested the Arduino alone. It burned my finger again. I turned my focus to the power supply. I tested the power supply with a multimeter and a 12V LED and surprisingly it was working perfectly. I measured the resistance between Arduino VCC and GND pin and it was only 10 ohms. Something was basically penetrated by current (if that's the right term.) I removed the regulator and this time I saw only 18 ohms. I plugged in the USB cable, as there was no voltage regulator, this time, the ATmega chip burned. I desoldered everything that's connected to VCC pin but still the resistance between VCC and GND was 18 ohms. The MOSFET drivers (IR2110) are completely fine. I checked the resistance between their output and ground pins, it was large.

On the voltage regulator it says: 4MBD and I don't know what model that is.

My question is:

What could possibly cause the Arduino to burn like that? Does my cheap Arduino clone have a poor regulator that can't handle 12 V raw input? Does the cheap LED driver have voltage spikes at start up and that killed the regulator? Did the 310VDC find a way to Arduino (this option is unlikely because the Arduino performed normally for some time during tests, if 310 V were there it would die instantly, right? The LED and screen weren't brighter than they should've been.)

physical circuit

enter image description here

Note: The power supply is removed and VCC pin of Arduino is desoldered.


I GUESS I FOUND THE ANSWER

Let's take a look at the datasheet of IR2110:

enter image description here

Both the Vss and COM pins are tied to ground. VSS is the ground for VDD (which is responsible to charge the bootstrap capacitor, in my example VDD = 12V which is supplied by the power supply which also feeds the Arduino). That's why Vss will be connected to the power supply ground, also this is the Arduino's ground. What about the COM ground, it's the ground of the H bridge, not the ground of Vdd. That's why COM and VSS must be considered separately. In most cases people will connect H bridge ground and Arduino to the same line so that Vss and COM can be connected together but in my case I didn't connect H bridge ground and VDD ground that's why there was always a potential difference between these two grounds.

My mistake might be to connect VSS and COM pins together to the power supply ground:

shorted 2 and 13

This might have created high voltages at the ground of Arduino and burned it.


My second question:

Should I connect the power supply ground to the H bridge ground with a wire as below, is it that simple? grounds together

-----------------------------------------Final-------------------------

The answer to my second question is "Yes".

IR2110 tried to drive the low MOSFETS with 12V voltage difference not between the source and gate but the Arduino ground and gate, that's why the 220V light didn't turn on. I'm still unsure about why the Arduino burned but there might me tons of things going wrong beyond my level of understanding.

Diagnosis: Uneven Grounds (probably)

\$\endgroup\$
19
  • 1
    \$\begingroup\$ This circuit has very little chance of working on a protoboard, at least not on that kind. It would have a chance on a ground plane with upside-down or floating island chips. I’d suggest to make a 2-layer PCB with one layer devoted to a ground plane, at a minimum. And add plenty of optional instrumentation to measure currents etc. For pickup of wideband noise, you can mount BNCs on the board to monitor various voltages while retaining signal integrity. \$\endgroup\$ Aug 13, 2022 at 19:36
  • 1
    \$\begingroup\$ How were you going to make measurements? Did you connect the ground clip of an oscilloscope to the circuit somewhere? \$\endgroup\$
    – JRE
    Aug 13, 2022 at 19:54
  • 2
    \$\begingroup\$ You do realize that you have the Arduino connected directly to the line voltage, right? You have the ground of the 12V supply connected to the negative side of the rectifier bridge. Anything bad that happens in the high voltage parts will happily "bite" your Arduino and the other low voltage parts. \$\endgroup\$
    – JRE
    Aug 13, 2022 at 19:58
  • 1
    \$\begingroup\$ Show us the bottom of the board. \$\endgroup\$ Aug 13, 2022 at 20:26
  • 3
    \$\begingroup\$ Clarify the schematic, not descriptions how it differ from your actual setup. Schematics are the language of EEs. \$\endgroup\$
    – winny
    Aug 13, 2022 at 21:37

1 Answer 1

1
\$\begingroup\$

I think you found the problem yourself. The motor supply ground must be connected to gate driver ground in order to drive the low side FET.

However, doing that, and even before doing so, please understand that the Arduino will be connected to lethal mains potentials, and it should not have any outside connections to any other device or be touched with fingers etc.

So remember to disconnect USB connector after programming, or you will send mains through PC, and it will likely destroy things before the fuse or circuit breaker blows. If your PC is ungrounded, it might not blow a fuse but the PC will then be live with mains too.

\$\endgroup\$
8
  • \$\begingroup\$ Can I prevent Arduino form being connected to mains. Or is it mandatory to do it this way. After all I need the mains to obtain 12V right? Most importantly: Can I short circuit the bridge ground and 12V power supply ground to prevent any problems related to ground difference? \$\endgroup\$ Aug 13, 2022 at 22:23
  • \$\begingroup\$ Just look at the pink marked wire at the original post and you will understand what I am planning to make grounds equal. \$\endgroup\$ Aug 13, 2022 at 22:31
  • \$\begingroup\$ Your edit with the pink mark is exactly what I said in my answer what is wrong and how you must do to fix it. But like I also said, the whole circuit and all connections going in and out of it are dangerous, and in fact it should have no outside connections anywhere due to that reason. That's because the gate driver does not isolate anything, as it requires the Arduino ground to be connected to H-bridge ground, for common reference. \$\endgroup\$
    – Justme
    Aug 13, 2022 at 22:32
  • 1
    \$\begingroup\$ The grounds are a problem and it can't be isolated with optocouplers, because you are using the same 12V supply for both Arduino and FET driver to drive the FETs already. You need two separate 12V supplies then, so that Arduino runs on 12V supply that is isolated, and it has optocoupler isolation to FET drivers. \$\endgroup\$
    – Justme
    Aug 14, 2022 at 0:03
  • 1
    \$\begingroup\$ If you use a simpler and non-obsolete half-bridge driver like digikey.com/en/products/detail/infineon-technologies/IR2304PBF/…, you can use a single separate 12 or 15 volt power supply for the drivers, and some dual high speed optocouplers to totally isolate the high voltage section of the design. \$\endgroup\$
    – PStechPaul
    Aug 14, 2022 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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