Archis's Blog

December 22, 2011

Proud owner of the world’s most advanced kitchen beverage heater

Filed under: Uncategorized — Tags: , , , , , , , — archisgore @ 6:11 am

I’m kiddish, and do stupid stuff to pass the time. Pretty proud of it too. Of all the stuff I do, once in a while, something interesting comes of it. This time, what started as a mis-communication with a friend over why it takes more than five minutes to heat wine (and 2 months later, when I did the math, it makes sense why), I decided the world could do better. Surely with all of man’s ingenuity, we’d have a device that allows us to heat stuff fast, and keep it at a temperature we desire. Thermostats aren’t new – but you’d be hard-pressed to find a kettle or heating rod that’ll do this even today.

As is bound to happen, I began building something of my own. It’s not until you do the math that you realize just how much specific heat water has. It’s a miracle we get it to boil at all. Pumping in that much energy into a thermodynamic system that fast was a problem. My heating elements would have to heat up too rapidly and I needed some way to control them.

The next step was obvious. A trip to radio shack, an Arduino and a fast-switching MOSFET, turned into a pulse-wave modulated heating element  - beyond which the original intentions of heating wine fast no longer mattered – I was chasing some crazy high.

I ended up building a device that gets multiple feedback readings plots them on a logarithmic function, and injects heat at the rate at which said liquid can absorb safely, without the boundaries over-heating, and can compute the rate of heat loss from the system through radiation or evaporation (before you ask, yes, at that point I was caught up in the feature-hole – just adding stuff because I could.) Microcontrollers in the hands of a software engineer are dangerous. Once you have one, you find yourself with limitless power and the ability to add frivolous sensors and features, for cheap.

Anyway, a quick survey among friends (which is a pretty biased sample – since they always tell you what you want to hear)  indicated that it may be quite a nifty little thing for home use. There are plenty of liquids that needs to be regulated in a small temperature window. Thermostats are typically fairly brutal in their operation – they turn on and suddenly heat up your elements rapidly, and abruptly shut off. You can’t really regulate them to say turn on 1/5th of a second, each second, so that you don’t get the massive temperature variance.

It’s been quite an adventure, and I practically burnt through my life savings. I am a trained programmer, but electronics has been a hobby. I’m worse still when it comes to fabrication. Fabrication is an art, and as such cannot be objectively studied. As much as I’d like to be, I’m not MacGyver. My initial tools of choice were test tubes, and beakers – stuff you’d find easily, but not stuff that makes a good product. I learnt a hard lesson – material science is a “thing”, and one that deserves more respect than I had given it for a long time. Finding a material with all the thousand properties that make a good food-safe barrier between your electronics, and… well, food, is a challenge.

So I stand here today – owner of the world’s arguably most advanced device ever possessed for the purpose of heating wines – and one that I dare not use, for fear of accidentally starting fires.

As I mentioned above, when you really do the math, it takes about 4 KJ to heat 1 liter of water by 1 degree C. Assuming you want it at near boiling (say 95C) from room temperature of say, 30C, you’re looking at a 65C difference. You need about 230 KJ to heat it up. That’s about 230 watts per second for a thousand seconds (about 16 minutes) not counting any heat losses. No way do I have the guts to  run that kind of power through anything I built at home. I have some experience with microelectronics, but those who handle power electronics are in a different league altogether. It’s a wonder we live such safe lives given how much power circulates through our grids around us at every moment.

I am however, looking for investors. I’ve filed a provisional patent, and would welcome any contacts, startups, large companies, kitchen appliance companies to revolutionalize the world of… heating wine?

Until my next project then….

December 26, 2010

Mythbusters’ method of derivation by first-principles

Filed under: Entertainment, Personal, Preaching, Science — Tags: , , , — archisgore @ 1:20 pm

I’m the type of person who loves deriving from first-principles and one who admires people who like to do the same. This post goes in honour (British English, people – I come from an ex-colony) of the Mythbusters.

