Programming question

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

jakeshivers

Active Member
Joined
Oct 21, 2009
Messages
36
Reaction score
0
Location
Denver
Calling all nerd-geeks. I'm working on an automated brew system similar to that of Deep Six and a few others on here. I know there are a few people doing the same thing, as well.

Where do you get your temp gauges? I looked for some code or a plug-in online but came up with nothing. I don't think .NET has anything useful for this either. Any help would be awesome. Thanks!

http://johnbeere.com/rig/DSC00630.jpg
 
ah you want a nice temp gauge graphic with a line pointing to the proper value. well assuming your a programmer you could make the graphic with a bmp. then use LineTo to draw the indicator. you know at what angle 0 should be and what angle the max reading should be .. should be a simple linear interpolation to figure out where the line should point.
 
yeah, that's exactly what I want. I was just hoping there was something else already done for me. I'm not too artistic.
 
I don't think you need to be super artistic here. You could just draw the whole thing in code, Thats probably what I would do, since then you could draw tickmarks VERY accurately... Otherwise, just pop open MSpaint.
 
I recently re-did mine for the BCS using the <canvas> html element. It was very easy to use. They also offer some gradients, so you can make shadows, etc. If interested, you can log onto the demo unit and 'view source'.

guage.jpg
 
I recently re-did mine for the BCS using the <canvas> html element. It was very easy to use. They also offer some gradients, so you can make shadows, etc. If interested, you can log onto the demo unit and 'view source'.

guage.jpg

Does this involve AJAX controls? I can't currently log into the demo page for some reason.
 
I say skip the guages all together. I used the space on my system for GREAT BIG NUMBERS that I can see from anywhere. I only have 7" of space on my screen though. The gauges to me are gimmicky.... There is a reason the digital clock was invented.

Good luck either way. Just thought I would throw in my perhaps not so helpful $.02:mug:
 
I say skip the guages all together. I used the space on my system for GREAT BIG NUMBERS that I can see from anywhere. I only have 7" of space on my screen though. The gauges to me are gimmicky.... There is a reason the digital clock was invented.

Good luck either way. Just thought I would throw in my perhaps not so helpful $.02:mug:

haha! now why the hell didn't I think of that? Occam's Razor at it's finest
 
Which programming language are you working in?, if Java I have a gauge bean that might be usefull. I am interested in your approach to the automation and brewing hardware controls. My software currently integrates the recipe construction with the automatic control functions and automatic shut down on alarm conditions.
 
Which programming language are you working in?, if Java I have a gauge bean that might be usefull. I am interested in your approach to the automation and brewing hardware controls. My software currently integrates the recipe construction with the automatic control functions and automatic shut down on alarm conditions.

That sounds very interesting. I am (and after some discussion with Jake so is he) working in Visual Basic. When you speak of recipe construction I assume you are using exports from BeerSmith. Is that correct? I am doing the same. I also have automatic on/off features however, I have yet to get to the point where I have programmed in faults that would alarm and pause the sytem. I would be interested in hearing which situations you have coded to halt the system and why.
 
On the chance that you want to use .NET 3.5 and the WPF, codeplex has a dashboard/gauge suite here that I've used before (not for brewing, but for work). You could use either the dial control or the wall-thermometer control.

I've gotta say, the databinding in WPF is pretty badass. The learning curve with the way XAML interacts with C# is a bit steep, but once you figure it out it's like manna raining down from heaven.
 
I am working in Java as a prototyping platform and will change over to either C++ or VB soon, the graphics rendering engine in Java has serious memory control issues. The recipe builder uses SQL tables to hold ingredient and recipe component tables which allow you to build your recipe and observe the results with the recipe color presented to compare with style color range. As the recipe is built the malt quantities and selected mashing steps are used for the water calculations and system control settings. I am just completing the export-import code for saving the recipe data in a CSV format file. When the recipe data is complete all you have left is to load the malt bill and hops then hit the automatic sequence start, the rest of the operation is fully automatic.
 
