Convoy XHP35 Driver Analysis / Testing / Schematic

No it is depend of it, If you put 6V LED the output will go over 12V and will burin it in matters in milisecond. The current loop is maybe no enough fast to limit output current to 2.3A without burn the LED. In that case you need just to adjust voltage divider at FB pin in which case is setpoint for unloaded output voltage of MP3431. In that case the MP3431 will go in constant voltage mode. So for 6V led is maybe better output voltage to be set at around 7-7.2V maybe.


Ah cheers dude, I appreciate it :THUMBS-UP: :-) .

You are right about how the LVP works. No confusion. I have removed the MCU, so cannot test it, but should be approx 1.5V.

[quote=Barkuti] Mmmkay but how is the input current limit removed or adjusted? [/quote]

Adjusted - replace R14. See datasheet for required value. Removed - short R13 to ground.

Halfway between the min Vf and max Vf. E.g XHP70 turns on at 5.3V and reaches 6.5V at 8A. Halfway is 5.9V, so set R16 for 5.9V out from MP3431.

The datasheet gives more info on the specifics. Not sure about the H1-A, but it's a different chip...

[quote=Barkuti] Is pin 2 from the VLDO a good place to set an e-switch? [/quote]

A switch to interrupt power to ONLY the MCU would work, so yeah, between LDO out and MCU pin1. You'd need to lift the leg of the MCU though.

Cutting power to the op-amp would make the light go crazy (most likely stuck in turbo or go into overvoltage shutdown).

The integrator can have better standalone stability, but the DC/DC stage is compensated to be very stable for output voltage transients.

It uses FB to detect the output voltage, so the op-amp is just giving it lots of little adjustments, which are stabilised by the compensation network. Too much op-amp 'stability' = the MP3431 being slowed down.

You are right about the sense resistor/R6/R7, but it's easier for people to replace/solder a 1206 resistor than an 0402. And it can reduce output current power loss.

They just used it in a faster configuration. The op-amp does not need much compensating, as the MP3431 handles the power stage stability and responds very well to FB (see the bode plot in datasheet).

For my circuit, I tested the voltage gain required using LTSpice, but I will link an online equivalent HERE.

It can be seen that for eg an XHP35 needs output swing of ~11V to ~14V, setting the MP3431 to 12.5V. FB is regulated to 1.00V, so op amp needs to raise and lower FB so that 2.5V is divided into FB for an output swing of 11-14V.

Simulation shows that 1.05Vopamp = 11Vout, and 0.4Vopamp = 14Vout. So op-amp output swings 0.65V. 30mR Sense Vdrop at 2.5A = 0.075V. So op-amp gain required is 0.65/0.075 = 8.67.

That's very low in openloop, and gives the op-amp plenty of gain-bandwidth headroom.

For a given combination of PWM divider and sense resistor, yes. The only catch is that the Vf needs to be within the range set by R16.

Connected my test driver to a 6V MT-G2; it is happy to feed the poor thing up to 8A+. Lower currents no problem at all. R16 needs setting to 250/270k for the Vf though, so yeah, you need to replace one resistor (as icpart mentions).

Thanks for the data! Would be interested to see how the stock driver performs too but only if you have the time. I know these things take a lot of time.

Kewl, tnx! I was worried about tranaients, as well as any “minimum output voltage” as far as stability.

So there's no guarantee that the MCU will work below ≈3V. This alone sucks good. It would be useful to know how low can we go here.

Then, as the op-amp gets less voltage, it amplifies less, sense voltage reduces… well, current output gets smaller. 91% is 3 / 3.3V, so I guess that if you switched to a 2.5V VLDO, you reduced your sense resistor value to 2.5 / 3.3 = 75.7̅5̅% to compensate for this, and/or did something else. :???:

Linking your above diagram here agnelucio:

Took a peek at the MP3431 datasheet.

I see shorting R14 or the nearby C13, or straight connecting ILIM to ground is what you meant to remove the current limit.

Page 21 from the manual describes how to set the output voltage, providing the equation R17 = VREF / (VOUT - VREF) × R16 (translated to your diagram here), where VREF = 1V = FB. So I see that the output voltage is set at 11V as it comes stock.

One more question which could be of interest to some, any potential problems making this driver work with 2S battery? It is within range of the boost converter. Only potential problem I see is with the VLDO, as the stock one probably has a 6V maximum input voltage limit. The rest is, well, for 2S input we need to correct the way the LVP gets its feedback, disconnecting R2 from the VLDO and connecting it to input. So: a) we do away with the stock R2; b) We install a new R2 of adequate value, 243KΩ would for example set the cut-off at 5.5V, but we set the new R2 like if we had rotated it 180° at its right side terminal, so R2 ends up disconnected from the VLDO and with its now left leg connected to the LVP pin and R3; and c) We lie a wire from VCC to the now free right side R2 terminal; as I see it we can take VCC from either side of R1.