To figure things out, to derive things when no knowledge exists is a concept that seems rare today, and yet I’m sure it was rare as far as humanity existed. It is simply observation bias that made me believe the Renaissance period was any better than today. I didn’t read about all the billion people over the world who didn’t do anything while Da Vinci was doing something. Science and Technology ‘exist’ just as a lot of other things.

Most people know things – they don’t find out things, or learn things; they just know things. I came back from a road trip an hour ago on a route that everyone knew had no places to stay or eat, and yet I stayed in warm lodgings, clean beds, and ate some of the best American food in 20 years. We know toast is made by heating bread. We know we’re supposed to go ‘ahhh’ when we eat French or Italian food, and we know bread can’t be made any other way because – well wouldn’t we know about it already? Red wine is better than White wine. Gas pumps have gas, because… they just do, don’t they? Two drinks are never dangerous for driving because I always have control.

Unfortunately, a lot of science education programs also follow this pattern. There exists the earth. It is round. We live on it. It revolves around the sun. I literally don’t know a single person (including myself) around me who can devise a simple experiment right now on the spot to test whether or not the earth is round. I went through five years of college being told Knowledge (no, not a grammatical error there, I was literally told Knowledge – as in a proper noun).

The one thing that really defines the Renaissance was the spirit of individuality and discovery. Leonardo didn’t make ‘great’ paintings, as if God had said, “Let there be a definition of great paintings that humans can aim for. There was hence a definition for what maketh paintings great.” Leonardo made paintings – they were appreciated. Others couldn’t make much better than his, and his paintings obtained value. The renaissance evolved and nurtured the process of independent thought and opinionated thinking (two things I value most.)

I wrote once before about how a process (also called a model) is what defines everything about science, and perhaps what defines science itself versus… well, lack-of-science. I can’t be more precise than that because process is all-encompassing. String theories don’t define one outcome, but define a process by which outcomes for all situations can be predicted. ‘Solutions of equations of the n’th degree’ in mathematics are really the processes used to solve any system of any number of equations with any number of variables of the n’th degree. As a child I had the opportunity to read some interesting books by 20th century scientists, and one difference I noted from modern populist writing is their emphasis on their line of reasoning, their attempts at scientific enquiry, the setbacks, the necessity for designing creative experiments to test hypothesis.

For the last three years, I’d been trying to figure out just what makes me such a mad fan of the Mythbusters, and the answer is that they are more old-school scientists than many I have met in my life in a university. Of course one does chance upon those rare inquisitive individuals who want to know, but they are few and far apart. I must say that the Mythbusters remind me of some of the influential people from my past who made me who I am today – people who genuinely wanted to find out. I will put this out there – Adam and Jamie are two of the very best science teachers that exist on earth today, and the reason is precisely because they are not scientists (while that’s clearly not true, we’ll go by their claim for now.)

They love to discover. They love to figure out. Sure, you’d say, why figure out what’s already known? If you really just said that, then you don’t know squat! :-) To design an experiment to test a hypothesis is a complex task, heck there’s a whole specialization one can study in design of experimentation. Designing an experiment for a theory that cannot be easily tested rarely happens through dreams, no matter how much we want to believe that that’s how we’ll get rich some day. It comes through practice. Let’s be honest, half the things Adam and Jamie test are not known – sure we can make an educated guess at them, but we don’t know them do we? Chickens are not spheres with point mass.

The Mythbusters teach true, pure science, while selflessly claiming they’re not scientists. They derive from first-principles. Instead of assuming chickens are spheres of point-mass, they start with chickens as chickens, and spherical-masses as spherical-masses. If the two being shot out of a cannon demonstrate the same result, Adam goes, “Hmm… Jamie, what if we replaced our chickens with small spherical balls?” (such a thing has not really happened on the show, I made that up.) This casual remark teaches tons more science than all of high-school physics put together. It demonstrates how generalizations come to be in the first place. What the phrase, ‘without loss of generality’ means. What substitutions are allowed. How experiments must be broken down. How do you discover theory in the first place?

