gfxgfx
 
Please login or register.

Login with username, password and session length
logo
 
gfx gfx
gfx
19694 Posts in 1260 Topics by 5033 Members - Latest Member: jackiehinchey November 18, 2017, 01:29:28 AM
*
gfx* Home | Help | Login | Register | gfx
gfx
Breaktru Forum  |  eCigarette Forum  |  Modding  |  Topic: DNA 12 Evolv w/ an MCU
gfx
gfxgfx
 

Author Topic: DNA 12 Evolv w/ an MCU  (Read 83122 times)

0 Members and 2 Guests are viewing this topic.

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #50 on: July 18, 2012, 09:06:37 AM »
Same result with the second charger on Li-Po that Brandon sent.

I thought that maybe these chargers couldn't handle a Li-Po so I discharged an 18350, 1200mah, Ultrafire (blue) to 3.38v and put it on charge monitoring Voltage and amperage.

Charging rate is the same 0.8uA. Voltage slowly increased from 3.43 and slowly climbing. It's on charge now for 1/2hr and has reached 3.65v and still charging at 0.8uA. After 3 1/2 hrs it's at 3.86v.


« Last Edit: July 18, 2012, 12:07:17 PM by Breaktru Admin »

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #51 on: July 18, 2012, 11:51:06 AM »
Okay, I sent Brandon a PM yesterday and he just replied.
He sent me the wrong chargers.

Offline Squance

  • Full Member
  • ***
  • Joined: Sep 2011
  • Posts: 37
  • Karma: +16/-0
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #52 on: July 19, 2012, 07:19:00 PM »
Okay, I sent Brandon a PM yesterday and he just replied.
He sent me the wrong chargers.

Oh boy. Hope he waits for your testing before making them available to the public.
Sounds like what happened with the first version of the DNA not being able to reach 12w max

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #53 on: July 22, 2012, 07:26:55 PM »
Okay, I sent Brandon a PM yesterday and he just replied.
He sent me the wrong chargers.

I have the new chargers that Brandon sent and they work well. These are the same exact size and look exactly like the previous ones he sent.
Charging rate is 500mah, actually started at 520mah and slowly declined to Zero when charging was complete.
Red light while charging and and a Green light when completed. Great small size. You can squeeze these in almost anywhere.
Took 2hrs 15min for a 1000mah 20C battery to completely charge.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #54 on: July 24, 2012, 11:48:51 AM »
Just stumbled on to this forum as I have been starting my own mods, BreakTru and CraigHB you both do fantastic work and the discussions here are an invaluable resource.  I'm planning two mods, one based on the DNA and eventually a more complicated mod using something like a TI4050 with a control circuit and the needed safety monitoring.  The DNA is attractive as a first project as it contains the safety monitoring and simple setup so I can get the sensing circuits and display dialed in before taking on a more complicated project. 

What have you found to be the best way to get an accurate current measurement?  Hall effect sensors or are you measuring the voltage drop across a small resistor in series with the load and driving that to the ADC with an op-amp?  Thanks!


Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #55 on: July 24, 2012, 11:55:13 AM »
Just stumbled on to this forum as I have been starting my own mods, BreakTru and CraigHB you both do fantastic work and the discussions here are an invaluable resource.  I'm planning two mods, one based on the DNA and eventually a more complicated mod using something like a TI4050 with a control circuit and the needed safety monitoring.  The DNA is attractive as a first project as it contains the safety monitoring and simple setup so I can get the sensing circuits and display dialed in before taking on a more complicated project. 

What have you found to be the best way to get an accurate current measurement?  Hall effect sensors or are you measuring the voltage drop across a small resistor in series with the load and driving that to the ADC with an op-amp?  Thanks!


Hey Synchro, welcome to the forum. Glad you found us.
I take the easy approach with a hall effect sensor. I believe Craig builds his own which I assume is the resistor/op-amp method.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #56 on: July 24, 2012, 01:04:25 PM »
Thanks! Do you mind if I ask what sensor you are using? 

I've been looking at this part (http://www.digikey.com/product-detail/en/ACS711ELCTR-12AB-T/620-1370-1-ND/2470594) since I'm using the 3.3 mini board and dont want to put a 5v reg in to keep it small and the component count down. Like that it has an overcurrent latch as well, could be useful later on. Wish it was through hole but that can be overcome.

