01 August 2013

Raspberry Pi Sous Vide (2) -- Software

After a few days sober second thought, I have decided to keep things simple for a start, and use Chris Swan's design for my first iteration.  I can better understand Python and shell scripting than Java, and the overall program is much, much smaller.  With the Pi kernel and Python libraries now supporting GPIO, there is no need for a Python - shell - Python which was one thing that concerned me.  Now I can keep everything in one fairly small program.  More info here (go near the end for programming examples).

I've added the two modules w1-gpio and w1-therm to /etc/modules so the needed commands / interfaces should be readily available.  Instructions for getting the source and needed dependencies (wiringPi, wiringPi-python are here.

Edit:  Never mind.  I can handle changing the on and off scripts to native pascal, but not the temperature reading.  I am assuming for now that the code for reading the 1-wire temperature sensor is awesomely optimized and calling it regularly won't result in significant CPU overhead.  (I'm still hoping in the future to add a LAMP stack and serve web pages with current and historical temperature data, so saving clock cycles might be significant.)

30 July 2013

Sous Vide with a Raspberry Pi Controller

I have finished my most recent assignment, 2 years + working for Holcim Indonesia on CSR things.  It was a good time, good work and fantastic colleagues.  I've got lots of inquiries out but nothing solid yet.

So with all my free time I thought I'd start a project.  Since my annual barbecue is coming up I was thinking about food, and I've been interested for a while in Sous Vide, French for "cooking meat for a long time in a plastic bag buried in water with the temperature carefully controlled."  Google it.

I found a few people who have done something similar.  I was going to use a TI Launchpad 430G2, for the simple reason that it looked up to the job and I have a few lying around (cost $4.30).  I ordered some SSRs and probes from eBay and am still waiting for their arrival.  My first idea was to copy the absolutely awesome Sous Vader, but rewrite the C code to speak to the TI chip.

Meanwhile, I've been out and bought an extra large Sanyo rice cooker, 395W, which should do the job.  It has three heating elements, so I'm hopeful I won't need to worry about circulation.

However, a week and a half of searching has led me to conclude that I don't have the smarts to do this on the TI without expert help.  Most of the controllers out there are built with Arduino and ATM, and it would take me a long time to decipher the external calls in an ATM C program and find/make the TI equivalent.  I thought perhaps I could tinker and learn a little C, but the job is simply too big.

But, I do have a couple of Raspberry Pi units here, one is busy running my media centre but two others just resting.  There are a couple of great Pi temperature control examples out there:  Steve Smith's RasPiBrew and Chris Swan's sous vide unit.  Neither of these is exactly what I want, however.  The first has an LCD and uses an I2C adapter which I don't have (but that seems like a practical idea for protection.  I'm seriously thinking about going back to this design, but not right now.  The second wasn't how I want to wire the mains (I'm using a Fotek 25A SSR now on order).  Both use PID (or PI) loops for tuning the heater response to temperature changes, something I really want to include and something that was not included in some simpler projects.  Back to the drawing board.

14 March 2011

Pak Ardi Has Passed

As the title says, Pak Ardi died today, apparently two days after banging his head in the bathroom at home. A stroke, one presumes, or blood clot or some such thing.

I miss him. God knows he didn't change much of the world, beyond the toilet roll at Aphrodite. The thing is, he always had a smile and a kind word when I went in. He never, ever, failed to ask how I was doing. And I never minded, his smile couldn't help but warm my heart every time I saw it. He was a toilet cleaner and I was a customer, but his smile contained such warmth, such joy in our shared journey through the human experience, that it was impossible to resist.

I look around this evening at the grief on the faces of the Aphro staff, and I know I was not the only one. Earlier, I walked into the bathroom behind an employee in a navy uniform, and expected to see a smile and exchange greetings. I caught myself when I realized this couldn't be Pak Ardi, and was taken aback.

I don't know anything about his personal life, and I'm sorry for that. I do know that I was wrong in the second paragraph above when I said he didn't change anything. I see the impact of his life on everyone's face tonight, and that makes me all the more sad.

Rest in Peace, Pak Ardi. You had an impact on many of us, and we were all the better for having known you.

Dean

29 September 2009

Getting it done, and electricity

I'm reading on facebook that Jakartans are complaining about the electricity supply being suspended, due to some breakdowns. I don't think they know how good they've got it. Here in Banda Aceh, I had intermittent electricity Saturday, ending in the evening. It came back on for about 10 minutes Sunday morning, then nothing. About 4pm I dumped all my frozen steaks, lamb shanks, ground beef and *ahem* pork *ahem* into a cooler and took it the office, where there's a genset. Oh, I have a genset too, but it doesn't work -- that's my next project. I was told all it needed was a new battery.

