Wednesday, April 9, 2014

Low Volume Automatic Maple Sap Evaporator

Sugaring for the Common Man

Introduction

It seems to me that the thorniest problem for very small volume maple sugaring (a few gallons per year) is the evaporation step. Gathering the sap can be a rather pleasant walk in the forest. Watching sap boil can get slightly tedious after a few hours. And if you leave it and get distracted, disaster is not far behind – especially if this is taking place on the kitchen stove. I resolved to do better.

This season, I built a high-efficiency, automatic filling, electric evaporator with a timer and a low level shutoff. My wife thinks it looks like something Rube Goldberg would come up with if he wanted to make soup in a toilet, but it is working extremely well. Here is a picture:



Safety Considerations

The system I built is never going to get approved by UL or the CSA. All the more reason for you to take safety extremely seriously. You are building and using this evaporator at your own risk and if you don’t feel comfortable doing this you probably should not be. I am pretty with building and tools and if you are making your own maple syrup, you probable are too. If not, you might want to partner with someone who is. But here are some really important guidelines:

  •  Use this unit only when plugged into a GFI outlet. Any outdoor outlet should already be GFI protected and if not, the outlet should be replaced and tested. Please, please, please – do not violate this guideline. The penalty for violation of this recommendation could be death. Think about it.
  • Use this unit ONLY outdoors and away from anything flammable. I don’t expect a fire, but you never know. Maple Sugar will burn and so will the wooden box around the boiling chamber. Also, there is 115 Volt power next to lots of wood. Wood is a pretty good insulator as long as it is dry which it might not be the case when the unit is outside. And the unit should only be used outside.

Overview

My evaporator consists of:
  • A Boiling Pot. This is a very cheap 12 quart stock pot with an electric hot water heating element mounted through the side as low as possible in the pan.
  • A wooden case to hold the pot and the various accessories described below.
  • A float system to switch power to a small pump when the sap level gets low in the boiler.
  • An inexpensive “fountain pump” in a 5 gallon bucket with a tube running into the boiling chamber.
  • A low sap level safety shutoff system. This is a fulcrum under the wooden case that tilts if the sap level gets too low, thus throwing a safety shutoff switch.
  • A timer so that the time duration of operation can be limited.

That’s all there is to it. But even so, I will elaborate below.

The Boiling Pot

I wanted my Boiling Pot to be simple, inexpensive, reliable and efficient.

I purchased a cheap12 Quart stock pot and the heating element for a hot water heater. I managed to find one similar to one I found on Amazon called the “Good Cook Stock Pot”.  Purchase the hot water heater element from Lowes or the local hardware store. Be sure to get one for 110-120 Volt operation. In addition, I needed a large, very thick washer and a nut that would secure the heating element to the stock bot. I purchased the washer at my local hardware store, but it was a little bit too small, so I had to file out the inside slightly with a curved file (or rattail file) until it would slip over the threads of the heating element.

The 1.25” nut was pretty tricky. “Rich” at the hardware store finally sold me a fitting for 1.25” electrical connector which included a nut with the correct threads. Here is a photo of the electrical fitting I bought. I used the nut from this on the heating element. You do not see the nut in the image because I used it before I took the photo:


With these parts, I was ready to mount the heating element into the stock pot. I cut a 1.25” diameter hole as low as I could in the side of stock pot. It helped that my stock pot was extremely cheap, but even so, this was a challenge. I started by drilling a small hole at the center of where I wanted the larger hole. Cutting a piece of 2x4 to the exact diameter of the pot and putting it under where the hole would be allowed me to have something behind the metal that was getting drilled. Once I had the small hole, I drilled ever larger holes until I had one that was 3/8 inch diameter. From here, I removed the piece of wood and started using a sabre saw with a very fine blade. I drew a ring of the correct diameter and drilled toward the ring from the hole. Careful here. It is really easy to go outside the lines and if you do, the pot is ruined. When the hole was almost large enough, I started using a small grinding wheel on a hand held rotating tool (Dremel tool or similar) until the edges were smooth and the hole was large enough.

