Quick demo

I’ve put together a quick demo of some of the Chronoduino + cFace functionality. Here’s a vid…

Everything’s working out just fine except the real-time clock (DS1337). I’m pretty sure now that the crystals i’ve ordered are borked. The “seconds” it ticks are nowhere near seconds. Sometimes it slows down, sometimes it paces up. Guess they were 12 pF after all, not 6 pF. Anyways, the clock demo is there just to show it ticking the seconds (and minutes) away, so it doesn’t really matter.

Library i’ve been writing addresses the LEDs via a buffer, to which you write using the provided functions (one per LED group). The buffer refresh function is then put inside the main loop and everything is handled via faux interrupts (if-then statements). You need to be careful what you put inside the main loop, to prevent the refresh rate from going too low (causing flicker).

Tags: , , , , , , , , , , , , , , , , , , , , , , ,

15 Responses to “Quick demo”

  1. adnbr 04/08/2011 at 23:44 #

    You should definitely be pleased with yourself on this – it looks mint!

  2. Harry 05/08/2011 at 05:50 #

    this looks awsome, I would buy it! completed or as a kit,

  3. Ferdinand 05/08/2011 at 11:51 #

    What a beauty! I especially like the compass function.
    Your problem with the RTC might result from the traces running near or under the crystal. Those can couple directly to the crystal resulting in erratic clock signals. If the clock refuses to start up you can try to solder an 1MOhm resistor in parallel to the contacts.
    Did you use 2.54mm or 1.27mm connectors on your board? I’m asking because the 1.27mm ones are available in low profile version. You can also give Tyco’s micro match connectors a try.

    • orcinus 05/08/2011 at 14:00 #

      Hmm… The crystal has a pretty beefy ground plane directly under it, and the traces from it to DS1337 X1 and X2 pins are extremely short (3mm or so) and surrounded with ground planes (pours).

      I’ve hooked up an oscilloscope to it… well, an Xprotolab (a miniature DIP-package oscilloscope/logic probe) that i took with me on vacation. It *does* pick up a ton of noise. There’s a strong 50 Hz interference when it’s not hooked up to an FTDI cable and interference from the TTL comms when it is. I’ve expected some EMI, but not this much. Weird. Ground loop, maybe?

      Re: 1MOhm resistor… I did try bridging the crystal with my finger (thinking my skin’s resistance might work as a sufficient parallel resistor), but it had no effect on the clock. So far, the only thing that seems to have an effect is heat. If i leave the whole thing running for a while, the crystal usually starts working. If it’s a cold start, it’s either dead in the water or starts and stops erratically.

      The connectors are 2.54mm as i wanted to leave things… standardish (i.e. usable with the most common headers available). I actually found some low-profile 2.54mm headers, but they were only available in quantities over 1000 or so and were absurdly pricey. I’ll look into switching to 1.27mm, thanks for the heads up!

      PS: Lower profile switches might be a good idea too.

      • orcinus 05/08/2011 at 14:11 #

        Just did some measurements and it seems the clock consistently runs 1.05 seconds per minute slower than it should be. That’s 1.74%!

        Meaning the oscillator is ticking at 32,197 kHz instead of 32,768 kHz.
        Dunno, i still think this is caused by a load capacitance cockup.

        • Ferdinand 06/08/2011 at 11:09 #

          Well, that sounds like a problem with the load capacitance. Unluckily, as the capacitance is too large there’s is not much you can do – correct me if I’m wrong.
          How exactly did you connect the Xprotolab to the circuit? And did you use a laptop? A laptop helps you isolate your circuit from noise picked up via your power outlets and cabling.

          • orcinus 06/08/2011 at 23:58 #

            Yup, used a laptop. And connected it with two breadboard wires (yeah, i know… but didn’t have anything else).

            Hmmm. Now that i think about it… I might use both channels, leaving one channel dangling and picking the EMI up. Then subtract CH1 and CH2, causing destructive interference between the 50 Hz hum common to both channels.

  4. Ferdinand 07/08/2011 at 15:44 #

    Would the Xprotolab’s display fit on one our your clock face shields?

    • orcinus 08/08/2011 at 02:48 #

      Yes it would :)
      And yes, an OLED shield is planned.

      • Ferdinand 08/08/2011 at 09:37 #

        That’s great. I have two of these displays lying around. If you’re interested in working with these I could send you one.

        • orcinus 11/08/2011 at 15:54 #

          That would be great! :)
          How much?

          That’s the SSD1306, right?

          • Ferdinand 12/08/2011 at 13:43 #

            The display is actually exactly the same type as was used for the Xprotolab. I bought if from the manufacturer via eBay. It uses the SSD1306 controller and has an integrated charge pump, so you just need a 3.3V rail.
            I also ordered a breakout board for the display. I might get one more, so you can have one of those too.
            Maybe you can give me discount on one of your coming clock kits in exchange for the board.

  5. orcinus 18/08/2011 at 02:25 #

    Sure thing!
    You can reach me at o{dot}orcinus{at}gmail{dot}com.

    I’ve got two more sets of boards and accompanying parts from the prototype batch (there were three total). I can send one your way if you want, or one from the next batch which will be revision 3 (just finished routing it), with a voltage regulator and ISP, TTL and USB hooked up to the 3.3V rail (along with a few other tweaks).

    I’m on vacation away from home at the moment, unfortunately, so it’ll all have to wait until i get back (end of the month).

    PS: i’m considering dumping the JST for the battery and putting an SMD right-angle (sideways) 2-pin header there. Smaller footprint, thinner, and the JST plug on most batteries can still be squeezed on it (despite the slightly different pitch).

  6. kabturek 22/08/2011 at 15:15 #

    Are you planning on open sourcing the hardware design (eagle files/ schematic ?

    • orcinus 22/08/2011 at 15:31 #

      I’m about to release the first revision (under CC BY NC SA).
      Compiling all the relevant info and datasheets and will probably have it on-line in a day or two.

Leave a Reply