Computing stuff tied to the physical world

New series – What If?

In Hardware, News, Software on Apr 23, 2013 at 00:01

Questions are very useful: “what would happen if…” is the foundation of science, after all.

Conjectures and Refutations is a famous book by the late philosopher Sir Karl Popper. I could not possibly summarise it (heck, I haven’t even read it), but what I take away from what I’ve read and heard about it, is that theories can be judged on their predictive value. A theory in itself is no more than an intellectual exercise, but its real value lies in being able to apply it to what-if questions. The stronger a theory, the better it should predict outcomes. The way to “refute” a theory, is to come up with an example where it fails. Rinse and repeat, and you’ve captured the essence of science.

Want to predict what will happen when you place a 100 Ω resistor across a 9V battery? That’s easy, given the proper theory: take Ohm’s Law (i.e. a theory which has stood the test of time), and apply it – a current of ≈ 11 90 mA will flow. Actually a bit less due to the internal resistance of the battery, which goes to show how strong theories can be refined further, leading to even more accurate predictions.

The what-if question is a great way to experiment, especially in electronics and electro-mechanics, because it lets you be prepared and avoid silly (and sometimes catastrophic) outcomes, such as a damaged component, a harmful burn, or even an explosion.

This approach lends itself to all sorts of practical questions:

  • What if I short out a 3x AA battery pack?
  • What if I connect my chip the wrong way around?
  • What if I have to use a 12V power supply instead of 5V?

But also issues as varied as:

  • What if I omit a certain component from my circuit?
  • What if I unplug the Raspberry Pi without shutting it down?
  • What if I wanted to use HouseMon in combination with MySQL?

Properly phrased, what-if questions are essential for practical experiments, and – by extension – also the key to building useful circuits and automated installations.

A useful variation of the what-if question is to help predict “bad” outcomes and estimate the risk of an experiment, such as: can shorting out my power supply cause real damage?

Starting tomorrow, I’m launching a new series on this weblog, titled “What-If Wednesday”. As far as I’m concerned, it can run as long as there are interesting questions I can answer, so please feel free to suggest lots of topics in the comments below. These weekly posts will be tagged What-If, and I’m also setting up a new wiki page to collect them all.

Sooo… please help me out folks, and send in some nice what-if questions!

  1. I like this idea! No questions come to mind at the moment, but I think this’ll be a fun and interesting series. I rather enjoyed the practical questions too, my answer for all three is “Bad Things” :D

  2. You lost me at 11mA. I * R = U, IIRC…

    • Whoops, my mistake. Indeed, I x R = U, so I = U / R, i.e. I = 9 V / 100 Ω = .09 A = 90 mA.

      How silly of me: getting the theory right and then messing up the math. Sorry about that…

  3. “What if I connect my chip the wrong way around?”

    Last week I was playing with a DS18S20 on a bread board and wondered why I couldn’t get it to work although the software looked OK. When wanted to replace it to check if it was broken I burned my fingers as if I had touched the tip of a soldering iron. It turned out that I had put the AVR-T32U4 board ( to the breadboard the wrong way, so that GND was on the red line and +5V on the blue one.

    Now the surprising thing about this was that even after having been reversed for half an hour (if not longer) and heating up to well over 100°C, the DS18B20 still worked fine and produced the same values as a second one that hadn’t been through that torture. Well done, Dallas!

    • Nice! In one of the what-if posts, I’ll go into why turning a digital chip around often leads to hot chips but not irreversible damage.

    • I burnt my fingers once this way also… but my chip was also fried…

Comments are closed.