From datasheet of MP3431 is better to calculate and adjust as Barkuti mention R17 not R16. From theory here also R16 can affect loop stabilitty of MP3431. Yes you right that MP3431dc loop is very stable but here we have added second control loop with Opamp which can go unstable and oscillate in some cases so to prevent that it will better to add little compensation compared to without it. I also made simple Spice simulation of control loop of H1-C driver with XHP50.2 LED and OPA333
Here is compensated opamp with 1nF capacitor:

Here is with removed capacitor:

You can see how output can go to oscillate. Yes the behaviour of real circuit can be total different and to work stable for most of cases.

So if we have MP3431 set to 11V and from datasheet for typical XHP35 the output current will be around 200mA not at all in 2A region, very interesting . Also is better to sample VCC after R1 because we have RC filtering of pulsing VCC.

IC Part, very interesting!
Unfortunately i cannot see the spice simulation

Do you mean H1-A, or H2-C?

Removed the images, they weren't working anyway. Left their links…

Are these links, or some sort of revenge? Weird, long, encoded URLs.

There may be people who understands what you say here; just not me. ¯\_(ツ)_/¯

Sorry for images. They are shared via Google photos and the links seems to be encrypted. I think they must be visible in threat anyway? You right H1-C with Tps61088 The simulation was from Tina Ti. Also I simulated that driver with MP3429 in PsPice and Opa333 with XHP35 LED PsPice model from Cree. MP3429 is exactly the same but without current limiting feature. It seems to work but without feedback compensation of OPamp it will go to oscillate in simulation. I will post waveform from that simulation later. So if you use higher bandwidth OPamp maybe will be better and stable but most of them have large input offset voltages. So that will be important if you need to control low output currents where the offset voltage really matter. Also so far best designed boost driver which I saw here is KX70 Buck and Boost Drivers, Testing, Modding, and Discussion (Pic Heavy) - #29 by Jensen567
If you look more careful the circuit there is also used Type II opamp compensation with additional resistor and capacitor.

