Author Topic: Digiwatch  (Read 9605 times)

Hizzle

  • Newbie
  • *
  • Posts: 4
Digiwatch
« on: January 20, 2013, 08:40:25 am »
I am a fan of wrist watches. Would like to create one with the digispark (which I am still waiting for).

I do have a 128x32 OLED SPI display lying around. Would an SPI display be any problem? as I understand it should work with i2c but I haven't read anything about SPI.

What would the power consumption be on the Digispark for just keeping time and displaying it on a display at the press of a button?

Cool stuff could me made if the USB is left as accesable as possible. For reprogramming the time (setting alarms, etc).

Yes, it would be a bulky watch (46mm across and 15-20mm deep at least).
« Last Edit: January 20, 2013, 08:40:25 am by Hizzle »

semicolo

  • Full Member
  • ***
  • Posts: 137
Digiwatch
« Reply #1 on: January 20, 2013, 10:50:04 am »
SPI shouldn\'t be a problem, I think it has hardware SPI, if not you can use software SPI using 2 pins if the display doesn\'t send any data else 3 pins.
But you\'ll need to use software SPI if you want the USB available.
I\'ll need the datasheet for the power consumption, but the digispark is probably not the best device to conserve energy (running at 5V and 16.5Mhz)

Hizzle

  • Newbie
  • *
  • Posts: 4
Digiwatch
« Reply #2 on: January 20, 2013, 11:32:37 am »
There is some kind of sleep mode on the processor right? Long since I\'ve tinkered with microcontrollers, but even in sleep mode it should be able to keep time. Waking it up only on a press on a button.

Guess I\'ll skip the USB, having it accessable with anyway be an impossible task given the \"watch\" constraints.

vicary

  • Newbie
  • *
  • Posts: 13
Re: Digiwatch
« Reply #3 on: January 21, 2013, 10:22:29 am »
I am also working on time displays in OLED, you may want to deal with the 5 sec programmer mode (make it like 1-2 secs) and simply shuts off the power when you don't need the time.

A little bit off topic here. I really want to make a cool watch with transparent OLED display, but having a hard time sourcing it. Have anyone of you heard of a supplier?

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Digiwatch
« Reply #4 on: January 21, 2013, 06:59:57 pm »
You can mod the bootloader to have a shorter timeout, but this makes it work poorly with Windows computers. Windows is really slow at enumerating and making available USB devices, and a shorter timeout makes it really difficult to get windows to install the 'driver' thing the first time it's plugged in. After that it works okay. Making the USB stuff work at all reliably in windows is a bit of a nightmare. Some of my own usb projects using the digispark bootloader (micronucleus) have a 2 second timeout and more aggressive faster uploading, but I only use those with recent Mac OS computers.


Sleep modes are a better idea I think. You can get the power usage of the attiny85 chip down to about 0.01ma in sleep and use the watchdog timer to wake it up every now and then to do a little work before going back to sleep, or have it just wake up when a button is pressed or something like that. The digispark's usb connection would use more power than the chip when it's sleeping, even if the usb port isn't in use (about 3ma) and the power LED would dwarf that number again though at least the power LED is fairly easy to disable. All this means the digispark is a great way to prototype a watch, but a poor way to build the final thing if using sleeping to preserve power.


A better modded bootloader design would be to have one which lasts for 5-10 seconds, but only enters if you're holding down a button connected to one of the pins, so you'd have some sort of 'show time' button which gives the digispark power, and a 'program' button which if you hold it down before pressing in the power button puts the spark in to the bootloader, otherwise it just boots immediately. If you guys are really keen on a bootloader like this, let me know what pin you want to use for the 'program' button and how your circuit will work and I can provide you instructions on how to mod the bootloader. Keep in mind that I'm not digistump staff and doing the mod might void your warranty or something.

Trakkasure

  • Newbie
  • *
  • Posts: 28
Re: Digiwatch
« Reply #5 on: January 22, 2013, 08:26:48 pm »
I've been working on a watch... I have an OLED 128x64 after creating most of the drawing routines, for writing to the display, I'm out of space.
I do, however, have a 1k buffer in memory.. I bumped the I2C speed to 1Mhz and refresh the display.
Much more flexible to write to a buffer and just dump it.
I have some 64k x 1 DRAM chips.. maybe use those for storing the buffer. They are old and slow (120ns), but are fast enough for a display update... and for prototyping. I have an analog face with watch-face hands ( and second hand ) along with digital time and date beside it.


Hizzle

  • Newbie
  • *
  • Posts: 4
Re: Digiwatch
« Reply #6 on: January 23, 2013, 10:36:03 am »
Thank you Bluebie for the reply.


USB using 3ma is a big concern. I think I'll skip the entire programming the watch via USB thing and instead use the only button as the programming interface. Press to show time or navigate menu, long press to enter menu or choose option. Is there any way I can disable USB?


Vicary. I usually turn to Adafruit to source displays. Don't know what you mean with transparant though.


/H

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Digiwatch
« Reply #7 on: January 26, 2013, 11:23:35 pm »
I'm not going to suggest how to mod a digispark board to break the USB hardware. Instead you should purchase a regular attiny85 chip and program it using your digispark. It will be cheaper and better. Unless you have a high voltage serial programmer you wont be able to reprogram your digispark in any way after you break the USB port.

Trakkasure

  • Newbie
  • *
  • Posts: 28
Re: Digiwatch
« Reply #8 on: January 29, 2013, 07:31:46 am »
I've been learning microcontrollers (as a beginner) for the past couple of months. Found some limitations in the arduino implementation ( simply because of the nature of microcontroller differences ) and am learning more how to program the controller than the environment. I hope this will allow me to better utilize the small space available to me for development.


This book: http://archive.org/details/TinyavrMicrocontrollerProjectsForTheEvilGenius.pdf (it's a web page with links to 6 different book formats)
is what I am using to learn. It's not arduino based... but it is helping me understand the underlying hardware.


I really like watches, and want to do both digital and analog.
A watch with the digispark running arduino is a difficult problem given the overhead imposed by the arduino libraries.


 -- Brandon