Random Speed Controller for “Looping Louie”

This is the project homepage for some modifications to a children’s game called “Looping Louie”.

Introduction

“Looping Louie” is a children’s game made by Milton Bradley, a Hasbro company, which has become increasingly popular amongst young adults. The goal of the game is to prevent a rotating arm from touching the players’ game chips by catapulting it in the air (the links section brings you to a video which will make things clearer). Because the speed of the rotating arm is fixed, an experienced player can have a significant advantage over someone who is not familiar with the game. Also, the game is designed for four players.

This page describes how the game was enhanced with a “random speed controller” that eliminates any advantages experienced players may have. Also, a modification for eight players is presented which has been created by a friend of the author. For the impatient, there’s a set of pictures below.

Hardware

The hardware part of the project is fairly simple: A microcontroller (MCU) does pulse-width modulation (PWM) through an n-Channel FET on a 9V DC supply voltage. Because the MCU runs at a maximum of 5V DC, a voltage regulator is required. I added a couple of buttons to reset and provide input to the MCU. One or two LEDs give some feedback on what the MCU is doing. A few resistors and capacitors here and there and that’s it.

I chose the ATtiny 25/45/85 family of microcontrollers for three reasons: First, it comes in a DIL-8 package, so it’s small and easy to solder. Second, it requires almost no external parts, especially no oscillator as it has one built in. And third, it has a hardware timer to generate the PWM pulses which simplifies the software design.

To make everything look nice, and in order to make things a bit more robust, I bought a small plastic housing. It contains the board and holds the cables, buttons and one LED. The rest of the hardware, especially the second LED and the programming header, are not accessible unless the housing is opened.

There is a link to the schematics in the downloads section on this page.

Software

The software running on the MCU controls the timer used for the PWM and thus the speed of the game. It offers four fixed speed modes as well as a random mode. The mode button allows the user to switch through the modes, i.e. pressing the mode button switches the software to the next mode.

In the fixed speed modes, the PWM timer is set to a pre-defined value and never changed, unless the user presses the mode button to select the next mode.

In random mode, the PWM width is periodically updated. There are several ways of updating the PWM speed: No change, add, subtract, multiply, divide or set the current value. This causes the speed of the game to vary. Because the goal is to achieve non-deterministic behavior, a second timer is used to control the time between updating the PWM speed. The algorithm goes like this:

  1. The user turns on random mode.
  2. Set the current PWM speed to a fixed value, somewhere near medium fast.
  3. Initialize the current random mode iteration.
    • Randomly pick an “update mode”.
    • Randomly pick a change value, i.e. how much the speed should be increased or decreased when it is changed.
    • Program the second timer with a random delay.
    • Decide for how many timer ticks the chosen “update mode” should be kept and store the value in a counter variable.
  4. Wait for timer tick.
  5. Execute update.
    • Perform an update of the PWM speed, depending on the “update mode” and the change value.
    • Decrement the counter variable by 1.
    • If counter variable has reached zero, go to 3. Otherwise, go to 4.

Because division is diffictult on a MCU, both multiplication as well as division are implemented by bit shifting, so there is always a factor of 2. For instance, if the current value is 27 (0x1b), the next value will be 54 (0x36) in multiply mode. In division mode, the next value would be 13 (0xd).

The software can be downloaded in both source and binary form. See the downloads section for links.

Eight-player Extension

The extension for eight players is fairly straight forward: Small adapter parts have been manufactured that allow an extra four arms to be connected to the base station. Because the parts have been designed by a friend of mine, I cannot say much about how it’s done. All I know is that they are made of acrylic glass and that they have been machine manufactured.

Pictures

Here’s a set of pictures that show what the finished project looks like:

Download

The source code of the firmware.

The schematics (PDF) of the circuit.

Dia drawing on how to layout the circuit on a perfboard. I ended up soldering everything pretty close to the layout in the drawing, but I had to make small changes for the connector of the supply cables. Also, I soldered the wires for the buttons and the red LED where they fit best, not at the edge of the board as shown in the drawing.

Note on the Perfboard Drawing: I ended up soldering everything pretty close to the layout in the drawing, but I had to make small changes for the connector of the supply cables. Also, I soldered the wires for the buttons and the red LED where they fit best, not at the edge of the board as shown in the drawing.

Parts List

In case you want to build a controller on your own, here’s a list of parts you will need. Since I’m located in Germany, I’m listing the German sources, but I’m sure the parts can be obtained in other parts of the world, too.

General Supplies you probably have at home

  • Soldering iron (Lötkolben).
  • Soldering wire (Lötzinn).
  • Copper or silver wire for the electrical connections on the curcuit board (Kupfer- o. Silberdraht für Leiterbahnen).
  • A pair of pliers to cut the wire (Einen Seitenschneider für den Silberdraht).
  • Sharp knife to remove the insulation (Scharfes Messer um Kabel von der Isolierung zu befreien).
  • 4mm drill for holes in the housing (4mm Bohrer für das Plastikgehäuse).

Mechanical Parts for the outside

  • Housing 85x65x28mm (Gehäuse, z.B. Reichelt SP 2062 SW).
  • 10 mm Spacer (Distanzstück, z.B. Reichelt DK 10MM).
  • 1 Screw, M4, 20-25mm (Schraube M4).
  • 1 Nut, M4 (passende M4 Mutter).
  • Some plastic shells that let you run the cable through the board housing in a nice looking way (“Durchführungstülle”, z.B. Conrad Nr. 526924).

Connections

  • Some two-wired cable, mine is 2 x .75mm (Litze, 2 * 0,75mm).
  • 4-port clamp connector (4-polige Anschlussklemmen, z.B. 2x Conrad Nr. 743530)
  • 3 Connectors for power supply and game (Stecker und Buchsen für die Stromversorgung, z.B. Reichelt 1x HS 25-9 und 2x HK 25)
  • 2×6 Pin Header for programming adapter (2×6 pol. Wannenstecker, z.B. Reichelt WSL 6G)

Electronics

  • Perfboard, about 60x65mm (Lochrasterplatine).
  • ATtiny 25/45/85 Controller, either version should work.
  • 5V/100mA voltage regulator, e.g. 78L05 (Spannungsregler).
  • n-Channel Field-effect Transistor (n-FET), e.g. BUZ-11 (Feldeffekttransistor).
  • 50V/1A Diode, e.g. 1N4001.
  • Resistors: 2x 100k, 1x 4k7, 2x 220 (Widerstände).
  • Capacitors: 1x 330nF, 1x 100 nF (Kondensatoren).
  • Two push buttons of different color that close on push (verschiedenfarbige Schließ-Taster, z.B. Reichelt T 250A GN).
  • LEDs: 1x red, 1x green (for debug).

Other parts

  • A power supply that provides 9 Volts DC at 1 A (max.) (Netzteil, 9V Gleichspannung, 1A max., z.B. Conrad Nr. 513002).
  • An AVR programmer, e.g. AVRISP mkII, in order to get the firmware programmed into the microcontroller.

Links

Here are a few links related to this project. Apparently, this game isn’t very popular outside the German speaking part of the world.