The Texas Buck driver series, Q8 / Skyray King 2S/4S buck driver RELEASED!

467 posts / 0 new
Last post
Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Mike C wrote:
I measured resistance from PBx pins to both VCC and GND on an unconnected MCU. I got varying results but the lowest was in the 4 to 5 mega ohms range. Things are probably different when it's mounted on a driver.
Flintrock wrote:
The zener situation is probably quite a bit different than the LDO situation.  In either case though when ground is disconnected the mcu should continue to run powered by the cap.  The current draw on it is I guess 10x higher than the divider current so it runs fast until it reaches shutdown voltage in zener case or the ldo reaches its dropout limit in the ldo case.  But this is fast compared to the divider RC anyway so doesn't contribute a significant lag.  Obviously it impacts the t=0 cap voltage.

 

In the zener case I hadn't appreciated that the cap stays only at zener voltage (plus or minus the input diode vf) according to this diagram anyway:

I didn't think about the zener case either. In any case I'd guess that a driver with the LDO solution would provide more stable readings than one with the zener solution, or at least differently. The zener does what it does, it's passive, but the output pin of the LDO probably behaves differently when there is no input voltage.
Flintrock wrote:
Now what I really don't get is the turn on.  In either case if the mcu/ldo has enough voltage to turn back on, the cap must have already charged back up no?
The off time cap is measured before it gets any voltage. The cap doesn't get charged until the pin it sits on is set to output high in the firmware, at least this is the normal method in "standard" driver designs if things haven't changed lately.

 

Ah.. yes,  Now I remember being confused about THAT when I saw it before.  I now got C1 and OTC confused... well, because there is no OTC in this driver!  Never mind.  C1 is I guess only a bypass and maybe useful for the bleeder.  Somehow I had that right in my parts description, just a not-so momentary lapse of reason.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas

Very nice work, I am busy today but I will sit down and check out those items later along with tweaking the driver to see about removing the jumper and squeezing a 1206 cap in there.

Also curious how arrow will compare in the final price outcome. Particularly with free shipping they have now.

DB Custom
DB Custom's picture
Online
Last seen: 4 min 51 sec ago
Joined: 01/13/2013 - 22:28
Posts: 20373
Location: Heart of Texas

Funny, that Texas Ace wants free shipping from Arrow when Mouser is in his backyard…

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas
DB Custom wrote:
Funny, that Texas Ace wants free shipping from Arrow when Mouser is in his backyard…

I honestly have only ever made one order from mouser, all I remember about it is that it was just so so. Prices were a bit higher then digikey, the website was far harder to navigate then digikey (although massively better then arrow) and the shipping cost was a bit cheaper but not significantly so IIRC.

My biggest issue with shipping is that out of all the orders I have made shipping is generally at least $10 for some parts that weigh all of an ounce and should cost all of $3 to ship.

When I only need $7 worth of parts and spend $10 on shipping, that should have cost $3, that bothers me.

Not to mention that to date Arrow has been cheaper on 90% of parts I have compared (they also have a price guaranty apparently, although not sure how it works).

DB Custom
DB Custom's picture
Online
Last seen: 4 min 51 sec ago
Joined: 01/13/2013 - 22:28
Posts: 20373
Location: Heart of Texas

Mouser is in Mansfield, you could drive over and pick stuff up and pay zero shipping.

They also have an option to use USPS for shipping at the lower rates, it’s not really clear though and you almost have to ask for it.

