Thursday, 16 January 2014

Duet on board power supply testing

There have been a number of discussions on the reprap forum (1,2,3 for starters) about the effect of electrical noise causing hanging/freezing on the Duet board requiring reset attributed to this. Radian originally highlighted that a significant spike on the 12V line was caused by the switch of of the Heated Bed FET could be the cause.

We have done  quite a bit of investigation now into this particular effect, its causes and options to reduce it which is covered below. All the scope plots were recorded by Andy, one of the Duet designers. Throughout the green trace is the voltage under investigation and the purple trace is the heated bed current.

The relevant portion of the schematic is shown here for quick reference, full design files are on Github:



Bed FET Switching Transient Spike

Due to the fast switch off of the MOSFET, combined with the inductance of the PCB heatbed (average measurements 1uH) there is significant ringing (47.8V pp). The FET is avalanching at that point.


12V at he MOSFET Drain during bed switch off
This noise is relatively local to the MOSFET though, at the 12V input connector it is down to 750mV pp.

12V at the input connector

Once through the buck DC-DC convertor on the 5V line the noise is down to 130mV pp.
5V at buck output

and by the time that goes through the 3.3V regulator its down to 63 mV


3.3V at LDO regulator output
 At this point the 3.3V is further filtered and converted onboard the processor to 1.68V.

Mitigating the Spike

Some of these ideas have come form suggestions on the RepRap forums - thanks for the input!

First Andy added an RC snubber across the FET  with a 10nF capacitor and a 10R resistor. This removed the ringing but the large spike was still evident. Adding a catch diode across the heat bed contact made a small additional difference


RC snubber added across FET (10nF + 10R)


Snubber + catch diode across heat bed contacts
Finally R18 (see schematic at the top) was changed for 470R and 100R added in series with the FET gate. This has the effect of speeding up the turn on and slowing down the turn off of the FET. With all of this in place the spike is still significant but as the second trace below shows the noise on the 3.3V line is now only ~18mV

Snubber + catch diode + R18 changed to 470R and 100R added in series with TR2 gate
3.3V LDO output during heated bed switching
So what?

Our assessment at this point is that the 12V spike caused by the heated bed switching is not, in of itself, causing any negative effects to the Duet processor. In addition the avalanching causes minimal additional heating to the FET when "Bang, Bang" switching or low speed (<1KHz) PWM is used. High speed PWM is bad due mainly to the slow turn on time which causes significant heating.

During this testing we had 3 Duet boards using PWM on the heated bed for a number of days with no modifications, those processors have been subjected to hundreds of millions of these noise spike without a single crash and hang. That is not saying that its not possible but there are probably other contributory factors, see "Further Work" below

Further Work

More investigation is needed into the effects of USB ground loops which may be causing some issues. Other USB noise can also cause problems, the investigation by markbee, posted on the forums is a very useful starting point.

The firmware is being continually updated (special thanks to dc42 for all the work he has already done). This has already fixed some causes of Duets hanging so make sure you are using the most up to date firmware if you are having issues.

I must again thank everyone who is contributing so much on the forums!



2 comments:

  1. I had a logitech Duet power supply http://www.staticon.ca/ it could fairly easily build a small box that would hold a passive filter, made with air-core (or common-mode) inductors and film or ceramic capacitors; such a box would be placed in series with the Duet and its switcher. This might work quite well, depending on how much noise and what frequency the noise contained

    ReplyDelete
    Replies
    1. HI Sasha, you can filter the incoming power line if you are concerned about the transients getting back onto the main power, I find that the ATX PSUs we use are good enough as filters.

      Cheers

      Tony

      Delete