Projects you did with LPC800?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Projects you did with LPC800?

1,021 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Fri Jul 17 04:26:29 MST 2015
Hello guys,

I'm simply curious what circuits you've built with one of the LPC800 controllers. Tell me!  ;-)

I've done the following (some unfinished, because I 'paused' uC programming nearly one year)...

- Periodic timer for my SLR camera
- IR-Thermometer (MLX90614/5) activation of SLR camera and flashlight
- Long distance IR-control or LED torch
- frequency doubler for a 3D-Projector's color wheel (at work)

Most of my LPC800 projects have focus on low power consumption (battery powered).

Currently I'm considering a high power LED-string off-line current regulator using LPC81x, IRS44273 gate driver, IRS25751 startup IC (or a IXYS depletion mode FET). Current sensing should be done with a source-connected series resistor + ACMP and pulse generation with SCT.
This approach should allow for a standby current of at most 500uA - a value also found for standard LED-driver controllers that don't provide a programmable interface. That's a wasted power of less than 200mW even at rectified 230V AC...

Marc
Labels (1)
0 Kudos
13 Replies

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Tue May 24 02:31:57 MST 2016
I suppose it depends on how much of that spike is from charging the gate capacitance, and how much is from the reverse recovery of the diode. I've also seen negative current sensing especially on PFC circuits, with the sense resistor between the circuit ground and the PSU. It does measure the (insignificant) power drawn by the circuit, and it is a little trickier to connect the comparator (one input to ground, the other to Rsense by a resistor, with another resistor to Vdd).

There would probably be some merit in driving the FET with a pulse transformer, which has the added benefit that if the MCU gets stuck, it can't leave the FET on.

