eCigarette Forum > Modding
DNA 12 Evolv w/ an MCU
CraigHB:
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.
Breaktru:
--- Quote from: synchro on July 24, 2012, 12: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.
--- End quote ---
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
poorboy:
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.
synchro:
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.
CraigHB:
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version