The image here shows (not very clearly) the inside of the pot with the washer and nut over the heating element. The arc that runs from top to bottom is the junction between the sides and the bottom of the pan.

At this point, fill the pot with water to make sure that it does not leak.

My calculations are that my boiling pot will boil away about 2/3 gallon per hour, assuming 100% efficiency. I am sure I am not getting 100% efficiency, but I think it is close to that – about .06 gallons per hour.

In theory, this boiling pot is useful by itself. Put a couple of gallons of sap in it, connect a 115 V wire to it and plug it in. You will hear it start to heat the sap. In a few minutes, the sap will be boiling. Keep refilling it and make sure that the sap level keeps the heating element covered. But, if you let the heating element get uncovered (or apply power before you put the sap in), the heating element will burn out almost immediately.

The Wooden Case

As we said above, the boiling pot would work by itself if you were to run a wire to the heating element, but if that is all you plan to do, you might just as well have purchased an electric hot plate. (Not a bad idea actually, but get the highest wattage you can find.) The wooden case is there to provide a place to mount all the other features.

I made mine into a 14” cube from some half-inch plywood that I had sitting around. I cut a circular hole in the top large enough for my stock pot to fit through. I used a router to cut the hole, but a saber saw would work almost as well. You have to tilt the pot as you are inserting it to get the heating element to fit through the hole in the top. On mine, the handles of the pot rest on the sides of the top suspending the pot in the box. I recommend half inch plywood so that it is strong enough to hold the other parts of the system.

I will leave the exact size and design of the box up to you. I included ¾ x ¾ inch pieces of pine scraps inside at the edges to give myself something to screw into. After a few days, I also added handles to the sides of mine to make it easier to move around.

The Float System

This is the part of the system that does the most for convenience. You can put about 2 to 2.5 gallons into a 12 quart pot and you need at least a gallon or a gallon and a half of sap to cover the heating element. If you don’t watch it carefully, the sap level will go down and expose the heating element and the heating element will quickly burn out and also ruin the sap. The float system solves this.

Our float system consists of a copper toilet float-ball (Available from Amazon), a wooden tower with a lever arm at the top and a replacement “sump pump” float switch (Lowes: ProPlumber Plastic Float Switch). I wired this to a standard 115V outlet that the pump can be plugged into. I used heavy wire to connect the lever arm to the sump pump switch. I used a 12" long piece of ¼” threaded rod to connect to the copper float and I ran this threaded rod through an eyelet on the lever arm. I used “Binder Clips” (available from Staples) on the threaded rod to set the on and off points over and under the eyelet on the lever arm. Using binder clips makes it easy to adjust the switch points. I also used some very heavy wire to place a guide loop under the lever arm that keeps the threaded rod close to vertical as the float moves up and down. To install or remove the float/threaded rod, I unscrew the threaded rod from the float.  I know this sounds complicated, but it should be pretty clear when you look at the image  below:

I purchased a cheap “Water Garden Fountain Pump” from Lowes. I put this into a 5 gallon food safe plastic bucket (Lowes again), plugged this into the outlet and ran some tubing from the pump to the boiling pot. My pump used the same tubing as I used when tapping my trees.

Voila! Whenever the sap in the boiling pot goes down enough to trip the float switch, the pump goes on and refills the boiling pot. When the level gets high enough, the pump shuts off.

I figured that this is enough to let the system run for about 6 – 8 hours without attention. But I wanted a margin of safety, so I set up a second bucket with a siphon between the two buckets. This doubles the capacity. Of course, there is no limit to the number of buckets that could be added to the supply in this way. Here is a photo of my supply system:

Safety Shutoff System

I am a naturally cautious guy and the float switch / refill pump system just looked like it a area where a lot could go wrong. I designed a system that would automatically shut down the system if the sap level got too low.

