It’s Time for Watch Clocks to Make a Comeback

Along with all the colorful, geometric influence of Memphis design everywhere, giant wristwatch clocks were one of our favorite things about the 80s. We always wanted one, and frankly, we still do. Evidently, so did [Kothe]. But instead of some splashy Swatch-esque style, [Kothe] went the nerdy route by building a giant Casio F-91W to hang on the wall.

Not only does it look fantastic, it has the full functionality of the original from the alarm to the stopwatch to the backlit screen. Well, everything but the water resistance. The case is 3D-printed, as are the buckle and the buttons. [Kothe] might have printed the straps, but they were too big for the bed. Instead, they are made of laser-cut foam and engraved with all the details.

Inside there’s a 7″ touch display, a real-time clock module, and an Arduino Mega to make everything tick. To make each of the printed buttons work, [Kothe] cleverly extended a touch sensor module’s input pad with some copper tape. We think this could only be more awesome if it were modeled after one of Casio’s calculator watches, but that might be asking too much. Take a few seconds to watch the demo after the break.

Prefer your clocks less clock-like? Get a handle on the inner workings of this slot machine-based stunner.

source https://hackaday.com/2020/07/10/its-time-for-watch-clocks-to-make-a-comeback/

Mmm… Obfuscated Shell Donuts

In case you grow tired of clear-written, understandable code, obfuscation contests provide a nice change of scenery, and trying to make sense of their entries can be a fun-time activity and an interesting alternative to the usual brainteasers. If we ever happen to see a Simpsons episode on the subject, [Andy Sloane] has the obvious candidate for a [Hackerman Homer] entry: a rotating ASCII art donut, formatted as donut-shaped C code.

The code itself actually dates back to 2006, but has recently resurfaced on Reddit after [Lex Fridman] posted a video about it on YouTube, so we figured we take that chance to give some further attention to this nifty piece of art. [Andy]’s blog article goes in all the details of the rotation math, and how he simply uses ASCII characters with different pixel amounts to emulate the illumination. For those who prefer C over mathematical notation, we added a reformatted version after the break.

Sure, the code’s donut shape is mainly owed to the added filler comments, but let’s face it, the donut shape is just a neat little addition, and the code wouldn’t be any less impressive squeezed all in one line — or multiple lines of appropriate lengths. However, for the actual 2006 IOCCC, [Andy] took it a serious step further with his entry, and you should definitely give that one a try. For some more obfuscated shell animations, check out the fluid dynamics simulator from a few years back, and for a more recent entry, have a look at the printf Tic Tac Toe we covered last month.

int k;
double sin();
double cos();

main() {
  float A=0;
  float B=0;
  float i;
  float j;
  float z[1760];
  char  b[1760];

  printf("\x1b[2J");

  for (;;) {
    memset(b, 32, 1760);
    memset(z, 0, 7040);

    for (j = 0; 6.28 > j; j += 0.07) {
      for (i = 0; 6.28 > i; i += 0.02) {
        float c = sin(i);
        float d = cos(j);
        float e = sin(A);
        float f = sin(j);
        float g = cos(A);
        float h = d + 2;
        float D = 1 / (c * h * e + f * g + 5);
        float l = cos(i);
        float m = cos(B);
        float n = sin(B);
        float t = c * h * g - f * e;

        int x = 40 + 30 * D * (l * h * m - t * n);
        int y = 12 + 15 * D * (l * h * n + t * m);
        int o = x + 80 * y;
        int N = 8 * ((f * e - c * d * g) * m - c * d * e - f * g - l * d * n);

        if (22 > y && y > 0 && x > 0 && 80 > x && D > z[o]) {
          z[o] = D;
          b[o] = ".,-~:;=!*#$@"[N > 0 ? N : 0];
        }
      }
    }

    printf("\x1b[H");
    
    for (k = 0; 1761 > k; k++) {
      putchar(k % 80 ? b[k] : 10);
    }

    A += 0.04;
    B += 0.02;
  }
}

