BTU Shocker Triple MT-G2 with a twist -- Aiming for >100Watt ~9000Lumens -- With external 2S power pack, handle etc...

Ah ok, I see what you mean, my first line of attack is hardware based so it’s good to have someone thinking along the firmware lines. I just don’t know enough on either the MCU hardware side or the firmware side to make a good call on troubleshooting stuff to do with the Atmel directly.

Wight says output pin set to constant on or PWM 255 would make no difference if the problem is the MCU as a current source.
Using the Transistor as a power source/amplifier for the PWM signal should give us a good idea if that is the problem. If it still doesn’t work right and it’s related to the Atmel getting too hot or whatever then we can go from there.

Actually I think the problems affect other modes not just High, High is just what I’ve been testing and heat seems to have a strong influence on the behaviour so that’s where it’s also most obvious.
I can’t be absolutely certain but my test run on Med (~30% pwm) also produced pretty poor/weird results with no regulation and some flicker. Unfortunately because of the difficulty of measuring current accurately with PWM I didn’t do any more comparisons at that level.

Yep, I guess it’s basically the same test but different approach. Interested in the results as I don’t know enough about these either, expect that the oscillators on the MCUs are largely affected by heat. But I guess current output from the pins could be affected too. It could also be the 7135s that are having troubles with PWM in the heat? They are being run above maximum limit of 7v, maybe this is causing the unpredictable results when heat becomes a factor?

Any how, feels a bit lame of me to give suggestions, don’t know much about these things either, but I am interested in your results as I currently have a similar configuration. I am however going for a PWM-less option. Maybe three MCU outputs to control chains of 7135s, and the remaining output to control a MOSFET configuration (got a couple I’m playing around with). That’ll give me seven 7135 modes and one MOSFET mode, all without PWM.

I don’t see that as the same test. There’s nothing wrong with doing either test, but they aren’t the same thing and they don’t tell us the same things.

The 7135’s are not “being run above maximum limit of 7v”, recheck the datasheet. Supply voltage must be 2.7-6v (it is). The other numbers pertain to the voltage difference present over the 7135… which is just a couple of volts here.

EDIT: For clarity, look at the block diagram on page 2 and compare that to the ratings (Absolute Maximum Ratings is mostly what we have). VDD cannot go beyond 7v and should not go beyond 6v. “OUT” cannot go beyond 7v and does not have an operating spec… note that “OUT” voltage is measured in relation to GND, hence it is simply how much voltage the 7135 is dropping in order to control the load.

If the constant high/on through the MCU test displays no problems, then you know it’s not the current supply from the MCU that’s causing the problem?

Oops, I forgot about Vf over the LEDs.

It would certainly be interesting to see for future reference, however I need PWM to work for this light so it’s not the most valid test to do right now. I also wouldn’t know where to start with tweaking the STAR firmware to get this to work.
But if you’re interested in sending me a hex file with the PWM pin configured to constant on I’d be happy to flash it to my MCU and run a test to see if it makes any difference at all.

On the transistor front, I just got back from distrelec with PNPs in hand. Will give it a go now, fingers crossed.

Ok, cool. I’ll get it done later tonight (gotta run). Could you PM me an email address so I can email it over? You should have it tomorrow morning.

Hex file sent. Interested in the result, and also your test with the transistor. Interesting stuff.

I’m curious about both tests as well. … although I fear that no news = problems w/ the PNP transistor test. :frowning:

Well I don’t want to say anything yet, want to be sure I’m not getting something wrong. Dumb mistakes can often lead to major confusion.
Currently setting up a clean firmware without all the bells (LVC etc) and some simple inverted PWM values so I have a better idea of what’s going on.

With the standard firmware and running 2 test xmls I had light with the transistor driving the 7135s and also some kind of modes (so that’s promising). Strangely it was a very low, super smooth moon mode (I’m thinking that’s the high mode with the inverted 255 pwm?) but otherwise it seemed to be in permanent LVC mode (3 slow flashes) and switching between the modes showed a quick triple flicker. Only seemed to have two modes with the triple flicker in between mode changes…strange stuff.

