Welcome to Vape.to ! Log in or Sign up to interact with the Vape.to community.

e-Juice mixing calculator - needs testing

Discussion in 'Vape DIY Juice / Recipes / Mixing' started by GiselleAf, Jan 9, 2016.

  1. GiselleAf

    GiselleAf New Member

    Messages:
    3
    Likes Received:
    0
    I wanted an e-Juice mixing calculator that provided a little more than I could find on the web, so being a programmer, I wrote my own. It is (of course) free, and I will eventually make it 'open source' (so programmers can both see the code and use it for making their own version).

    What I needed in addition to what I could find was that the calculator would support telling the user not only the mix of flavor, nicotine and PG/VG, but break it down further into flavor, nicotine, PG and VG (separately for the last two). In order to calculate the breakdown between PG and VG it requires information on the mix of PG/VG used in the flavor and the nicotine. Once it has those numbers, it can report numbers (ml or drops) for all 4 ingredients. I also wanted a text based report that summed up the information, to allow easy copy/pasting to forums.

    I call it eJuMiCa (E-JUice MIxing CAlculator). Here is how it looks.

    [​IMG]

    ..and the Report (available from the menu) looks like this:

    [​IMG]

    If I can get it working on PCs (it is written in Java, so should be OK to run on OS X, Windows, Linux & Unix based machines), I might rewrite it using the Google Web Toolkit, which will make it available on the net for phones, tablets and PCs. But first I need to be confident that it is:

    • Working according to need
    • Useable (by people other than me - it is easy to write software that the.comthor can use, but a lot harder to write software that anyone can use).


    Are there any folks that can give it a test and report back their findings and comments?

    Things I'd like to know:

    • Is it useable, or a complete mystery to behold?
    • Does it give correct results? (Seems so to me, but needs more testing)
    • Does it require more help, and if so, should the help be tool-tips, or a more formal 'help document' that appears in a free floating dialog?
    • Does it need more features? One thing I was thinking of is the ability to save and restore the info. in the top section.
    • Are the error messages comprehensible, and do they give enough info,?
    • While the main GUI gives quantities in ml or drops, the Report provides only drops. Would people need an option for making the report show mls instead? (Are there people that mix juice according to mls?)
    • Do the gradations for the spinners and sliders make sense? The sliders are integer based with a minimum step size of 5. Most of the spinners have a step value of one, except the Milliliters of Juice to mix, which has a step value of .05 (to allow adjusting the total by one drop at a time).

    To test it, you'll need a desktop PC with Java installed. The app. itself can be downloaded from my cloud drive (named JuiceMixingCalculator.jar).

    I myself would be .comtious about running code from a source I did not know well. So in an attempt to remedy that (at least a little) I am active on Stack Exchange under my own name, Andrew Thompson. Here is my FaceBook page (where you can see both the 'Defy!' Avatar I currently use at Stack Exchange sites, as well as the 'Imp' Avatar I use here).


    Sample Reports

    Say you have a flavor doubler that comes in PG/VG at 50/50. The nicotine is 36 mg/ml in PG/VG at 90/10. You need 10 ml of mixed eJuice with a final level 12 mgl/ml nic. & PG/VG ratio of 60/40.

    Code:
    * eJuice Mixing Formula *
    
    ** Starting Ingredients **
    Juice Strength: 	50.00
    Juice PG/VG: 	50/50
    Nic. Strength: 	36 mg/ml
    Nic. PG/VG: 	90/10
    
    ** Mix Requirement **
    Volume: 	10.00 ml
    Nic. Strength: 	12 mg/ml
    PG/VG: 	60/40
    
    ** Mix Formula **
    Flavor: 	100 drops 	Flavor target mix met.
    Nicotine: 	67 drops 	Nicotine target mix met.
    PG: 	10 drops 	PG target mix met.
    VG: 	23 drops 	VG target mix met.
    You have a flavor tripler that comes in pure PG. The nicotine is 100 mg/ml also in pure PG. You need 10 ml of mixed eJuice with a final level 16 mgl/ml nic. & PG/VG ratio of 70/30.

    Code:
    * eJuice Mixing Formula *
    
    ** Starting Ingredients **
    Juice Strength: 	33.30
    Juice PG/VG: 	100/0
    Nic. Strength: 	100 mg/ml
    Nic. PG/VG: 	100/0
    
    ** Mix Requirement **
    Volume: 	10.00 ml
    Nic. Strength: 	16 mg/ml
    PG/VG: 	70/30
    
    ** Mix Formula **
    Flavor: 	67 drops 	Flavor target mix met.
    Nicotine: 	32 drops 	Nicotine target mix met.
    PG: 	41 drops 	PG target mix met.
    VG: 	60 drops 	VG target mix met.
    And here is a slightly more interesting one. You have a flavor doubler in pure PG. Nic. is 18 mg/ml in pure PG. You need 10 ml of mixed eJuice with a final level 12 mg/ml nic. & PG/VG ratio of 100/0.

    Code:
    * eJuice Mixing Formula *
    
    ** Starting Ingredients **
    Juice Strength: 	50.00
    Juice PG/VG: 	100/0
    Nic. Strength: 	18 mg/ml
    Nic. PG/VG: 	100/0
    
    ** Mix Requirement **
    Volume: 	10.00 ml
    Nic. Strength: 	16 mg/ml
    PG/VG: 	100/0
    
    ** Mix Formula **
    Flavor: 	100 drops 	Flavor target mix met.
    Nicotine: 	178 drops 	ERROR: Could not meet nicotine target.  Use stronger nicotine!
    PG: 	-78 drops 	ERROR: Could not meet PG target.  Use less VG!
    VG: 	0 drops 	VG target mix met.
    As is hopefully clear from the messages beside the Mix Formula entries, this cannot be done be.comse the nicotine is too weak to give the required 12 mg/ml. Fixing the first error in the table should help fix problems for entries that come after it.
     
  2. Plupjese

    Plupjese New Member

    Messages:
    3
    Likes Received:
    0
    Hell of a lot of drops in 200ml
     
  3. I don't waste time mixing small amounts, so quantities in MLs works better for me.
     
  4. gottcha

    gottcha New Member

    Messages:
    6
    Likes Received:
    0
    It would be nice to have the option of using ml's or drops. I'll be trying some DIY once my nic arrives and would be mixing small amounts to start with till we find what we like.
     
  5. Corn

    Corn New Member

    Messages:
    7
    Likes Received:
    0
    Seems to work OK. Tested with the mix I made the other day and the numbers came out the same as I worked out using another calculator.

    I would suggest changes to the juice setting though. Use increments of 0.2 not .05 as the syringes most people use only have these increments and it is almost impossible to accurately measure anything less (not to mention painfully slow using the scroll-bar to adjust).

    On the report side of things, 'Juice strength' is probably a bit misleading. For one I would include it as a %, second the 17% I have used was a concentrate, how it appears may be interpreted as 17% of 1:1 (or weak as piss) whereas it is actually about 350% strength.

    Other than that, nice and simple and appears to work well.

    [​IMG]

    [​IMG]
     
  6. somebrony

    somebrony New Member

    Messages:
    6
    Likes Received:
    0
    That's two people wanting mls, so I'll put it in as an option to choose between ml & drops (I figure the report is a little too many words to add another 'column' to the output). If the majority of people think mls are more useful, it will be the de.comlt.

    Thanks for your input! :)
     
  7. Kyrix

    Kyrix New Member

    Messages:
    7
    Likes Received:
    0
    Another vote for the option to show either mls or drops, with mls the de.comlt. And another vote for increasing the increment on the spinners that use 0.05. For the 'Millilites of juice to mix', I'd think an increment of 1.0 would be the most useful. Do people make final mixes in fractions of a ml?

    An option to save the current settings as a de.comlt would be nice.
     
  8. darl

    darl New Member

    Messages:
    6
    Likes Received:
    0
    Nice one, not sure if you've allowed for it, but drop differ in volume depending on the item dripped from. So you need to be able to vary the number of drops per ml... But imho, drops are not accurate, so I always use ml's
     
  9. lexxkos

    lexxkos New Member

    Messages:
    4
    Likes Received:
    0
    Standard syringes are in increments of 0.2 so this would be ideal especially for smaller batches. Depends on the person mixing though
     
  10. propecia

    propecia New Member

    Messages:
    7
    Likes Received:
    0
    Excellent.



    OK, I have to agree that the increments of that spinner are even beginning to irritate me! I would like to 'have my cake and eat it too' though, so I'm thinking of adding a control beside (or above) it to change the increment value. How about I offer .05, .2 and 1, with the de.comlt being .2?



    So instead of 'Juice Strength: 17.00' are you suggesting 'Juice %: 17.00' or just 'Juice: 17.00 %', or am I getting this wrong and you mean a doubler might be represented as 'Juice Strength: 2.00'? Sorry, but I've been up around 20 hours now and I'm getting a little fuzzy on logic. :p

    Thanks for your helpful insights thus far. :)
     
  11. unLimit989

    unLimit989 New Member

    Messages:
    4
    Likes Received:
    0
    A nicotine strength of 48mg/ml is also needed.
    I buy this from Indigo Vapor USA - canukNic.
    Trying it out on Linux - everything else seems to be working ok.
    Copy and paste report in Linux doesn't work - won't allow right click copy after highlighting text.
    Maybe print to file or pdf needed.
    Definitely mls in reports as de.comlt - not drops.
    Thanks for making the prog cross platform compatible - not many out there.
     
  12. bujol

    bujol New Member

    Messages:
    6
    Likes Received:
    0
    eJuMiCa version 0.2 is complete..

    1. Added radio buttons to select between 'mls' & 'drops' in report. The de.comlt is milliliters, since most people seem to prefer that.
    2. Added 'Copy' button for report. It might not be more successful than selecting and copying the content of the text area, but if it fails it should provide reasons.
    3. 48 mg/ml nic. added to 'Common Nicotine Strengths' drop down.
    4. Added a 'Juice volume increment' drop down to allow 5 ml, 1 ml, .2 ml and .05 ml. It de.comlts to the (much less irritating) 1 ml.
    5. Printing - implemented something better, see 'Formatted Report' menu item. It will export a report to the browser (using proper headers, tables etc.) that is printable.

    To Do. Save/restore recipes (look for that in version 0.3).

    Formatted Report example

    [​IMG]

    New version of Report

    [​IMG]
     
  13. fabigazel

    fabigazel New Member

    Messages:
    4
    Likes Received:
    0
    Yeah, a doubler is effectively 200% or 2:1. Theoretically you want your final juice strength to be 100% ie 1:1.

    It might make sense to some people and not to others. Personally I see 17 (%) and see 17% of 1:1. Maybe change the wording from Juice strength to something else might make it clearer :shrug:
     
  14. Ferygon

    Ferygon New Member

    Messages:
    5
    Likes Received:
    0
    On the basis that mls are more accurate, and the drop size might vary with the ratio of PG/VG (making the calculation torturous) I figure it is better to just use mls if concerned with accuracy.

    Note that while ml in the reports goes to 2 decimal places, I chose to round off the drops to an integer value. Milliliters has become the de.comlt for the text report. Both mls and drops are included in the formatted report.
     
  15. Invetaneata

    Invetaneata New Member

    Messages:
    5
    Likes Received:
    0
    It's good, vaporific - nice and simple. Just a comment on wording.

    On screen in the starting ingredients, you refer to "flavor" (common flavor strengths, flavor base % etc). However, in the "Starting Ingredients" for both reports, it becomes 'Juice'. I think that's the .comse of the confusion? The reports would be clearer if the starting ingredients referred to 'Flavor %' and 'Flavor PG/VG'?
     
  16. jerky69

    jerky69 New Member

    Messages:
    6
    Likes Received:
    0
    @Vaporific - Thanks for the changes in v0.2 (48mg nic and copy button/paste of report to gedit - both now work OK.).

    I used to program 30 odd years ago and there was always some P.I.T.A. who wanted something else !

    Here I am.

    1. Editable 'Name of Mix' at top of Mix Page and Report Print Out - eg: Steamers Plime Doubler 9mg 50PG50VG
    (this will probably be the name of the recipe file when saved in your upcoming v0.3)
    2. On reports please change 'Juice Strength' label to 'Flavour Strength'.
    (also 'Juice PG/VG' label to 'Flavour PG/VG' - it has already been mentioned by someone else)
    3. Option to add up to 3/5 flavours and their names - eg: JFG Peach ???

    I currently have to use an old eJuice mixing program called 'EZ-Mix' (windows based) in Wine on Linux - this might give you some idea of the layout I am talking about.

    Thanks for all your time and effort going into this - I know what it takes to make just the smallest of changes and programmers are rarely understood about all their time they put into a working proggy.
     
  17. sarg

    sarg New Member

    Messages:
    7
    Likes Received:
    0
    eJuMiCa v. 0.3 has arrived!

    1. Changed descriptions in Report and Formatted Report from 'Juice' to 'Flavor' to avoid confusion. Expanded some of the other labels.
    2. Save/Open/Manage recipes menu items.
    3. Added check-box menu item to allow 'Custom Title' for the 'Formatted Report'. If checked it will prompt the user for the title of the mixing calculator report.
    4. Help menu item.
    5. Updated to the native 'look and feel'. On Windows it will aim for a Windows 7 look, on OS X it would use the Aqua look and feel, and on Linux/Unix it would use CDE/Motif or (more likely) GTK. The only reason I was using the de.comlt Java 'Metal' look and feel was be.comse it made the text report look nice in that the columns of descriptions and values were (mostly) aligned. This component is only intended for use when copy/pasting to forums though, and there it will format as well as the browser formats it.
    6. Added blue/white cloud icon as seen below. Will only show on Windows and Unix/Linux - OS X does not support application icons and the simplistic code used here will not get the user a Dock icon.
    7. Improved style sheet for formatted report and help page
      • Removed slight blue tinge from table values
      • Gave faint green BG.
      • Changed font to sans-serif (undecorated)
      • Added print stylesheet that establishes print font as serif (decorated) and hides links and 'please consider trees' message. If we can't save the trees, at least we'll spare some ink.

    [​IMG]

    Downloadable from the link in my sig.
     
  18. lymngell

    lymngell New Member

    Messages:
    7
    Likes Received:
    0
    It seems it was me that was talking nonsense, that some people couldn't make sense of it. btobw warned me of a word mismatch that I had seen 100s of times and failed to actually notice!

    Mentioned in the top point of the version 0.3 release announcement above. Hopefully it will make more sense to everybody now.
     
  19. tAlbertinaWeeksa

    tAlbertinaWeeksa New Member

    Messages:
    5
    Likes Received:
    0
    I'm not entirely sure what you mean by that. Is it covered in the recent updates? If not, could you expand on it?

    By '3/5' I guess you mean '3 to 5' as opposed to '60%', but after that I get a little fuzzy..

    ______________________________​

    Oh, and I've made a stylistic choice to use the shorter American spelling 'Flavor' as opposed to 'Flavour'. I hope no-one is .comght up on British spelling.. be.comse, tough - that ain't changin'. No more than I'd be willing to change milliliters to fluid ounces (shudder).

    I'll use the best of both sides of the Atlantic - American spelling (shorter) and French metric units (which go up & down in nice multiples and are therefore easy for calculations).
     
  20. faizeq

    faizeq New Member

    Messages:
    7
    Likes Received:
    0
    I've had a quick look, Vaporific. I like the changes :) A couple of suggestions, but nothing major. I'm sure you'll feel free to ignore me !

    • When you open a previously saved file, both the window caption and the button say 'Save'. It's a bit counter-intuitive, since you're opening, not saving; I did a double-take, thinking I'd accidentally selected the wrong option.
    • When a recipe is saved, is it possible to save the 'Juice Volume increment' at the same time? Alternatively, "remember" the increment between sessions.
    • Also "remembering" the setting for the custom heading would be nice; I'd be inclined to de.comlt this to checked anyway.
    • In the 'Final mix' section, I think the comments would be easier to read if you removed the word 'mix' (for example, 'Nicotine target met', rather then 'Nicotine target mix met')
    • I'm vaguely wondering if the screen would be clearer if 'pairs' of controls (where you have both a drop-down and a spinner) were side-by-side.

    The first time I opened and saw 'flavor', I gritted my teeth and made a conscious decision to ignore it :D

    I confess I haven't read all your help, but I'm sure it's excellent :friendly_wink:
     
Loading...

Share This Page