I had earlier found a diesel jerrycan, filled with a dark liquid. Dumped that. Spent an hour looking for the old battery, only to find it has been in the car for months. Now I needed to find a motorcycle battery store open on Sunday evening. I got a few suggestions, and drove around those areas, but no luck. I headed home, keeping my eyes peeled for any prospects. There it is! I spied a Honda / Castrol motorcycle parts store on the other side of the street. I drove a long way for a break in the median, maybe 1/2 a kilometre, then turned around. The store was closing the last door for the night. I ran up and asked them if they sold batteries, and they said yes. I showed them my old one, but they didn't have one that size. Give me the biggest you have in 12V, I said, and they did. I had to fill it with acid at home, then connect it and then...

Nothing. My new purchase was too big to turn over the big single diesel, so no dice. Fortunately the PLN juice was back on by now, so I slept in air-conditioned comfort until 5:30, when it died again. I waited for my great pembantu, Ifa, to show
up and ask her to send her father, the mechanic. They got it started using the battery from my car and some kind of cable end adapters. Two hours and $50 later, I own an appropriate sized battery and I'm ready to go.

The office is back to life today, after a somewhat slow Monday. I forgot to distribute the bika ambon cake I bought in Medan airport on Thursday, and it's probably no good now, so I'll toss it when nobody's looking.

Getting work done. My strategy is due this week, and I've barely started, but I always work better to a deadline anyway. I've got it laid out and the sections are filling quickly, so I'll get it in on time, I think. I need to plan a "Capacity Development Program" for the Aceh legal affairs bureau. It's not really rocket science, and I've got some good colleagues and a nice, hardworking counterpart from the government, so I should be alright.

The reason, or one reason, I'm behind schedule is that a lot of short-term things have jumped up, which I'd like to ignore but can't. We've designed an initial training program for the bureau, even though we don't have a strategy yet, but at least they'll know we're serious. I've also got foreign consultants visiting, who will take some of the other work over, but of course it takes time to get them up to speed on what we are doing.

Tonight is our weekly expat beer ^H^H^H^H dinner night. Looking forward to a good crowd, with visitors and most back in town.

By the way, the electricity hasn't failed since I got the genset working. Sigh.

26 September 2009

Back to Aceh -- Where is Everybody?

Well, not a good start back to the office. I traveled on Thursday, as I was told to be in Banda Aceh to be standing by as the Governor would be meeting with the Minister of Religious Affairs. Apparently the meeting was set up a long time ago, but the focus would now no doubt be on the new "jeniyah" qanun, which a few out of touch old men decided should require that adulterers should be stoned to death. We needed to be standing by in case my client, the Head of the Legal Affairs Bureau, needed our assistance.

Friday I showed up at the office, even had a tie with me, and was alone. All day. Only me, a driver and a guard. No meeting, no answer to my SMS, nobody to talk to. For this I came back early????

If anyone's interested in my view of the Qanun, or Local Regulation, I can confirm that it sucks, although I haven't been able to read it yet. Unfortunately, the LoGA (Law on Governance of Aceh) allows the legislature to pass laws with or without the approval of the executive, similar to the power the central legislature grabbed for itself in a moment when supporters of democracy were apparently asleep. There are lots of ways a qanun can be made ineffective, however. The best would be for the incoming legislature to remove the stoning provision, and ideally the other barbaric, stone age bits, from the regulation. The central government has the authority to throw the whole thing out. Similarly, the regulation can be challenged at the Supreme Court, and of course someone could appeal once convicted and sentenced. I think this one has a short life, but I've been wrong before. It's obviously difficult, for reasons I really can't understand, for politicians to appear less religious than their peers. And by religious, of course, I mean slavishly following the letter of religious doctrine while thoroughly ignoring its intent. Does anyone believe there's an honest member of the central DPR, for example? Yet these old men and few women strut and fret their hour upon stage, proclaiming to be protectors of the public's morals. One wishes they were capable of feeling shame.

22 September 2009

Back to Work

Well, I'm back to work, but just a slow start. Met Canadian colleague GF for lunch, and agreed that we'd try to get him to Aceh next week, to plan the work for the Legal Rsource Centre (I'll provide background later). Pizza Marzano was good. After lunch went to the gym, for a rare appearance, then went to EP and chatted with Joel and friends. Made a nice breaded chicken breast supper, with feta cheese and fresh sage I scored from Food Hall in Grand East. Good place to get fresh herbs, it seems.

21 September 2009

Now posting regularly

Well, last night I decided to commit to regularly updating my blog, even if I don't have anything all that new to report. Today, I have nothing to report...

Today, I did NOTHING! I realize that's not much of a post. Okay, I played on the internet for most of the day, got a level in Mafia Wars (now level 149), got a video put together of a typical trip to work in Banda Aceh, which I've put below. Baking lamb shanks from a Jamie Oliver recipe for supper, so at least that will be going well. My poker game got cancelled, as usually seems to happen, so no plans tonight either.



Good news is that I won a bit of money on my football bets last night. Would have been more if the referee at the Manchester derby had, well, refereed. Four, then six, then seven minutes of added time when there hadn't been a significant stoppage all half????

Tomorrow, meeting alas.