You are probably wondering what could go wrong. Well, there were a few things I thought of and a few things I did not think of. Bottom line is that so far, this safety system has shut my system down several times – saving the heating element as well as a large batch of syrup each time. Trust me – this is worth adding. 

Here are some of the possible failure modes:

  • Sap in supply bucket runs out of supply bucket (this happened to me)
  • Pump fails
  • Pump line freezes due to cold
  • Sap in supply bucket freezes
  • Lever arm freezes due to cold (this happened to me)
  • Float unscrews from threaded rod (this happened to me)

I wanted a simple and reliable shutoff system and decided on something that would tilt if the sap level got too low. The tilting would shut off a switch. I added a outrigger on one side of the box and put a fulcrum under the box such that the box would tilt if it were empty, but stay level if it there was enough sap in there. I put a switch on the end of the outrigger. Here is a photo that shows the outrigger. 

At the end of the outrigger, I used two pieces of pine. There is a piece of ¼ inch plywood under this. I used this arrangement in case I needed to add weights of some sort. If you look carefully under the outrigger, you can see the side of the electrical box in which I mounted the switch.


 I used a “decorator” style switch both because of the shape of the switch and the fact that it takes very little force to throw the switch. When I mounted the electrical box onto the outrigger arm, I used a few washers under one end so that is it is tilted. This way, when the arm rocks down, the switch flips to the “off” position, shutting down the system. Another approach would be to mount the electrical box level and glue a block or wood or something to the “off” side of the switch.

At this point, you should be asking why the wooden box would rock to one side. This is because of the weight of the arm out to the side and the fact that there is a fulcrum point set so that the whole thing rocks if the level gets too low. The fulcrum is a ¾” x ¾” board screwed to the bottom of the box. There is another ¾” x ¾” board at the edge of the box opposite to the outrigger arm so that it is level as long as there is enough sap in the boiling pot.

It is best to position the fulcrum using experimentation. Get the entire system built up, except that the fulcrum is not screwed into position. Be sure to have all the parts such as the wires, the sides of the wooden box, the copper float, etc. in position since these will affect the balance point.  Put water into the boiling pot to the point where you would want the safety system to trip - an inch or so over the top of the heating element. Then adjust the fulcrum so that it is at the point where the system just rocks. Mark the position of the fulcrum and then screw it into position. It is possible to make adjustments later by adding small weights to either the box or the end of the lever arm.

Timer Switch

I included a timer switch in my design. The switch I used allows me to set the system to run for 1, 2, 4 or 8 hours. This turned out to be non-essential, but handy. I built mine into the system itself. If I had it to do over, I would have put the switch into an extension cord which I could either use or not use. I think a better use of the timer would be for when the boiling is close to being done and you want to let it boil for another 5 minutes or 30 minutes or whatever and you don’t want to either stand there watching it or risk forgetting about it.

Wiring

The system draws about 15 Amps which means that you should wire it all together using #14 copper wire. I used solid house wiring cable and connected everything together with standard wire nuts. I used spade lugs crimped to the wire to connect to the sump pump switch. I ran the wires inside the box where possible to keep the out of the way.

Operation

To use the system, set it up on a fairly level flat surface. Pour enough sap into the boiling chamber before plugging the unit it. Put the pump in the sap supply bucket and run the hose from the pump to the boiling pot. Plug the pump into the switched outlet. Make sure that the switch on the outrigger arm is switched to “on”. Put some time onto the timer switch. The pump should fill the boiling pot and you should hear the heat come on in the boiling pot. Manually tilt the unit to activate the safety switch. Make sure that it shuts off the pump and the heater element. Switch the unit back on to continue.

Finishing the Syrup

This is the part that is not automated and not yet solved to my satisfaction. The problem is that the sap boils and boils and boils for many many hours and then turns to syrup fairly suddenly. This can happen while you are not paying attention and hot syrup will boil over – not only ruining the syrup, but also making a terrible mess.

