New to Arduino, Have what might be an over ambitious project NEED HELP!

Hello, everyone. I was recently asked if I could create an Arduino-controlled e-hookah. To clarify, this would be four heating elements controlled by four buttons, hopefully with some LEDS and pretty stuff like that. I'm new to Arduino as I said, and I'm not exactly sure how to go about it, which is delaying me from buying a board until I know what I need. Here's the specifics:

I would need a source for (4) 3.7 volt outputs(one to each heating element) and whatever I'd need to run the LEDs. I would probably need separate batteries for this, I know, but how would I control the voltage going to each heating element?
Beyond that(and being ambitious), how difficult would it be to make each output variable voltage, as in controlled by a dial, but within a given range(roughly 3-4.5 volts). I would like to add a low power cut off as well, but these things can wait until I figure out if it works at all!

I'm thinking of it as four separate circuits, basically. One circuit for each heating element each with a power supply.

So what I'm asking is: Is what I'm thinking possible? Can I control the voltage from a secondary power source? How difficult would it be, would four separate sources be necessary, and does having more than one heating element make it more difficult, if so, how much?

"Variable voltage" is done using PWM; see the reference page for analogWrite(). Using PWM you're pulsing power to the device between full off to full on in 255 steps, ~500 times a second.

If your heating elements need more than 20ma of current then you'll need to use a transistor. 20ma of current is the recommended limit for an Arduino output pin.

Thank you for answering the variable voltage question! I'm sure when I get deeper into this, I'll have a bunch more questions on that line.

My thought was to use disposable or rechargeable batteries to power the heating coils, not power them off the Arduino. What I'm not understanding is if there's a way to control the voltage in that system, to maintain 3.7 volts or thereabouts. I know I'll have to wire the grounds together. Would the PWM solution work there? I know people use secondary power for motors and servos and such...

As far as the 20 mA limit, I have literally no idea. I studied electrical systems years ago, but I've lost most of it. This is all the information I have: The battery I'm using to power one heating element now is 3.7v, 1100mAh, and the element has a resistance of 1.8 ohms. This is a preassembled unit, though, and using it for my project would be difficult and possibly dangerous(Lithium Ion and I have a bad history).
Sorry if I'm repeating myself or asking obvious questions, and since I'm going to be at this for a while, thanks in advance for the patience of everyone who responds!

NSullivan:
Thank you for answering the variable voltage question! I'm sure when I get deeper into this, I'll have a bunch more questions on that line.

My thought was to use disposable or rechargeable batteries to power the heating coils, not power them off the Arduino. What I'm not understanding is if there's a way to control the voltage in that system, to maintain 3.7 volts or thereabouts. I know I'll have to wire the grounds together. Would the PWM solution work there? I know people use secondary power for motors and servos and such...

As far as the 20 mA limit, I have literally no idea. I studied electrical systems years ago, but I've lost most of it. This is all the information I have: The battery I'm using to power one heating element now is 3.7v, 1100mAh, and the element has a resistance of 1.8 ohms. This is a preassembled unit, though, and using it for my project would be difficult and possibly dangerous(Lithium Ion and I have a bad history).

I'll assume that the 1.8 Ohms is the cold resistance of the heater. By Ohms law: Current = Volts/Resistance. The current drawn by one heater initially will be 3.7/1.8 =~2Amps. This will change as it heats up. Far too much for an Arduino pin to supply directly, but you could use a transistor.
I'd be looking for a powered solution instead of rechargeable batteries, but that's my preference.
But won't the vapour condense in the tube before it reaches the 'smoker'?

1.8 ohm nichrome is .18mm/33gauge/.007in wire. That's the size used in "e-cigarettes", and given the size of those devices it's not unlikely that 20ma might be a good place to start. Too much current and you'll burn the wire.

I'd suggest trying the nichrome coil with a 220 ohm resistor in series and connect that to the battery. See if it gets the coil hot enough but not so hot that it burns out.

Ideally you'd use a thermistor in contact with the nichrome coil (maybe even wrapped around the thermistor) for temperature feedback. Then you could feed the coil current until you reach the required temperature and then use PWM to back off on the current. The problem you have is that as soon as someone inhales the coil will cool off and you want to be able to ramp the temperature back up to compensate.

Sorry for the long post, two replies to respond to:
Chagrin:
I'm not building the coils, using commercially available coil/tank combination to keep production costs down. So inserting a thermistor into the setup really isn't an option. As far as the coil cooling, probably won't be an issue. They're not designed to stay on, they heat up enough for a single drag when the user presses a button and then cool between drags. They only heat while the button is pressed. The cycle(from my own use) tops out at about 10 seconds on, 50 seconds off. Also, the way I'm planning the system, each user will have their own coil and tank. That way each can have their preferred flavor and nicotine content. This lowers the chance of overheating the coils as well.

Henry:
Thank you for the Ohm's law calculation. I'm sure there's somewhere on the "interwebs" I could have gotten that, but I'm terrible at math and a touch lazy. I'm assuming that's the "cold" resistance, as well.

I've considered wall power, but two things make me think batteries first:
1: I have no idea how I'd do that. If you happen to know and would like to throw that info my way when the time comes, I wouldn't scoff...
2: There is a good chance this will become a "display item" for taking to bars(pubs for my new English friend) and showing off. I can't see them being too keen on me running experimental electronics from their wall source. Ideally, being able to switch between battery and wall power would be totally brilliant.

As far as the "vapor condensing" issue, I'm running experiments now on how long the tube can be before that becomes an issue. Luckily, I have many friends who indulged in "less than legal" recreation in their youths(unlike me, who never even drinks), so there is some backroom expertise on that sort of thing close at hand. I'm hearing that if the tube is narrow enough, I should be able to get a comfortable length without condensation.

