Sunday, April 3, 2016

Music & Me Part 4 -- Version 1.0 is complete


It's finished, completed, accomplished, discharged, ended, concluded, done.

For those of you who have not been following along at home, please check out the first three installments of this project. Since my last post I finished the plumbing, again with the help of my friend Jim. You may remember from earlier posts that the wind chest has valves that control the flow of air to the organ pipes. Here you can see them with white leaf springs holding them closed. The air then needs to actually get to the pipes, which sit over the holes some of which you can see in the top of the picture.









This was accomplished using pvc plumbing pieces as shown here. The underside of the wind chest is on the left and the organ pipes sit atop the plumbing on the right.























Here is my source of air or as the organ folks say, wind. I couldn't afford a real organ blower so I went with the Shop-Vac solution. I built this box to accomplish two things. First, one could hardly hear the organ over the roar of the Shop-Vac so I needed to do something about the noise. Second, the higher the pressure in the organ the higher the pitch of the pipes. Therefore, a pressure regulator is needed to limit the changes in pressure that occur as different numbers of pipes are playing at one time. The lower box contains the Shop-Vac and muffles its noise. The upper box further muffles the noise and regulates the pressure.

Let's start with the pressure regulator first. My friend Jim used to have an HVAC (Heating, Ventilating, and Air Conditioning) business and he showed me how they regulate pressure in those systems. You can see an example on the left side of the top box. There is a door, hinged at the top. Sticking out of the door is a rod, and on the rod is a weight. When the system is running, most of the time it produces more air than the organ needs. The excess air shoves the door open and escapes. If the pressure starts to drop, as it does when more pipes are playing, the lower pressure can't hold the door open as much so the door closes a little and that boosts the pressure. The pressure can be regulated by sliding the weight in or out on the rod.

Now for the sound deadening. Here is a picture of the upper box (left) and one of the lower box (right) with their tops removed. The air inlet is on the left side of the upper box, near the top of the picture. I have sound deadening insulation near the opening because I found that there was some noise from the airflow, and some from the Vac, and insulation near the opening seemed to quiet it. The air is drawn into the hole on the left near the bottom of the picture, down to where the Vac is. Now looking at the picture of the lower box the opening from the upper box opens into the large compartment where the Vac is. The discharge from the Vac goes through the short white tube into the small compartment on the upper left of the picture. It then passes through an opening into the small compartment on the upper right. From there it flows back up into the upper box through the hole you can see in the upper right of the left picture. This compartment has the pressure regulating weighted door. The air that doesn't escape through the pressure regulator flows through the round hole through a hose to the organ. All those twists and turns, with insulation at strategic points cause the sound to be dramatically reduced, from about 90dB to about 73dB.

After getting the organ working, Jim and I went through endless sessions of tuning the forty-two pipes. We used an app called Pano Tuner, a screen shot of which is shown here. The app worked beautifully, the organ somewhat less so. After much trial and error we learned that the pipes were so close together that their sound was impacted by the pipes around them. Also, at first we were playing around with the pressure and every time we changed it we had to re-tune all the pipes. Even after we chose a final setting for that, though, we would tune the organ in the morning and when we came back in the afternoon the pipes would all be sharp or flat. We figured it may have to do with temperature and humidity. I live in Florida and the organ is in my garage so those parameters can vary quite a bit but I haven't brought it indoors yet to test that theory.

And that's it. Here are me (on the right) and Jim relieved that version 1.0 is complete. Now, those of you who have stuck with me this far get either a reward or punishment depending on your perspective. Here is a link to a YouTube video of the organ in action. Thanks for reading my blog.


And thanks once again to Matthias Wandel at woodgears.ca and Raphi Giangiulio at rwgiangiulio.com. I stand on the shoulders of giants.




















Wednesday, January 27, 2016

Music and Me Part 3

Around two years ago I wrote about building a pipe organ in a post called Music and me continued. At the end of that post I said that the number of solenoids that I would need would cost quite a bit of money and I wasn't sure when I would get back to it (i.e. I am too cheap to spend that kind of money on the project.)

Well, my friend Jim from across the street came over just before Christmas and I was showing him the pipes that I had made and he asked what the next step was in the project. I said that solenoids were too expensive to take it any further and by way of illustration I called up the Electronic Goldmine website (http://www.goldmine-elec-products.com/) and what to my wondering eyes did appear but solenoids on sale for $5 each. I quickly penned a letter to Santa and there, under the tree on Christmas morning were 42 solenoids. I was back in motion once again.

Jim and I spent hours working on designs for the configuration for the solenoids and eventually hit on something that we thought would work, and here it is in the flesh.
In the lower part of the picture is the "wind chest" that I mentioned in my last post on this topic. This is a design that I pretty much just stole from Matthias Wandel from his woodgears.ca website. For springs I used hacksaw blades because they are made of spring steel. You can see that there are two rows of valves with the (mostly) white hacksaw blades pressing them down (closed). Above the wind chest you can see that there are two aluminum angles, the bottom one is populated with solenoids, the top one not yet.

Running down from the solenoids you might be able to spot thin wires attached to the valves. When the solenoid is powered it pulls on the wire and opens the valve.

So far so good. How do I play music? I mentioned in an earlier post that I planned to use MIDI (Musical Instrument Digital Interface). This is a standard that is more than 30 years old. It is used to control digital musical instruments like synthesizers, to manage stage lighting and pyrotechnics that are coordinated with music and so on. There are many thousands of songs in MIDI format available for free online. These are not sound files, though. They are instructions on what notes to play, when, for how long, and at what volume. Here is an example of some lines from a MIDI file converted to text.

   4: 1:  0  |On Note | chan= 3   | pitch=C#2 | vol=66
   |On Note | chan= 3   | pitch=C#1 | vol=64
24 |On Note | chan= 3   | pitch=F#2 | vol=52
43 |(Off) Note  | chan= 3   | pitch=f#2
48 |On Note | chan= 3   | pitch=G#2 | vol=56
61 |(Off) Note  | chan= 3   | pitch=g#2
72 |On Note | chan= 3   | pitch=E 3 | vol=88
   |On Note | chan= 3   | pitch=B 2 | vol=76
   |On Note | chan= 3   | pitch=F#2 | vol=76
   |On Note | chan= 3   | pitch=G#2 | vol=68
90 |(Off) Note  | chan= 3   | pitch=g#2
91 |(Off) Note  | chan= 3   | pitch=b 2
94 |(Off) Note  | chan= 3   | pitch=c#2
95 |(Off) Note  | chan= 3   | pitch=e 3
   |(Off) Note  | chan= 3   | pitch=f#2
      2:  8 |(Off) Note  | chan= 3   | pitch=c#1

The numbers on the left are timing. Then comes the instruction. The channel is the instrument, then the note, and finally the volume. This particular MIDI file breaks each beat into 96 increments. So, for instance, the first line says "at the beginning of the first beat of the fourth measure, for instrument number 3, start playing C# in the second octave at a volume of 66". The next line says "at the same time start playing C# in the first octave". Then after 24/96ths of a beat (or actually 25/96ths of a beat because the counting starts at 0 rather than 1) start playing F# in the second octave. Then 19/96ths (43-24=19) of a beat later turn of F# in the second octave. And so on, and so on.

I had an Arduino Due microcontroller and hooked up an SD card reader to it and put a MIDI file on the SD card.

Here is the Arduino. It has 53 output pins. Under program control it can turn each of these on or off. I wrote a program on the Arduino that assigns each note to a pin. Then it reads the file and turns the pins on and off with the correct timing. Since I only have 42 notes on the organ I only need 42 pins. These pins can only supply a tiny amount of electricity, however, not nearly enough to trigger a solenoid.


















My sister Monica and her husband Jim happened to be visiting, and she and he and I built this board.
The main components are 42 transistors. These work like electronic switches. The tiny amount of electricity from the Arduino can turn on a transistor, and a transistor can switch enough electricity to trigger a solenoid.

I still have to wire all this stuff together but I'm pretty confident that it will work







And what about all those pipes, you might ask. Not tons of progress on that front, with one exception. Again, I have been using the information provided by Raphi Giangiulio's YouTube videos on how to make wooden organ pipes.

In looking at his specifications there was something that didn't make sense to me. As the pitch gets lower the pipes get bigger until we get below C below middle C. Then they are significantly smaller. I didn't understand that so I sent an email to Raphi and he generously responded and explained that Bourdan pipes are stoppered. That means there is an airtight stopper put into the pipe and that lowers the frequency. It's counter-intuitive but it works. Here are a series of five pipes in order of frequency with the lowest on the left.














And here is a shot of a couple of stoppers.

I have only 18 pipes of the 42 pipes made, and so I am not nearly finished with the project but I am re-invigorated. I'll keep you up-to-date.

Thursday, October 15, 2015

Matching headboard

Regular readers might remember that sometime back I built a bench for the foot of our bed. At the time I mentioned that we had a queen size mattress but were thinking of upgrading to a king size. The issue was that Peg likes a firmer mattress and I like a softer one. I thought about one of those Sleep Number beds where each side is adjustable as to firmness. I priced them, however, and realized that it would be cheaper to buy a car and sleep in there. Then, as luck would have it we were up visiting Abigail in Washington D.C. We stayed in a Marriott hotel and we both liked the bed. I looked for a tag on the mattress. It was a Serta but didn't have a model name or number. Peg looked on the Serta website and they said that if you stayed in a hotel and liked the mattress you could call Serta and order the same model direct from them. So I did.

Now, however, the pressure was on. I had to actaully make the headboard to match the bench that I had been talking about. I had enough cherry left over, and enough caning so I did it, and here are the pictures to show you.




I didn't have any 8/4 cherry so I made the posts by doubling the 4/4. These are the posts with mortices for the lower rail.





I cut one of the two 4/4 pieces shorter than the other giving me a way to overlap the upper rail. Here you can see one of the completed posts with a groove cut for one of the panels. You can also see the three stiles with their tenons and grooves cut.














Here's how I made the panels. I used half inch plywood. I glued the caning to one side and cut rabbets along the edges of the other side to fit into the grooves.


 Here is the lower rail with tenons and groove cut.



















And here you can see one of the mortices in the lower rail, cut to accept the tenon on the stile.













Here are most of the pieces, ready to assemble.






And now the posts, lower rail, and stiles are glued together and ready for the panels to be inserted.

As no good deed goes unpunished I imposed on my friend Jim (who helped me with the Historic Spanish Point benches) to help me glue on the top rail. This glue-up was particularly exciting because we had to get the tenons on the three stiles into the three mortices, while at the same time getting the top rail aligned exactlly with the posts all before the glue dried. You can never have too many hands or too many clamps.

Next I cut grooves to fasten the header to the top rail using biscuits. To the uninitiated, buscuits are oval shaped pieces of compressed wood. When glue is applied to the grooves and the biscuit inserted, it swells and that in combination with the glue hold the joint firmly.

Six coats of polyurethane later and it's ready to go.


Ta-Daa. The finished product, matching bench, and hotel mattress.

Monday, October 5, 2015

Benches for Historic Spanish Point

Some of you may recall that a while back I made a model of the HSP (Historic Spanish Point) orange sorter. They wanted to use it for their outreach program to take it to schools, nursing homes, and that kind of thing.


HSP has beautiful grounds that are part of the land that had been owned by Bertha Honore Palmer, the wife of Potter Palmer who built the Palmer House Hotel in Chicago. Besides being popular for historical tours and the like, they have facilities for weddings and other such gatherings. They have a small chapel the stained glass windows of which were the inspiration for one of the stained glass lanterns that I blogged about some months back.

Well, in order to better support (no pun intended) the gatherings they host there, HSP asked me to make some benches. I asked, with some trepidation, what they wanted the benches to be like. The reason for my fear dates back 25 years or so. I was going to build a swing set/climbing platform etc. in our back yard for the kids to play on. I thought it would be a good opportunity for them to learn about the design and planning process for such  project. We sat down and collected a bunch of ideas about what things they wanted to include, how many levels, how tall, how many swings and so forth. Then we drew pictures to scale from different angles of how it would look. Finally we built a small model to help work out the construction details. They agreed that that it was just what they wanted.

Then I went to work. It took me a few weeks of weekends but finally it was done. I hung the swings, fastened the ladders and climbing ropes, checked to make sure there were no rough spots or slivers, and then invited the kids out to try it. They came running out and as they got close they stopped dead in their tracks. They said, "Where's the slide?" I asked what slide they were talking about. They said they thought there was going to be a slide. I took them back in the house and we reviewed the list of desired features we had developed at the start of the project -- no slide. I showed them the drawings. Then we looked at the model. I pointed out that there was no slide on either of those. They allowed as how that while that was true it should have been obvious that a structure like this should have a slide.

Fade out 25 years ago, fade in present day. Scarred as I am from that episode I always nervous when someone wants something built but don't have too firm and idea as to what exactly it should be.

In this case my fears were completely unfounded. Kara at HSP had found exactly what she was looking for on the web at http://www.thehappierhomemaker.com/2013/10/rustic-15-dollar-bench/


What's more, the website included a dimensioned drawing and, much to my surprise the material costs really were around $15.

Kara brought the HSP truck and she and I went to Lowes and bought all the stuff.












I went into production line mode and cut all the pieces.



Mercifully, my friend Jim from across the street stopped by to see what was going on and volunteered to pitch in. We worked together over a number of days, improving our efficiency with each bench we completed.

Here are the first nine.

And here are the last sixteen. Kara seems pleased with them, and if she's happy, I'm happy. Thanks again to Jim for all his help, and thanks to thehappierhomemaker.com for a solid design.


















Sunday, July 5, 2015

Kite pictures with a Raspberry Pi Camera

My brother Jim and his family were down here in Florida and we got it into our heads that it would be fun to take some aerial pictures. Now that I'm retired I'm too cheap to buy a GoPro and a multicopter, and besides those copters are just too annoying.

I cooked up a python program on one of my Raspberry Pi single board computers that would snap a picture once a second. The PiCamera has a resolution of about 5 megapixels.

Then my brother and his two kids figured out a way to rig it to a kite that I had bought when I was living in Singapore.


Here is a picture south along the beach near the apogee of the flight. The kite string is visible on the right.




This is Venice, Florida looking east.


Jim's neighborhood, with his house in the middle distance.




A nice view of the Gulf of Mexico and a few July 4th weekend beachgoers.





Jim and my nephew and myself discussing some crucial landing parameters.

Me and the kite nearly reunited.


My niece and nephew wrestling the kite back into its storage bag.

Sunday, May 3, 2015

Stained glass

I'm sorry for not posting for a while. My everyday computer got jumped by Mr. Dead. I've therefore been somewhat discombobulated however all is now sorted out . . . and I am thus recombobulated. Then we had our three daughters and son-in-law down for Easter.

Peg and I took a class in making stained glass. This is what happens when you're retired and so have too much time on your hands. We have this courtyard around the pool at our house. We often eat dinner out there, and entertain as well as use the pool and the outdoor kitchen. We have lights under the eaves but we were looking for something a little more subtle. We put candles on the tables and that led us to the idea of making some lanterns to put the candles in, which led us to the stained glass class. Or at least that's the way I remember it.

Neither Peg nor I go in much for tchotchke, and after looking through the pattern books that seems to be stained glass' stock-in-trade. Thus, I think the lanterns will be our final projects for the moment. I'm glad I now know the techniques, however, so if some huge money-making opportunity opens up in the stained glass arena, I'm ready to take it on.


Here are some pictures of the ones that we made. 






















Peg made these using a combination of stained glass and fused glass techniques. Fused glass involves partially melting glass in a kiln to soften the edges and (as the name implies) fuse the pieces together.





Wednesday, December 17, 2014

Measuring Electricity with an Arduino

A few of us have been working on a project to try and figure out what is the most cost effective temperature at which to set our thermostats if we plan to be away for an extended period. I'll write about the details of that at a future date, but clearly an important factor in that determination is how much electricity our air conditioners use. That is a question that I have focused on recently.

 FPL (Florida Power & Light) provides hourly data, as shown here.




For my purposes, however, this has a couple of drawbacks. First, I would have to pull it from the website every day. Second, the highest resolution is on an hourly basis and I am looking for much more detail than that.

I nosed around the internet and I found a website called Desert Home. This is a fascinating collection of home automation projects with detailed how-tos. Dave from Desert Home referenced OpenEnergyMonitor. They sell a bunch of products for doing this kind of monitoring, but they also have a large number of educational posts that give the theory behind measuring electricity. Since I'm retired and have more time than money I decided to build the tools myself.

I ordered up some CTs (current transformers). They clip around the electrical feed lines coming into the house and produce a small current that is proportional to the large current that is flowing through the feed wires. You can see them near the bottom of the picture below. For those of you not familiar with household electricity, in the US we commonly use 120Volt 2-phase 60 Hertz current. That is, the voltage on each of the feed lines alternates between a root-mean-square voltage of +120V and -120V relative to the neutral wire (the thick white wire in the picture) 60 times per second. That's why there are two transformers in the picture, one for each feed line. Incidentally, the 60 cycle wave-forms on the two feed lines are 180 degrees out of phase (thus it's called 2-phase) with each other, so when one is at +120V the other is at -120V. Thus the potential between the two feed lines, rather than between the feed line and the neutral, alternates between +240V and -240V 60 times per second. That's how you get 240V for your electric dryer or pool pump or whatever. But I digress.