I am working in Java as a prototyping platform and will change over to either C++ or VB soon, the graphics rendering engine in Java has serious memory control issues. The recipe builder uses SQL tables to hold ingredient and recipe component tables which allow you to build your recipe and observe the results with the recipe color presented to compare with style color range. As the recipe is built the malt quantities and selected mashing steps are used for the water calculations and system control settings. I am just completing the export-import code for saving the recipe data in a CSV format file. When the recipe data is complete all you have left is to load the malt bill and hops then hit the automatic sequence start, the rest of the operation is fully automatic.


Sounds sweet. Screenshots?
 
I am working in Java as a prototyping platform and will change over to either C++ or VB soon, the graphics rendering engine in Java has serious memory control issues.

Which rendering engine are you using?

I've written a lot of java code, and use a lot more, and haven't had any issues like that.
 
I am using the default rendering engine, the main problem is it appears to allocate memory then loose the pointer to the allocation so the GC can clean it up. The regular stack memory GC works fine but every time a new image is rendered the memory use increases and does not decrease after disposing the frame that it was in. The only method that has been reliable for memory recovery was to Iconify the frame and let the OS GC recover the memory. The compiled base code for the program is a bit over 4MB and running it consumes about 65 - 70 MB on startup, after Iconify it reduces to about 40-45MB then slowly climbs back to 70MB. Profiling the code has not revealed any memory leaks in the code so far and the GC is working normally, so the only area left is the rendering engine, which I am not the only one having this type of problem. The current program is built on 2 frames with 6 tabbed panes each, about 35 threads for the various classes with looping events, Jtables for point data presentation and manipulation, popup keyboard and number pads for data entry, SQL tables for data storage, and round dial gauges that are switching between analog points for visual display of values. With the system designed for unattended operation there is an alarm class that monitors the events and variables and delivers audible alerts and performs the necessary shut down procedures based on type of event. This entire program has been designed for use on a touch screen panel PC with 256MB memory and a 500 MHZ processor with an ethernet connection to the rs485 interface for the Opto 22 hardware. With close to 60 points under control this application is a bit more than what is needed for the traditional 3 vessel RIMS/HERMS system.
 
I really like the look of the BCS demo, but the code was somewhat tough to decipher. Since eccsynd offered up his code as an example, I did some reverse engineering and cleaned it up a little. Here is a demo that should be reasonably easy to follow:

Gauge Demo

I made two styles of gauges based on the BCS code. They look pretty sharp, IMHO! I will likely incorporate the code into my brew rig monitoring solution. With a little more work, one could easily make the code a bit more elegant. Options to specify the scale and tick mark intervals would make the gauge code much more useful.
 
I hate raining on peoples threads, but do it a lot ;-)

Analog gauges, IMHO are vestiges from an earlier time. Why use a dial gauge with a digital system? Consider digits and a temp bar (i.e. mercury up a tube) if you want something to look at comparatively. If you do this, no custom controls needed and very simple ui and coding.
 
First, it's a fun challenge. Second, it looks good. Third, you can do whatever you want with your system.

The OP wanted a gauge. That's what we gave him.
 
Analog gauges, IMHO are vestiges from an earlier time. Why use a dial gauge with a digital system? Consider digits and a temp bar (i.e. mercury up a tube) if you want something to look at comparatively. If you do this, no custom controls needed and very simple ui and coding.

I Could also go out and buy a 2009 VW Beetle, but I choose to own a 1973 model that me and my dad customized. It has analog gauges, and in my opinion, they just look cooler.
 
First, it's a fun challenge. Second, it looks good. Third, you can do whatever you want with your system.

The OP wanted a gauge. That's what we gave him.

Fair enough. It wasn't a hundred percent clear if the OP was bent on a simulated analog needle gauge. I was just throwing the option of a bar type gauge. I work around process equipment all the time and many use that style of display. That said, didn't mean to offend just offer an easy option.
 