I will be experimenting with all of this as time goes on, and hope to pick up my Arduino Mega end of this week, beginning of next. That leads me to another question: If I get all of this to work well, I'm hoping to make it a permanent system, how hard would it be to replace the Mega in the circuit with a Mini or Nano? Would it be a total rewrite of the program, a simple upload, or somewhere in between?

P.S. for Henry,
I successfully fought the urge to use every last bit of rhyming slang I know in this post.

I'm still pretty new to this stuff too, but with my limited knowledge this is my suggestion. lol
Whatever your power source is try running that through a voltage regulator. This one is adjustable with the right combo of resistors.

NSullivan:
The cycle(from my own use) tops out at about 10 seconds on, 50 seconds off. Also, the way I'm planning the system, each user will have their own coil and tank.

That's hardly in the spirit of a hookah.

That way each can have their preferred flavor and nicotine content. This lowers the chance of overheating the coils as well.

Not if each has their own coil but they all use a common tank.

Henry:
Thank you for the Ohm's law calculation. I'm sure there's somewhere on the "interwebs" I could have gotten that, but I'm terrible at math and a touch lazy. I'm assuming that's the "cold" resistance, as well.

If you're using an 1100mAh battery and each 'puff' is 10 seconds then we can do a calculation (more like an approximation) to see how long the battery will last.
10 seconds is 1/6th of a minute and is 1/360th of an hour.
You can expect to get about 1/2 the charge out of the battery before it needs recharging, so you've got about 550mAh to play with. 2A/360Hrs is about 5.5mAh so you should get about 100 'puffs' from each charge. I don't know if that's within your range of 'usability'.

I've considered wall power, but two things make me think batteries first:
1: I have no idea how I'd do that. If you happen to know and would like to throw that info my way when the time comes, I wouldn't scoff...
2: There is a good chance this will become a "display item" for taking to bars(pubs for my new English friend) and showing off. I can't see them being too keen on me running experimental electronics from their wall source. Ideally, being able to switch between battery and wall power would be totally brilliant.

I'm sure that could be done.

As far as the "vapor condensing" issue, I'm running experiments now on how long the tube can be before that becomes an issue. Luckily, I have many friends who indulged in "less than legal" recreation in their youths(unlike me, who never even drinks), so there is some backroom expertise on that sort of thing close at hand. I'm hearing that if the tube is narrow enough, I should be able to get a comfortable length without condensation.

But too narrow a tube will make it hard to draw.

I will be experimenting with all of this as time goes on, and hope to pick up my Arduino Mega end of this week, beginning of next. That leads me to another question: If I get all of this to work well, I'm hoping to make it a permanent system, how hard would it be to replace the Mega in the circuit with a Mini or Nano? Would it be a total rewrite of the program, a simple upload, or somewhere in between?

Depending on the size of your code, it would probably be possible. As for the rewrite, probably 'somewhere in between.' :slight_smile:

P.S. for Henry,
I successfully fought the urge to use every last bit of rhyming slang I know in this post.

I'm a Londoner born and bred, but not from the East End, so I'm not a Cockney. Rhyming slang is not my 'native tongue', but I understand some, although I'm not fluent.

Thanks for the detailed response, Henry!
As far as the approximation of battery life, I found a site where other people have actually figured out a pretty accurate formula for it. With that, and another site that calculates Ohm's Law, I've done some math(yes, my head hurts), and found the battery numbers I've been looking for. From what I can see, without any other type of draw on the battery, a 3.7 volt, 750mAh battery would last about 0.255 hours. Doesn't seem like much, but they also give you a way to translate that into actual use time:
B*3600/A=N
Battery life(B) in hours multiplied times number of seconds in an hour(3600) divided by average activation duration(A) equals number of activations before battery dies(N).
So on the given battery above, with an average activation of 5 seconds(my previous estimation was WAY off), that is 183.6 puffs.

Now, a new question: If I use a 9v battery, and use PWM to create an output voltage of 3.7(ish), would that improve/increase the battery life? My brain is telling me that if I'm turning the power on and off like that instead of running continuous voltage, I should increase the life by equal to the percentage of battery voltage I'm NOT using(i.e. if I were using 4.5 volts from a 9 volt battery, it should last twice as long as a 4.5 volt battery under the same load).
But I'm also as I said, no good at math. Can you confirm or disprove this theory?

On another note, bought my Arduino today. Decided to go with the classic Uno. Didn't have cash on hand for the Mega, but if all goes well, I'll be adding one of those to my collection eventually.

The Arduino uses a linear regulator, and with linear regulators any voltage above the regulated voltage is wasted as heat. There is no advantage to using a higher voltage power supply, battery or otherwise.

9V batteries have about a 600mah capacity. Generally just a poor choice of battery given their cost.

Also, batteries are typically rated for a 10 hour discharge. If you pull 60ma from a 9V battery you'll probably get around 600mah capacity, but if you pull 200ma you'll only get about a 500mah capacity. The faster you drain the less total amp hours you get.

So 9v isn't the way to go with this system. Got it.
Since a standard AA battery is 1500 mAh, I'm guessing some of those would be a better way to go.
I could use 4 AA to run the board.
For the heating elements, I'm going to regulate output to a constant 3.7v. Four AA will put out 4.5. Is there any advantage to adding more batteries than that into the element's circuit?

Sorry, have to correct myself! I can run the board with SIX AAs, not four. Also, THREE AAs will give me 4.5volts, not four!
That's what I get for writing tired!