I'll try the "blanking time" version first.
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Sat May 21 16:36:23 MST 2016
The funny thing about my 'high power' design was, that the gate drive current peak was higher than the inductor current (15A versus 10A). If your design allows for it, think about connecting the gate driver to the source of the FET - what is equivalent with GND=source. The current sensing provides negative voltages in this case.
I haven't tried this, yet.
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Sat May 21 11:25:41 MST 2016
Many thanks. I'll give that a go!
I was hoping that the "insync" bit which delays the input by a clock cycle might be enough to take care of the switch-on pulse
(but I hadn't got far enough to try it)
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Sat May 21 10:41:39 MST 2016
Hi Ian,

in my system the current sensing is so noisy that I have to use dead-times between 100ns and 800ns. I ignore the comparator output until the programmed dead-time is over.


Quote: IanB

I made event 0 the comparator input, and event 1 a MATCH event - event 0 LIMITs (resets) the counter, and CLEARs the output. Event 1 just SETs the output. Both happen in state 0.

What I get is output pulses that match the input pulses.

How did you implement it?



In my implementation state==1 means: comparator engaged; state==0 means: comparator ignored

start with: state=0, FET OFF.

match0 of event0 -> off-time expired; switch FET ON
match1 of event1 -> blanking time expired, state=1
Comparator output==1 of event2 -> switch FET OFF, LIMIT (reset counter), capture time to CAP2, state=0

optional: (yes, I use these!)
match3 of event3 -> 'comparator timeout', switch FET OFF, HALT, trigger ISR because something has gone seriously wrong.
match4 of event4 -> keep counter at zero (with matchRel4=0) or 'normal operation' (with matchRel4=-1) for easy, asynchronous on/off switching with a low frequency PWM. I found it quite tricky to on/off modulate my circuit and this is my best solution so far.

Marc
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Thu May 19 11:11:30 MST 2016
Thought I'd give it a go, as my HV9910 didn't have enough go to drive a big FET and I needed a buffer, so I thought I'd might as well use the comparator and SCT in an LPC812.

Half of the SCT generates the reference voltage using filtered PWM.
The other half is meant to implement "constant off time", by using the comparator to trigger the SCT which sends a 10µs pulse to the FET - trouble is, I can't get the 10µs pulse to work.

I made event 0 the comparator input, and event 1 a MATCH event - event 0 LIMITs (resets) the counter, and CLEARs the output. Event 1 just SETs the output. Both happen in state 0.

What I get is output pulses that match the input pulses.

How did you implement it?
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Fri Feb 19 12:50:44 MST 2016
My writing is misleading. By "digitally enhanced" I mean "stealing" the principle of a proven IC like the xx9910 and implement it with an LPC800 (alone). From that point onwards, I can add (algorithmic) features not possible with the analog equivalent.

I attached the schematic of the current experimental PCB. I've changed the power devices, see above. Some parts are duplicated (SMD and THT) or provide alternatives (e.g. current sensing).
The 12V power supply must be provided separately, because the gate driving isn't low power at all  ;-)
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Fri Feb 19 07:00:33 MST 2016
Thanks - really interesting - but which pins of the HV9910 did you join to the micro? Did you connect to RT (pin 8)? and if you did, did you limit the current into it?

I wasn't sure if it would appreciate having pin 8 shorted directly to ground, and connecting via a resistor would introduce a delay.
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Thu Feb 18 03:12:48 MST 2016
Hi Ian,

at the moment I use this function, executed every 30ms in the main loop (not ISR):

void pwmRegulator (void) {
        static Uint32 hrPwm = 0;
        if (hrTimerExpired (hrPwm)) {
                hrPwm += HR_MS*30;
                const Uint32 off = SCT.matchRel0;
                const Uint32 cap2 = SCT.cap2;
                fifoPrintString (&out,"off=");
                fifoPrintClocks (&out,off);
                fifoPrintString (&out,", cap2=");
                fifoPrintClocks (&out,cap2);

                const Uint32 cycle = off + cap2;
                fifoPrintString (&out,", cycle=");
                fifoPrintClocks (&out,cycle);
                fifoPrintString (&out,", min=");
                fifoPrintClocks (&out,CYCLE_SWEET_MIN);

                const Uint32 step = off>=STEP_FRACTION ? off / STEP_FRACTION : 1;
                if (cycle > CYCLE_SWEET_MAX) {          // too slow
                        const Uint32 newOff = off - step;
                        if (newOff >= pwmCtrl.off) {
                                SCT.matchRel0 = newOff;
                                fifoPrintString (&out," +");
                        }
                        else {
                                SCT.matchRel0 = pwmCtrl.off;
                                fifoPrintString (&out," (+)");
                        }
                }
                else if (cycle < CYCLE_SWEET_MIN) {     // too fast
                        const Uint32 newOff = off + step;
                        SCT.matchRel0 = newOff;
                        fifoPrintString (&out," -");
                }
                else fifoPrintString (&out," 0");       // all fine. Keep it.
                fifoPrintLn (&out);
        }
}

cap2 is the exact on-time (including blanking) until current trip point.
off is the (not truely) constant off-time

I defined CYCLE_SWEET_MIN/MAX to be the desired switching frequency F_SWEET cycle time +- F_SWEET/STEP_FRACTION tolerance.
If the frequency f is below f_min I increase it to f * (1+1/STEP_FRACTION).
If the frequency f is above f_max I decrease it to f * (1-1/STEP_FRACTION).
Plus some checks, to avoid doing stupid things...
The update rate defines frequency adaption speed. For short periods of time, the circuit may run (far) from the sweet spot.
For emergencies - when ton gets critically short (~tblank!), output voltage = 0 - I stop the whole SCT and disable output for a time that is sufficient to drain the inductor current over a voltage of one diode drop and then re-start with much longer toff.

This algorithm looks blunt, but works for my application - in contrast to more 'elaborate' things I tried before and constantly failed with :~
Unfortunately I also failed to use the Rdson current sense IC IR25750 

If you want, I can post the whole source. But my code looks very different, because I don't use any foreign source hence use different approaches to nearly everything...
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Wed Feb 17 00:51:03 MST 2016
HV9910 is a great circuit for digital enhancement. The direct relationship between the control voltage and the switch-off current is much better than the 3842 type where there's all sort of strange voltage drops between the two; and the constant-off-time option means you can guarantee that is stay stable.

Do you have a good way of digitally controlling its off time?
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Tue Feb 16 15:36:45 MST 2016

Quote: MarcVonWindscooting

Currently I'm considering a high power LED-string off-line current regulator using LPC81x, IRS44273 gate driver, IRS25751 startup IC (or a IXYS depletion mode FET). Current sensing should be done with a source-connected series resistor + ACMP and pulse generation with SCT.
Marc



At work I indeed finished a high power LED string driver (50W) array (x30) using LPC812, but it doesn't run off-line (safety considerations) and doesn't use the startup IC. LPC812 is great fun with this and I appreciate the software-control very much.

But my private project drifted off. The result is a constant current supply for experimenting with 'plasma electrolytic oxidation' (https://en.wikipedia.org/wiki/Plasma_electrolytic_oxidation) . Voltage range 0V.. rectified mains supply (320V), 10A (set by software) and that toy takes every kind of abuse without complaint  :bigsmile:
I've never seen a stable 5cm arc burning between electrolyte (water!) and the anode....until recently!! Cheeses, I should pull out the workpiece more quickly! 8-)

It took me quite a while to find a suitable algorithm that keeps the inductor in CCM over the full voltage range.

Some circuit details: Schottky rectifier GDP24P060, MOSFET IXTR102N65 + MIC4452 gate driver, cannibalized 1.4mH solar inverter inductor and ... one LPC812 controlling everything! 15kHz switching frequency. Basic control scheme: COT 'constant off time' (implemented in SCT). Additionally: emergency control - short circuit = diminishing 'on times' - handled by SCT + ISR. Additionally: control thread, that keeps the COT controller on the sweet spot (CCM, 15kHz) by adjusting the off-time slowly.

I do encourage you to try your own 'digitally enhanced' versions of proven analog circuits. In my case it was the UC3843 PWM controller that sparked the idea, initially, and later the HV9910.

Next thing I try will be the 'digitally enhanced' LM5008/5009 version. Control scheme COT - 'constant on time' + Vin-controlled forced off-time. Unfortunatly, there's no way to measure Vin with a LPC81x, so I have to use a LPC82x.

Thank you, NXP engineers, for the SCT! So cool, what we can do with this peripheral at AHB clock speed!
Even more thanks, that the SCT is made more powerful on the LPC820. 2 states only wasn't enough for many interesting applications...
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Wed Jul 22 14:23:23 MST 2015

Quote: jdesbonnet
As a matter of curiosity, how low current were you about to achieve in your sleep modes?



The SLR timer consumes a few mA in active mode, because I use a LED and a piezo to 'announce' the next photo to be shot.
It has a START and a STOP button. START is WAKEUP and reboots the timer. I don't use power saving modes when the timer is running (other than clocking at 1MHz only). STOP puts the system in deep power down and it consumes about 0.5uA. This discharges the two AA accumulators 2600mAh in about 216 days - which is way longer than the self discharge I observe: always empty when I finally want to use them  |(

[EDIT: Sorry, I was off by a factor of 1000 with the theoretical discharge time in deep-power down. It's a few hundred years...]

The same approach (active: considerable power drain because of physical output; inactive: save battery power) is applied to the
IR remote. But the other devices on the board already sum up to several uA and I need state retention of the outputs. This one uses power-down mode. However, I haven't finished the software, yet.

The IR thermometer already consumes in the mA range as soon as the MLX device is active, so no point in saving a little power with the LPC when active.
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Sat Jul 18 05:22:33 MST 2015
Thanks for alerting me to the IRS25751, a very handy little device of whose existence I was not previously aware!

That gets you a list of my LPC800 projects!

1) .wav file player (no controls, just plays all the .wav files it can find on a SD card in the order it finds them!) uses the now-sadly-discontinued Wolfson WM8727 DAC.
2) radio controlled luminaire (on 433MHz). This sound a bit similar to your LED-string off-line project, except that I used a AL9910 (now also made my Microchip and called HV9910) which has a quite handy psu output of 1mA @ 7V (it would be VERY handy if it were 3.3V not 7V). The 9910 handles all the comparator, timing and MOSFET driving stuff.
3) DMX monitor - lights 80 LEDs to show what is happing on the first 80 channels of a DMX output.

I'm looking forward to the LPC82x being available at RS and Farnell. Currently, it's only at Mouser and Digikey, so paying their carriage charges makes the LPC1111 from RS/Farnell a much more attractive proposition.
0 Kudos

820 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdesbonnet on Sat Jul 18 03:16:12 MST 2015
As a matter of curiosity, how low current were you about to achieve in your sleep modes?
0 Kudos