I buy almost all my components from Mouser. Have built hundreds of FET drivers with parts from them, a few times I’ve gotten stuff from DigiKey and the shipping costs were similar. Then the DigiKey site got difficult to access and I quit using them altogether.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Yeah so I was getting things all mixed up with the OTC momentarily and yet C1 does seem to play a role in this and the point of adding a controlled resistance maybe is even more clear.  There's some weird stuff going on there.  Without C1 I wouldn't think R1 matters for OTC, it just the highest resistance path to ground.  Reading the docs it's not at all clear to me that attiny will shut down consistently, but I don't know.  It seems like going with a 10x or 100x higher capacitor for OTC and a parallel resistor would put the discharge RC time entirely into our control and decouple it from all the side effects of every voltage and leakage in the whole system.  I bet all this stability voodoo of minor changes here and there just dissappear.  It also should allow to get rid of R1 and R2 entirely in direct drive non-zener lights without impacting OTC.

 

I'm seeing now this could be tested in a 1S non zener light without changes just by removing R1 and shorting the R2 pin to the OTC pin to create the RC.  Then just have to choose the right OTC and R2 for desired RC.  I've got a $0.50 0805 220uF cap picked out already.  There may be cheaper options at 100uF or so.  

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Analog version?

 

So this thing is basically an analogish driver with a digital click controller and took a little thought (we'll still have to see) to cram that together.  However, it's also possible to ditch the MCU entirely and just replace the Iadj stuff with just an ldo, pot, cap and resistor or two.  The pot could be mounted in place of the e-switch for a fully analog light.  Of course clicks have some use, always knowing really what mode you're in, so you know what to expect for heat and runtime, and some features like battery monitoring, thermal control etc are nice.  But simplicity and analog control are also very attractive features that us humans tend to find comfortable. I don't know how hard it would be to find a nice pot knob that could fit on say a Q8.   As for battery monitoring, we could undervoltage shuttoff  back to the LM3409 (lol, I just asked about removing it, not even gone yet).  And I think the LM3409 has some kind of thermal shuttoff built in as I recall, maybe pretty extreme though.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas

DB Custom wrote:
Mouser is in Mansfield, you could drive over and pick stuff up and pay zero shipping.

They also have an option to use USPS for shipping at the lower rates, it’s not really clear though and you almost have to ask for it.

I buy almost all my components from Mouser. Have built hundreds of FET drivers with parts from them, a few times I’ve gotten stuff from DigiKey and the shipping costs were similar. Then the DigiKey site got difficult to access and I quit using them altogether.

Interesting, I knew they were in Texas but didn’t know they were in DFW.

Although Mansfield is still a good drive from me. DFW is a huge place and just keeps getting bigger! You can drive for 1.5 – 2 hours in some places and still be in DFW! And thats without traffic.

Now at 3 in the morning on a toll road on the other hand, that time can be cut down to about 20 minutes…….

I use digikey simply because their website makes sense and you can narrow down the parts you are looking for far easier. Mouser is several steps behind when it comes to this.

In my case I best it would cost me the same in gas to pick it up as to ship it.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas
Flintrock wrote:

Yeah so I was getting things all mixed up with the OTC momentarily and yet C1 does seem to play a role in this and the point of adding a controlled resistance maybe is even more clear.  There’s some weird stuff going on there.  Without C1 I wouldn’t think R1 matters for OTC, it just the highest resistance path to ground.  Reading the docs it’s not at all clear to me that attiny will shut down consistently, but I don’t know.  It seems like going with a 10x or 100x higher capacitor for OTC and a parallel resistor would put the discharge RC time entirely into our control and decouple it from all the side effects of every voltage and leakage in the whole system.  I bet all this stability voodoo of minor changes here and there just dissappear.  It also should allow to get rid of R1 and R2 entirely in direct drive non-zener lights without impacting OTC.


 


I’m seeing now this could be tested in a 1S non zener light without changes just by removing R1 and shorting the R2 pin to the OTC pin to create the RC.  Then just have to choose the right OTC and R2 for desired RC.  I’ve got a $0.50 0805 220uF cap picked out already.  There may be cheaper options at 100uF or so.  

First off the OTC is a non-issue for this driver as it will be setup as an E-Switch driver in virtually all cases. It is not used for an e-switch.

Also the voltage divider can indeed be removed and the internal reference used with 1S setups but not with anything higher.

I also forgot that for e-switch lights we generally use 47k/220k voltage divider. Needless to say I do not deal with e-switch lights much.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas
Flintrock wrote:

Analog version?


 


So this thing is basically an analogish driver with a digital click controller and took a little thought (we’ll still have to see) to cram that together.  However, it’s also possible to ditch the MCU entirely and just replace the Iadj stuff with just an ldo, pot, cap and resistor or two.  The pot could be mounted in place of the e-switch for a fully analog light.  Of course clicks have some use, always knowing really what mode you’re in, so you know what to expect for heat and runtime, and some features like battery monitoring, thermal control etc are nice.  But simplicity and analog control are also very attractive features that us humans tend to find comfortable. I don’t know how hard it would be to find a nice pot knob that could fit on say a Q8.   As for battery monitoring, we could undervoltage shuttoff  back to the LM3409 (lol, I just asked about removing it, not even gone yet).  And I think the LM3409 has some kind of thermal shuttoff built in as I recall, maybe pretty extreme though.

Interesting idea, doubt many would use it but never know what someone would do with such an idea.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Texas_Ace wrote:

First off the OTC is a non-issue for this driver as it will be setup as an E-Switch driver in virtually all cases.  It is not used for an e-switch.

In this size at least yes.  I momentarily forgot that earlier when I was looking at circuits instead of the board, and with all the discussion of it. I might raise the idea in another thread.

 

Quote:
Also the voltage divider can indeed be removed and the internal reference used with 1S setups but not with anything higher.

Yep, and it makes it a simple place to test this RC idea.  Once my hot air station gets sorted, I might just give it a go. I've got all the bits, enough for two to compare for that matter.

 

Quote:
I also forgot that for e-switch lights we generally use 47k/220k voltage divider. Needless to say I do not deal with e-switch lights much.

Yes, so I'm not sure this is settled.  I went with 360k/47k because we had strong confirmation of 36k/4.7k working well for 4S clicky.  That will give the same divider obviously, and there are no OTC issues, so I thought that should be fine.  Most of the early adopters will have the 220k on hand if needed anyway, so worst case is we change it and learn. Anyway, we can certainly change the part list if we're sure.  I'm still not.

 

 

 

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

About the jumper:

Quote:

So I’m probably missing it, but I just can’t see how that lower right quadrant could ever be ground. The upper right is + and the upper left is – and in 4s all other battery contacts are not ground. (the ground of a battery maybe, but not the ground, any raised voltage will due for the uv pin). I’m assuming there will be a jumper connecting the bottom two pads then.

For 2 S one of each of the bottom right and bottom left must be plus and minus. The mid voltage plane must be at the tail. There’s no other possible way. But I can’t imagine why the lower right would be ground. That would require connecting diagonal pads which is not simple to even do. The only thing that makes sense in 2S the lower right is connected to hot and lower left to ground, with vertical jumpers or traces on each side.

I’m wondering if you forgot to flip the board over in your head when you said that’s ground. If I’m confused, ok, but if I’m not, the jumper thing is real simple so maybe worth double checking.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas

I still think we should redo the voltage divider to whatever is ideal for the voltage in this case. Very few people have the components on hand for high voltage builds as it is so not a big deal to start over in this case.

Am I right that 4x the R2 should be roughly what we need to get the same reference voltage for the MCU with 4x the voltage?

So it would seem that an 47k/880k ish would be what we need?

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Here it is:

Unfortunately this is upside down. But your markings confirm my understanding of where the jumpers go. Looks to me like a simple via will work great.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas

Flintrock wrote:
About the jumper:

So I’m probably missing it, but I just can’t see how that lower right quadrant could ever be ground. The upper right is + and the upper left is – and in 4s all other battery contacts are not ground. (the ground of a battery maybe, but not the ground, any raised voltage will due for the uv pin). I’m assuming there will be a jumper connecting the bottom two pads then.

For 2 S one of each of the bottom right and bottom left must be plus and minus. The mid voltage plane must be at the tail. There’s no other possible way. But I can’t imagine why the lower right would be ground. That would require connecting diagonal pads which is not simple to even do. The only thing that makes sense in 2S the lower right is connected to hot and lower left to ground, with vertical jumpers or traces on each side.

I’m wondering if you forgot to flip the board over in your head when you said that’s ground. If I’m confused, ok, but if I’m not, the jumper thing is real simple so maybe worth double checking.

I had not really though of stealing some midpoint voltage. I suppose it would work to do that actually.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Texas_Ace wrote:
I still think we should redo the voltage divider to whatever is ideal for the voltage in this case. Very few people have the components on hand for high voltage builds as it is so not a big deal to start over in this case. Am I right that 4x the R2 should be roughly what we need to get the same reference voltage for the MCU with 4x the voltage? So it would seem that an 47k/880k ish would be what we need?

 

Why 4? 

What we want is for max voltage, 17.4V (4.35V batteries) to correspond to 2.56V, the internal reference.  That means a ratio of (17.4-2.56)/2.56  =5.8

 

47*5.8=270  But 360 leaves a little more head room and it seems calibrations already exist for it.  That seems to me to be the main thing.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas

Mostly because I do not know what reference existing firmware’s are using. It needs to be setup for whatever they are using now, which I think is the 1.1V reference.

Changing the reference is over the head of most people (including me) so it needs to work with whatever it is setup for now. Calibrating it is pretty simple by comparison.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Texas_Ace][quote=Flintrock wrote:
I had not really though of stealing some midpoint voltage. I suppose it would work to do that actually.

 

Obviously other solutions will be needed for smaller boards, and I know you're always thinking about that.  But with how silly simple this is.. I'd just worry about that later.  It's solved here.

 

Never mind, that's not even right.  In 2s tube lights there's only hot there.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Texas_Ace wrote:
Mostly because I do not know what reference existing firmware's are using. It needs to be setup for whatever they are using now, which I think is the 1.1V reference. Changing the reference is over the head of most people (including me) so it needs to work with whatever it is setup for now. Calibrating it is pretty simple by comparison.

 

But according to MTN max order site, they say to use 36/4.7 for 4s and DB confirmed, so it seems someone at least has software setup for 2.56.  That's also what DB seems to have verified (he said 2.55, I think the programmer's approximation, but the spec sheet is actually 2.56)

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Worst case is early testers have to change resistors, not recompile software.

 

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas
Flintrock wrote:

Texas_Ace wrote:
Mostly because I do not know what reference existing firmware’s are using. It needs to be setup for whatever they are using now, which I think is the 1.1V reference. Changing the reference is over the head of most people (including me) so it needs to work with whatever it is setup for now. Calibrating it is pretty simple by comparison.

 


But according to MTN max order site, they say to use 36/4.7 for 4s and DB confirmed, so it seems someone at least has software setup for 2.56.  That’s also what DB seems to have verified (he said 2.55, I think the programmer’s approximation, but the spec sheet is actually 2.56)

Yeah, there is firmware to support it out there but this will be running on either Narsil or Bistro. TK is MIA lately so we have to use whatever it is setup for since no one else can really edit this type of thing.

Narsil I have no idea on but it would be best to not need a separate firmware just for a voltage divider.

In the case of Bistro it uses a 4.7k/19.1K and ends up around 50% of the usable range.

Running quick math that lines up with a 1.1V reference but a 2.56v reference would have the divider be something like 4.7k / 5k. This suggests that the 1.1V reference is used and as such should be what we aim to use as well to keep things standardized.

I am a major fan of standardization, it is the entire reason I made the TA drivers to start with.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Mtn max reccommends the same for 1S.  Hmm... yes that comes to about 0.86V max, 0.833 for normal cells.  I'm not sure why they changed it for 4S.  Must have been a reason, but I definitely get your point.  This is why I wanted to really verify what's being used around here as far as software.  

 