This weirdness and LVC is probably all caused by a massive 4v drop I was seeing across the 200ohm resistor before the MCU (the Emitter leg of the transistor is also connected to the MCU side of this resistor)
So ultimately I was only seeing around 2.5v powering the MCU and across the Transistor instead of the expected 5.6v. 8x 7135s definitely shouldn’t be drawing this much current, so I’m not ruling out a partial short or something equally stupid in my quick test setup.

Like I said, need to check my test setup with some simple firmware and see what’s really going on.

What was your input voltage?

Vbatt was 7.7v, 5.6v zener and 200ohm MCU resistor on board.

I was using the crusty old driver pucks so I’m pretty sure something isn’t right.
Urgh, every time I do some circuit troubleshooting like this I realise how shit my measuring kit really is and it tends to get very expensive very quickly. Last time I ended up shelling out on a digital scope (which still hasn’t arrived :frowning: ) and this time it’s probably going to be a new multimeter and a bench power supply… :stuck_out_tongue:

I’m also thinking that instead of mucking about with these zeners and resistors I’d be much better off just sticking a 5.5v LDO or something on there to power the board.
Would make things much simpler and more understandable as well.

Ok, I got frustrated testing the transistor setup without the right equipment so I’ll hold off on that until I at least have my scope. Also going to get a decent RMS multimeter tomorrow so that should make testing easier.

In the meantime I flashed MikeC’s custom firmware to see if the MCU can supply enough juice to run all those 7135s when the output pin is simply set to High/ON.

The results are interesting but the answer to that question seems to be a fairly clear no.

Here we have the new test in dark (No PWM, Pin1 High) with the two faded comparisons overlaid. ( done at 4.3v and 5.6v Vcc with MCU PWM output).

The test without PWM is worse in overall performance compared to both of the previous tests with PWM. The best comparison is between the two 5.6v MCU tests (the highest maintained current graph, sorry for not labelling) and it’s clearly worse than that one. Starts off lower and drops fairly drastically after 2minutes, interestingly that’s also the point where the flicker would usually set in while using PWM and at the same time the current and output levels would tend to jump up a little on those. Without PWM that wasn’t the case and the driver current simply took a nose dive and so naturally did the output. On a positive note I didn’t notice any flicker during this test.

So the problem isn’t related solely to the PWM behaviour, what are your thoughts?
Cheers

I’m not surprised that it didn’t fix the performance problem, but I am surprised that it appeared to fix the flicker issue. JonnyC checked w/ a scope to be sure that there 255 gave a full duty cycle (no off time). I think JonnyC mentioned using a really basic scope so maybe it was a DSO Nano or something, it’s possible that it just wasn’t fast enough. I’ll get around to checking with my scope. :frowning:

For now I say pickup a 5.0v LDO. Those should be much cheaper and more plentiful than 5.5v ones. 3.3v and 5.0v are both standard voltages used in the electronics industry. The normal ones we use are SOT23-5, which is too small for most stripboard but you can probably make do by chopping up the stripboard/copperclad with an X-ACTO knive. Or maybe find a larger package to work with for testing. You can also just use the LDO section of this board, but I doubt that you want to wait for OSH Park. - 17mm++ single-sided / DD driver w/ low parasitic drain for e-switch lights: AxxDD-SO8+LDO

I suspect there might be a difference between PWM behaviour in optimal conditions with a light load vs when the MCU get’s loaded down and is running at higher temperatures.

I quickly scanned through the Atmel Attiny13A datasheet again, specifically the high temperature amendments and the output current supply stuff at 5v. I couldn’t really find anything that showed a potential problem when matched with my operating conditions. Certainly it seems to deliver a measurably lower output voltage and current as the temperatures goes above 100degrees but if the 48x 7135s really only draw a combined current of 9.6mA (using the max datsheet iQ values of 200uA @ 100degs ) then none of it is anywhere close to hitting the limit even under extreme conditions. I could be reading it all incorrectly though, and only studied the more understandable graphs, 80% of that document makes my head spin… :frowning:

Or maybe the 7135s draw a lot more current than the datasheet implies?…too many maybes at the moment.

-

Next up I’ll swap over the Attiny for a new one, just to eliminate any chance that it’s down to a bad or damaged unit.

And then with the new Multimeter I’ll tap into the clicky circuit and measure how much current the whole driver draws. Maybe that will give us a clue as to what is going on in there.

I was also contemplating whether I had a bad connection or high resistance somewhere on the clicky circuit resulting in a lower than expect input voltage at the MCU. But that all checks out well with my crappy DMMs.

-

Thanks for the tip, I ended up finding a 5v sot-89 LDO capable of 200ma. Should fit nicely on the empty 7135 slots on my MCU board. Just need to scrape up some old traces and wire a couple new ones.

I think it’s reasonable not to trust the datasheet for these heavily cloned devices.

Good thinking.

I’m not sooo surprised that the flickering didn’t appear as before. With PWM 255 there is some “switching” going on somewhere, and heat may well affect it. Scope measurements under optimal conditions might not apply to a light like this run for two minutes.

Anyway, thanks for testing the constant on firmware, it’s helpful for me too.

I can’t be 100% that the flickering was completely gone, but it certainly didn’t draw attention to itself as much as before.
Strongest flicker was noted when doing the 5.6v MCU test, no sure what that means but the behaviour tends to be pretty consistent between runs.

Well guys, seems the little 5v LDO has really done the trick.

I slapped it onto the MCU board replacing the 5.6v zener and resistor. Hooked up my new DMM to the trigger circuit to measure driver current and ran a test (still using Mike’s firmware with output pin set to High i.e no PWM). The results where perfectly regulated output current at 8.3v iCharger voltage, just like the MCU-less runs!! :bigsmile: :party:


(Here’s the little fella on the board… I’m struggling to still call sot-89 parts little at this stage :P)

Of course I’m a plank and forgot to turn off the cooling fan before starting the test. So I’m setting it up again now and flashing my normal firmware back to the MCU to get some like for like data. Fingers crossed it works as well with the PWM back on.
But I can tell you for sure that the influence of the fan did not make this much of a difference to the drive current. It’s a bang on a perfect match to the MCU less test, flat and steady. :slight_smile:

-

Also interesting are the driver current draw results.

The driver drew 23.9ma at the start of the test and that rose to 24.89ma by the end of the 6mins. Which doesn’t seem all that high to me but I guess it could be quite a bit higher than what the Zener mod 200ohm resistor is intended for. I calculate there to be a voltage drop of 4.975v across that 200ohm resistor with this current draw!
So that doesn’t seem to leave much of an input voltage for the MCU to power itself and all those 7135s. I suspect that could be part of the problem, but let me know what you guys think.
It’s still not a clear red flag but I’d have to check the Attiny datasheet at an input voltage closer to 3v to see where it starts to struggle.

Please correct me if my weak understanding of how the Zener mod works is tripping me up here.
Resistor drops the voltage to the MCU based on it’s current draw, and the Zener is like a safety blow off valve which bleeds off unsafe voltage spikes should the current drop too low at the MCU. Is that right?

If that’s how it works and the higher voltage drop is the cause of the problems I don’t however know why swapping the 4.3v zener for a 5.6v one made any difference at all… :~

-

In any case this is really looking good with the little LDO, i’ll post up a graph with the proper test in a bit.

Yup, standard firmware with PWM (phase correct) works just as good! :slight_smile:

Awesome, really pleased with this. Looks like this is the solution finally!

Here’s the graph compared with the other MCU tests I ran, I’ll save myself the bother of pointing out the differences, they’re not exactly subtle… haha :wink:

-

Interestingly the driver looked to be drawing a little less current when operating under PWM (phase correct) compared with the constant on firmware.
Although that could be margin of error stuff between the two tests.

Here is the driver (mcu) current plotted against heatsink temperature.

Amazing effort and loved the team work. I see the lines going up and just think of temperature rising.