Deriving from basics is one of the key overlooked abilities of this decade. Yes, we know the earth is round. We know we can go in space and figure it out. We also know that some ancients figured it out long ago. Most readers of this blog, I’m sure, are at least self-styled techies who are ‘in the know’ about all things technology. I doubt there’s anyone who can come up with an experiment to test the veracity of that hypothesis right now without leaving this page. That’s the kind of stuff the Mythbusters do daily. Some of the tests they are asked to conduct are impossible to imagine being tested. It is like a classic Sherlock Holmes mystery – when you know the answer, it’s obvious, it couldn’t have been anyone else! I’ve been racking my own brains for the last hour trying to figure out how, given that I don’t even know what “The earth” is, I would attempt to figure out its shape. I’ve had formal education in high-school physics.

They also follow a pre-declared results-based experimentation process. A lot of experiments in my high-school physics were dead-on in conclusions, but they never defined what a set of outcomes would have implied before the results were described. The Mythbusters approach is truly scientific. They would first ask: Why do you decide that you want to put an Apple in liquid nitrogen? Then they would define what each outcome would imply: Suppose it were to come out soft, what would that tell us? Suppose it were to come out hard, what would that tell us?

Objectivity is very hard to learn – and is a constant struggle. We all hope our very first outcome is favourable, and it rarely is. Data is manipulated, conclusions are creatively worded, because the results don’t quite imply what we expect them do. The Mythbusters are not afraid to fail, but heck, they love to fail! Almost every other episode they are proven wrong. They love it! It doesn’t get any purer science than that!

If today’s kids are going to break new barriers, then they must have the ability to derive from first-principles – from the very basic axioms. This however, must be done without compromising clear and hard science. Plenty of out-of-the-box thinkers who promote unlearning what universities teach, get too carried away in philosophy, spirituality or just plain stupidity. Deriving from first-principles never causes you to unlearn what you have learnt, but rather causes you to conform what you have learnt. If you were to put an apple in liquid nitrogen, no matter how out-of-the-box you are, it must have the same results as anyone else doing it. If not, you’ve hit upon something and must find out why.

I’m glad the President Obama recognized such brilliant men who love to discover and figure out. It is heartening to see them teaching principles of science (and I know secretly that they too know they are following the scientific method) without making it ‘science’. Under the casual tone of ‘obvious necessary steps’, they are secretly teaching some very fundamental methods of scientific enquiry that took me years to learn.

EDIT: Some people just asked me, why this is important. We come across people treating simple problems as if they were obstacles created by God, or treating solutions as if they just came into existence of their own accord, without appreciating that there was some human being who developed that solution. If one cannot appreciate that, then one can never look at current problems as solvable, since they inevitably ‘exist’. Brings to me frightful visions of the Eloi.

January 13, 2010

Medical Capsule dilution experiment

Filed under: 1 — Tags: , , — archisgore @ 12:13 pm
Picture of Capsule Dilution experimental setup

Capsule Dilution Experimental Setup (click image for larger version)

So… once in a while you want a controlled release of certain substances in a solvent, and the easiest method with minimal chances of failure is to have a capsule that slowly dissolves in the solvent, thereby unleashing whatever awesomeness you have stored inside.

Timing with capsules can be quite a feat, and for some upcoming big plans, I needed to have a controlled release of large capsules simultaneously. This experiment was designed to study that.

The picture above shows the experimental setup. The capsules used are B-Complex vitamin supplements. I opened one of the capsules to replace the stuff inside with a colourant (thereby allowing me to visually see when the capsule got broken), but since all my solvents were colourless, and the stuff inside was a yellowish powder, I figured it would suffice to use them as-is.

I wanted all this on video, but I left my handicam DVDs in Pune with my parents, and had forgotten to buy new ones, with very little chance of me getting them at 1:30 am in the morning.