So – here is how I am dealing with this – at least until I come up with a better method. First, I keep track of how much sap has gone into the boiling chamber. When I have boiled about 50 gallons of sap, I figure that is enough to make about a 4 to 5 quarts of syrup. If I don’t let the levels in my boiling bot get down below a gallon and a half, the sugar concentration should not get high enough to boil over. At this point, I am ready to transfer the hot sap to our kitchen stove or a hotplate. This is also a good time to filter the sap.

I purchased an 8 quart stainless stock pot in which to do the finishing. I wanted a pan that was tall, but with a relatively narrow base so that the level of the syrup is high enough for a candy thermometer. The first step is to determine today's boiling point on this thermometer at your altitude. Note the temperature – probably something just under 212 degrees F unless you are right at sea level. Then start boiling the sap/syrup mixture. Keep the candy thermometer in the boiling mixture and watch the temperature. The boiling point will rise as the water leaves the pot causing the sugar content to increase. Stop boiling as soon as the temperature has risen 7 degrees.

As an alternative, you might also decide to do more with the evaporator. Here is where a timer switch might be useful. You might decide to give it another 15 minutes of boiling which you can set on the timer and then test the boiling point. The timer switch allows you to walk away for a few minutes without worrying about getting distracted.

I expect to do some experimenting with this over the next week or so and I will update this blog if I come up with any better ideas.

Electric Versus Gas

I thought about using gas instead of electricity. The great thing about electricity is that it is easy to shut off. But I also think it is more cost efficient.


According to what I got from the internet, it takes about 400,000 BTUs to evaporate 40 gallons of sap (to make one gallon of syrup). The internet also tells me that there are 430,000 BTUs in a 20 gallon propane tank – again about enough to make one gallon of syrup. This costs about $20 around here. The other alternative is Electricity. 400,000 BTUs is about 117 KWH. Electricity here is more expensive than in most places - $.15/KWH. The same amount of electricity therefore will cost about $17.50. At $.10/KWH, it would come to “only” about $12.

This of course assumes 100% efficiency. My guess was that I could build a much more efficient electric boiler than I could a gas boiler. Also, I liked the idea of not having to schlep to the Hardware Store to refill the gas canister. So I decide that my evaporator would be electric.

Using 230 Volts

The wattage of the heater element I purchased is 115V / 15A / 2000 watts. The store also offered one that was 230V / 20A / 5500 watts. In theory, that would boil the sap down 2 ½ times faster. WOW! I had to try this.

So, I built one of these into a 20 quart boiling pot and connected it directly to the 230 V outlet that I user for my table saw. It boiled like crazy, but I shut it down after a couple of hours. I just did not feel comfortable around it. It was not plugged into a GFI outlet. There was no auto shutoff. The higher current rating meant that I had to use #12 wire which is much harder to work with than #14. To me it felt like an accident waiting to happen.

My suggestion is that if you need to evaporate faster, build another 115V evaporator.

Conclusion


Bottom line is that this is a pretty simple system that worked extremely well for me. Build your own. Let me know how you make out. If you come up with improvements, please let me know about that too.

Saturday, June 23, 2012

MVC3 on Soft Sys Hosting

I am trying to get an MVC 3 web application running on a Web Server. Soft Sys Hosting claims support of MVC 3 and .Net 4.0 and since this is what I am using, I thought I would give it a shot.

Setting up Soft Sys Hosting

I started by logging in and ordering a package including domain name N1-Web.com. That was easy. What was much more complicated than it had to be was setting up all the logins. I don’t know why there were so many. I set all the passwords to be the same. See Password Safe

Host Name

User Name

Description

https://www.n1-web.com:8443

https://173.248.177.6:8443

nwebcom

This is the login to Parallels control panel for ONE machine account.

http://domaincp.softsyshosting.com/customer

