Thursday, 26 July 2012

Sous Vide cooker with Arduino

Filed under: Uncategorized — Michael @ 15:28

A while back I came across Sous Vide cooking. (I also occasionally cook, among my other interests.) Sous Vide is French for “under vacuum” and refers to a style of cooking where the food is sealed in a bag and cooked at a controlled temperature in a water bath. I tried a couple of experiments using a pot of water on the stove with me as the temperature controller, switching the stove on/off while watching a thermometer. The results were certainly worthwhile and prompted me to explore the possibility of building a temperature controller using the Arduino, a very capable micro-controller hardware/software platform, and a hot plate. A search of the inter-tubes quickly showed that I was not alone and that many had traveled this or a similar road. (One reason for DIY is the relatively high cost of commercial Sous Vide appliances. At least in my case it was. And besides, hacking something together would be fun.) Most of the existing DIY attempts were either pretty crude or too sophisticated for me (and my budget). And I’m kind of a re-invent the wheel sort, anyway.
I figured a good first place to start would be to get a sketch going that would read the temperature. (‘Sketch’ is an application program in Arduino-speak.) The result is the library I described in the last post.
I knew I wanted the end result to be stand-alone and that meant some kind of user interface. The great folks at Adafruit had just introduced their LCD Shield with a 16×2 display and input buttons. I ordered one and started work on a display/menu system. Soon, I was able to set the desired temperature and display the actual vs. goal temperatures. It was easy enough, then, to send a control signal, based on the water temperature difference, to the hot plate.
Now, I needed to turn on/off the 230V mains using a 5V signal from the Arduino. The answer was a solid state relay but they aren’t cheap so I built one. I used the MOC3041M triac driver and a BT139/600 triac using the basic circuit described in the Fairchild Semi MOC3041M datasheet. The triac is mounted to a processor heatsink (way bigger than necessary) salvaged from an old PC. It easily controls power to the 230V, 1800W hot plate I am using.
Putting it all together, the first tests showed that, in concept, everything worked! But the hysteresis of the system was way too large, swinging 15-20 degrees over the goal temperature. So, simple on/off control was not going to work. A post to the Adafruit forums and within minutes I learned that what I needed was a PID control algorithm. That’s Proportional/Integral/Derivative and it’s a basic concept in systems control. I had something new to learn about! The Arduino Playground page had a couple of implementations of PID. I chose the PID Library written by Brett Beauregard. (For this purpose, it is slightly modified and is the PID_SV library in the attached code.)
I added to the menu/display code to allow setting the PID parameters and monitoring the PID output on the display. It is still just in the breadboard stage but all is working very well allowing temperature control within a couple of tenths of a degree. Here is a picture of the system spread out on my workbench.

The next step is to package this all up. For the electronics, I have a chassis that is just the right size for the hot plate to sit on. And I’ll make a separate unit to place in the pot that holds the temperature sensor and a circulation motor/propeller.
If you want to see the current state of the code, click here to download a zip file with the sketch and the necessary libraries. I have run this on the Arduino Duemilanove and Uno.

Sunday, 1 July 2012

Arduino library for DS18x20 temperature sensor

Filed under: Uncategorized — Michael @ 22:11

I wrote an Arduino library for the MAXIM DS18B20 temperature sensor sold at Adafruit Industries. (The library also works with the DS18S20.) Based on the Arduino OneWire library, I think it’s a pretty good start for anyone who wants to use this device. To download, right-click here and save it somewhere.
Let me know if it’s useful to you.

Tuesday, 2 August 2011

An active crossover for my 2.1 HiFi

Filed under: Music,Uncategorized — Michael @ 7:55

It’s been a long time since my last post. I have been doing stuff, though, and I thought I would post about a modification I did to add a subwoofer crossover to my hi-fi system. It came out pretty well, I think.
What I have is an NAD C315BEE integrated amp. This is their entry model from a couple of years ago and it has no separate pre-amp out or subwoofer out. Speakers are B&W 685s with an ASW610 subwoofer. (A ’2.1′ system.) I was using the subwoofer’s speaker-level inputs and internal low-pass filter and the system sounded OK. But I got to thinking that the low frequencies were also going to the main speakers and even though they can’t reproduce, say, 30Hz they still get the signal. So I thought about “bi-amping” with the active subwoofer amp and the NAD and with an active crossover. I got a hold of the service manual for the NAD and found that there are actually jumpers on the circuit board between the pre-amp and power sections, all I needed to do was build in some connectors for a pre-amp out/in.
First, I went ahead and built the crossover. It is a standard Linkwitz-Riley 24dB/octave circuit set for crossover at 59Hz. (I just added 10Hz to the -3dB frequency for the 685 speakers.) Graphing the response showed all was in order, no phase problems and crossover frequency just where I’d calculated. Cool!
Now it was time to open up the NAD and see about removing the jumpers and adding the connectors. Turned out that it was really easy to work on. They even have a panel on the bottom that, when removed, allows access to the underside of the circuit board. Anyway, once I got the covers off it looked like there would be room to actually mount the crossover inside. I knew from the schematic that there was +/-17V in there which could power the crossover (it only draws like 30mA so I wasn’t worried about that).
So, this last weekend I wired it all up and was truly surprised at how much clearer the lower notes sound. Whether rock, jazz, or concert orchestra, the low-end is just more transparent and real sounding.
I attached a few pictures. The first shows the added subwoofer-out jacks (lower-left) with the location of the two removed jumpers (upper-middle, just to the right of a tall heatsink). The two jumpers just above the upper removed jumper are +/-17V. I removed them and replaced them with new jumpers with a little loop to solder to. I also drilled 5 small holes in the audio ground plane for the ground wires. The second picture shows the wiring in place. The third shows the crossover in place. The last two show the amp with the crossover and the new backside.
Thanks for looking!

Saturday, 5 June 2010

Mozart, The Magic Flute, and Sewage

Filed under: Uncategorized — Michael @ 13:47

Intrigued by the title of this post? Check out the post on my Magic Flute site.

Sunday, 8 November 2009

In the Glow

Filed under: Uncategorized — Michael @ 18:04

I really don’t understand the folks in the audiophile community that claim that tube amplifiers sound better than transistor units. I mean, for some time now, solid-state audio amplifiers have been capable of reproducing the input signal with virtually perfect fidelity.
Maybe I should say ‘didn’t understand’. Let me explain.
In my home system I use a NAD C315BEE and am absolutely pleased with it. When, a few months ago, I went looking for a system, I listened to a number of amps and honestly couldn’t really hear any difference between most of them. I choose the NAD because it was relatively inexpensive and had all of the features I needed. Before then I listened with headphones using a couple of amplifiers I built myself, one with op-amps and another, class-A amp, using discrete transistors. Both sound very good with the class-A amp being, marginally, my favorite.
Anyway, I got to thinking it would be interesting to hear a tube amp and see, er, hear, if there really was something to it. I found a simple headphone amp circuit (http://headwize.com/projects/showfile.php?file=waarde1_prj.htm) that many have built and given positive comments about. Here is a pic of my result.

TubeHeadphoneAmp
(The whole box is 20cm (8″) wide, 30cm (12″) deep and 12cm (4.5″) high. The big tube is just under 13cm (5″) tall. The actual amp is completely built on the lower plate. That’s why the input, volume control and output jack are “on top”. The rest is the power supply. The two switches control the filament and high-voltage separately to let it warm up before applying the real juice.)

Well, I have now listened to the warm (er, hot) glow of tubes and can report that the sound is really quite pleasing. It definately has a different character than with my other semiconductor amps. So, what makes it so? I have some thoughts on that. First, no question that the fidelity of the playback is comprimised. But the odd thing is, in a somehow “good” way. The sound of a violin or soprano, e.g., is softer. And bass sounds such tympani or bassviolin roll in rather than pound in. It really does give an impression of a “rounder” sound. (But I don’t want to imply that the sound from the tubes is more accurate. It’s not. Violins can be hard and tympani really do pound.)
I have an analogy. With my class-A amp, for example, everything in the recording is reproduced with, for all intent, no loss in fidelity. I close my eyes and I am alone in the second row of the auditorium, right behind the conductor (or depending on the mastering, in the orchestra) and I can hear everything in analytic detail. With the tube amp I am in the first balcony with friends around me. I mean there is no longer the analytical precision but the sound of life is around. Or something. It is “verblüffend” (a good German word meaning baffling/intriguing/fascinating all at once).
Now, I have heard only one circuit, one tube type, etc. But I think that this “good” fidelity loss would be somewhat different with other choices. Can this be what the tube-heads are really chasing? I mean the good loss that best satisfies them?
So, will I use it regularly? Probably. It was fun to build and does, in fact, sound really nice. But it comes with some minuses. It’s heavy. No, not that way, I mean really heavy as in weighs a lot. The high-voltage supply has to deliver almost 10 watts at 150V with no ripple. That means lots of transformer, lots of capacitance and a big inductor. And the 6V supply for the heaters is cruising at over 15W. Another big transformer and more capacitors and a voltage regulator that needs a huge heatsink (and it still gets too hot to touch after a couple hours).
But it’s pretty, glowing there in a darkened room. Maybe that is the real draw.

Sunday, 6 September 2009

Hi!

Filed under: Uncategorized — Michael @ 15:38

Well, it has certainly been some time time since the last post. The blog was, in fact, not even available for a while because of a hack attack. It took some time to get it back up and running but here I am again. I really don’t know what is in it for the attackers. In my case it was a bunch of additional invisible admin accounts and lots of crap spam comments. Ho hum.
Anyway, over the next few weeks I will be posting a couple of things about an interest of mine that I have not touched on here and that is amateur astronomy.
And if you haven’t already, check out my Magic Flute site at themagicflute.info. It’s a rambling collection of posts about my favorite opera, Mozart’s “Die Zauberflöte”. There’ll be more to come there as well.

Tuesday, 4 March 2008

Microsoft, again

Filed under: Uncategorized — Michael @ 1:15

I just saw a news report about Microsoft at CeBIT and the big thing was their “new” Surface interface. (Well, actually the report began with the decision of the EU to impose an 899 million Euro fine on MS for failing to live up to the decision in 2004 that MS must make their software APIs available to others. Google “eu microsoft”. Check out, e.g., the NY Times article.)
Anyway, here again is MS telling us that they have developed the coolest and the greatest when in fact they must have seen this (from 2006 at TED): Jeff Han: Unveiling the genius of multi-touch interface design.
Now admittedly, this is what TED is all about, i.e., sharing ideas. And maybe MS licensed this technology, all above board. Great if they incorporate this into their OS. Apple has done something similar in their iPhone/iPod Touch devices. But Microsoft again implies that technology such as “Surface” does not exist outside of their world. And that is just not the case. It seems there are very few (if any) really innovative ideas coming out of Redmond. But they sure know how to claim other’s as their own.

Friday, 29 February 2008

Another example of why Microsoft pisses me off

Filed under: Uncategorized — Michael @ 0:53

I just saw a TED talk about the “new” Microsoft World Wide Telescope project (http://worldwidetelescope.org/) and it pissed me off. Not because the project is a not a worthy one. In fact it looks like a very cool thing. But it was the usual, from them, implication that this was something “new, never been done before and only Microsoft brings you this kind of thing” that pissed me off when in fact a similar application has been around since 2001. The application is Celestia (http://www.shatters.net/celestia/). If the WWTelescope sounds interesting, you should check out Celestia, too. It also provides tours of the universe and supports scripting and add-ons and has a huge community of contributors and (this is probably where the folks in Redmond want you to stay ignorant) runs on just about every platform out there (including Windows). Oh, and is also free.
It pisses me off because it is just another example of how “computing” is what Microsoft defines it to be and not what it really is. There are alternatives. Computing (without the quotes) is a wide open playground. “Computing” is what Microsoft says it is and what you must agree to if you want to play.

Friday, 30 March 2007

Tinker Bell and electrons

Filed under: Uncategorized — Michael @ 22:47

A recent round of correspondence reminded me of an old theory of mine. So, this post is part autobiography, part philosophy and part speculative fiction. Here goes…
I grew up in San Jose, California. This was in the sixties, before this once small town became part of what is now known as Silicon Valley. The area south of San Francisco acquired that appellation because the first tech-industry there was the fabrication of semiconductors (made from silicon) and not so much the computer and software companies that so dominate the landscape now. Anyway, when I graduated from high-school (in 1971) I didn’t know what I wanted to do and started studying math at the local college. I had an interest in electronics and had even built a couple of pieces of amateur radio gear and some audio stuff. So, to help pay the bills, I started, in 1974, to work for a chip company as a technician. These were pretty rough and tumble times with rapid growth and it was definitely an employees market. I was clever enough to pick up enough knowledge on the job so that within a couple of years I was doing some pretty cool engineering and getting paid for it. Bye to school and into the tech-world.
I mention all this in order to indicate that I am pretty well grounded in semiconductor physics, logic and design. Of course, the circuits I worked with then were fabricated with geometries considerably larger than today but the concepts have changed little. (In fact, I sometimes think that the progress should have been even faster than it has been since what exists today is, for the most part, just a refinement of what I was playing with then. Ho hum.)
But at some point I realized that what we were building was impossible. I mean, a semiconductor device is built on a size-scale that is really mind-bogglingly small. Today, the state change of a transistor in a typical IC is the result of the movement of only a few dozen electrons. And electrons are really, really small. Possibly not even “real”. Maybe it was the experience of watching and single-step clocking ICs under power in a scanning electron microscope (while stoned, and quite an experience it was, too) that first lead me to this theory of mine.
I call it the “Tinker Bell Theory”.
You surely remember watching Mary Martin as Peter Pan when you were small. For those who have a serious gap in their cultural training, Peter Pan is a play where a young boy refuses to grow up (I can identify) and he has a “sidekick” fairy named Tinker Bell. At a point in the play where Tinker Bell drinks some poison (that was meant for Peter) and is dying, Peter turns to the audience for help and pleads that they believe in fairies to save “Tink”. He says to clap your hands if you believe and of course no one can kill a fairy and so everyone claps and all is well once again.
The point is to believe. It occurred to me that semiconductors work because from Shockley on, engineers believe that they do. And when things go wrong and your PC eats that file you’ve been working on for the last few hours and there’s no backup it is because, just for a moment perhaps, a semiconductor engineer somewhere (probably Intel) doubted.
Of course disk drives are impossible, too. Apply my theory and it easy to see that if someone at Fujitsu, Seagate, Toshiba, Western Digital or where ever thinks “damn, that’s impossible!” then poof, heads contact platter and adios baby.
Well, that’s my theory. I think it is at least as good as Intelligent Design.
“I’ll never grow up, never grow up…”

Sunday, 18 February 2007

Our little bumblebee

Filed under: Uncategorized — Michael @ 23:21

Just a quick post with a picture of “Hummel” (German for bumblebee), our new family member.

She’s been with us a week now. Both blackcat and I are very glad to have this new little “Wesen” (being, creature) sharing our home. We have the feeling that Hummel is happy with us too. It is obvious that she was mistreated in the past but she is quickly learning to trust us and that is good feeling.