Dummy load uses gray code to adjust load in small steps

We’re not really interested in building a dummy load like this one for ourselves. But the concepts behind its design make for a nice little mental exercise as you read your way through the build description. [Pabr] wanted to build a dummy load which could be used to test a cheaply made gas generator. He wanted it to be as simple as possible, while providing a range of different loads. What he came up with is this monotonically adjustable load tester which uses gray codes for switching.

The video after the break does a good job of explaining the motivation for the design. Grey coding ensures that just one bit changes at a time. The example he uses to show the importance of this is when binary code transitions from 7 (0b0111) to 8 (0b1000). Three digits have been turned off and one has been turned on. Since he’s using light bulbs for his load this will turn off 700 Watts and then switch on 800W. That sudden jump in power draw can cause all kinds of problems with the generator’s engine. But the system he wired up will ensure that each flip of a switch moves in smaller steps.


  1. rj says:

    That’s nifty, but I’m concerned about the halogen lights’ huge inrush current here.

    • pabr says:

      Good point… I had not realized that the resistivity of tungsten varies so much with temperature (e.g. according to this table).

      Fortunately I believe my wiring makes it possible to power the unused tubes from a wall outlet to keep them all hot. I will mention that in the next revision of the article (with credits).

      • How about a setup where the bulbs are powered 100% of the time, either by mains or the test subject, and the circuit simply switches between power sources for each bulb? That would eliminate any changes based on temperature/etc.

      • FWIW, Gray code is a God-send for debugging almost any problem involving multiple variables; it makes sure that every possible combination is considered only once, while only changing a single variable at a time. (Hint: order the variables, left to right, from least likely to be involved in the solution to most.)

        I remember having a complete nerdgasm when I first realized how much easier it could make problem solving. (I recall once some piece of equipment at a camp wasn’t working, so I grabbed a pad of paper and a pen and did up a 6 bit code to keep track of what they had tried and hadn’t. I lost track of how many times I had to remind them that they had already tried a particular combination.)

    • n0lkk says:

      I’m not sure if inrush current with halogen lamps is any greater than standard incandescent lamps of the same wattage. How a generator reacts to the inrush current phenomenon is one of the things being considered isn’t it? Pabr does mention using reactive components in testing in addition to loads that can be considered resistive for the most part.

  2. Chris C. says:

    Clever solution.

    Not a very intuitive interface though. While [Pabr] appears to know the gray code sequence by heart, I think most folks (myself included) would need a cheat sheet affixed to the case.

    • Jason says:

      I think he’s entering binary on the switches. The box converts from binary to gray code internally.

      No need to memorize the sequence or have a cheat sheet.

    • pabr says:

      Yes, the space between the switches and the neon lamps was intended for a cheat sheet. But I use this simple trick to increment the value: Find the leftmost lamp that needs to change in the binary-coded word, and flip the corresponding Gray-coded switch.

    • melthacks says:

      He’s inputting binary on the switches, and it’s converting to Gray internally.

      Not the most intuitive interface, but an inspired use of Gray!

      • Chris C. says:

        You and [Jason] have it exactly backwards. Read again, or watch the switch sequence as he increases the load; you’ll see the switch input is Gray code, which is converted to binary internally.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s