wc@wc1.us

This is the login for the master account

ftp://www.n1-web.com

Nwebcom

This is the default FTP account. It is read only.

ftp://www.n1-web.com

Warren

I had to set this up to get an FTP account that would allow me to write

With this, I was able to upload HelloWorld.html to /httpdocs and display it using: http://www.n1-web.com/HelloWorld.html.

Uploading Files

I am starting by copying the following to /httpdocs:

  • Bin directory (including EntityFramework.dll which I hope is not necessary)
  • Content directory
  • Images directory
  • Scripts
  • ASPX files
  • N1_Logo.gif
  • Global.asax
  • Web.config

I also renamed index.html to index.html_old.html

 

Trying to run the web site

When I tried to run the web site, the system told me I had errors but would not tell me what they are. I added <customErrors mode="Off"/> to the <system.web> section of Web.Config.

Then when I ran it again, it tells me:

clip_image002

So, I contacted them and they did something that caused me to get a different error message:

clip_image004

I was able to make this go away by getting rid of the line: <customErrors mode="Off"/> in Config.sys that I had added above. This gave me a bit of success; I was able to get the default page of my application, then go to the users page and then try to do a filtered search. The attempt to go to the database failed and of course since I could no longer see my errors, I did not get an error message.

So, I surrounded the code in N1_UserController with a try/catch block with catch doing a Response.Write(U_Log.ToHtmlText(ex));.

This showed me the error which was that it could not find MySql.Data. I tried copying MySql.Data.dll from: clip_image006 to the bin directory on the web site.

That worked! Horray! I am up and running.

Wednesday, May 2, 2012

Moving from SQL Server to MySQL for Web Development

I am a Web Developer who is quite comfortable using Visual Studio 2005 and 2008 to build web sites based on SQL Server. Today, I am trying to transfer this knowledge to creating sites based on three new technologies:

  • Visual Studio 2010 Web developer
  • MVC 3 for developing sites that are partially or completely based on the Model / View / Controller design pattern. This seems to be the wave of the future and also seems to be the basis for using DHTML5 with AJAX. Hey – maybe this isn’t necessary, but it looks to me like the most probably future direction for Microsoft based development.
  • MySQL. Narrative 1 databases are currently based on MySQL and this will continue. This last transition is the one I will talk about here.

Connecting to MySQL

In my experience, connecting the plumbing is always the hardest part of any new technology and connecting to MySQL from Visual Studio is no exception. Here is what I think is necessary.

  1. You need something called the MySQL Connector for .Net which I got from http://dev.mysql.com/downloads/connector/net/. Somewhere I saw that I was supposed to uninstall previous versions of this. I did so and that made my Narrative 1 workbooks stop connecting to the MySQL databases. Hopefully, reinstalling Narrative 1 will correct this,but I have not yet tried this.
  2. Once you have successfully installed MySQL Connector, open the VS 2010 project and add a reference to this. Right click the References section under the Project in the Solution Explorer, Select the .NET tab, and sort by Component Name. Scroll down and click on MySQL.Data. Then click OK. For me, this component was on my system at

image

For easier access, I added the following to the top of the file:

image

The first step in using the program to connect to a MySQL database is setting up the connection. Here is the the connect string format that I ended up using:

image

At this point, one would think that all our problems would be solved; if you can do it in SQL Server, you should be able to do it in MySQL, right?  WRONG! It ain’t that easy.

Accessing a table seems to work as one would expect. You set the Command Text property to the name of the table, and set the Command Type to Table and you get back the entire table. No Problem.

Invoking a normal SQL Command also seems to not be a problem. Set the Command Text property to a string holding the command, set the Command Type to Text and it runs the the stored procedure.  No Problem.

