Wednesday, September 10, 2014

See my latest video. Not much new, but the first time to see the completed prototype.


I will be creating a tab with all of the files required for this version of the watch. The two versions are:

v1: With thumb wheel and GY-80 IMU. (will not fit in iPod nano case, but you can use the backlight made for the display. Also no board mounted piezo speaker - but hookup pads available)

v2: With 3 micro pushbuttons and discrete chips for IMU and Pressure sensing and board mounted speaker. (will fit nano case)

Saturday, August 30, 2014

Final Prototype (Yeah, right)


Here is the assembled watch in it's case.


Note, I changed the watch face from the previous prototypes. You know why? Because I can!! I love having a watch that is totally customizable.

This current version is different from the last because, instead of using an IMU board with the 3.3V power supply and the sensors, I have used discrete components. This has reduced the thickness to be able to mount the whole project in the iPod nano case. Well, almost. The battery is sitting on the outside of the case but adds so little to the width it is nearly undetectable. Here is the new assembled board:



The small square to the right of the ATMega1284p is the LSM9DS0 IMU chip and just to the right of that (the small silver looking square) is the BMP180 Pressure sensor. Note that I had to take part of the case off of the piezo speaker (large square on top of board) so that it would have the clearence needed to slide the case over it.

Here is the case going on:



Next, I position the battery and tape it down:



That is it. Place the band on and you are good to go.

Notice the profile. The battery is almost invisible.


That is it. You have an assembled watch. I will be posting a video soon. I have a couple of the blank pc boards for this project, so I may make them available to anyone looking to take on this project. All components come from Mouser and I will post the parts list when I post the updated schematic and layout files.


If you like this project, please like the post and share it with your friends. And don't forget to vote for it in the Atmel Simply AVR design contest!!! Thanks so much!!

Wednesday, August 13, 2014

I posted an updated video of the prototype watch. Go see it in action.


Friday, August 1, 2014

Final look

Here is a picture of what I am going for. This is my first prototype (with the sensor board removed) in the Apple Ipod Nano Aluminum Watch Band.


Really pretty. But here is the thing. It is tight in that case. The Ipod Nano 6th gen is tiny!!! I have the battery for it next to the watch in the picture and you can see that it takes up half the volume of the compartment. To make this all fit and still make it so it can be a hobbyist project may be a little much. The piezo speaker I got in from Mouser is only 3mm tall and is way too big for the housing. It will also be tough for the battery to slip in on top of components mounted on the board. I have a couple of options. I can make the watch a little thicker and stay with the rubber case which is pretty forgiving, I can strip the watch down a bit to fit in the nice rugged case, or I could try to fabricate a custom case for it. I am leaning toward the rugged case. I think the next watch will probably be a redesign using a Sharp Memory Display and a dedicated power management chip. I may also go with an ARM processor. I will update as this unfolds.

Thursday, July 31, 2014

Battery voltage measurement

I have been thinking about the battery voltage measurement. There are many trade offs in the different methods to accomplish this. The voltage divider I have now works fine. In a voltage divider, the lower the resistance values, the better resolution you have, but the more current you draw. I use 100k ohm resistors so the total current draw (continuous draw) is 20 micro amps. This doesn't feel really good as the Atmel mega1284 can power down to about 1 microamp. The alternative is to add a switching circuit like a FET to switch on the power to the voltage divider. This would make the current draw almost zero when not in use, but adds to the complexity of the board layout. I think for the current version I am going to go with the simple voltage divider and suck up the current draw. After all, the lcd is drawing about 250 microamps anyway and my goal is really to stay below half a milliamp in idle mode. For later models I will consider some of the new battery monitors/manager chips out there. They are good at not only reporting voltage but tracking battery capacity to give you a better idea of remaining battery life. Parts arrived from mouser (particularly the small switches I need) so I will be finalizing the design of the next version. As much as I hate it, I will probably leave out the Bluetooth at this point because I really want this to fit in a good looking case. Stay tuned for updates.

Monday, July 28, 2014

Using the Watchdog Timer for Periodic Tasks

The more I read the datasheet on the mega1284p the more I am amazed at what I learn about chips I have been using for a long time. Forget about using timer 2 for your periodic tasks. It is nice because it can continue to run in sleep mode but it is only an 8 bit counter. Even with the max prescaling (1024) with my 8 Mhz clock you roll over about every 0.03 seconds. This forced me to keep a counter running to only update my clock every 1 second or so because the overhead of doing it every 0.03 seconds crashed the processor. Then I read the section on the Watchdog Timer. I have used it before to reset the processor when my code hung up, but I learned that the WDT can be used in interrupt mode only. This means I can use it for the periodic functions. And the great part is it has it's own clock source which will allow it to roll over from 16ms to 8 seconds. And this leaves Timer 2 for other Arduino functions or I can bring the chip down to lower shutdown levels to conserve battery power. You have to use a timing sequence to enable the WDT, so after some searching and tweaking, I found the following to work:

// Setup the watchdog timer to overflow every 8 seconds.
  MCUSR &= ~(1<<WDRF);
  WDTCSR |= (1<<WDCE) | (1<<WDE);
  WDTCSR = 1<<WDP0 | 1<<WDP3; // Set Watchdog Timer to interupt on 8 second overflow
  WDTCSR |= _BV(WDIE); // Enable Interupt but not Reset

That was it. I then used the Interrupt service routine to set my update flag ( the interrupt caused the chip to wake up from sleep)

SIGNAL(WDT_vect){
  //Add periodic operations
  if (mSelect == -1) clockUp = true; // The current mode is the clock, otherwise, don't update
}

I am currently optimizing the code to minimize battery power. I have it down to about 0.6 ma in sleep mode. The lcd should be about 0.25 ma. Unfortunately, the rest is mostly the stock IMU board. Even placing the individual components in low power mode, it is still a big draw. I am going to fix that in my next design by replacing the board with a BMP180 and a LSM9DS0 IMU. These should virtually disappear in low power mode and the 0.25 ma for the display should be just about all I see. That will give about 16 days of standby time for the 100mah battery I have. I have ordered the final parts from Mouser and will finish the PC board layout after they arrive. The new design will have the improved IMU, barometer, bluetooth, an installed speaker, and I hope, will all fit in the LunaTik ipod nano 6th gen watch case to make this project truly wearable and good looking. Stay tuned.

Saturday, July 12, 2014

Board Layout:
Board Layout (*.brd)

Schematic:
Schematic (*.sch)

Arduino Sketch (zip):
Arduino Sketch (*.zip of all tabs)

These files will give you a good idea of how I constructed the watch. Note: these are still all in their early development stages and do not have a lot of polish or annotation.