Love that OLED display you are using, has a lot of advantages for modding being small and clear.
« Last Edit: July 24, 2012, 03:19:13 PM by Breaktru Admin »

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #57 on: July 24, 2012, 01:08:52 PM »
I use a current sense resistor and an op-amp.  The current sense resistor is 10m Ohms and the op-amp is set up as a differential amplifier with a gain of around 50.

I would recommend the chip Dave uses for the simplicity.
« Last Edit: July 24, 2012, 01:22:53 PM by CraigHB »

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #58 on: July 24, 2012, 03:19:34 PM »
Thanks! Do you mind if I ask what sensor you are using? 

I've been looking at this part (http://www.digikey.com/product-detail/en/ACS711ELCTR-12AB-T/620-1370-1-ND/2470594) since I'm using the 3.3 mini board and dont want to put a 5v reg in to keep it small and the component count down. Like that it has an overcurrent latch as well, could be useful later on. Wish it was through hole but that can be overcome.

Love that OLED display you are using, has a lot of advantages for modding being small and clear.

I use the ACS712 which is 5v, 5amp.
I just want to point out that the display in very tiny. Hope you have good eyes...  :laughing:
The text is very sharp and crisp and doesn't need a backlight. Text is illuminated

Offline poorboy

  • Sr. Member
  • ****
  • Joined: May 2012
  • Location: Manila, Philippines
  • Posts: 60
  • Karma: +9/-0
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #59 on: July 25, 2012, 04:46:28 PM »
Can i ask what micro controller you use with the dna? Im planning to build one myself but im still studying about it. Thanks man im really inspired!

Oh im sorry its already been mentioned.
« Last Edit: July 25, 2012, 04:49:42 PM by poorboy »

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #60 on: July 31, 2012, 01:22:46 PM »
Man, you weren't kidding...that display is tiny.  Its really sharp and clear though, and its kinda fun to play with bitmaps on the oled and animate them. :D I think next time I would go for the 128x64 so I can use a bigger font.  One thing I'm gonna try is to see if a digital pin on the controller will power it.  The current draw is low enough and it would be nice to turn the display off when idle with a simple digitalpin low command.

Had a good weekend, got the display wired up, voltage dividers made and tested, most of the code done which I'm sure I'll need to tweak once everything is together.  Still waiting on the Lipos to arrive but at least they are (somewhere) in the US now. 

One thing I've been reading alot about is using the measured Vcc from the controller for more accurate measurements instead of just assuming 3.3v in my case which makes sense to me...(Count/1023)*Vcc.  Is this a common practice and worth the extra code for the increase in accuracy?  I'm curious if just once when the controller is started is enough or measuring the Vcc constantly is needed as regulators will drift with temp, batt, etc. 


Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #61 on: July 31, 2012, 01:57:34 PM »
The LCD is load is heavily capacitive since it uses a charge pump to drive the display.  It's generally a bad idea to power a capacitive load directly from a digital I/O pin.  It's because the inrush current causes a large drop in voltage within the MCU and can cause indeterminate behavior such as spurious resets and locks.  To control loads like this, you should use an analog switch or a complimentary MOSFET pair.

Your ADC is only going to be as accurate as your voltage reference.  If you are using Vcc as a reference, you want to use a precision LDO regulator to minimize error.  Commonly they are available with 2% accuracy and they can be found as low as 0.5%.  Some MCU's have a built-in voltage reference module that is highly accurate.  If the MCU has one, it's always better to use that than Vcc.  If the MCU does not have an internal voltage reference, you can use a voltage reference chip to provide one.

Accuracy always boils down to what you're willing to pay in cost of components and complexity of design.  I wouldn't go to overboard with it.  It's only an e-cig and if you can keep error under a couple percent, that's more than adequate.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #62 on: July 31, 2012, 04:11:09 PM »
Thanks Craig, sounded like an easy display on/off but I won't mess with it if it causes other problems. Not that big of a deal to leave the oled on until the MCU goes into sleep mode.

Interesting, my mcu is based on the ATmega328 running at 8MHz which has a 1.1v internal reference which I've found to typically be around .9v  The onboard 3.3v regulator is pretty tight and analog measurements of Vcc are typically pretty close to my DMM.  I'll have to experiment with both, more to learn than anything else.

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #63 on: July 31, 2012, 09:31:41 PM »
I'm not a familiar with the ATmega328, but the ADC module should have configuration bits that allow you to select a range of references.  All MCU's allow you to select select Vcc or external input for V+ and Vss or external input for V-.  Ones with internal voltage references should provide a set of values you can assign to V+ and V- as well.  I don't know for sure though, maybe that MCU only provides one value for the internal voltage reference.  That would be kind of weak though.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #64 on: July 31, 2012, 11:41:56 PM »
Well, a little google fu and some trial and error and my readings are spot on.  Hardware Hacking has a good tutorial on using the reference voltage and normalizing the DAC, had to fiddle a bit to get it but when using a AA battery to test it was spot on to the DMM.  Thanks again Craig and BT.  This has been a fun project, my degree is computer eng but my profession is software modeling power systems and I never get to do any hands on anymore. 

