Fried regulator with USB + external power ?

Started by Marcus, May 31, 2015, 06:01:56 AM

Marcus

Hello,

I just purchased few Moteinos and first let me tell you that they look awesome! So compact!  Too bad that I may have fried the regulator on one of them already on the first day of prototyping.. Luckily I have dozen of extra MCP1703's from Mouser so it's not a catastrophe, but I would like to spare myself extra trouble of re-re-re-soldering components in the future so I'd appreciate any hints why this might have happened.   :-\

I already had following prototype setup before:
- MySensor MQTT gateway with Uno+Ethernet shied + nRF24L01+ (connected to Openhab and Philips Hue lights) 
- As a sensor Arduino Pro mini 3.3V 8Mhz with DHT temp & humidity sensor and  PIR motion sensor. Also theres a voltage divider + cap to sense Vin voltage level.
This setup was quite nicely working as my bathroom sensor (motion detect turns on the light, and if theres sudden raise in humidity then "lights off" timeout period is extended so the lights won't turn off while I'm in shower  ;D )
In the end, I chose Moteino for future sensors since it's more compact, low-power and cheaper than Arduino-clones + nRF24. Anyway,  I didn't want to start from the beginning so I tried couple of days trying to tie together both MySensors and Moteino network by connecting Moteino by I2C to MySensor MQTT hub, but in the end I gave up (I didn't like the amount of glue that was required . Also there were too many weird lock ups).

So, I constructed RFM69  MQTT hub from Computourist (https://github.com/computourist/RFM69-MQTT-client) with few modifications for Moteino and it seemed to work ok with dummy sensor.  Next I converted the bathroom sensor to use Moteino. Composition is identical except  PIR sensor pin was changed to D3 from D2 (RFM69 uses that as interrupt pin). Also extra 10uF cap was put to 3.3V  rail to add stability.

Now,  PIR sensor requires >=5V, and my Sparkfun USB FTDI board gives only 3.3V so I use Agilent 66321B bench power supply to put 5V to Vin (and also to later measure current consumption when USB board is removed).  PIR then takes its VCC directly from Vin. Cheap chinese Pro Mini board had no problems with concurrent external Vin supply + 3.3V from USB, but with Moteino I found some weird problems: sometimes when turning on the external 5V input there would be garbage on the Serial line, but no lock-up though (MQTT server received messages). Also I could see that there was intermittent overcurrent warning in Agilent (I have set 100mA as a limit for safety). After some more testing I found out that Moteino wouldn't start up with only external +5V connected, and with oscilloscope I could see alternating waveform in 3v3 rail from 0.5V to 2V. However 3.3V directly to 3.3 rail works, as well as powering Moteino with USB.

So, the magic smoke in regulator is gone, but why? Originally bad regulator? ESD spike? Would the 10uF cap cause current spike during start-up and destroy the reg?

Thanks for your time :)

Marcus

Haha, so this is quite funny indeed.

- I changed the MCP1703 but no luck - there was still oscillation on 3.3v rail with 5v input.
- Checked with USB board again to make sure nothing else was damaged during resoldering --> works fine
- Assembled another Moteino but with this time didn't connect it to the sensors or other components to make sure they weren't causing trouble. But now this is oscillating too with ext power??
- Tried it with  +9V battery --> no problem!  Something wrong with my super duper Agilent precision power supply??
- Connected Agilent to Arduino Pro Mini --> no problem..  WTF? Something to do with MCP1703 itself?

This time I dug out the MCP datasheet and checked input cap recommendations:
"For most applications, 1 µF of capacitance will ensure stable
operation of the LDO circuit. For applications that have
load currents below 100 mA, the input capacitance
requirement can be lowered. The type of capacitor
used can be ceramic, tantalum, or aluminum
electrolytic. The low ESR characteristics of the ceramic
will yield better noise and PSRR performance at
high-frequency."

I checked the Moteino schematics and there seems to be 1uF input capacitor in place. Checked with multimeter that it was indeed connected and then checked the capacitance with Fluke 87V (I know, in-circuit testing is not reliable, but it showed capacitance around 1.1uF so there should be no problem. Also tried the other Moteino with same results, so unless there is a batch of bad input caps in both Moteinos this shouldn't be causing trouble).

Now, finally I put extra 1uF electrolytic capacitor between Vin and GND and voila - it works!  So, it seems that the internal 1uF is not always enough even though datasheet recommends otherwise! It could be because I have 1.5 meter long power cables coming from the power supply, but then again, I checked with oscilloscope the Vin rail and it seemed to be stable regardless of extra input capacitor.  Weird!

Anyway, this is a warning to you who might have weird problems with external power. Any thoughts?


Marcus

Ok,  my happiness was premature. The oscillation started to occur again even with additional input cap..

Then I tried another similar HP 6632b power supply, but this time without any current sense wires connected and that worked like a charm. Then removed the sense wires from 66321B and no problems whatsoever. So there's some weird thing going on with these sense wires.  Maybe they aren't shielded well enough (they are twisted but not protected by grounded shielding)

They are usually used to sense the voltage drop in current supplying wires to get more accurate current reading and to adjust output accordingly, but since the current with low power devices is not that high, measurements should be accurate enough for me. So I'll keep them detached and tackle with this issue later.. 

Wow, amazing how much time can go wasted when the culprit is the very tool that you should be relying on :D

Felix

The power circuit on the Moteino hasn't changed significantly since inception a few years ago. The MCP has gone from 1702 to 1703 and the caps evolved to higher spec over time. Moteinos are not designed to be fool proof, rather it's designed to be lean and efficient, and it is when it's used properly. However you can easily fry the regulator if you're not careful and hook power backwards or short GND to VOUT etc.