You might think that's almost the end of the story, but you would be mistaken. The way power companies charge for electricity is on the basis of "real power." Real power is the instantaneous voltage multiplied by the instantaneous current, giving the instantaneous (real) power (in watts). The reason that's important, the folks at OpenEnergyMonitor taught me is that electrical devices draw different amounts of current at different voltages. The plots of voltage and current draw might look something like this. So what you have to do is measure the voltage and current a bunch of times a second, multiply them, and then total them up. 

Okay, so here is what my setup looks like with all the covers off.


I have two 200amp panels, each with two feeds so I have four measurements that I take. I ran a piece of conduit from each panel to the blue box. I then connected them to a circuit I built, again based on guidance from OpenEnergyMonitor that conditions the current coming from the transformers so that it can be measured using an Arduino microcontroller. You can see it hanging from the wires in the bottom of the above picture. You will remember that the two components needed to measure the power used are current and voltage. That's why there are two "wall wart" transformers plugged in in the picture. One powers the Arduino and one just delivers the alternating current waveform to the conditioning circuit.




Here is a closer picture of the circuit stacked on top of the Arduino.  And here is everything all buttoned-up.

The Arduino takes around 45,000 readings a minute from each of the four current sensors. That may seem like a lot but you must remember that the voltage is alternating 60 times per second so 45,000 readings per minutes is 750 readings per second and if there are 60 cycles per second that is only 12.5 readings per cycle. The Arduino takes the readings and averages them for one minute then stores that number. Then every five minutes it uploads the data to a small computer up in my office. That computer stores the information in a SQL database that I can access via web browser from any computer on my network.

I was a little concerned that I was only getting about 12.5 readings per cycle but the electrical usage that I measure is within less than 2% of what Florida Power and Light reports so it's pretty close, and I think I can get it even closer if I tinker with my calculations a little.




Here is a graph of the electrical usage on a minute by minute basis. The four colors are the four electrical feeds. I know what circuits are connected to what feeds so I can use the information to track down what equipment is using the electricity. I've just gotten this working but there are some features that jumped out at me. Specifically, the blue, yellow, and red lines all have trains of more or less evenly spaced peaks. The blue ones repeat about once every forty-five minutes, the yellow once every two hours, and the red once an hour.

I showed them to Peg and asked her what she thought they were. She said, "What about the refrigerator?" I said it couldn't be that because they each have periods of even units of time, forty-five minutes, one hour, two hours. They must be things that are running on timers. I unplugged my cable box and TV. I unplugged the printer. I turned off the breaker on the security system...nothing. As it turns out they are three different refrigerators. The red one is the one in the kitchen, the yellow one in the outdoor kitchen, and the blue one a small beverage 'fridge that we have in the guest room. Who'd have thought? Well, Peg I guess.

That's it for now. As I said earlier, we're working on a project to measure air conditioner usage and I'll give you an update on that in a later post.