Everything is ready to go now, just waiting on batteries.  Had a really nice case that would just barely fit everything and I cracked it while drilling for the 510 connection.  Ugh.  Have another one that will do but it is big.   


Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #65 on: August 02, 2012, 11:43:35 PM »
batteries arrived today, got everything together and tested.  Voltages are dead on, but current needs some work.  Will take a bit to get the ratio correct. Almost there...

« Last Edit: August 03, 2012, 12:32:12 AM by synchro »

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #66 on: August 03, 2012, 03:08:15 PM »
Looking good there boss :)

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #67 on: August 03, 2012, 03:14:36 PM »
Very good Synchro. Well done my friend. Welcome to the club..
I see you have the latest DNA release and achieved over 12 watts.
Do your readings fluctuate any?

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #68 on: August 03, 2012, 04:58:09 PM »
Thanks guys, been fun and frustrating at the same time.  The help from the two of you is greatly appreciated! Still nowhere close to being done, but at least I can use it at this point.

Not seeing much fluctuation at all.  Pretty impressive actually, gets pretty close to 13W which is cool although around 10.5 is where I like it.  The 20C cell makes a difference as well, the DNA wasn't as strong with an IMR I tested it with earlier. Its big tho, much bigger than I intended.  I'd really like this to fit inside a 4.5x2.2x1 box I have coming, and couldn't do that right now.  I think the next step is to look into the ATmega chip you are using BT so I can consolidate the bulk of the circuitry onto 1 board that runs over the length and width of the battery. I haven't built a lot of mods tho, so i'll get better as I go.  Having gone through it once now, I'll pick better suited components and plan it out better. I knew this first one was going to be more of a test run than anything else.

Its on a charge now, 500mA takes forever.  Funny that the first charge is always nerve wracking.

Offline theDom

  • Jr. Member
  • **
  • Joined: Feb 2012
  • Posts: 24
  • Karma: +1/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #69 on: August 03, 2012, 06:01:19 PM »
Cool sync  :rockin smiley: congrats on your build. It's nice to see all the info on one screen like Craig and breaktru.
I expect to see more mods coming with an LCD or oLed display

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #70 on: August 03, 2012, 07:22:04 PM »
Yes, that's what's convenient about the LiPo flat cells.  They fit nicely under a PCB.  Perfect for a box mod.

You can charge your cell quickly with a DC benchtop power supply.  The 20C 2200mAh cell can handle 2C or 4.4A when charging.  Just set your DC power supply to 4.2V and limit current to 4.4A.  The cell will charge in a half hour.  I do it routinely on the one cell I use all the time for testing.  I've beat the hell out of that one cell and it's still got most of its original charge capacity.

« Last Edit: August 03, 2012, 07:29:27 PM by CraigHB »

Offline michamer

  • Full Member
  • ***
  • Joined: Jan 2011
  • Posts: 37
  • Karma: +2/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #71 on: August 03, 2012, 09:49:14 PM »
batteries arrived today, got everything together and tested.  Voltages are dead on, but current needs some work.  Will take a bit to get the ratio correct. Almost there...

Way to go synchro. Excellent work

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #72 on: August 03, 2012, 09:54:40 PM »
Hmmm...dont have a DC supply here, but I think this usb charge breakout board can be modified to 1 amp.  I think BreakTru did this so I'll see if I can find where he found out how, that would be better at least. 

Got it all boxed up and (still) charging, vapes pretty nicely.  Ranges between 6 and 12.5 watts which is plenty for me. 

My PTN4050C samples are calling my name now....did someone say digital pot? 


Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #73 on: August 03, 2012, 10:01:10 PM »
Hmmm...dont have a DC supply here, but I think this usb charge breakout board can be modified to 1 amp.  I think BreakTru did this so I'll see if I can find where he found out how, that would be better at least. 

Got it all boxed up and (still) charging, vapes pretty nicely.  Ranges between 6 and 12.5 watts which is plenty for me. 