If we want to hit 0.833 that's (16.8-0.833)/0.833 =19.2  which gives 90K R1

 

If we want to bump it up to 1.0V  that's   74k, call it 75 to be standard.    A 68K, a bit more standard, would make it 1.08, pushing it, and over the top for full 4.35 V cells.

 

82k, also a bit more standard gives 0.91V, seems pretty good to me.  I could go with that.

 

 

 

Of course standards are fine, but what standards?  36 seems to be a somewhat standard 4S resistor value. 1.1 seems to be a somewhat standard internal reference.  Software standards then?  Ok, nobody is around to change it now, but we will need new software for this driver.  We'll want dual PWM modes.  I guess you've been playing with modes, so if that's something you can handle then great.   

 

Anyway, 82k is fine with me if you've got a way to make it run.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Indeed I thought mountain uses bistro, but not on that driver.  Just guppydrv and their own software.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

But what about calibration.  Do we have people responsive who can deal with that?  If not, we better go with a 91K to keep even the calibration the same.

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

another issue, so it's not 90, it's more like 900.  At such high resistances I get worried about stray current through places it shouldn't go.  10Mohm becomes an important path that level.  So I read the manual and it says ADC inputs are subject to the input leakage current of the pin... which elsewhere in the manual is specced at 1uA.   So that's 6% of our divider current.  Ok  That actually should be ok.  But it will reduce the voltage by 6%.  So much for using existing calibrations. Enh, it might be less than this since it's only 1V on the pin, not 3 or 5.

 