I Could also go out and buy a 2009 VW Beetle, but I choose to own a 1973 model that me and my dad customized. It has analog gauges, and in my opinion, they just look cooler.

That's an idea, reface an automotive gauge and drive it through an available analog output???
 
I really like the look of the BCS demo, but the code was somewhat tough to decipher. Since eccsynd offered up his code as an example, I did some reverse engineering and cleaned it up a little. Here is a demo that should be reasonably easy to follow:

Gauge Demo

I made two styles of gauges based on the BCS code. They look pretty sharp, IMHO! I will likely incorporate the code into my brew rig monitoring solution. With a little more work, one could easily make the code a bit more elegant. Options to specify the scale and tick mark intervals would make the gauge code much more useful.

Good looking gauge. Now you got me looking at that BCS vs using a LabJack.
 
That's an idea, reface an automotive gauge and drive it through an available analog output???

I love it...would be easier with a modern drive by wire car, but gack, what a perverse idea. Someone please do it...perhaps old airplane gauges...and maybe a stick shift to change the steps in your brewing process, perhaps using an actual car horn to trigger alarms when some important event transpires...next stop fermenting in an old gas tank, those things are easy to get and hold big volumes!

(sorry i got away from myself, i really do like the (perverse) idea of using actual car gauges...)

:mug:
 
I hate raining on peoples threads, but do it a lot ;-)

Analog gauges, IMHO are vestiges from an earlier time. Why use a dial gauge with a digital system? Consider digits and a temp bar (i.e. mercury up a tube) if you want something to look at comparatively. If you do this, no custom controls needed and very simple ui and coding.

A friend of mine does fuel cell research. He added some to his software as a quick and dirty demo. People got pissed when he took them out, so back in they went.
 
The auto/analog gauge idea would be lots of fun. If anyone makes it work, be sure to post pictures and a short "how-to."

I updated my code to make it more robust. You can now create custom numeric ranges, labels, and tick marks. The gauge code is now contained in a separate script file (gauge.js) to make it more portable/useful. Use the link above and "view source" to see how it works. My apologies for the lack of code comments.

As long as eccsynd is cool with it, feel free to use or modify the code I adapted from his project.
 
Hey you guys I have a quick, somewhat unrelated somewhat pitiful question...

What is the best major to pursue to in order to learn stuff like this? I did six years in the navy and currently working a decent full time job and going to school, currently for computer science. This is the type of stuff that interests me but I honestly just do not know if CS is the right degree. I have some programming experience, mainly VB, VBA, and some basic, basic scripting skills that I have put to use in a various work related projects that I started myself. I am just trying to get an opinion from the pros who have been there and done that before I get a degree in something that is not what I expected it to be. Thanks!
 
For my touchscreen, I used C++ Builder and a component library called iocomp, because I had them available...

The gauge is just an image with an needle overlaying it, scaling it correctly was a little tricky, but not too bad...

It's still work in progress.....

touchscreen.jpg
 
Hey you guys I have a quick, somewhat unrelated somewhat pitiful question...

What is the best major to pursue to in order to learn stuff like this? I did six years in the navy and currently working a decent full time job and going to school, currently for computer science. This is the type of stuff that interests me but I honestly just do not know if CS is the right degree. I have some programming experience, mainly VB, VBA, and some basic, basic scripting skills that I have put to use in a various work related projects that I started myself. I am just trying to get an opinion from the pros who have been there and done that before I get a degree in something that is not what I expected it to be. Thanks!

Partly depends on what you like to do. Computer science, the way it should be taught, isn't about computers so much as it's about using computers to solve problems, or to more effectively study other areas. Like Dijkstra said, "Computer Science is no more about computers than astronomy is about telescopes." Programming tasks will generally be high-level and fairly abstract.