By the way, the MCU used in this driver is, according to my sense-making knowledge, the same as is found in the newer generation ∅17/20/22mm SST-40 linear drivers. And according to good guy BMS, it is a Renesas RL78/G10 R5F10Y14/16 (datasheet). The unit with 2KB of Flash ROM must be used in drivers with Biscotti clone or Biscuit firmware. It works between 2 - 5.5V if limited to 5MHz max, and between 2.7 to 5.5V for higher frequencies (that if I've understood enough, see page 28 in the datasheet).

Hi here are shared results from PSPice MP3429 simulation with OPA333 and with 1nF compensation capacitor and without it.

From simulation we can see that with compensated OPamp the output current and voltage is very clean and stable compared to uncompensated circuit. There is ringing and large pulsating in output voltage and current.

If got a problem with this driver. It skips to the second mode after about 10/20 sec on first mode. I checked every connection in switch etc and I think the problem is in the driver. Does anyone know where the problem is coming from?

icpart, thanks for sharing that. It’s definitely an interesting problem.

I’ll see if I can import the MP3429 Spice model into LTSpice and run some more tests.

I notice that you’ve picked the OPA2333 op-amp with a 350kHz gain-bandwidth product.

Maybe a different op-amp would alter the behaviour (e.g. OPA365)…

Edit: I tried connecting a 10nF capacitor to the op-amp to form an integrator, and while there was no oscillation, it became very slow to respond to changing input.
Adjusting the brightness worked fine, but there was a perceiveable ‘lag’ in brightness changes, and any sort of strobe/flashing mode was a complete mess.

I tested input to the stock configuration, and strobe at 0.1ms pulse length worked up to 2.5kHz. So the stock op-amp setup works very well with stroboscope etc…

OPA2333 and OPA333 are the same spice models. I choose OPA333 because is used in most circuits of chinese boost drivers like H2-C and H1-A. Also the loneoceans has used the same OPAMP in itss GXB172 driver which is based also on MP3431 circuit. OPA333 is very precision and low power consumption opamp compared to OPA365. OPA333 is zero drift chopper stabilizated OPAMP which have very low offset voltage but in most cases these amps are to slow and with limithed bandwith. Also the power consumption is high. So if you whant to have great low current regulation like moonlight you will need very percision OPamp to measure accurately very low currents like uA. I also searched for precision comparators time ago wgich will be better solution but they don’t exist at all, so we need to use here OPAMP like comparator. Another possible solution is to be used additional OPAMP to amplify current sense voltage and compared but we will have additional stage which will slow down feedback loop also design will be more complex. I wrote a while ago that best solutions will be driver and feedback to be controlled from MCU and not dedicated DC/DC converter i.e. will need digital power supply with PID control in basic concept. One russian guy Tamagochi in fonarevka have similar great driver based at that concept: Драйвер для Skilhunt H02/H03. | Мастерская: Tamagotchi и Rime
You cant. The spice model is encrypted and can be only used in Orcad Pspice but you can use free simulator Simetrix/Simplis from MPS which they called MPSmart. The problem with MPSmart is that the model is not exactly typical Spice model. They used special fast simulation engine called Simetrix specially designed for simulations of switch mode supllies which is very fast compared to Spice, if you need to simulate something for minutes in PSpice here it take only seconds for that. But this engine lack of support of typical Spice models. They have a model for diode and OPamp of which you must add parameters manual. I tried that months ago and I think simulation will maybe not very accurate but you can try.
Yes it support both but when you need to simulate Spice based circuit you need use theirs second simulation engine called Simplis for that.
Here is the original software
Monolithic Power System just used limited but very good rebranded version MPSmart of Simetrix. Microchip also used the same analog free simaltor which they called MPlab Mindi.
I tested my boost converter circuit with OPA365 without compensation and it is wrost, the circuit go to be very unstable and oscillate with higer frequency compared to OPA333. Yes with faster OPAMP we have better respond from feedback loop and we can just use lower capacitance for compensation like pF compared to slower opamps. Try to use 1nF capacitor. From simulations I have made it seems to be good choise in most cases. If you have oscilloscope can you post some waveform over sense resistor and output voltage over LED. It will be interesting to compare them with and without capacitor. I will order maybe soon this driver. It seems to be good choise for cheap DEVboard at all for MP3431. Also respond of ciruit is slowed down from PWM DAC and output RC filter. In future if we have MCU with integrated DAC and firmware support of it that will be great.

How did you test that lag? And what impulse you injected in the driver, do you used some square wave function generator?

Could a dedicated MCU replace the op amp? Just feed the pwm and sense resistor into it and eliminate some input stage components.

It might keep more noise out of the signal path and take up less board space.

If you we remove external controller it will be best at all. Just view of Tamagochi SMPS driver. There is no any external DC/DC switching controller at all. In that desisgn with MP3431 yes we can remove opamp to sense and compare voltages. MCU can handle and meausre LED current and adjust via PWM DAC and FB pin output voltage. But there is another problem. To measure current from low ohmic sense resistor we need to amplify voltage over it and we need opamp anyway. The Attiny ADC resolution is just 10 bit and with internal 1.1V reference we have about 1mV resolution to be used for direct current measurements. So over 30mOhm sense resistor lower current which we can measure will be around 35mA per bit, also ADC have errors with some bits deviation and finally that be very unaccurate measurements at all.
If we have 14, 16-bit or the best 24-bit ADC that will be best approach without amplification. There is technique called ADC oversampling which can be used in Attiny to get higher resolution to 12bit, but that method is slow for measurements. But anyway SC-70 case opamp occupy very little space on PCB.

I could not find much information in the Tamagochi thread and I don’t enough knowledge to base much of an opinion on it. I read about a pic controller optimized for smps and it tops out at 300khz. It has features to keep the converter in focus and stable while the processor preforms other functions. Without those features that driver must have a pretty low switching frequency so it won’t have much use in high powered designs.

I hoped getting rid of about five passives that convert the pwm signal plus the op amp and replacing it with an attiny would save space. As usual there is always a good reason for not doing something, sometimes I just can’t see it.

Here is direct link to circuit of first version of Tamagochi driver on another thread over fonarevka
There are also links to hex file for attiny85 Кастомим Skilhunt H03. | Мастерская: Tamagotchi и Rime for another version of that driver.
Very interesting how he generate such 300kHz high PMW frequency from attiny85. Also I readed that he implement the PID control algorithm for SMPS regulation.
Yes you right the output power is limited because of use of such low PWM frequency. I readed that driver have 18W output power at 6V, so 3A output current is very good from attiny control circuit.

Sorry to interrupt a bit this long boost converter design and optimization off-topic people. I made a question a couple days ago in #26, could you please comment about it? Auto-quoting myself: