First State Brewers Blog

Homebrewing club for the northern Delaware area

Archive for the 'Tech geeks' Category

Mindless Movie

Thursday, October 25th, 2007

BrewzNET20071012Since you all are suffering my Tech Geek posts about my user interface for my planned computerized homebrew system so well, I thought I’d take it a step beyond my screenshots to a little “in action” action. The screen capture was encoded with the Microsoft MPEG-4 v2 codec, and I know it works with Windows Media Player v11 (what we have). If it turns out you guys can’t see it or play it, or really want a different codec, I can try again. Otherwise try saving it to your harddrive and opening it with WMP.

BrewzNET video #1

The video basically shows the use of design control points, resizing the various objects that are available, playing around with pipe routing and styles, and a quick demonstration of the alpha-level support, which is not 100% at this point - I make the fermenter vessel partially transparent by setting the alpha channel for one of the color properties. I used a crappy freeware video capture application, so the framerate blows… but you get what you pay for, and you guys still will get the idea on how the screen designer is gonna work.

You may not care, which is fine too.

On the homebrewing front - I haven’t really brewed much. We did a saison (10 gal) a couple weekends ago, which is ready for transfer to secondaries, and I bottled 10 gallons of Choking Sun Stout on Monday - But I haven’t really put much thought into brewing more batches, namely because I have so much beer on hand as it is. I will probably brew some Black Honey Ale and a Coffee Stout sometime soon, but no firm plans on when. To be honest, the price hikes for malt and hops have seriously got me rethinking the frequency with which I brew. I have a decent supply of base malt and hops now, so I’ll probably burn through that over the next 6 months just to reduce on-hand inventory.

More tinkering

Saturday, October 13th, 2007

BrewzNET20071012So I managed to get my prototype components worked into the main application after a couple hours of playing around. I fixed several issues, and found about 20 more that need attention.

I expect that this will go on for some time - but the results should be good. As you can see, I’ve put in placeholders for a component list on the top right side, and a combobox that will display the current component and its associated icon. I will ultimately put some tabs at the top of the development area to allow flipping between the graphics screens and events designers… I need to work on getting the refresh code optimized and hiding the component properties that I don’t want to show up in the PropertyGrid too.

So much to do…. but that is a good thing, I guess.

Program Progress

Thursday, October 11th, 2007

I have been writing computer code since I was 10, pounding away on the keyboard of my dad’s Atari 800 back when BASIC came on a cartridge, and programs were stored on audio tapes. Computers and programming have always made sense to me, and I’ve been blessed with a unique capacity to discern what applications are doing. I exercise that ability every day in my job, diagnosing problems with SAP which (more often than not) are the result of users not understanding or misusing the system rather than the sytem doing something unexpected.

Visual Studio 2005 IDESo why the history lesson? Because I suprised myself recently, or more specifically the power of Visual Studio 2005 suprised me. For months I have been struggling with how to implement some design environment functionality for the BrewzNET software I’ve been working on for over a year. In fact, I took a several month hiatus during July-Oct and have not written a single line of code in that time - until this week. It is amazing what happens when you walk away from something and come back to it with fresh eyes. The primary concepts I struggled with (and prompted me to walk away) were how to implement the component and property list functionality when setting up a sculpture interface - namely how to make them look similar to the VB2005 IDE, which I feel is fairly user friendly and intuitive. I could write mountains of code and build custom components to do that, but the effort involved did not seem worth it.

PropList DemoFast forward to Tuesday evening, when I was bored and playing around, only to discover a standard out-of-the-box component I was not familiar with - The PropertyList. It is exactly what I needed, and is (I believe) the same component that the VS2005 studio uses. SCORE! So how hard is it to use with my already-developed display classes for pipes, tanks, labels, etc? A single line of code implemented 75% of the functionality I was looking for - and the remaining percents are due to poorly designed object design on my part (and relatively straight-forward to resolve). The result speaks for itself - a flexible and professional looking property editing list. It works very well with the control-point functionality I had already implemented, and seems to update itself automatically when properties change.

Toolbox DemoInspired by my newfound functionality, I endeavored to unlock the secrets of the component toolbox list. A quick SPY++ look at the VS2005 component list yielded the class name of “TBToolBox”. At first that didn’t mean alot to me, and I checked for a “toolbox” component hoping for a similar eureka! moment as with the PropertyList. Alas, it did not happen. Instead, I reanalyzed the name, and realized that the “TB” at the beginning of the class name stood for “Toolbar”. Voila! 10 minutes later, I had a prototype component list that looks strikingly similar to the VS2005 one.

So with some hesitation, I declare “GAME ON!!” for my control system development again. I hope to have a screen design environment completed by the end of the year, perhaps with some of the event model code completed as well. I have a short overnight business trip to CII scheduled for early November, so I may have time to code while en-route and Thursday evening. 5 1/2 hours in the air each way to Austin - YUCK.

Gratuitous Customization

Sunday, July 15th, 2007

While I haven’t been working much on the sculpture development platform much recently, I haven’t been idle. In fact, I’ve been getting to know the inner workings of .NET a little better by taking on some completely unnecessary and extremely difficult customizations to standard user controls. I had a large library of control modules in VB6 that allowed me to do all manner of amazing things with simple controls like Tabstrips and Edits (Textboxes)… and with .NET that library evaporated. The tabstrip and textbox are the first I’ve tried to tackle, and while they are only partly complete right now - the really hard stuff is behind me.

Tweaked-out TextboxI started with some of my favorites - a textbox that includes a line number tray AND provides complete control over text and selection colors. The number tray is complete, as is the custom selection color. It responds to the mouse gestures as it should, and scrolls appropriately. I have not gotten around to keystroke redraws yet, but since the VB6 version has the requirements pretty much captured - I do not see it being an issue.

So what would that be useful for? In the development platform, it could be used for displaying action scripts, and when syntax checking is generated, it could help the user find the “errors” by calling out specific line numbers. In the sculpture control app, it could be used for printing out error messages or something.

Tweaked-out TabstripThe second item is the tabstrip - I don’t much care for the way a standard tabstrip is rendered, and while .NET makes ownerdrawing the “text” part of the tab areas easily, you have no control whatsoever around the “frame”. After a little effort, I figured out what it takes to override and draw the tabs, as well as the little child window that lets you scroll through them. I haven’t settled on exactly what I want the tabs to look like, but once I do - I can now make it happen.

I love how much power .NET has built into it, but I find that many of the items still require resorting to the Windows API calls, or at least that is how I have tackled (being somewhat ignorant of all .NET’s capabilities). Dealing with structures in the API calls seems a little problematic for me, but I’m sure its simply a lack of experience.

So anyways - that’s only barely related to brewing. I did brew 20 gallons of IPA this weekend with my friends Brian and Chris - turned out to be 1.074, and we used 1.5 pounds of hops… was killer. Its downstairs chugging away in the primaries.

Sod’s Law

Sunday, June 17th, 2007

…Or as we refer to it in the US, Murphy’s Law, was definitely in effect for my trip to Fayetteville. I won’t recount the whole experience, but needless to say I will never fly through Charlotte again if I can help it, particularly on US(eless)Air. I put some highlights of the business trip debacle at the end of this post, so you can read the good stuff and then listen to my whining (if you are interested in doing so). Man, do I hate business trips.

Proof of Concept - Point AlignmentSo at any rate, I did none of the things I wanted to on that trip. I am lucky to have just survived it. The past couple of nights I have worked out a demo for part of my missing pipe functionality - a routine that aligns the defining points for a pipe routing and will re-align everything if one of them is moved. In the screenshot, point 8 (in blue) is moved by either right-clicking in the new location, or holding down the right mouse button and dragging the mouse around. This will ultimately translate into clicking and dragging the pipe control points around (See Memorial Day Activities for some screenshots regarding the control points). I have made the VB2005 source code available if anyone is interested in trying it out.

Pressure sensor test standThis weekend I also got something working that I have been meaning to - the pressure sensor proof-of-concept circuit. I am stunned by how well the MPX5010GSX fits the system requirements - simplicity is a beautiful thing. For the test circuit, I ended up using a PICAXE 18X although I could have managed it with an 08M or 14M. I will have to decide how I want to implement when it comes time to print the circuit boards, but for now I’ll punish my 18Xs a little more. I did opt to test out the smaller 2-channel analog-to-digital chips (MCP3202) since the SPI communication protocol is a little different than for the 4 or 8 channel versions.

Pressure sensor circuitI included some captions in the picture so you can tell what is what… hopefully.
 
Pressure DataThe data sent back to the PC indicates that I probably won’t even need to use the AD620 instrumentation amplifiers. In the screenshot to the left, Channel 0 is the digital temperature sensor, and Channel 1 is the pressure sensor (as I am slowly letting the liquid level drop). I wouldn’t really need to amplify the signal more than 1.2 to 1.5X of what the raw reading is, and I’m not sure that the amplification would really buy me additional resolution. A simpler design means fewer things that can crap out when in use. Again - I *LOVE* these MPX5010GSX sensors.

Hot Liquor TankSo how do I plan on working the pressure sensors into my sculpture design? It just so happens that my test rig was put together with a very specific layout for one reason - it directly mirrors the physical orientation of my new 28 gallon Hot Liquor Tank. It has a site glass fitting (brass right now, soon to be replaced with stainless) that has a 1/2″ threaded plug on one end. I plan on drilling a hole in a stainless 1/2″ plug, and having the pressure sensor right there at the end of the site glass fitting. The circuitry will most likely be in a small sealed stainless project box, with only a wire/cable running back to the main control board.

And now, let the whining begin:

  • My flight from Philly to Charlotte was late in departing, and arrived at the gate 10 minutes AFTER my connecting flight was supposed to depart. That was OK though - the connecting flight was ALSO delayed.
  • Connecting flight to Fayetteville is cancelled after waiting 2 hours. We are told to go to the “Customer (Dis)Service desk and rebook.
  • 150 people in line before me at the US(eless)Air Customer (Dis)Service desk - Quick head math tells me I will talk to someone in about 4 hours, at which time no more flights out will be available (not to mention everything being booked solid from the other 150 people going first).
  • We quickly call our company travel agent and get booked on a flight to Raleigh. We fly into Raleigh without incident, and drive down to Fayetteville (about 60 minute drive, not bad).
  • We arrive in Fayetteville at 10:30pm, a full 5 hours later than anticipated, without our luggage, and immediately go to bed.
  • My luggage arrives in Fayetteville the following day, but my collegue’s bags get sent to Raleigh for some ridiculous reason. Baggage (Mis)handlers strike again!
  • I’m so tired on Tuesday from the previous day’s ordeal (and working a 10 hour day at the plant) that I eat a quick dinner and pass out at 8pm. I wake up at around midnight and realize no coding is gonna happen for my brew sculpture on this trip.
  • Wednesday our departing flight out of Fayetteville gets cancelled 10 minutes before we’re supposed to board. Fortunately this time around I didn’t try to check my bag, so we get booked out of Raleigh direct to Philly.
  • We go rent ANOTHER car (since we had turned in the previous one hour earlier) and drive to Raleigh, catch the flight in plenty of time, and get to Philly around 9:45pm.
  • Driving home on I-95, I hit the road construction around 476 (exit 7), and sit in bumper-to-bumper traffic as they squeeze 3 lanes down into 1.
  • I arrive home at 10 minutes to midnight, a full 5 hours after I was supposed to.

Under Pressure

Sunday, June 10th, 2007

…So this weekend I finally got around to doing something that I have been meaning to for some time - Building a test rig for the MPX5010GSX pressure sensors. You guys have already seen my temperature sensor test rigs in previous posts like Electromadness Continues, and I’ve had the pressure sensors for a while but have not actually done any testing with them yet. Instead I have been pondering how to proof the concept of pressure level sensing, and build accurate test circuits.

Pressure Sensor Test RigI built the mechanical portion, as shown in the picture. The 28 gallon (~100 L) kettle is included for a scale comparison. It consists of a plastic 1/2″ T, plenty of 1/2″ vinyl tubing, an old brass drain valve (long since replaced with stainless in on my kettles), and a wood support. This will let me test the pressure sensor with a very small amount of water, as opposed to filling up and draining 28 gallons at a time (not like that was ever even considered).

Sensor picThe circuit portion is going to require a little more time. First I need to find and purchase a 4 or 6 socket header that I can plug the sensor… I will run some wire back to a breadboard, and from there use my AD620 instrumentation amplifier IC to make it full-scale. I am thinking of taking it from the AD620 through a 12 bit SPI Analog to digital IC (MCP3202) and then to a 08M PICAXE chip. I haven’t worked out details, but I should have enough inputs and outputs on the 08M to bit-bang the SPI protocol and implement an interrupt / serial communication back to a master PICAXE chip when requested. If not, I’ve got a couple of the 14M chips that will definitely have enough power to do so - or I may even try playing around with the 28X1 and 40X1 parts that have native SPI support - haven’t really decided yet.

I also did some minor work on the VB.NET user interface - mostly getting the basic functionality for the “Designer” control to work. The biggest gap at this point dragging the pipe points around the screen, but I have a plan on how to do that. Cut/Copy/Paste is all working, the Zorder (bring forward/send back) is all working, as is shift-dragging and ctrl-dragging. Soon I’ll start work on the designer form (not just the control that displays and implements the changes). I don’t have any good / new screenshots to share, but I hope to complete a good quantity of work this week while on a business trip to Fayetteville. Once the workday is over and we’ve eaten dinner, I plan on locking myself in my room and working on the application rather than killing time, money, and brain cells in an overpriced and understocked pub. Seeing as Fayetteville is a military town, I do not have high hopes for the local craft brew scene.

Other things beer-related from this weekend:

  • I racked 10 gallons of Witbier to secondaries, 5 gallons of which went onto about 5lb of cubed mangos (the “Mango Mama” witbier).
  • I participated in the 2007 BUZZ-Off Competition and took 2nd place in the Belgian Dubbel category for Travellers & Tourists (TnT). My amarillo pale ale did well too (38.5), but did not place.
  • I carelessly broke my favorite belgian glass (a Dogfish Head tulip glass, given to me by Sam Calagione at a book signing) and they are not made any more - DRAT!

The unfortunate demise of my tulip glass is most tragic. You were good to me - RIP.

Goodbye old friend

Memorial Day Activities

Monday, May 28th, 2007

I can’t say that I’ve been really busy this memorial day, but I have gotten some stuff done. Probably the biggest thing was brewing 10 gallons of Witbier, at least half of which will go on to become Mango Mama” witbier (a fruit witbier with… uh… mangos). The brew day went resonably well, although I did stick the sparge pretty good after about 3 gallons. More hot liquor, a good stirring, and a second vorlauf later it sparged flawlessly.

Witbier Yeast Culture10 gallons of Witbier fermenting…

Wyeast 3864I also am getting activities queued up for next weekend, when I will brew 10 gallons of belgian pale with - Wyeast’s Canadian Belgian Strain!!! WOOOT! I stopped by Joe & Marlana’s shop (HDYB) on Saturday, only to discover that they had another (expired) package of this stuff in the fridge. Since I do starters, that didn’t slow me down one bit - I was so thrilled to get another pure culture of that strain. I brought it home, smacked it, and within 16 hours the package had started to swell. It is now downstairs on the stirplate propogating to a good sized volume for next weekend. I will then take the slurry from my 10 gallon batch and use it for 20 gallons of Travellers & Tourists Belgian Red in a few more weeks. YEAH!!! Next time that strain becomes available, I will probably get 2 or 3 of them - LOVE that yeast.

I have also been doing some work on the user interface program for the sculpture… but you all are probably not terribly interested in that. I’ve been trying to zero in on what the design behavior would be like for setting the screens up, etc… and I think I’ve arrived at a fairly user-friendly method. It will be mostly drag & drop, with many of the properties being set by simple mouse clicks. I’ve got the drag & drop working, and have the point control working pretty well for a number of different things. The drag and drop turned out really nice - I managed to get the images to show up partially transparent - looks much cooler than the “outline” style. Right now I’ve got control point manipulations drawing just the outline because it started to look a little jumbled with the translucent style. Screenshots are below.

Drag and dropControl points

My hope is that this stuff can be used as a development platform by other folks who want to do something similar for their sculptures - they won’t have to struggle as much creating the user interface and can focus in on all the more fun stuff, like the electronics and piping.

When the cat’s away…

Friday, May 11th, 2007

…I get time to work on my .NET application for the homebrew sculpture. This weekend Donna’s headed to Atlanta to spend mother’s day with her family, and I am taking today off work to watch the kids (and for the rest of the weekend). I am actually pretty excited about it - Once the children go to bed, I can now work on my program without feeling guilty that I’m not spending quality time with Donna. I also thought I would have 4 hours a week to devote to this activity while Donna was taking Pipe Welding courses at Delaware Tech, however they cancelled the course on her due to lack of participants!! We’re trying to find other ways for her to practice TIG welding so her skills don’t get rusty.

test applicationUpdates to the PipeRenderer class
So slowly I’ve been building up the infrastructure for my application. I could probably have expedited development if I had used cut & paste coding methods or a number of dirty tricks that I’ve learned over the years, but an important aspect of this project for me is actually learning the VB.NET language and becoming proficient in it. I spent enough time on the Visual Basic Forum answering questions on VB6 to know that people who don’t really struggle to learn something and have other people answer all their questions never retain the knowledge offered… So here I am, a newbie at coding again in a familiar (but very different) language.

You probably don’t see much in the way of progress looking at the screens, so let me enumerate exactly what has been done:

  • Additon of a ValveRendererc class, which still needs some work.
  • Addition of “bump up” and “bump down” styles for the unions on a pipe
  • Addition of a “rounded end” style for pipes
  • A “T” and “4-way” junction style for internal pipe unions in the PipeRenderer class
  • A completely back-buffered ComponentDisplay control that makes rendering and updating the displayed things a breeze.
  • Update event code in all renderers that notify the application when redraws are required
  • A means to save and restore the component information to a file

And believe it or not, that took quite some time… Worse yet, when I was going through the changes to the PipeRenderer class I felt compelled to completely rewrite if from scratch AGAIN and had to stop myself. I may still ultimately do that, but for now I’ve got too many other things to obsess on.

This weekend I hope to start work on:

  • The event model for dynamically changing component properties based on other component properties (ex. Pump1 gets turned “On”, so Pipe1 and 2 show themselves as liquid-full).
  • A drag & drop screen designer so building the component collections / screens is greatly simplified
  • Actual application windows that will be used in the final program, instead of just test windows.

Time will get away from me before I can complete all those things, but I’m going to try to get as much done as I can. I also still need to set up a test circuit for my MPX5010GSX pressure sensors and confirm they will measure liquid level with the kind of accuracy I am looking for. What will be really cool is if I have something to demo at Friday’s club meeting here - but I doubt that will happen.

Newark Rocks!

Monday, April 30th, 2007

OK, I’ll be honest - I’m not talking about the city in which I live. It’s cool and all, but I wouldn’t exactly say that it “Rocks”.

No, I am referring to Newark InOne… They are an electronics supplier that has just about everything under the sun, and for a pretty fair price too. This morning I ordered the following, and they have already shipped:

2 MCP3202 2-channel 12 bit A/D converters
2 MCP3204 4-channel 12 bit A/D converters
2 MPX5010GSX Motorola pressure sensors
2 AD620ANZ Instrumentation Amplifiers
2 LM331AN Voltage / Frequency converters

These are obviously purchases for the electronics components that will make up my homebrew sculpture - most notably the level sensor circuits. I am a little nervous as I am not convinced that it will work at all, but I’m not plowing new ground here… both Wicked Stone and Emile have done this with success before using these components (well… almost these components).

I also ordered some new PICAXE components this week… 2 of the new 28X1 chips and 2 of the 40X1 chips. I am very excited about the I2C slave functionality and built-in SPI support, as well as the internal resonators that eliminate the need for extra circuitry. Should give me plenty to play with down in the basement while the sun scortches thru summer.

On a non-nerd note, I have both the Amarillo Pale and Black Raspberry Ales on tap now - they are great individually, and magnificent when blended. Cutting the grass will be less of a chore for the next few weeks.