Ohm's Law Calculator

Status
Not open for further replies.

redz22

Full Member
Verified Member
Feb 2, 2014
57
33
Starkville, MS, USA
Hey guys. I have something I made for myself and thought I would share with y'all.

First a little background:
I am a mechanical engineering major at Mississippi State University. We have to take a programming class for the major which is where my knowledge comes from.

The program:
This is a simple program that will calculate the amp output of a coil build. Simple as that. If there is enough interest, I will develop it some more and fix a few bugs it might have at the moment. Right now, it is at version 1.0. THIS IS ONLY FOR WINDOWS COMPUTERS!

How to use:
First, you have to check one of the buttons, either watts or volts, whichever is easier for you. Second, just type in the number of watts or volts and type in the resistance of your build, then hit calculate. Simple as that. The program might crash if data is input wrong. I will fix this if there is enough interest in a later build. If it crashes, just reopen the program and try again. It should not crash if you select either watts or volts and type in numbers.

Download:
I'm using Dropbox for a file hosting client right now. I assure you there are no viruses. If somebody knows a file hosting client that checks for viruses, I will be glad to upload it and post the link from there. Here is the link to the first, and possible future builds:
https://www.dropbox.com/sh/06ed4pp2fv92s85/I17xW5Cy7p

Screenshots:
Screenshots are available in the dropbox link above. I have also attached them below.
Ohm's law.jpg Ohm's law solved.jpg

Versions:
3/22/14 - v1

Suggestions:
Please post any bugs or suggests you might have and I will do my best to implement the suggestion or fix the problem.
 

PaulBHC

Vaping Master
ECF Veteran
Jan 22, 2014
4,090
7,525
Arizona
What would help newbies is the mah of a battery and the length of life on constant output. Or puffs per minute to calculate how long a battery might last.

Example: My ego 650 lasts 4 hours average. If I get a mod with a 18350 at 700mah, how much longer will it last with the same topper. Then if I recoil up or down, how will that effect my vape time.

Keeping in mind the safety cutoff of regulated devices.
 

redz22

Full Member
Verified Member
Feb 2, 2014
57
33
Starkville, MS, USA
What would help newbies is the mah of a battery and the length of life on constant output. Or puffs per minute to calculate how long a battery might last.

Example: My ego 650 lasts 4 hours average. If I get a mod with a 18350 at 700mah, how much longer will it last with the same topper. Then if I recoil up or down, how will that effect my vape time.

Keeping in mind the safety cutoff of regulated devices.

I'm honestly not too sure on how to implement that. I think everybody's vaping style is so different that it would hard to get a general idea.
 

Ryedan

ECF Guru
ECF Veteran
Verified Member
Mar 31, 2012
12,869
19,652
Ontario, Canada
The program:
This is a simple program that will calculate the amp output of a coil build. Simple as that. If there is enough interest, I will develop it some more and fix a few bugs it might have at the moment. Right now, it is at version 1.0. THIS IS ONLY FOR WINDOWS COMPUTERS!

Suggestions:
Please post any bugs or suggests you might have and I will do my best to implement the suggestion or fix the problem.

Thanks redz22, it's neat to have a calculator you can use without having to go online. I would like the program more if when you check voltage and calculate, it would also fill in power and the other way around too.

It would be perfect if you could input any two values and it calculates the other two.
 

Ryedan

ECF Guru
ECF Veteran
Verified Member
Mar 31, 2012
12,869
19,652
Ontario, Canada
I'm honestly not too sure on how to implement that. I think everybody's vaping style is so different that it would hard to get a general idea.

It's easy if you don't try to model the process too exactly. I've done it in Excel. You've already learned everything you need to program it I think.

Just take a portion of the mAh and divide it by the current at say 3.7V (average battery voltage) to output minutes of continuous run time. If you want to get fancy you could have an input for puff length, divide the time by that and output a number of drags.

It would be a good addition to the basic calculator if you felt like doing it :)
 

mobydick

Moved On
Feb 16, 2013
0
0
montreal
www.ecigood.ca
  • Deleted by retired1
  • Reason: Unregistered supplier

redz22

Full Member
Verified Member
Feb 2, 2014
57
33
Starkville, MS, USA
Thanks redz22, it's neat to have a calculator you can use without having to go online. I would like the program more if when you check voltage and calculate, it would also fill in power and the other way around too.

It would be perfect if you could input any two values and it calculates the other two.

Yeah, that's one of the features I was going to include in it later on. I definitely want to add this.

It's easy if you don't try to model the process too exactly. I've done it in Excel. You've already learned everything you need to program it I think.

Just take a portion of the mAh and divide it by the current at say 3.7V (average battery voltage) to output minutes of continuous run time. If you want to get fancy you could have an input for puff length, divide the time by that and output a number of drags.

It would be a good addition to the basic calculator if you felt like doing it :)

I did not realize it was that simple. I'll have to add that!

I have been looking for it for a while. This is really cool! Thx!

No problem!
 

joecil

Super Member
ECF Veteran
Verified Member
Jan 9, 2014
565
203
Russell Springs, Kentucky
I found a problem in the calculations. If you use Wattage and Ohms to calculate the power is voltage not amperage. For example 12 watts with a 1.8 ohm coil shows 4.6475800154489 as Current (A) which should be 2.5833 as per several others I've tried it on. You can also see it by using 4.65 volts with a 1.8 ohm atty which then gives the 2.583 as Current (A).

Most of these you put in two pieces and it gives the other 2 pieces of data not just one.
 

redz22

Full Member
Verified Member
Feb 2, 2014
57
33
Starkville, MS, USA
I found a problem in the calculations. If you use Wattage and Ohms to calculate the power is voltage not amperage. For example 12 watts with a 1.8 ohm coil shows 4.6475800154489 as Current (A) which should be 2.5833 as per several others I've tried it on. You can also see it by using 4.65 volts with a 1.8 ohm atty which then gives the 2.583 as Current (A).

Most of these you put in two pieces and it gives the other 2 pieces of data not just one.

Thanks for letting me know! I'll get it fixed when I do the next version, which will either be tomorrow or Tuesday before I get time.
 

redz22

Full Member
Verified Member
Feb 2, 2014
57
33
Starkville, MS, USA
Alright guys, V2 should be up and running! It's in the same dropbox link with new screenshots. Here's a change log for it:

Redesigned Interface
Enter any 2 values and it will display the other two values up to 4 decimal places
It should not crash even if you enter text that is not a number
Tab now moves from text box to text box and to the buttons for ease of use
Accuracy of calculations should be improved

Thanks guys. Let me know if you have any further suggestions or bugs. The next version should have the battery life estimator in it.
https://www.dropbox.com/sh/06ed4pp2fv92s85/I17xW5Cy7p
 

kslice917

Senior Member
ECF Veteran
Apr 22, 2013
263
251
North Canton, OH, USA
Not bad! I know there are online anti-virus file scanners where you can upload a single file and it will check for viruses. But as far as a file host that hosts files WHILE checking them for viruses - well, I'm with you on that one...I don't know of any.

If you don't mind me asking, what language are you programming in? The GUI looks like it was designed in VB.NET, but could really be any VB-based language. Also a future suggestion (should you ever learn it) is to incorporate multi-threading so that it calculates the values in real-time. That is, as a user enters numbers it will display the results - no 'submit' button.

If you ever need any help with it, feel free to send me a PM. I'm versed in around 12 different programming languages at the moment. All of them are self-taught as it's actually a hobby of mine.
 

redz22

Full Member
Verified Member
Feb 2, 2014
57
33
Starkville, MS, USA
Works perfectly Redz and thanks for it as it will come in real handy for me.

No problem!

Works great :)

THX!

Thanks!

Not bad! I know there are online anti-virus file scanners where you can upload a single file and it will check for viruses. But as far as a file host that hosts files WHILE checking them for viruses - well, I'm with you on that one...I don't know of any.

If you don't mind me asking, what language are you programming in? The GUI looks like it was designed in VB.NET, but could really be any VB-based language. Also a future suggestion (should you ever learn it) is to incorporate multi-threading so that it calculates the values in real-time. That is, as a user enters numbers it will display the results - no 'submit' button.

If you ever need any help with it, feel free to send me a PM. I'm versed in around 12 different programming languages at the moment. All of them are self-taught as it's actually a hobby of mine.

It is Visual Basic. That sounds like an interesting idea, but I have no idea how to incorporate that. I might have to pm you about that.
 
Status
Not open for further replies.

Users who are viewing this thread