Stored Procedures, however, are a problem. Set the Command Text Property to a string holding the procedure name, set the Command Type property to Stored Procedure and Execute Reader says that it cannot find the Stored Procedure. I have tried this with and without “`” characters, with and without the database name in front, with and without the “( )” characters surrounding it all to no avail. I suspect that there is some stupid incantation that I am missing, but I have no idea what that would be.

I did find a workaround. Instead of setting the Command Type to Stored Procedure, I set it to Text. I was successful when I set:

image

The next issue is the passing of parameters. One might think that if you are going to pass the procedure name as text, you might just as well pass the parameters as text as well. That sounds find to me. But there are two reasons that you might not want to do this.

For me, the first reason is that I have code that has to work with both SQL Server and MySQL. It is all set up to loop through the parameters and add them to the parameter list. I want to be able to structure the code the same way in MySQL.

The way you do this is to add the parameter names to the Command Text, preceding the parameter name with a “@”. Note that MySQL procedures would not take arguments starting with “@”; I used “_” instead. When passing the parameters, the “@” character works fine. Because MySQL does not accept default values, it seems that it cares only about the order of the parameters and not the names. This means that all parameters must be passed; you can’t default them to null and skip them as I often do (or did) in SQL Server. Also, I discovered that if one wants to pass a null value to a parameter, one should use “dbNull.Value”. Of course, if you are putting this into a Command Text string, you just put in “null” as shown in the previous code snip.

Here is some sample code that shows how to work with parameters.

image 

Note the Prepare statement above. This causes a sort of compile to occur. In the code above, this would improve performance if the command is to be executed multiple times.

All this sure sounds simple enough. Why did it take me half the day to figure it all out??? I wish it had been in the manuals. But that is what this blog is for, isn’t it?

Thursday, November 24, 2011

Backup and Synchronize Contacts

This morning, I was taking a look at my system for backing up my files. Everything seems pretty much under control except for my contacts. It seems that I have many different contact systems and they are all completely independent. Here is a list:

  • Windows Contacts: (Start -> All Programs -> Windows Contacts) These appear to be completely obsolete, but I don’t dare to delete them. Actually, I probably will.
  • Windows Live Contacts on my desktop system.
  • Windows Live Contacts on my laptop system.
  • Contacts in Thunderbird.
  • Contacts in G Mail.
  • My on-line address book.

Remember that mostly, I just want to back up the contact list, but it would also be nice if there could be some sort of synchronization between some of them.

To make matters worse, Microsoft tends to hide all the contact information deep within directory structures that it also makes inaccessible. What a pain.

So, I did an internet search and what I found was that I was supposed to add Windows Live Messenger to tie all this stuff together. Just what I need: another database, but at least this one is in the cloud and would synchronize between my desktop and laptop systems. Not perfect, but it meets my minimum requirements.

 

Windows Live Messenger

Well, I am still not sure exactly what Microsoft Live Messenger actually is, but I think it is Microsoft’s answer to Facebook. Whatever it is, I would just as soon not have it on my systems, but I am willing if it will do the job. The websites extolling its virtues promised to synchronize with Windows Live Mail contacts, so I decided to give it a try. I downloaded and installed it. This may not actually have been necessary, but I did it.

And it did not synchronize with Windows Live Mail. I thought that the problem could be that I had different account names for Windows Live, so I created a new Windows Live account using the email account from at which I read my email messages. That made no difference.

Eventually, I think I found the trick.

  • Open Windows Live Mail.
  • Click Contacts in the lower left of the window.
  • That changes the ribbon bar at the top of the window.
  • At the right side of the ribbon, there is an icon. On my system, it offered me the option to Sign In. I did using my Windows Live ID. I think this was the key to synchronizing.
  • At this point, the icon changed to show my name and a drop down list which allows log out, change user and similar things.
  • I also clicked Clean Up Contacts. I don’t know if this was necessary, but it was probably a good idea.
  • I then went to my laptop, opened Windows Live Mail and logged into that program as well. I clicked Clean Up Contacts and the contacts appeared there. I had not installed Windows Live Messenger on that system.

I also note that with Contacts selected in Windows Live Mail, there are options on the ribbon to import or export my contact list. While I have not yet thought of a way to make this automatic, it would offer me a means of saving my contacts to a file that could be backed up.

So, I guess this solves my problem. It is not perfect, but it does seem to meet my immediate concerns.

Monday, October 10, 2011

Creating a WPF Web Application

I had a LOT of trouble getting anything working. This will help avoid future pitfalls.
I started by opening a new application:
Visual C# –> Windows –> WPF Browser Application.
Next, I tried to add a WPF Window. WRONG! I should have added a WPF Page. They are very similar, but a WPF Window would not work. I named the page Trans_Main.xaml.
At this point, the project was set up to run Page1.xaml. To change this, I went into the App.xaml file and corrected the StartupUri parameter.
This worked on IE, but when I tried to run it on Chrome, it reported that I was missing a Plug In.
I also noted that the Debug tab in the Project Properties window lets us select the Start Action. I had hoped that I could set this to Trans_Main.xaml, but this did not work. I had to set it to …bin\Debug\Translate.xbap. In fact, double clicking this file would bring up the Trans_Main.xaml file, but double-clicking the Trans_Main.xaml file directly caused an error.
I tried eliminating x:Class="Translate.Trans_Main"  from the XAML file. After that, IE would open and display the file.  I put the line back and copied the EXE file to the bin directory and this seemed to work. I tried setting the program to build directly to the bin directory (instead of bin\debug), but this seemed to mess things up. I did not play with it for long enough to figure out why.
Bottom line is that this technology is OK for use with Internet Explorer, but not for other browsers. I guess I will stick to using WPF for Applications only.
(Note to self: See the project in c:\wwwroot\inetpub\Translate)

Tuesday, September 27, 2011

How to build Help into a WPF Program

Over the last couple of days, I have spend an inordinate amount of time trying to figure out how to integrate on-line help into my WPF programs. I am amazed at how difficult it was to find concise and useful information on this subject. In fact, it makes me think that I must be missing something major. Also, it seems that none of my programming books do a very good job covering the subject.

In fact, creating the Help File and Linking to it are two separate topics and will be dealt with separately.

Lest there be any doubt, we are limiting ourselves to creating “CHM” help files.

Using HTML Help Workshop

This is a free download from Microsoft and it is pretty basic. It starts with HTML files into which you can put links to other HTML files. You add these HTML files to a Table of Contents as “Topics”. You can also insert Headings and Files. My theory is that a Heading is just like a Topic, except that it does not NEED to have an HTML file associated with it.

The biggest draw-back to this program is that it does not allow interactive editing of HTML files. Also, it was far from intuitive to use. I found an excellent Help Workstation Tutorial by Char James-Tanny. I downloaded it from http://frogleg.mvps.org/helptechnologies/htmlhelp/hhtutorials.html.

BUT – there is something better out there for preparation of CHM files.

Using HelpNDoc to create Help Files

A search for Free Help Authoring Tools brought me to http://www.helpndoc.com/ from whence I was able to download HelpNDoc which is free for non-commercial use.

This program is very cool and I think it could be just the thing I need for documenting programs. The reason that it would be better than MS Word or something like that is that it allows me to work in outlines and it allows me to enter hyperlinks. It would be really nice if allowed me to follow them while I was authoring something, but you can’t have everything.

It comes with a pretty good on-Line help system of its own and is pretty easy to use.

Another nice thing about it is that it outputs in any or all of four different formats: CHM, HTML, DPF and Word.

And if you look in the CHM folder, it seems that it puts out all the files that would be used by HTML Help Workshop. According to one source, HTML Help Workshop must be installed for HelpNDoc to compile its help projects.

It was not clear that it allows you to create indexes, but if this is important, one might be able to do this using HTML Help Workshop as a post-processing step. Experimentation would be useful here.

Linking to help from WPF Programs

As nice as these free programs are, neither explains how to link a WPF application to the help.

The Char James-Tanny tutorial does discuss linking using the hhctrl.ocx control from VB 5/6 and perhaps it would be possible to adapt those instructions.

Apparently, there is a System.Windows.Forms.HelpProvider control. This appears to not work with WPF controls.

I did, however, find a way to open CHM help files.

But first, a little about the structure of HelpNDoc.

HelpNDoc builds a help system out of Topics. Each Topic is one entry in the table of contents, and when as the help system is being built, it creates an HTML file on the topic. This HTML file gets compressed and included in the CHM file, but a copy of the HTML file is left in the CHM directory.

This topic gets a name or Help ID based on the Topic Name in the Table of Contents. You can change this Help ID by right clicking the TOC entry. This Help ID plus “.html” is used as the name of the HTML file for this topic.

You can also add Anchor points to a Topic. You can set an anchor by placing the cursor where you want the anchor, going to the Insert tab and clicking Insert/Remove Anchor on the right side of the ribbon. The program then prompts you to enter the name of the anchor. You can see a green bar where the anchor is placed, but unfortunately, I did not find a way to go back later and see what the name had been set to. I was able to see it after generating the help file by looking at the source code in the resulting HTML file.

So, now we have a generated CHM help file, HTML files holding topics that have been compiled into this help file and possibly anchors in some of the Topic/ HTML files. How do we access them.

The answer is to use the static ShowHelp method of System.Windows.Forms.Help. Here is what the calls will look like. Assume that the help file is named MyHelp.chm. Assume that the Help ID is MyTopic and that the topic file in that help file is therefore named MyTopic.html. Also, there is an anchor point in this file named MyAnchor. You might want to use a full path instead of just a filename.

To open the help file at the beginning, use:

Help.ShowHelp(null, @"MyHelp.chm");

The following will open the help file at the MyTopic page:

Help.ShowHelp(null, @" MyHelp.chm", "MyTopic.html");

And the following will open the help file at the anchor point:

Help.ShowHelp(null, @"MyHelp.chm", "MyTopic.html#MyAnchor");

So, that is enough to get me started. As I learn more, perhaps I will update this note.

Friday, September 23, 2011

Using my LG Dare as a Music Server

I like to listen to music while I am in my workshop. You would think this would be easy, and it would be if I were not so lazy. I want to be able to walk into the shop, throw a switch, and just have the music start – without thinking about a thing.

You might think that a radio would be just the thing, but there is only one passable FM radio station in my area and while I like a lot of their music, I don’t love it.

What about an old computer? Well, I don’t want to keep it on all the time or wait for it to boot up or log on or anything like that.

And how about Satellite Radio? Well, I am too cheap to pay for it.

But the LG Dare, plugged into a small charger, running all the time, might be just right. I plan to put the speakers onto the switch that I turn on when I enter the shop, so they will draw power only when I am using them.

Loading the Music

One can certainly use V-Cast/Rhapsody to load music. In fact, I had to install the V-Cast software on one of my computers in order to figure out the file structure of the Dare. But my goal is to pop micro-SD cards into and out of the Dare as my music store. I figure that it will be easier than using special software.

So, I loaded V-Cast onto the Vista side of the Timeline-X computer and told it to connect to the Dare. I then dragged some music  files from a windows explorer folder into the music directory on the Dare. I added a playlist and put a few songs into that as well.  The display on V-Cast shows that I had three folders: music, albums and playlists. I told the system to disconnect from the Dare, powered down the Dare, and removed the micro-SD card.

When I plugged the micro-SD card into my main computer, it had five folders on it:

  • media
  • my_flix
  • my_music
  • my_pix
  • my_sounds

The music was in the my_music folder (with all file names in lower case). I could not find the playlist; I searched for it several times. My only guess is that this could be on the part of the Dare that is not removable. It seems that all the music goes into this folder without subdirectories.