Ring-sized watch

Posted on
  • I have a few HP QDSP-6064 bubble displays, and it looks like they'd fit perfectly over a bare MDBT42Q module. A 3-layer sandwich of coin cell, module, display would fit in a cocktail ring sized 3d printed enclosure.
    As a stretch goal, I'll mount an AS5601 orthogonally and build a "digital crown" (copyright Apple of course)

  • ...there you go... just a few more digits... Retro Bubble Displays driven with 74HC595.

    #ao

  • Oooh, spiffy! Finding suppliers has turned out to be a bear tho - I have an idea involving a microscope and 120 0201 LEDs...

  • If you want to make something small, you could look at using a bare MDBT42Q module and a custom PCB.

    Using LEDs would be interesting, but a bit of a nightmare! What about an OLED? compared to that many LEDs the ribbon cable would be trivial to solder!

  • ...I guess @rmd6502 wants to go for the retro look... last but not least his screen name affinity to the famous 6502 - I'm I right, rmd6502?

    #ao

  • @Gordon yeah definitely have my eye on the bare MDBT42Q - thanks for the link! OLED isn't a bad idea, especially since I just found this

  • Oh @allObjects you are quite right - the 6502 is the second CPU I programmed on (the first being the Z-80)

  • Testing the QDSP-6064...

    const cathodes = [D24,D23,D27];
    const anodes = [D28,D29,D30,D31,D1,D2,D11];
    
    var k = 2;
    var pattern = 1;
    var count = 0;
    const maxa = (1 << anodes.length) - 1;
    setInterval(() => {
      "compiled";
      for (var a in anodes) {
        digitalWrite(anodes[a], 0);
      }
      digitalWrite(cathodes[k++], 1);
      if (k >= cathodes.length) {
        k = 0;
      }
      digitalWrite(cathodes[k], 0);
      if (count ++ == 20) {
        count = 0;
        pattern++;
        if (pattern + k > maxa) {
          pattern = 1;
        }
        console.log(pattern);
      }
      for (a in anodes) {
        digitalWrite(anodes[a], ((pattern + k) & (1 << a)) ? 1 : 0);
      }
    }, 1);
    
    

    1 Attachment

  • Also managed to compile and install the MDBT42Q image using the BlackMagic probe, since the MDBT isn't available in the US, except on a breakout board

  • Regarding the cool clip and test code: what's the reason for 3 digits only? ...and 7 segments only... including the dot but not the top half of the digits? ...or is it just the test program?

    EDIT: removed a comment about timing and free running.

  • yeah just too lazy to wire all the segments, lol
    free run is a good idea, will try that

  • Totally free is not what I meant... I edited my entry. You already have it practically free running... the 1 ms setInterval() is quasy doing it... but it may back up when other things happen... so running it with a setTimeout() to call itself is a good thing, because you want the other javascript events - and system events - to get the cpu as well.

    I'm sure you will have something that will switch the display on for some limited time to save power. It would then call the update display function and as long as 'the flag' is on - which you control by a setTimeout to switch off, you will call the update function at the end of it with a setTimeout of 1 (or 0)[ms]... to let the flag controlling timeout event run and and reset the flag to switch the display off. --- This was btw the behavior I remember of these first digital clocks with red LED 7 segment displays.

  • Looks great!

    Just to add that digitalWrite can take an array of pins, so certain things can be really simplified/sped up. For example:

    for (var a in anodes) {
        digitalWrite(anodes[a], 0);
      }
    // is the same as
    digitalWrite(anodes, 0);
    

    and similarly if you have a bit pattern that you want to output to all anodes at once you can do digitalWrite(anodes, pattern);.

  • Thanks to @GordonGordon's and @allObjects' suggestions I've distilled the code to the following, as well as wiring up the rest of the cathodes and anodes, resulting in the attached video.

    const cathodes = [D24,D28,D27,D23];
    const anodes = [D31,D1,D11,D29,D2,D30,D6,D7];
    const patterns = [63,6,91,79,102,109,125,7,127,111];
    const zero = '0'.charCodeAt(0);
    
    var count = 0;
    var k = 3;
    var pattern = "   0";
    
    function onInit() {
      setTimeout(update, 0);
      setInterval(() => {
        if (++count == 10000) {
          count = 0;
        }
        pattern = ("   " + count.toString()).slice(-4);
      }, 25);
    }
    
    function update() {
      "compiled";
      digitalWrite(anodes, 0);
      digitalWrite(cathodes[k++], 1);
      if (k >= cathodes.length) {
        k = 0;
      }
      var ch = pattern[k];
      if (ch >= '0' && ch <= '9') {
        digitalWrite(cathodes[k], 0);
        digitalWrite(anodes, patterns[ch.charCodeAt(0) - zero]);
      }
      setTimeout(update, 0);
    }
    

    1 Attachment

  • And posing with a MDBT42Q module for size comparison


    1 Attachment

    • 20181009_202642.jpg
  • Neat... so close next to each other w/ 50+ years time in between them... the fat, yellow and out-of-focus wire... ;)

    Is the MDBT42Q actually driving it already? ...I guess not... I do not see connections (yet)... You will have fun soldering...

  • Very cool - thanks!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Ring-sized watch

Posted by Avatar for rmd6502 @rmd6502

Actions