An Absurd Experiment - The Digital Boy

Status
Not open for further replies.

candre23

Ultra Member
ECF Veteran
Mar 12, 2010
1,185
23
NJ
chipandre.com
What started out as a thought experiment has now become an actual project which I may never finish. The idea was to come up with the most technically complicated mod I could. This is what I ended up with.

ridiculous.png


It's all based around the Arduino mini, which is basically a breakout board for the Amtel ATmega328 - a complete 16MHz 8-bit computer on a chip the size of your pinky nail. The Arduino will send a PWM signal to a FET, which will allow for adjustable vaping (in .1V increments) between 3 and 6 volts. The voltage setpoint will be adjusted by two tact switches. The Arduino will constantly monitor the voltage and adjust the PWM signal to maintain the correct output regardless of battery voltage. It will separately monitor the actual battery voltage and calculate a rough estimate of battery percentage remaining. The setpoint, battery voltage and battery percent will be displayed on a small 16x2 character alphanumeric LCD display. Other software features may be added if I can think of any and if there's any room left in the Arduino's 14k of usable flash memory. The device will be powered by two 3.7V batteries in series for a total Vin of ~7.4V. I'd like to use two 18350s, but if the circuitry ends up being too large, I may just go for two 18650s. I have no clue what sort of enclosure I'll end up using.

This is more of a learning experience for me than anything else. I've never done any microcontroller programming. I haven't done much programming at all in the last several years. The parts cost for this project are actually pretty low (only around $50), so this is a relatively cheap, fun way to try something new. And if it all works out, I'll have the most technologically advanced PV in the world.

What I would really like right now is for anybody out there with EE experience to look over the diagram and check my work. I have no idea what kind of FET I should be using for this. I do know I need one that can switch the positive leg of the atomizer, and that can be switched by applying positive voltage to gate. If no such animal exists, please tell me how I can rewire it so that it will work. I'm fairly certain I have the resistors for the voltage dividers the right way around, but that could use some checking too.

Once I'm pretty sure I've got it right (on paper at least), I'll start ordering parts.
 
Last edited:

karmatized

Unregistered Supplier
ECF Veteran
Mar 13, 2010
408
0
New York USA
www.happysmokes.com
you might run into voltage issues, a 12 x 2 is prob going to eat 3 - 5volts of power.
not including chip running at minimum 5volts by it self and extra led lights. That could mess with your actual vaping. You can do what i was planning and separate them into a different button. for example 1 button = vape and 1 button runs the chip but never at the same time so they dont eat from each others performance.

so far without even vaping you need 8 minimum - and 10 -17 volts max to run it judging by the specs on both a screen and the chip. so your gonna need another battery or possibly try a miniboost. But i cant tell ya what the Current is looking like.
 

Global_Apathy

Full Member
Mar 16, 2010
48
0
Wisconsin
using avr studio with winavr??? I'm still working on my Thesis project that utilizes a Atmega128. I have a bit of embedded experience... especially over the past couple of years. I can also say that if you have a large current drawing mod you are either going to need separate power supplies for the mcu and the load or a lot of capacitance. Now I believe a good place to start might be researching PWM motor driver boards... seeing as how they are high current inductive loads. You also might want to look into a TWI lcd... not so complicated and generally requires less over head... IMO easier to program.
 

candre23

Ultra Member
ECF Veteran
Mar 12, 2010
1,185
23
NJ
chipandre.com
so far without even vaping you need 8 minimum - and 10 -17 volts max
That's not really how electricity works. You don't "add up" the voltages. You add up the current, but the components I'm using are not very power hungry. The display only needs 1.5mA, and the Arduino itself runs on about 10mA, plus whatever the outputs use (which in this case, is negligible). A pair of 18650s could power the electronics alone for more than a week. Of course, the final device will have some kind of master on/of switch, so it won't be using any current when it's off.


