1. What does SSTB mean? See our glossary of acronyms.
    Dismiss Notice

The auto-magic super rZToaster, or something like that..

Discussion in 'DIY' started by rz, Apr 3, 2017.

  1. rz

    rz Well-Known Member

    Messages:
    149
    Grr. it looks like most of the protection ICs that I've seen that are available in small quantities and have over-current protection are at or below 0.3 cell voltage drop. My 2S pack drops about 1v at 10A at full duty cycle. I could probably blame 0.1~0.2v on my poly fuse, and that still leaves about ~0.4v drop per cell- about 0.04ohm internal resistance each cell. Way too close to max current on those protection ICs ;/ I could probably get it to work well at 0.4v drop per cell but those are available in full reels of a few thousand each. Maybe I could try get a handful of samples and find a lower quantity source, but to be honest, a 16A poly fuse and the smart high side switch (which actually protects closer to 20~30A at the 5~7V range, are sufficient overcurrent protection. In this case, I'll look for a simpler over-voltage + over-discharge protection at least and maybe stick in an integrated charger. I want to try get as many features added in each PCB run for R&D purposes.. @OF @hardboiledfrog @KeroZen anyone else any suggestions?
     
  2. KeroZen

    KeroZen Chronic vapaholic

    Messages:
    2,522
    Location:
    On Air
    I found a couple interesting BMS for 2S a while ago that should be able to cope with your continuous current requirement, one from China and the other from the US. I ordered two samples of the Chinese one as the PCB was more compact but they've been sitting in my parts bin and I didn't test them yet.

    Probably not what you are looking for as you are designing your whole circuit from scratch (where I wanted to just assemble ready-made parts more like a kit) but if you are interested I can try to find the links back.

    I don't have much else to add at that point, excepted keep up the good work! :p
     
    The Beagle, GreenHopper and rz like this.
  3. rz

    rz Well-Known Member

    Messages:
    149
    @KeroZen yeah I didn't want to deal with BMS design yet, and ordered this 15A with balance. 2 months and it hasn't arrived yet so even if it worked and I designed around it I'd have to wait months for more and TBH I like this design phase even if its frustrating I'm learning a lot so will keep going. I also get to select the best components for the job as long as I get the design right. I find the chinese BMS's are designed pretty well though not always with the best components. Those ebay ones state ~11mOhm, though I've found some nice ~1mOhm transistors.. albeit the transistors I'd use would cost as much as the whole chinese BMS :p Now that I look at that 15A, I see it doesn't have overcurrent protection, though the 8A one does (at 16A) - this would probably work well enough for me cause 8A @ 8.4V is plenty. The only reason I bumped up capacitance to get 10A @ 8.4v is so that when the battery drops to ~6V there's still enough oomph to heat quick enough. I could probably dial it back at 8, deal with the slow heat at lower end of charge. that's still 0.3v drop @ 8Amps and I cant find small quantities of protection chips with a detection level above that (like 0.5v would be OK). I'm interested in the components your 2S BMSs use If you could get some part numbers of the ICs. Looks like a lot of them use SII chips..
     
    The Beagle, GreenHopper and KeroZen like this.
  4. rz

    rz Well-Known Member

    Messages:
    149
    AHHA! :) All the stated over-current ratings on those protection chips are voltages built up on the control transistors so the sum of their RDSon is what determines the actual current limits. So if overdischarge voltage is rated 0.3v, and RDSon(sum of charge and discharge control FETs) is about 10mOhm, overcurrent is set to 0.3/0.01=30A. Short circuit detection is usually 1.2V, so 1.2/0.01=120A. Perfect. I just have to select the right transistor pair with minimum RDSon to prevent inefficiency, but LARGE enough to provide good enough overcurrent protection. This makes so much more sense that relying on cell internal resistance in which case I calculated overcurrent at 7.5A and that was just not suitable for this application. I can now go back to original plan to use something like the s-8252 (which looks identical to the ricoh r5460 which mouser actually has stock of one with decent voltage levels! :) ) viva la staring at datasheets for long enough I think this is the new action item :rockon: :science: now time for some zzzz
     
    Last edited: Nov 3, 2017
  5. KeroZen

    KeroZen Chronic vapaholic

    Messages:
    2,522
    Location:
    On Air
    So I had a look using a magnifier on the Chinese BMS and it's using 6 of these FETs:

    Alpha & Omega D514 >> http://store.alhekma4u.com/content/Transistors/FET/D514_AOD514.pdf

    Which I found on aliexpress here >> https://www.aliexpress.com/store/product/10PCS-AOD514-D514-30V-46A/1904245_32661168413.html

    Then there's a few passives, some kind of shunt resistance (just a trimmed piece of wire) and a single chip with 6 pins that I'm not able to identify (3ZK2 written on it but no luck on findchips) sorry!
     
    rz, The Beagle and GreenHopper like this.
  6. rz

    rz Well-Known Member

    Messages:
    149
    OK... I'm about to order parts for next round of R&D :D

    It's been a while, so I've attached some images below.

    The board will currently measure 60x80mm. There's an extra 20mm of design on the bottom of the PCB with some extra things like the switche panels (2 different designs), and the IR sensor + LED array.( Ignore the large female sockets on the 3d image) - these will be cut off and assembled accordingly.


    Major changes from previous prototype:


    1. Layout change. I now placed the IH underneath the board, next to the batteries. This keeps the whole thing about 60mm wide (both the main coil and 18650 have 18mm diamater, + some margins).
    On top of the board, all components are below 4.5mm tall, so all together, the thing should be about 27mm thick (minimum internal dimension of case). I'm still using a stock OLED panel which will be up front.

    2. Added basic battery protection circuit based on S-8262 chip. I can't source a chip with the right thresholds for optimized protection. Right now, IH will draw about 10Amps though protection will only kick in at about 30Amps - a whopping 300% margin but better than nothing. There is also the High side switch which should cut out a short at about 20A, and the lower voltage circuitry all goes through a poly fuse. Good enough for now, and for further testing purposes. Ideally, I'd source a chip that would kick in at, say, 12Amps leaving a 20% margin, though I'd have to get a few hundred at least.. Not ready for that.​

    3. USB charging! :D I really wanted this feature, and was looking for a more integrated solution than what I ended up with, but can't get stuck, so I just squished another boost circuit in there. It's designed to draw 1.5Amps from 5v usb for a 700mA charging current.

    4. Switches and IR panel + a bunch of LEDs. A string of red + string of green will go under the glass tube. The brightness of these can be controlled to get red / green / yellow orange glow depending on status. On the board, the charger has one, and the input to the opto-isolator has one. I like the last one, as it's not connected to ANY digital logic - directly lit from the induction coil, a nice little indicator.
    Those are the major changes. Another change, is that the microcontroller is mostly SMD pads now. I liked this cause it gave me more space to run wires between pins, but I re-organized the pins anyway since so wiring is much neater. I may move back to through holes to make development a bit easier and maybe offer this board without microcontroller for those inclined.

    What's next? Order the stuff and try get a few fully working boards out of this batch. I'll have parts for about 5 boards all being well. I'd like to keep one or two (one to use and one to abuse), and would be glad to on-board some early bird beta-testers.

    In the meantime, I've already ordered a hot-air rework station to help assembly, and have been drooling over the idea of building a reflow oven. Model predictive control looks really interesting and a reflow oven would be a great project to get into it with, though as it is my dev time is limited, so it looks like a kit is called for, something like this (@hardboiledfrog I see you made one, any input?). more $$!?!??! fuuuu...

    My current design is not $$ optimized. The main culprit is the whole microcontroller which currently weighs in at ~13$. I'm now pondering integrating SAMD21 48Mhz ARM Cortex M0+ 32bit processor (~3$ with necessary components) (some info here) (@toofluff any experience with this chip?). Other little things, like I'm currently using a separate voltage regulator to control all peripherals. This is only an extra 1~2$, but can be solved with putting things to low power sleep properly. Will eventually get to that in software even though I already got pretty close.. and PCBs. I need to print 10's of them to really drive the cost down, and till my design matures and goes through extra testing, I'm not committing to building that many at a time.

    I hadn't touched the software for a few months till yesterday. I wanted to do a quick optimization on insertion detection - slow the sample rate down to significantly reduce consumption while waiting. I should not mix tinkering and beer, bud, and anything to do with lithium ion batteries again. I ended up doing something odd with the timing and blew a transistor! Good thing I know a guy who could fix it, and I got to test out a different set of ultra-low on resistance + ultra low gate capacitance MOSFETS, which seem like a good candidate for the next build. All back in order again :) Otherwise, my two proto units have accumulated many hours of use. They're being switched on and off about 10 times a second in use, so the mechanism seems to work well when not f'd with. I did learn some valuable things from the miss-hap though. Like that I need to monitor the high side switch fault signal instead of turn it off and on again 10 times a second, which resets it :p And that poly fuses aren't as quick to respond - just like I expected actually, which is exactly why I want the battery protection circuit, since it can respond much faster than both the high side switch and the poly.. if only I can source the right ones.


    Future goals? Well, I dunno.. It would be a huge step to do this all by the book, and even though it's actually working, I feel like there's still so much to improve+optimize, so I'll keep making incremental changes, and it only makes sense to make a few boards at a time. I'd love to have a few folks help with extensive tests :brow::brow: though I cannot cover all costs. With necessary tools and parts purchases, PCB manufacturing, etc, boards are costing me about a hundred bucks each to build up. I really don't want to make any extra $$ from this, at least yet, since I fear it would complicate things a lot ( @Hippie Dickie you know what I mean ) though I'd be glad to offset the costs a bit. In the meantime, I hope to have parts and PCBs in a few weeks from now + some building time. Then dev + change + do it again, building a handful of devices every few months along the way.


    Ummm.. I think thats it for now.. or not.. but enough for now. :zzz:




    [​IMG]
    [​IMG]
     
    Last edited: Nov 12, 2017
  7. rz

    rz Well-Known Member

    Messages:
    149
    :science:


    I haven't finished putting it together yet, but V0.2 is working at l(e)ast ! :)

    Click to play YouTube Video



    Battery protection circuit seems to be working, as in, when inserting batteries it's disconnected untilI I 'wake' it up with a charging voltage. I haven't yet simulated fault conditions, drained a battery enough in there to get low voltage cutoff, nor tested overvoltage yet, so, still in progress..

    On board voltage boost works to drive the mosfet gates :D It had some hiccups with an external power supply set to lower end of the expected voltage range (~5.5V) though I hope it'll work bettwe with batteries, Otherwise I'll need to tweak it a little like add some input / output capacitance, maybe lower the output voltage from the current 18.5V to ~12v which should be enough since I've found some good MOSFETS for the IH with both low Rds and gate capacitance, so they open up pretty quickly, stay cool, and don't really need their gates driven so hard.

    The OLED breakout that I designed needs some tweaking, so I'm still using the fallback prebuilt module option for now. Hopefully it'll work in V0.3 cause the module adds a bit of unnecessary bulk.

    I'm using (2x)18awg for the 6 work coil windings, and with the 4x0.33uF capacitance this thing was pushing about 15A! I've limited it to 70% max duty cycle for now for ~10A, though I really don't need so much power. Will either go back to 4x0.22 or 3x0.33 which will still be plenty.

    The work coil is a bit too close to the battery, and the board itself gets a bit hot in use which warms the batteries up. When the design settles a bit, I'll use 2Oz coppper on the PCBs. For now, I'll add some external wire to connect between the coil and caps yo reduce board heating up a little. Reducing capacitance will also reduce current and keep things a bit cooler. Eventually, I hope the enclosure will have some heatsinking built in to keep it all cool (thinking some wood + aluminum/copper heatsink panel)

    That huge bulging external microcontroller will eventually be soldered flat, though I'll be experimenting with integrating an MCU directly on the PCB.

    I still have to populate the onboard charging circuitry - a second boost charger (designed for 5v@1.5Amax -> 9V@0.75A) will connect to a simple linear 2S lithium charger. Should work with any 5v@2A USB charger.

    So, I feel like 10 step forward 2 steps back. Happy with my progress, but still got what to do :science::peace:
     
  8. KeroZen

    KeroZen Chronic vapaholic

    Messages:
    2,522
    Location:
    On Air
    Excuse my ignorance/naiveness, but why are you using a boost circuit and not just a gate driver chip? How many FETs do you need to drive?

    Also why not chose "logic level" FETs? Seeing your gate voltage I assume you are using standard level ones right?
     
  9. Phenix

    Phenix Well-Known Member

    Messages:
    112
    Kudos to your work and progress, really nice to read!!

    Once it works someday will you offer some sort of „diy kit“ either with soldered pcbs/o case or a „solder yourself“ kit?
     
  10. rz

    rz Well-Known Member

    Messages:
    149
    @KeroZen Driving Two Mosfets. This IH design (royer oscillator/modified mazzilli flyback diver) is self resonant, each side turns the other off, so it's more like an analog circuit than digital driving. I read about some failed attempts of integrating gate drivers. It may be possible but I just haven't got much experience with gate drivers, so maybe it's my ignorance not yours ;) I'll try look into them again, and if you have some experience with them, would love to discuss while I clue myself up a bit more.

    MOSFET threshold voltage is just a threshold, and it takes time for the gate to open properly which is usually at a higher voltage. I'm currently using mossies with Vth=~4v. If it were switching at very low frequencies, it may be fine, but at ~24Khz, even driving at 8~9V, they got VERY hot. 6~7V was usually catastrophic. Driving them harder opened them up much faster and significantly reduced switching loss. Finding mossies with low gate capacitance helps open them up much quicker and was more influencial than a slightly lower threshold. Just like batteries, seems there aren't (m)any free lunches here either.. there's always this trading between physical size, Rds (~max current), lower Vgs, gate capacitance (~switching losses) etc..

    Anyway, the biggest reason is that I just happened to have a cheap voltage booster module on hand, and experimented with it. It worked perfectly and I could lower the source voltage to about 4~5 volts before oscillation stopped (but mossies stayed much cooler throughout) which is perfect for 2S.

    Since I'm monitoring the frequency and bit-banging the PWM in ~1ms increments, I can make sure the unit is always oscillating (@24Khz, it switches about 48 times every ms) . As soon as the count drops too much, I shut down the gate drivers and high side switch (if it hasn't already turned itself off with it's own overcurrent protection. I couldnt find response time specs in the DS for the high side overcurrent protection). Also monitoring the battery current draw with a threshold, along with the BMS stuff. I'm trying to throw as many failsafes possible into this thing cause I've seen what a shorted battery can do..



    Thanks! :) Possibly. I've even thought of open sourcing the whole design but it's just not mature enough yet and I don't want anyone trying to build something that could short circuit on them. I'm not so sure about a DIY PCB since most of the components are SMD and I've moved away a bit from the modularity(/ bring your own microcontroller) in favor of compactness. I'm a lot more likely to open source the software though (mostly because my programming (relatively) sucks and I'm sure many people can do a better job). I may do two designs though, one without batteries. I currently see this thing as an accessory to a wonderful vape that welcomes accessories, and I'd like to extend that. Providing pre-soldered board without a case is definitely an option. As for the case, there are some interesting options bubbling along :) though design is still up for changes (parts need to shift a bit for thermal reasons, buttons and display can move around, etc) so nothing solidified yet. Once things are settled, I'd love to see what the rest of you can do with it :) I certainly can't keep this in a padded cardboard box forever.
     
    Last edited: Dec 17, 2017
    GreenHopper, Copacetic, Joaon and 3 others like this.
  11. KeroZen

    KeroZen Chronic vapaholic

    Messages:
    2,522
    Location:
    On Air
    Ah right, of course it's not as simple. Then maybe a driver won't work indeed. That's unfortunate because they help precisely to open hard and fast, minimizing the losses.

    I don't recall if you did already, but would it be possible to tell us the FET part numbers you are currently using?
     
    GreenHopper, rz and The Beagle like this.
  12. rz

    rz Well-Known Member

    Messages:
    149
    I've probably mentioned one somewhere but I've tried a few. The ones in my latest build are FDD9410. I haven't extensively tested them yet though they ran cool enough in initial testing. I haven't even scoped out their gates yet. I first fired them up last night, and rushed to set my PWM to 70% as it wanted to pull 15A. Then I played with the LEDs a bit before forcing myself to zzz :mental:

    I've also used 30V transistors. As their max voltage goes down some parameters do improve though 30V was too close to the recommended 4X supply voltage for my comfort (in practive it's max 8.4V - about a 1V drop along the way x 3.14 = about +/-25V, but I feel better with 40V)

    I've already tested about 5~6 out of the 7~8 different kinds I have (every order I've added ~10x one or two different ones. One didn't work though i think there were other issues with that build. Some ran noticably warmer than other. Now that I have a hot-air station it'll be much easier to switch and test, though the FDD9410 seem good enough for now. If I spend too much time A/Bing everything, I wouldn't have gotten so far..

    I've also got a little box filled with fried transistors. Mostly from earlier builds. Fortunately since the frequency counting and current monitoring I haven't fried anything :)
     
  13. Copacetic

    Copacetic Somewhere North of The Wall

    Messages:
    856
    Oh boy, this little device looks like it's really moving!
    Keep it up rz, this is mighty impressive. :tup::clap::rockon:
     
    KeroZen and GreenHopper like this.
  14. Hogni

    Hogni Honi soit qui mal y pense

    Messages:
    1,732
    Location:
    Berlin, Germany
    What lasts long finally ends well - we all hope :tup:
     
  15. rz

    rz Well-Known Member

    Messages:
    149
    I got to play a bit more :D

    I spoke too soon about killing transistors. I wanted to do a quick mod and remove one of the tank capacitors (3x0.33 is enough). I also wanted to add some external wire to assist the current between the coil and capacitors. I also wanted to drink beer. and had been testing my heater. and. dunno. :hmm: Well. I do.. I hooked those two simple wires up wrong. Killed a transistor :doh:. Easy to find and fix at least. Not a typical problem, which I had hoped the BMS would have prevented, though nothing else went up in smoke at least :lol:

    In the end, I modified the coil a bit too, and removed a cap. The lower current doesn't heat the board up as much so seems good. I'll eventually use thicker copper on the PCB anyway, so will definitely be enough - and I've got some layout changes on my mind which will improve things even more.

    I did however end up with a good testing session. I was previously limiting current with a maximum duty cycle for my PWM, so I could take 15A down to 10A average (max) by just being on for ~2/3 of the time. However, this increases the voltage drop on the batteries which results in the undervoltage protection kicking in earlier. The modified coil and reduced capacitors run at about 12A @100% Duty instead of 15(full battery, even less at lower voltage) now so gives an extra bit of battery life before undervoltage kicks in WHILE IN USE. - a battery low indicator will be flashing on screen by then anyway, so you've been warned. Removing that cap also frees up some space so I can try cram most/all the heat-producing circuitry away from the batteries. For instance, I'm thinking of moving the while IH bit (caps, coil, transistors, and a few resistors/dioded) all on a daughterboard that would be mounted perpendicular on the edge of the board, easy to attach a side panel heatsink :brow: This little module may be more relevant for providing as a DIY kit.

    I built up the charging circuit. It works :D Kind of. I designed it for an input range of 4.5-5.5V for USB charging, with an output of 0.75A. The boost circuit doesn't seem able to start up the charger properly when charging voltage input is 5V, it worked at 5.3V though. The charging circuit thermally throttles itself down to about 450mA anyway and still creates some heat. In it's current location on the board, it was the charging circuit that warmed up the batteries while charging (which would take 3~4 hours to charge at 0.75A, ~7Hrs at 0.45A). I already added some copper on the PCB to keep the temp down (it's a linear charger after all), but it would need to be moved away from the batteries to prevent warming them up. Or I need to use a switching charger instead which are usually all step down, so I'd need to switch voltage up for it to be switched down again. DOH. I'll need to continue my search for a more suitable solution as this solution was rushed to fit it into this R&D round anyway and wasn't necessarily the best choice. In the meantime, I dropped charging current to 250mA - keeps the charging circuit cooler. It'll take ~10 hours for a full charge in the meanwhile, or just overnight top-ups every now and then (for now). This lower charge current also means 5v@500mA input, so I can safely charge it from any USB2.0+ spec port :)

    I also learnt the the BMS chip I have likes to be permanently connected to a pack, as in, after changing batteries, it needs to be jump started (bypassed momentarily) for it to stay awake itself. This would be inconvenient for an end-user to do. May be solved with a different BMS circuit or some other method I'll look into it but I'm glad this is working for now.

    A bunch of other things along the way, and many things learnt. I'll incorporate as much as I can into the next revision which I feel is closing in on something :science::brow:

    Meanwhile... back to (actual day job) work..
     
    Last edited: Dec 19, 2017
    Hippie, asdf420, Joaon and 5 others like this.
  16. kentuckyshark

    kentuckyshark New Member

    Messages:
    2
    Hey rz, love the work you have done on this! You have inspired me, however I am not nearly as electrically inclined as you are so I am taking a more KISS approach using as many off the shelf parts as possible.

    I did not notice that you had resolved an issue with the FOV on the temp sensor and now I am in the same boat you were before you replaced that. I saw you mentioned using a 35 degree FOV, however I was wondering if you could offer any more insight before I go ordering another sensor. I saw the mlx90614 is available in 12, 10 and 5 FOV also, is there any particular reason you chose 35?

    Thanks in advance!
     
    rz and GreenHopper like this.
  17. rz

    rz Well-Known Member

    Messages:
    149
    @kentuckyshark that's great! If you're already encountering those kind of problems you're pretty far on :)

    The main problems I had with the wide FOV was that if the Vapcap cap wasn't sitting flush against the casing of the IR sensor, there was a whole lot of stray IR peeking through the gap. The stay IR depended on the temperature of the IH coil which would change during the session. Additionally there are other issues with the heat gradient introduced onto the IR sensor, magnified by the direct contact of the cap. By using a smaller ID glass tube, I managed to keep the VC straight and the cap flush which resolved the stray IR issue and was actually usable but still not ideal.

    Currently I've got 10deg IR sensor though I don't think there's much of a difference between this and the 35deg sensor for this purpose. I've cut a 'mini cd' like shape - a disc with a hole, out of a silicone baking sheet, this reduced the gradient on the sensor. The glass isn't in direct contact with the IR sensor either as I've got some silicone between them too. Still, there are a bunch of issues with the IR sensor so I wouldn't call it VERY precise nor accurate, just like the cap tip temperature isn't really a true representation of chamber temperature (there's a lot going on), but it's close enough to work well for the cause specially when you get a feeling for how it all works.

    As for my progress. Family, work, life, etc, I had to slow down a little with this project or go completely :freak:. Just a little though..

    I've got the SAMD21G18A microcontroller working with all current features :D. I flashed it with Arduino zero bootloader and had to switch out a bunch of libraries. It's a but slower than the Teensy 3.2 though so had to optimize a few of my routines. When support matures I'll probably use a SAMD51 series which will be significantly faster and close enough to easily upgrade.

    I've moved my battery protection to high a side chip, S8253A, and am designing an MP2639A based charging circuit instead of the boost+linear charger. (@KeroZen )the MP2639A does actually balance in the end :rockon:.I've still got to finalize current BOM hopefully in time for a shipping opportunity. Then do board layout for the changes which includes moving the main IH bits to a small daughter board to keep heat away from the batteries and easier to cool down. So, progress.. just a little slower pace than my otherwise obsessive self would be at..
     
    The Beagle, GreenHopper and Hippie like this.

Support FC, visit our trusted friends and sponsors