Computer engineering classes will put you more in line with embedded development. Lots of logic, basic circuit construction, signals & systems, control theory, etc. It's just a bit more on the electrical engineering side of computer science.

All of this varies by school though, so you're best off talking with the advisors and as many graduate students and professors as you can at your school to get an idea of how the particular curriculum works.

Personally, I do embedded software and FPGA development for an optics shop-- high speed laser communications, mostly. I have a degree in CS that's serving me well because I'm the only guy in the building who thinks "above the wires" and so I've found a bit of a niche as a system-level software guy; that said, it was (and still is) a LOT of work to bring myself up to speed on things like high-speed signal paths, and I wish I'd taken more classes from the EE and math departments.
 
Partly depends on what you like to do. Computer science, the way it should be taught, isn't about computers so much as it's about using computers to solve problems, or to more effectively study other areas. Like Dijkstra said, "Computer Science is no more about computers than astronomy is about telescopes." Programming tasks will generally be high-level and fairly abstract.

Computer engineering classes will put you more in line with embedded development. Lots of logic, basic circuit construction, signals & systems, control theory, etc. It's just a bit more on the electrical engineering side of computer science.

All of this varies by school though, so you're best off talking with the advisors and as many graduate students and professors as you can at your school to get an idea of how the particular curriculum works.

Personally, I do embedded software and FPGA development for an optics shop-- high speed laser communications, mostly. I have a degree in CS that's serving me well because I'm the only guy in the building who thinks "above the wires" and so I've found a bit of a niche as a system-level software guy; that said, it was (and still is) a LOT of work to bring myself up to speed on things like high-speed signal paths, and I wish I'd taken more classes from the EE and math departments.

Most of my computer learning comes from having a problem to solve. You want to learn how to program? Program. Find something you want to accomplish and go for it. Google and online groups are your friend.
 
Gauges
I've used Dundas Gauges under .Net and C#. They are really nice. Every kind of radial dial you could think of.

Engineering
I have my own consulting engineering business. Mostly, I do electronic design (analog & digital) with an emphasis on embedded processors. I write firmware. I also do some Solidworks mech design when needed, and also C# PC software for interfaces to my electronics (general visibility into the system as well as customer-spec'ed interfaces). I am fairly successful at this.

I originally enrolled in a CS program, but somewhere in the middle of a COBOL class I realized that CS wasn't going to let me get my hands dirty. I ended up switching to electrical engineering and found it was my true calling. I haven't "worked" a day in my life.
 
Partly depends on what you like to do. Computer science, the way it should be taught, isn't about computers so much as it's about using computers to solve problems, or to more effectively study other areas. Like Dijkstra said, "Computer Science is no more about computers than astronomy is about telescopes." Programming tasks will generally be high-level and fairly abstract.

Computer engineering classes will put you more in line with embedded development. Lots of logic, basic circuit construction, signals & systems, control theory, etc. It's just a bit more on the electrical engineering side of computer science.

All of this varies by school though, so you're best off talking with the advisors and as many graduate students and professors as you can at your school to get an idea of how the particular curriculum works.

Personally, I do embedded software and FPGA development for an optics shop-- high speed laser communications, mostly. I have a degree in CS that's serving me well because I'm the only guy in the building who thinks "above the wires" and so I've found a bit of a niche as a system-level software guy; that said, it was (and still is) a LOT of work to bring myself up to speed on things like high-speed signal paths, and I wish I'd taken more classes from the EE and math departments.

Find out what you want to do from an academic orientation. If there is no money and you care, change and pick another concentration. Find what you care about and change YOUR WORLD!

... This comes from a masters candidate in Public Administration. I got my BA in Political Science and love working in construction. Maybe one day I'll find a way to both pay the bills and satisfy the mind, but I'm enjoying life.
 
Here's what I have so far. I took a lot of ideas from a friend that I met on here. I don't have dials because i'm doing it in VB (windows forms). My next release will be a web app.

mail
 

Latest posts

Back
Top