• Conclusion

    PointyOintment02/27/2016 at 22:27 0 comments

    Sorry for the late update; I've been off the site for several months.

    I never did get around to building more clocks in a series, and I no longer have any desire to build one clock per week now that the Ahmed thing is over, so I'm declaring this project complete. However, I will build more devices that tell time at some point in the future. But those will be separate projects.

    I'm also thinking about entering this in the /r/DIYelectronics first monthly contest, for an unconventional clock.

  • Update

    PointyOintment09/30/2015 at 23:02 0 comments

    I don't and won't have a new clock this week. I'm too busy preparing for the Protospace open house this Saturday. (BTW, if you're in Calgary, please come!) Hopefully I'll do it on Sunday.

    I also lost the power resistor I was using, and had to buy another. I bought several values and tried the highest, 68 Ω, first, and it worked, so the battery should last a lot longer now.

    I also got a couple new photos of my current clock, the first one courtesy of another Protospace member:

  • A clock a week?

    PointyOintment09/25/2015 at 14:46 0 comments

    I didn't get the miniaturized clock done (or make much progress on it at all) on Wednesday, and didn't have time to work on it last night. So, I guess I'll have it ready on Monday. Should I build a clock a week?

    And the other thing is that I've figured out part of what's going on with the USB battery, though it died in the process, so I don't have my clock with me today. It seems that when I unplugged the dummy load, the battery didn't realize the load had decreased, and still didn't realize the load was low even after being restarted multiple times. So it stayed on. But it also estimated its state of charge to be decreasing faster than reality. By last night it was down to 3%* and I decided to see how long it would last. It got down to 1% in a couple of hours and then ran for many more hours at 1% before dying. I was asleep so I don't know exactly how long it lasted. I think this may have succeeded at recalibrating the battery, so once it's charged again it won't work without the dummy load.

    *really 3/99; the battery has a 2-digit display and I guess the designers didn't think of using F for full, so it displays 1 to 99.

  • Improvements to first clock; better RTCs found

    PointyOintment09/23/2015 at 17:51 3 comments

    Yesterday I improved the signage on my clock:

    I also added a 15-ohm, 5-watt-looking power resistor as a dummy load so the battery stays on and I don't have to press its button every time I want to check the time. My calculations say it's drawing 1/3 amp and dissipating 1 2/3 watts. It gets pretty warm. I could add a transistor and modify the code a little to pulse the load, but I calculated the battery will last over 12 hours like this, so it's not worth it, especially because:

    I was at the electronics store yesterday and I found that they now have DS3231 breakout boards in stock! The DS3231 is a much superior RTC to the DS1307. It's temperature-compensated, making it far more accurate, and it can operate with supply voltage below 3 V. Even better, they fit directly onto a Raspberry Pi's header, they're about 1/6 the size (because they're not part of Seeed's Grove prototyping system, which my DS1307 is), and they're about half the price! I bought three, obviously.

    This means that I can build a miniaturized version of the clock immediately, without having to get a softRTC running first! So I'm hoping to have a new clock to wear to school tomorrow. The current one's cable is rubbing my collarbone irritatingly, and people seem to be getting slightly bored with it (those who've seen it already, anyway). The next one will pin to my shirt, I think, and have a laser-cut/etched frame, and maybe a slightly larger display.

  • softRTC: Studying prior art

    PointyOintment09/22/2015 at 17:26 1 comment

    As I said earlier, I tried to get the Arduino to keep track of time on its own, to denecessitate the DS1307, which in turn would denecessitate using the USB battery. JeeLabs's/Adafruit's RTClib was too confusing and overkill, and my simple implementation seemed to be picking up mains noise on the button pins (even with internal pull-up, and even when I gave them zero-ohm pull-up/pull-down). I haven't made any progress on this since then, but the other week I ran across an ATmega328P-based wristwatch called ChronosMEGA, the instructable for which is extremely detailed. I'm reading through that today to try to learn better ways to do what I want to do. It also claims 11 years of standby battery life!

  • Second (more presentable) prototype

    PointyOintment09/22/2015 at 02:26 0 comments

    2015-09-21 21:30 MDT: Added update on getting the decimal point working and a note that I soldered wires to the RTC board.

    On Sunday night (September 20), I switched it from a bunch of jumper wires to actually using the Patch Shield. This made it much more presentable and durable, and the red Ethernet cables sticking way out to the sides catch people's eyes.

    I also soldered some wires onto the DS1307 breakout board.

    Here you can see how I built the frame with Gorilla Tape. The USB cable forms the neck lanyard; the USB battery and the clock have about the same mass. The schematics on the back of the sign were for testing a galvanometer, I think.

    Here's how it looks being worn:

    Photos still look terrible, thanks to my tablet's awful camera. (My phone is still in pieces from when I tried to repair it and had exactly as much success as Robert Liston did in his most famous surgery.) When I get home I might use a real camera, and/or one of the other hackerspace members who's a photographer/videographer wants to take a picture of me wearing it, so better photos might be coming soon.

    To Do:

    • The bubble displays have decimal points, but the sketch I'm running currently doesn't have them enabled. I'll probably have that fixed tonight.
      Update: Fixed! It was a simple matter of adding a pin to the display definition (using the SevSeg library), as I expected. Now it displays HH.MM as desired. It would be nice to have a colon instead, but I'm not too bothered (though I'm slightly bothered that the decimal point is substantially below the digits). While looking for power resistors, I found we have a bunch of ancient red LED 7-segment displays (probably the ones that replaced bubble displays in products), some of which have colons, so maybe I'll use those in a future version.
    • I need to trick the USB battery into running continuously. It turns off after several seconds due to too little current draw (because it's designed to charge smartphones). I need to figure out how much current it needs drawn to stay on, and how frequently this current must be drawn (which I'll then program the Arduino to do with the help of a transistor and resistor). Unfortunately, this hackerspace seems to lack any kind of dummy load. Even just bare power resistors we don't have much selection of.
    • For miniaturization, I need to get some kind of softRTC running so that I can run it on a bare LiPo battery instead of the USB battery (which is a giant LiPo battery with a built-in 5 V boost converter). (The DS1307 requires 5 V.) I tried RTClib's softRTC, but I found it too difficult to use. (Or maybe I just wasn't reading it right; does anybody have experience with it?) So I wrote my own super-simple, 12-hour, non-sleeping softRTC implementation. That worked but when I added interrupts for buttons to increment the hour and minute, both incremented at 60 Hz even with no buttons connected. I think this might be mains noise. A multimeter only picked up about 0.12 V AC on the inputs, but there could be more when the meter isn't loading it down. I'll have to look into how other ATmega328p-based watches do it. This will also be applicable to my Word Watch project. More on this in a future project log post.

  • First prototype

    PointyOintment09/22/2015 at 02:02 0 comments

    Here's my first prototype, constructed September 18/19. (This picture is from 5:23 AM on Sept 19.) I didn't actually use the Patch Shield for this one; it was just still on there from when I put the kit together ages ago. The DS1307 breakout board is connected by means of micrograbber jumper wires. I carried this home and then back to Protospace on the bus and surprisingly didn't get many weird/curious looks.

    When I made this, I ended up staying awake for about 25.5 hours (not all prototyping, obviously), followed by sleeping for almost 21 hours, which is probably the longest I've ever slept. (Which is weird, because I used to make a habit of staying up for 24 to 36 hours and never slept for more than 15 hours before this.)