Still I'm a bit tempted to lower R2 to around 1K.  18uA of current makes me slightly nervous.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas

Yeah, an 82k sounds a lot better.

Recalibrating it is easy, anyone that can compile the software can do that. You simply flash TK’s calibration firmware and read off the numbers it spits out at a few voltages, feed those to the script she made and boom, you have your new calibration. Takes a little time but not hard to do and no coding expertise needed.

Far as firmware for this driver, it will run on the standard Narsil / Bistro firmware no problem. You will simply have to play with the PWM and modes a bit to dial in everything but once again, just a matter of playing with numbers, no actual coding going on.

Texas_Ace
Texas_Ace's picture
Offline
Last seen: 57 min 34 sec ago
Joined: 03/24/2016 - 07:44
Posts: 8566
Location: Everything is brighter in Texas

Ok, I spent the morning re-working the driver for what is hopefully the final version.

I was able to increase C1 to a 1206, removed the jumper and generally compacted everything for as much edge clearance as possible. Still not a ton though, only about 3mm at the closest points but that is just enough to clear most of the SRK’s I have laying around.

If this looks good to go then I will put together a completed package along with a shopping cart link and people can give it a try at their own risk.

pilotdog68
pilotdog68's picture
Offline
Last seen: 3 weeks 10 hours ago
Joined: 05/30/2013 - 23:31
Posts: 6420
Location: Held against my will in IOWA, USA

So what kind of voltage/amperage ranges is this capable of?

My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

Nice work, a good looking board.  I'm a bit surprised you left the Ruv's in.  It won't hurt though.  I guess you're worried we won't ever figure out R1? It defeats a good bit of the space saving though.    I will try to dig through source and code and attiny manual code and if I can get to the bottom of the R1 thing.  

Flintrock
Offline
Last seen: 1 year 11 months ago
Joined: 09/10/2016 - 20:29
Posts: 1544

pilotdog68 wrote:
So what kind of voltage/amperage ranges is this capable of?

 

Might reach 15A for some seconds.  0.6V dropout should be achievable at that current level in theory at least, for a perfect battery of course.  The driver is capable of opening up to 100% duty cycle, basically direct drive, but with a bit more resistance from parts.  It can take 16.8V input.

Pages