Let’s get to the contents of each of the containers – they’re all labelled in the picture. We’ll refer to each container combination as Ci where i=1 to 5.

C1 Water
C2 Water
C3 Isopropyl Alchohol
C4 Diluted Ethanol (Vodka)
C5 Citric Acid + Acetic Acid

Now I’ll get to a table with the timeline as per my log entries and you’ll know just what happened.

 1:35 Capsules were inserted in C1, C3 and C5 to test water, alchohol and acid . All 3 capsules float on all liquids.
 1:35:30  Water bowl (C1) immediately shows dissolution. The capsule’s outer shell is dissolving. I wonder if the width of the bowl was a factor that the achohol and acid didn’t have, so I start to setup C2 with a narrow tumbler.
 1:40:40  C5 shows signs of dissolution, yet mild. C1 is dissolving significantly.
 1:42  C2 is started – starts dissolving within seconds and at 1:42:30 has colours diffusing in the water. The capsule floats.
 1:43:30 C5 is slightly dissolving. Constant rate. Slow. C2 is rapid. C3 has NO CHANGE. I mean this is shocking – the capsule might as well be in an inert fluid. I decide to determine whether the type of alchohol matters. I begin setting up C4 with ethanol (knowing very well that vodka isn’t pure alchohol and my ethanol supplies having run out, I would have to make allowances for the water content in Vodka being responsible for a significant portion of the dissolution)
 1:46:30  C4 started. The capsule floats. C1 is almost broken. C2 is a close 2nd. C5 is now visibly dissolving – the colourants from the capsule’s outer shell are mixing evenly (unlike in water where they were breaking off and sinking to the bottom). C3 – NO CHANGE! C4 is going pretty fast.
 1:48:31  The picture you see above was taken.
 1:49:30  C1 broke. The contents within it sank to the bottom. C2 is almost broken. C3 NONE. C4 catching up fast. C5 broken. C5 seems to have been broken a while ago, but it’s contents weren’t coming out of the capsule. This may have something to do with the fact that these were vitamin tablets containing all acids and perhaps the water had already been saturated with an acid.
 1:52 C2 almost there…. C4 close behind. 
 1:54  C2 the capsule is shrivelled but the contents are not yet exposed to the solvent.
 1:60  C2 broke with contents now exposed to the solvent and started diffusing.
 1:59  C4 still in the race. Given up on C3 it had NO CHANGE!
 2:16  C4 broke. (many logs between 1:59 and this entry have been omitted that only record “no change”)

Each solvent’s start and end time is presented below

  Start Time End Time Duration
C1 1:35 1:49:30 19:30
C2 1:42 1:60 18
C3 1:35 practical infinity infinity
C4 1:46 2:16 30
C5 1:35 1:49:30 (maybe upto 30 seconds before) 19

 

Conclusion: Alchohol in water is a good way to control the dissolution timing of each capsule. Given capsules that are thinner, we could start with a base-line water-dissolution lower than whatever we want, and then mix enough alchohol in the water to fine-tune the time.

March 17, 2009

Want to be part of (another) crazy backyard science attempt?

Filed under: Uncategorized — Tags: , — archisgore @ 11:20 pm

The moment of truth has come. Four years ago, I competed in the BCI contest, and did fairly well for an undergrad student hobbyist. Those who’ve known me more than three years would know my obsession with brain computer interfaces (heck, they showed it in the code4bill video too.)

With work pressures mounting, I didn’t get a lot of time to pursue this. Looks like my Ph.D. plans are put on hold for lack of a problem I find appealing. In the meantime, my backyard science has been severely limited to aging books and (vain) attempts at distilling perfume out of flowers.

The time has come to be more ambitious. I asked a week ago how one finds those “cool professions” they show in movies, and I found the answer – they create them. You know all those geeks on Mythbusters or Junkyard Wars? They just do it. It’s not impossible. It’s not difficult. It’s just a matter of waking up one Saturday morning and asking yourself, “Do you feel lucky?”