My PTN4050C samples are calling my name now....did someone say digital pot? 

Looks real nice. Hell yeah.
Which charger did you use?

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #74 on: August 03, 2012, 10:30:08 PM »
Thanks sir! Not too bad I guess, I did not do great at modding the case - hence the electrical tape.  I do have these two cases coming in a week or two that I'll plan a little better and do a nicer job:
http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=380335740247&ssPageName=ADME:L:OU:US:3160
http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=330357824336&ssPageName=ADME:L:OU:US:3160

This is the charge board:
https://www.sparkfun.com/products/10401

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #75 on: August 03, 2012, 11:53:44 PM »
One of these DC power supplies will do most of what you need to do and it's cheap enough.  Their full range of linear DC power supplies is here.

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #76 on: August 04, 2012, 07:39:42 AM »
Thanks sir! Not too bad I guess, I did not do great at modding the case - hence the electrical tape.  I do have these two cases coming in a week or two that I'll plan a little better and do a nicer job:
http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=380335740247&ssPageName=ADME:L:OU:US:3160
http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=330357824336&ssPageName=ADME:L:OU:US:3160

This is the charge board:
https://www.sparkfun.com/products/10401

Didn't notice the tape.

This charger is set to 500mah. See photos attached for 1amp:
« Last Edit: August 04, 2012, 07:52:42 AM by Breaktru Admin »

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #77 on: August 04, 2012, 01:26:44 PM »
Nice, thanks BT!

Offline vaporvolt

  • Jr. Member
  • **
  • Joined: Aug 2012
  • Posts: 6
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #78 on: August 13, 2012, 07:26:20 PM »
Great job.
Thank you very much for sharing. People like I used a lot of help.  :applaude:

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #79 on: August 13, 2012, 07:37:23 PM »
You wont' be able to get a 1 Amp rate out of that chip.  It will overheat and go into thermal limiting.  I know because I tried already.  You have to use the MCP73833 with the thermal pad on the bottom and it has to be soldered to a ground plane to act as a heat sink.  I've seen MCP73833 modules available from Adafruit.

The other option is to use a charger module that utilizes a switching regulator, they don't generate any notable heat, but they tend to be too bulky for an e-cig mod.

