Wait for Vcc

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait for Vcc

294 Views
Senior Contributor I

I know that the LPC15xx's A/D converter and a few other peripheral don't do well with a slowly rising supply voltage.

I have an application which normally has a 470uF capacitor on the supply. If I change the capacitor to 1000uF, the LPC15xx gets stuck in ADC calibration.

I am looking for a way to wait until the supply voltage has cleared 3V before enabling those peripherals.

I was thinking of asserting the relevant bits in PRESETCTRL until the power supply voltage has risen far enough, and then performing the relevant initialisations. 

Is there a way of doing this with the Brown out circuitry?

Alternatively, could I enable a spare comparator and compare the potential divider with the bandgap reference?

0 Kudos
13 Replies

173 Views
Senior Contributor I

NXP tells my that it would like me to mark one of these replies as an "accepted solution", but it doesn't tell me how I should do that.

Perhaps, NXP would like to explain the cause of the problem - i.e. what conditions are required for the comparator and A/D to start up correctly?

0 Kudos

267 Views
Contributor III

I would suggest to match the capacitor size with the power supply's current driving capability. Perhaps staying with 470uF.

I know of mains-supplied devices, which use a larger cap as "emergency supply" to manage some state-saving operations before the power runs out.

0 Kudos

264 Views
Senior Contributor I

What do you mean? How is it “matched”?

If the LPC1517 has a problem starting up with a certain rise-time, how can I be certain it doesn’t occur due to the point on the mains waveform when it is powered up, or due to the large tolerance on electrolytic capacitors, or due to variations in the mains voltage?

Choosing a certain value of capacitor because it “happens to work” is not sufficiently rigorous for the application. I need to know that it will ALWAYS work.

0 Kudos

253 Views
Contributor III

> What do you mean? How is it “matched”?

A real-world capacitor has a series resistance, which, together with the capacity, defines the charge-up current. Keeping the inrush current below the peak limit of the power supply would surely relief you slow supply voltage rise.

I'm no hardware design guy, though.

0 Kudos

246 Views
Senior Contributor I

A real-world capacitor has a series resistance, which, together with the capacity, defines the charge-up current. Keeping the inrush current below the peak limit of the power supply would surely relief you slow supply voltage rise.

I'm no hardware design guy, though”

You don’t say!

capacitor ESR is 38mΩ for the 1000μF and 52mΩ for the 470μF.

Transformer output impedance is 16+2j Ω (including it’s leakage inductance referred to the secondary). 

If I didn’t need any smoothing on the supply, I wouldn’t need a capacitor at all, and the rise time wouldn’t be a problem!

0 Kudos

238 Views
Contributor III

> I have an application which normally has a 470uF capacitor on the supply. If I change the capacitor to 1000uF, the LPC15xx gets stuck in ADC calibration.

> If I didn’t need any smoothing on the supply, I wouldn’t need a capacitor at all, and the rise time wouldn’t be a problem!

Then, why do you do it at all ?

The 78Mxx have a current limit. And a 3VA transformer has a huge idle-to-load voltage drop.

0 Kudos

234 Views
Senior Contributor I

Maybe something to do with the output of the transformer being a sine wave, and therefore only above the 7V threshold of the 7805 for 77% of the time. The other 23% there wouldn’t be any power to the microcontroller.

0 Kudos

284 Views
NXP TechSupport
NXP TechSupport

Hi, Benton,

I am curious why you use so large bypass capacitor on the power supply pin, generally, it is okay to use 20uF, 30uF...

If your application does require the large capacitor for special purpose, it is okay.

In the case, I suggest you use comparator interrupt to trigger an interrupt, in the ISR of comparator, you can start to call ADC function so that ADC runs after the power supply voltage reaches a predefined level. I think it is okay also to use polling mode by polling the INTFLAG bit.

Hope it can help you

BR

XiangJun Rong

 

xiangjun_rong_0-1600070490635.png

 

 

0 Kudos

278 Views
Senior Contributor I

470uF or 1000uF is the capacitor before the rectifier. It is a 3VA transformer with 12V ac windings, rectified and smoothed with 470uF or 1000uF, then regulated twice with a 78M05 followed by a LP2951 to give 3.3V, which is decoupled by 10uF and several 100nF.

A/D fails to start if the smoothing capacitor is 1000uF.

0 Kudos

257 Views
NXP TechSupport
NXP TechSupport

Hi, Benton,

Okay, I see your application. Pls use the on-chip comparator, you can configure the comparator so that it can set the STAT and INTFLAG bits in the Comparator x register, in the initializing code, you can poll the flag bit, after the flag bit is set, start ADC.

Hope it can help you

BR

XiangJun rong

0 Kudos

245 Views
Senior Contributor I

Thanks. I’ll give it a try!

0 Kudos

224 Views
Senior Contributor I

Unfortunately, it’s not just the a/d that can fail to start - so can the comparator.

The comparator routine ensures a good start up about 95% of the time, but it can still fail.

Enabling the watchdog forces a hard reset if it gets stuck in the “wait for comparator” routine, and it has another go.

For good measure, I also enabled the brownout detect.

Now I think it’s reliable - or, any remaining bugs are down to my writing rubbish software, not due to the hardware failing to start up!

0 Kudos

220 Views
Senior Contributor I

Thanks for the heads-up on this Ian!

0 Kudos