I’m resurrecting the BCI fanaticism and am looking for hobbyists to join in. We could set up our base of operations in Hyderabad or Pune, I don’t mind. There are already a couple of friends signed up on this. It’s going to take time, and it’s going to involve sleepless nights, but it’s going to have you wake up one day and feel like James T Kirk – to have boldly gone where not many have gone before! I spent years begging for access to EEG equipment from hospitals and asking colleges/universities for funding. Turns out, in India, actually spending money on academics isn’t the cool thing. Lately though, I realised I make enough money just so I can fuel such crazy initiatives. I’m the type who doesn’t really care about “investments” and buying houses, and I have no hopes of meeting a girl in the near future, so I can pretty much afford to buy one of the over-the-counter biofeedback devices. And here we go….

Here’s the plan (of course this will take upto an year to execute):
1. If you want to fund part of it, I’m certainly not philanthropic, so I wouldn’t mind some monetary contribution towards purchasing such a device.
2. We’ll spend a few months working from the group up, reading on published literature.
3. We’ll replicate some results on pre-recorded data.
4. We’ll try and get access to an EEG device at a hospital. This would be best since buying one doesn’t really serve much of a purpose once we’re done.
5. If all else fails, and we think we have a decent enough processing enging, we’ll go and buy the damn device and do it!
6. We’ll try and replicate the Wolpaw-McFarland experiment from 1992 to control the mouse curser based on the beta band through motor imagery.

Don’t have time to write much. These are just raw ambitious thoughts. :-) This may not work out, but I had to get this out of my system. If anyone’s interested, feel free to ping me, and we can see what comes out of this.

February 22, 2009

Theoretical, Descriptive, Applied, Practical – the subtle distinctions

Filed under: Uncategorized — Tags: , , , , — archisgore @ 11:53 am

This is a followup to a post more than an year ago, titled Probability, Randomness, Non-Determinism, Approximation – the subtle distinctions. Again a very scientific or academic post to explain the words above which are frequently used out of context, even by professors.

As a college student, my classmates always used the phrase, “Theory vs. Practical”. Because I was a good coder (even if I say so myself), I was always branded as the”practical-oriented guy as opposed to a theoretician. I admit I wasn’t a theoretician, but the real title that I deserved was an applied scientist, not a “practical-oriented guy” (whatever the hell that means).

1. Theoretical vs Descriptive: Most people use the two terms interchangebly and it really gets on my nerves. Have you ever heard someone talk about theoretical questions vs. practical questions about Java/C/C++? What people really mean are descriptive vs. problem-statement questions. All questions are very much practical questions since they don’t deal with thought-experiments.

A question like, “Explain threading classes in Java”, is not a theoretical question, but a descriptive question. You’re being asked to describe how threading works in Java, not to present a theory about how you think it works. There’s no theory involved here. There’s no model that you present about how it may work, and then verify experimentally or empirically. It’s a fact. It works. You know how it works. You’re being asked to describe it. This like saying “Why is the Mona Lisa so popular?” is a theoretical question (unless of course some psychoanalyst presents a theoretical model about it).

This terminology probably comes from a natural extension of mathematical sciences developed by people without a lot of imagination. Mathematics may have three questions about the pythagoras theorem:
a) State the pythagoras theorem and prove it
b) Given a triangle with ….. find the hypotenuse.
c) Explain how the pythagoras theorem is used in various problems.

The first being theoretical in the sense you’re asked to present a theory and so as to not take it at face value, prove it (thereby demonstrating an understanding of theory). The second being a problem-statement where you’re asked to apply the pythagoras theorem to solve a problem. The third question is descriptive where you’re asked for an explanation or a description, but not the theory itself.

This distinction is very important when we may have a question with two interpretations – one theoretical, and the other descriptive. One question that comes to mind is, “Why is the sky blue?”