If you want to slow down (or speed up) the animation, decrease (or increase) the values added to A and B at the very end of the loop. Keep them in the same proportion to retain the rotation animation, or just play around with them and see what happens.

Remember to link against the Math library with -lm when compiling.

[via /r/programming]

source https://hackaday.com/2020/07/10/mmm-obfuscated-shell-donuts/

Vintage Instrument Gets Modern Replacement for Unobtainium Parts

One of the best parts about Hackaday is how much you learn from the projects that people tackle, especially when they are repairs on old gear with unknown failure modes and potentially multiple problems. By the same token, the worst part about Hackaday is seeing what other people are capable of and knowing that you’ve got a long way to go to catch up to them.

A case in point is [Curious Marc]’s recent repair of an old pulse generator. The instrument in question is an H-P 8082A, a device from a time when H-P was a place where “good engineers managed by even better engineers [wanted] to help other engineers,” as [Marc] so eloquently puts it. The instrument was capable of 250 MHz output with complete control over the amplitude, frequency, duty cycle, and rising and falling edge geometry of the pulses, in addition to being able to output double pulses. For an all-analog instrument made in 1974, it was in decent shape, and it still powered up and produced at least the square wave output. But [Marc]’s exploration revealed a few problems, which are detailed and partially addressed in the first video below.

In part two [Marc] goes after the problem behind the pulse delay function. He traced it to a bad IC, which was bad news since it was a custom H-P part using emitter-coupled logic (ECL) to achieve the needed performance that can no longer be sourced. So naturally, [Marc] decided to replace the chip with a custom circuit. The design and simulation of the circuit are detailed in part two, while the non-trivial details of designing a PCB to handle the high-speed signals take up most of part three. We found the details on getting the trace impedance just right fascinating.

In the end, [Marc]’s pulse generator was salvaged. It’ll go into service helping him probe the mysteries of vintage electronics from the Apollo era, so we’re looking forward to seeing more about this great old instrument.

source https://hackaday.com/2020/07/10/vintage-instrument-gets-modern-replacement-for-unobtainium-parts/

Hacked Case Fan Follows the Leader with IR Sensor

Adding an additional fan to your PC is usually pretty straightforward, but as [Randy Elwin] found, this isn’t always the case with the newer Small Form Factor (SFF) machines. Not only was the standard 80 mm fan too large to fit inside of the case, but there wasn’t even a spot to plug it in. So he had to come up with his own way to power it up and control its speed.

Now if he only needed power, that wouldn’t have been a problem. You could certainly tap into one of the wires coming from the PSU and get 12 V to spin the fan. But that would mean it was running at max speed the whole time; fine in a pinch, but not exactly ideal for a daily driver.

Note the SATA connector pulled from a dead HDD.

To get speed control, [Randy] put together a little circuit using an ATtiny85, an IR LED, and a LTR-306 phototransistor. The optical components are used to detect the GPU fan’s current speed, which itself is controlled based on system temperature. Using the GPU fan RPM as an input, a lookup table on the microcontroller sets an appropriate speed for the 80 mm case fan.

One could argue that it would have been easier to connect a temperature sensor to the ATtiny85, but by synchronizing the case fan to the computer-controlled GPU fan, [Randy] is able to manually control them both from software if necessary. Rather than waiting on the case temperature to rise, he can peg the GPU fan and have the external fan speed up to match when the system is under heavy load.

You may think this is overkill for a simple case fan, but compared to some of the cooling hacks we’ve seen in the past, it’s pretty tame.

source https://hackaday.com/2020/07/10/hacked-case-fan-follows-the-leader-with-ir-sensor/

New Shop Launch

Join us on 1 August First Thursdays Durban to celebrate the opening of our New Location. Come checkout out the new space, grab some food & drinks from the Florida Fields selection before going to your next destination. We’ll be hanging out the whole day doing what we do best until about 20:00. WALK-INS WELCOME!