Yet another option is to simply use a charging connector in the mod with the charger electronics external to the device.  That's a good solution for dual series cells.

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #80 on: August 13, 2012, 07:47:01 PM »
Well it sound good looking at the Charger datasheet formula.
Nothing like real live testing

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #81 on: August 13, 2012, 08:01:04 PM »
Well, you might be able to milk it for a little more.  Just put an ammeter on the input with a 1k rate resistor.  Take note of the most current it will draw (there's very little overhead).  Highest heat occurs at lowest battery voltage.   Select a resistor for a charging rate just below its maximum.

I found its max rate before, but it was some ago and I dont' remember at all what it was.  I only remember it couldn't do a 1A rate.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #82 on: August 13, 2012, 08:02:00 PM »
Hmmm...changed the resistor this weekend and it didn't seem to complain although I didnt watch it that close. Charge time was reduced although without any timing or calculations to back that up.  The AC charger I use is .8A so maybe it just sneaks under from throwing it into thermal limit (or I just wasnt paying enough attention to notice) 8). Will look into that circuit, thanks for the tip Craig!

Taking the DNA out to put in a simpler mod this weekend, just the DNA and an LED voltage display with a 3 way switch so I can see either atty or battery voltage. 

Going to start breadboarding the next one, TI 4050C mod.  Not sure where I want to go with this one, but not in any hurry.  Was hoping to get some time to look into digital pots this weekend more than I did, seems like SPI is popular for interfacing them which may interfere with the interface for the OLED.

Also, been thinking about incorporating a low voltage cutout as well to protect the battery.  Simple enough to use a shunt reg diode and resistor for voltage detection, what to do with it from there I haven't figured out yet.  Could just drive a warning LED or to drive a logic high signaling the MCU to sleep but I'd like to cut out functionality altogether ensuring the battery can't go below the threshold. 

Just ideas I'm pondering but haven't had time to research yet.  My daughter made the Varsity volleyball team so much of my free time is shuttling teenage girls to and from practice. 

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #83 on: August 13, 2012, 08:10:35 PM »
Hmmm...changed the resistor this weekend and it didn't seem to complain although I didnt watch it that close. Charge time was reduced although without any timing or calculations to back that up.  The AC charger I use is .8A so maybe it just sneaks under from throwing it into thermal limit (or I just wasnt paying enough attention to notice) 8). Will look into that circuit, thanks for the tip Craig!

I'm curious to find out what amperage it is actually charging at. Can you place an amp meter between battery and charger leg?

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #84 on: August 13, 2012, 08:13:28 PM »
Sure, I'll do that when I open it up to move the DNA to another mod.

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #85 on: August 13, 2012, 08:24:56 PM »
If you select a 1k resistor, the rate will end up being regulated by the controllers built-in thermal limiting.  When the battery is low and the differential between input and output is highest, current will be lowest.  As battery voltage climbs, the chip will run cooler and may even hit the 1A rate for a time.

So, you'll see a reduction in charging time for sure, but I don't know, it's probably not a good idea to rely on the chip's thermal protection.  Better to set it to a rate you know it can handle.

That's the booster, right?  For a low voltage cut-out without an MCU, use a voltage detector and MOSFET.  If using an MCU, drive the LDO regulator's enable pin with a voltage detector.  If things are designed right, current draw well under a micro-Amp can be acheived.  My mod draws 250 nano-Amps when the low battery cut-out engages at 3.0 Volts.  Though that's a backup safety feature.  The MCU detects a low battery 3.3 Volts open circuit.  I was using 3.5V open circuit before, but recently changed it after I decided I wanted to milk the extra 50mAh out of it.

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #86 on: August 13, 2012, 09:07:13 PM »
I just re-read the datasheet for the charger and found this:
Programmable Charge Current: 15 mA to 500 mA

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #87 on: August 13, 2012, 09:23:20 PM »
Oh yea, I might be wrong about all that, oops.  I was messing with an MCP73833 in an MSOP package as opposed to the DFN package.  Both are programmable to 1 Amp, but only the DFN package has the thermal pad so only the DFN package can handle the 1A rate.

It may be possible the 73831 will not go over 500mA regardless of the rate resistor.  On the other hand, that spec might just reflect what it's rated for.  Someone will have to put an ammeter on one with a 1k rate resistor to say for sure.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #88 on: August 14, 2012, 10:41:23 AM »
Looking at the datasheet for the 73831, its a CC/CV type charge circuit and I wonder if trying to boost the current will throw off the algorithm.  It also says that charging at 500mA is "Not production tested. Ensured by design."

Adafruit has the MCP73833 modules but they look to be a bit bigger as it has 2 jst connections. Default is 500mA but is adjustable to 1amp with a 1K thru-hole resistor and can also use a thermistor for temp monitoring during the charge. 
https://www.adafruit.com/products/259

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #89 on: August 14, 2012, 11:24:35 AM »
Looking at the datasheet for the 73831, its a CC/CV type charge circuit and I wonder if trying to boost the current will throw off the algorithm.  It also says that charging at 500mA is "Not production tested. Ensured by design."

Adafruit has the MCP73833 modules but they look to be a bit bigger as it has 2 jst connections. Default is 500mA but is adjustable to 1amp with a 1K thru-hole resistor and can also use a thermistor for temp monitoring during the charge. 
https://www.adafruit.com/products/259

I've use this one at 1 amp for my MCU Nokia mod: http://goo.gl/07sWv
but since replaced it w/ a 500mah DNA charger that is much smaller due to space confinement.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #90 on: August 14, 2012, 02:12:22 PM »
The evolv charger is small, what IC does it use? I like the one from Spark as it uses the CC/CV charge cycle which is supposed to be better for preserving the longevity of the batteries (like a Pila charger for IMR's).

Craig, something like the NCP/NCV300 series from On Semi?  Those seem very accurate, low Q current and manage hysteresis well.  Would that be sufficient to drive the gate of a P-channel mosfet without a lot of extra components?

Offline CraigHB

  • PV Master
  • *******
  • Joined: Nov 2011
  • Location: Reno, Nevada
  • Posts: 2023
  • Karma: +243/-1
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #91 on: August 14, 2012, 03:44:45 PM »
Yes, those are the voltage detectors I use, NCP300.  One can drive a MOSFET no problem.  For a 3V cut-out, you'd want to use a NCP300LSN30T1G with an N-Channel or a NCP300HSN30T1G with a P-Channel.  Don't use a pull-up or pull-down on the MOSFET gate or regulator enable pin othwise you may get additional active draw.

The data sheet indicates 250nA active draw, but I'm getting less than that, 150nA.  I get 250nA total when active with leakage from the rest of the circuit as measured by my Extech MM570A meter.  It's a top-of-the-line meter with the resolution and accuracy to measure currents that small.

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #92 on: August 14, 2012, 04:52:01 PM »
The evolv charger is small, what IC does it use? I like the one from Spark as it uses the CC/CV charge cycle which is supposed to be better for preserving the longevity of the batteries (like a Pila charger for IMR's).

I have 4 of the evolv chargers and each one has a different number on the chip. Must be evolv's ref number. Google returns nada on the the number.
I've used the Sparkfun's charger on my first USB and commented about it's Pre-Conditioning feature.
I was thinking about cutting it down in length by cutting the board just above the (+) and (-) wire holes, removing the top portion w/ the JST connector.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #93 on: August 14, 2012, 07:28:23 PM »
I was thinking the same thing BT since I don't use the connector, just lop off the top above the two thru hole connections to save space. Preserves the mounting hole as well. 

I've kinda hijacked your thread here BT, sorry about that.  I'll start a new one for the next mod.


Offline poorboy

  • Sr. Member
  • ****
  • Joined: May 2012
  • Location: Manila, Philippines
  • Posts: 60
  • Karma: +9/-0
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #94 on: August 16, 2012, 08:25:53 AM »

Taking the DNA out to put in a simpler mod this weekend, just the DNA and an LED voltage display with a 3 way switch so I can see either atty or battery voltage. 

I'm thinking about doing the same thing. Im planning to use a 3way switch but im thinking i might damage the dna cause the negative for Vin and Vout are seperated. Is it ok if we wire it altogether with the negative wire from the display?
« Last Edit: August 16, 2012, 08:33:05 AM by poorboy »

Online Breaktru

  • Administrator
  • PV Master
  • *****
  • Joined: Nov 2008
  • Location: NY
  • Posts: 3299
  • Karma: +784/-4
  • Gender: Male
  • PLEASE participate in this forum
Re: DNA 12 Evolv w/ an MCU
« Reply #95 on: August 16, 2012, 08:50:16 AM »
I'm thinking about doing the same thing. Im planning to use a 3way switch but im thinking i might damage the dna cause the negative for Vin and Vout are separated. Is it ok if we wire it altogether with the negative wire from the display?

Not having the actual schematic for the DNA and that a member tied the negatives together and damaged the DNA, I would stick to the DNA wiring spec's.

Offline poorboy

  • Sr. Member
  • ****
  • Joined: May 2012
  • Location: Manila, Philippines
  • Posts: 60
  • Karma: +9/-0
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #96 on: August 16, 2012, 09:25:50 AM »
Is there a way we could use the display to show battery charge and atty?

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #97 on: August 16, 2012, 09:50:08 AM »
I hadn't heard that about the DNA being damaged by joining the negatives from the in and out.  The switch I bought from digikey has 6 terminals, in this case both pos and neg for atty, battery and display.  It's a 3 position switch so I plan on having it wired in a atty - off - battery configuration and the negs for battery and atty won't be connected through the switch at all.  The display is just a 3 digit voltage display I got from Madvapes.  Should be easy enough. 

Here's the switch, DPDT on-off-on: bit.ly/P0xhDN

Offline poorboy

  • Sr. Member
  • ****
  • Joined: May 2012
  • Location: Manila, Philippines
  • Posts: 60
  • Karma: +9/-0
  • Gender: Male
Re: DNA 12 Evolv w/ an MCU
« Reply #98 on: August 16, 2012, 10:17:52 AM »
Hi sychro, can you do little diagram on how you'll have it wired? Im confused.

Offline synchro

  • Full Member
  • ***
  • Joined: Jul 2012
  • Posts: 43
  • Karma: +11/-0
Re: DNA 12 Evolv w/ an MCU
« Reply #99 on: August 16, 2012, 11:14:52 AM »
If you look at the datasheet for that switch here: bit.ly/SrF12n

On the second page is the schematic for the DPDT version.

        +       -
Pins 2 and 5 to the display
pins 1 and 4 to the battery
pins 3 and 6 to the atty

With this switch configuration, position 1 would send atty volts to the display, position 2 would be off, position 3 would be battery voltage to the display. Pos and neg for both atty and battery can be switched in while being kept isolated from each other avoiding the problem reported with the DNA. 

Breaktru Forum  |  eCigarette Forum  |  Modding  |  Topic: DNA 12 Evolv w/ an MCU
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!