a. The theoretical interpretation asks for your understanding of theory behind it. It is not only asking you to state the theory but to demonstrate an understanding of it, so that you may apply the theory elsewhere or develop it forther.

b. The descriptive interpretation may take many forms of an answer. Today is a clear and sunny day withthout clouds, and therefore the sky is blue. This describes certain things, but makes to rigorous scientific attempt at modelling it.

2. Applied vs. Practical: Another one of those things that bother me. I see many people who don’t want to spend time understanding theory, find they can do things, and claim they’re “applied”. Conversely, I find many applied scientists are labelled as “practical-oriented guys”. :-) Again, this demonstrates a gross misunderstanding of how science works.

An applied scientist has a firm understanding of theory. They just don’t develop theory, but they are not unaware of it. Application of theory requires a deep understanding of it to begin with. An applied person isn’t necessarily the one who can hold a test tube with a steady hand and perform a qualitative analysis on it themselves. A lab practicioner, on the other hand, may not have much understanding of theory, but they would be able to do this in their stride.

The closest analogy I can think of is a mechanic vs. an automobile engineer. A mechanic really doesn’t understand the theory behind the distance between the two electrodes in a spark plug, or they may not be able to determine the barometric pressure in a car’s tyres for optimal performance. They can however, do these things. An automobile engineer may not have developed the theory of fluid mechanics, and tensile strength of bonding between rubber molecules in the tyres, but they certainly understand it. Given sufficient parameters, they can determine the optimal pressure in the tyre. They are applying theory, but not developing it.

In the computing world, this is seen altogether too often. We see programmers who have memorized a lot of syntax and function calls and go around claiming theory is not important. We do see better programmers who have a firm theoretical understanding of Turing Machines or Regular grammars but may not have developed these concepts. And we see people who are developing new types of “machines” and “grammars”. Although not apparent at first sight, there is a significant difference between the three.

The theoretician is the guy who thought up Regular Grammar and Context-Free Grammar. The applied computer scientist who knows when to use a regular expression, and when to use a recursive-descent parser. The practician is someone who remembers a million function calls but won’t be able to decide whether a grammar is regular or context-free. Having been told to use a certain grammar, they may be able to code the parser.

3. Theoretical vs. Applied: After the point above , this becomes easy to see. Scientists understand theory. They understand science. They have a firm basis for whatever they do. They are decision makers. They can decide whether or not a certain type of string can be matched with a regular expression, or whether it needs a more sophisticated parser like an RDP. There is a common misconception that theoreticians are ones who study theory, and applied scientists don’t understand theory. Part of this comes due to the confusion between scientists and engineers.

Theoreticians develop theory. They are ones who propose theory. Given that the sky is blue, they develop a model for “why is it blue?” Taking into account empirical data, experimental results, etc. they propose a theory (not a description). A theory models behaviour of stuff in the sky that produces the color blue – it promotes understanding of how things work. It’s only a theory if it explains all the factors responsible and is proven (until then, it’s a conjecture.)

Applied Scientists then use this theory to create blue elsewhere. If I put a lot of atmospheric gasses in a room, and provided just as much light as the sun, can I produce blue? An applied scientist will interpret the theory and answer questions. Or they may tell you what color the sky would look like on Mars or Venus or Pluto. That’s why I distinguish between theory and description – a descriptive answer to “Why is the sky blue?” would not allow one to predict how the sky would look like on Venus, only a theoretical answer would. They may also verify theory by designing experiments (not necessarily perform experiments). They can tell you what happens when you mix the “blue liquid” and the “red liquid” in a test tube without ever having done it.

The practitioner won’t be able to tell you what’s going to happen. If something goes wrong, they won’t be able to extrapolate what may be the cause. They won’t be able to tell you exactly how an experiment would need to be designed so as to isolate the cause of a certain phenomenon – say something like determining the existence of ether.

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.