I can also say that if you have a large current drawing mod you are either going to need separate power supplies for the mcu and the load or a lot of capacitance.
...
You also might want to look into a TWI lcd... not so complicated and generally requires less over head... IMO easier to program.
The Arduino itself requires very little power. I'm thinking that even under load, the battery shouldn't drop so low as to have the board crap out. I'm going to be doing a lot of testing on a breadboard before I solder anything, so I'll see then if it's workable as-is, or if I need some more work in the power department. As for the LCD, I had originally thought about using a serial-interface graphical display (smaller, and much nicer), but I think writing my own display driver is well outside my capabilities. This display uses a simple 4-bit parallel interface and there are already Arduino driver libraries written for it. Compared to a serial display, this is pretty much plug and play.
 
Last edited:

Global_Apathy

Full Member
Mar 16, 2010
48
0
Wisconsin
I've had embedded projects "crap out" when the load was turned on... lulz.. in that case there are low internal resistance batteries with a higher current output that might work as well. There are also inrush current stabilizing circuits.. or ye olde pi circuits... but pi circuits generally require large components.

You could also program a ramp up pwm with thermal feedback ... and then temperature control the whole thing with an rtd.

There was a posting that contained a link to a digitally controlled p channel fet somewhere in the mix of the modders forum.
 

candre23

Ultra Member
ECF Veteran
Mar 12, 2010
1,185
23
NJ
chipandre.com
Last edited:

StinkyMcghee

Full Member
Jan 15, 2010
8
0
New Mexico
Okay, this is a fantastic idea. I received an Arduino as a gift a few months ago, but I've only tinkered with it a bit, flashing little lights, driving little motors, etc. My problem is that I'm *way* better at programming than electronics (I'm an astrophysicist by trade, so numerical number-crunching is our bread-and-butter).

Only after starting to investigate various battery mods did it just occur to me to use the little guy as a variable voltage e-cig mod, which ultimately led me to this thread. Lemme know how this works out for you - I might just try building one of my own.
 

candre23

Ultra Member
ECF Veteran
Mar 12, 2010
1,185
23
NJ
chipandre.com
OK, I went ahead and ordered all the necessary components to start working on this beast. I went with the Arduino Duemilanove instead of the mini because it will be a lot easier to prototype with. If the project ever gets to the point where I actually want to build it into a case, I can get a mini then and still have the Duemilanove to play with.

I ordered the parts for two different power regulation schemes so I can see which works better. I got a 5A MOSFET which I will try to modulate with a PWM output. If that doesn't work, I also got a 5A variable voltage regulator which I will try to control with a digital pot over the SPI interface. Wish me luck.
 

petercro

Super Member
ECF Veteran
Dec 18, 2009
321
4
Brough East Yorkshire, UK
Since you a making the most technical mod ever.
I would like to through this into the mix.
Could you test the resistance across the cart filling?
If so.
When the filling is wet (fully juiced up) the resistance would be low.
If the filling were dry the resistance would high.

You may see where this is going!!!!!!!!!

Two ideas.

One. A red LED turns on when the cart needs re-filling.
Or
Two. A small pump re-juices the cart.

The PIC would come into play, because if a different juice were used with a different nominal resistance.
The resistance / re-juice level would have to be reset by the user and stored within the flash.
A reset button held closed of 10 seconds to instruct the pic to store the current resistance as the re-juice activation level.

Just a thought.
 

Rocketman

Ultra Member
ECF Veteran
May 3, 2009
2,649
977
SouthEastern Louisiana
peter,
great idea on active monitoring..
Juice resistance might be really high unless juice was doped with a conductor.
But, juice on the heater is a load, and keeps the heater from going nuclear (hot).
Active atty resistance monitoring (heater has a temperature coeeficient) could be calculated from atty voltage and current, an on-the-fly calculation would show loading.
Dry atty, heater temperature goes up, resistance goes up, piezoelectric pump taps a little juice to the heater.

What's that ticking noise? my automatic juicer :)......

Rocket
 
Last edited:

candre23

Ultra Member
ECF Veteran
Mar 12, 2010
1,185
23
NJ
chipandre.com
I definitely have some things I want to test out, and that's one of them. I'd also like to try a constant wattage mode in addition to the constant-voltage mode. In this mode, you would set a watt setpoint and the Arduino would measure the atty resistance before each drag and calculate the voltage needed to make that power level. That way, you could swap between different attys and not have to change anything.
 
Status
Not open for further replies.

Users who are viewing this thread