loading

UPDATE: CHECK OUT MY OTHER TWO PROJECTS >>

SweeperBot - Roomba-like Robot With Bluetooth

Alarm Clock with Infrared and Bluetooth Speakers

Hi folks! Last few days I've been obsessed with the idea to make my own watch from arduino parts, but something cool I could use and say I did it myself. So I found out there was a sensor board (commonly named GY-87) which had three sensors on it: HMC5883L (compass), BMP085 (pressure, altitude, temperature) and MPU6050 (accelerometer and gyroscope). With it, via I2C, I could add an Arduino Pro Mini, and an I2C Oled Display and make a watch capable of having all this information, plus a pedometer (by analysing accelerometer data).

Cool enough, it was incredibly easy to make, and you will just need some cheap parts, a small amount of Eagle PCB knowledge, some skill on making your own PCB board, and preferably a cheap watch to unmount and get the bracelet / carcass.

Before start, I'll just post some pictures of previous versions I made so you can have an idea of the challenges you'll face, and stuff you can add if you like. Let's get going!

Observation: forgive me if my english is not good enough, this is not my native language, for I am brazilian. XD

Step 1: Previous Versions

There were two previous versions of the watch. The first one was an attempt to put compass and bluetooth together. It succeeded. The watch was small in size, but too thick. The first three images are it. It could communicate with my Windows Phone via bluetooth, get automatically the time and date, and also my next calendar appointments and display them. It was also sending many times per second the current compass position, and the phone would display it. Yeah, I had to make the WP app. I think I have it here, so I'll post it with the instructable. However there were some problems with the Project:

  1. The bluetooth consumes A LOT of energy, and the battery lasted just for an hour or so;
  2. There was no real advantage in using the bluetooth, because the date and time you could put also using the buttons, and if the battery could last a day long, you would charge before running out, so you wouldnt have to put date and time again;
  3. The calendar thing was great, but was kind of useless, because you could always check it on the phone, and as the watch had limited memory space, you couldnt download all the calendar;
  4. Plus, each alteration of calendar would require to sincronize again;
  5. Sending the compass back to the phone and spinning a compass on the display was great too, but of course useless, because the watch already did that;
  6. The watch had resistors on each button, something I found out later that was useless, because arduino already has pull up resistors on each digital input pin, you just have to turn it on;

So I tried to make another with the bluetooth, but one that you could turn it on with a switch. It turned out that switching it on and off resets the arduino . I figured out that I didnt need the bluetooth, so I made a second version, with an MPU9150 (compass, accelerometer and gyro). The second version is on the next 13 images. It was a pretty better unit, also with two buttons (I still used resistors on them), larger in size, and less thicker than the original. The battery was smaller, and I managed to make a carcass to wear it. It got kind of steampunk look, but wasnt something I would wear on the street (lol). The battery lasted 14 hours! Amazing! Problems as follow:

  1. I could have desoldered the two leds that there are on the boards: one on the arduino and one on the MPU9150 to spare energy;
  2. There was no need to use resistors;
  3. There was no need to have two buttons, because I could implement via software two functions to the same button;
  4. It was too thick;
  5. The carcass wasnt great, and was too big;
  6. The charging was made via a two pin conector on the side, and if just one time you got confused and put the conector inverted could burn the system - it had to be fool proof;
  7. I glued everything with silicone glue, however I found out silicon glue oxidate the copper and the tin, conducting current, so it was a problem;

The third version was the first to be one I could use on street and is pictured on this instructable: it is on the last four images. The battery lasts 24 hours easily, and I took out one led from the GY-87 sensors board. I left one led because I forgot to take out, but ended cooler this way. However there are some stuff I can improve on future versions:

  1. I drilled the hole for the button and for the charging conector too distant one from the other;
  2. I could have placed the parts better, sparing space;
  3. I could have designed the pcb on Eagle way better, voiding short circuits;
  4. I could have programmed better the pedometer;

Next step we assemble the componentes!

UPDATE: the battery lasted 26 hours on regular use.

<p>is it possible to send the pedometer data to a device such as mobile</p>
I am getting a fuzzy display at the OLED. Uploaded the same code and also verified the connections. Is it regarding the refresh rate?
<p>I heard there will be problems with the project. are you planning to make an update? Thanks</p>
<p>And also i saw that there was a problem with the PCB. Do you know where I can upload it online and order it?</p>
<p>And also i saw that there was a problem with the PCB. Do you know where I can upload it online and order it?</p>
Hi, <br>Thx for your post, it's a great project. <br>I'm beginning in arduino coding, i managed to get the data from the accelero but i'm struggling with the detection of a peak, to count the step..is there any chance i see your code ? <br>Thank you so much
<p>Good job. I like it.</p>
<p>please guide me from the first step.</p>
<p>hey man......i desperate to make it any how....guide me for where i will start that thing and from where i start to work on it</p>
<p>Hi Very Nice ! good job !!</p><p>But... i have a problem with the code :</p><p>RelogioRedondo.ino: In function 'void setup()':</p><p>RelogioRedondo.ino:122:11: error: 'class HMC5883L' has no member named 'SetScale'</p><p>RelogioRedondo.ino:123:19: error: 'class HMC5883L' has no member named 'SetMeasurementMode'</p><p>RelogioRedondo.ino:123:38: error: 'Measurement_Continuous' was not declared in this scope</p><p>RelogioRedondo.ino: In function 'void leitura()':</p><p>RelogioRedondo.ino:277:3: error: 'MagnetometerScaled' was not declared in this scope</p><p>RelogioRedondo.ino:277:22: error: expected ';' before 'scaled'</p><p>RelogioRedondo.ino:278:17: error: 'scaled' was not declared in this scope</p><p>Do you have a idea !!?? (Im a nerd.. and sorry with my bad english :( </p>
<p>Any idea how much battery the display consumes?</p><p>I'm thinking of making one with a bluetooth module and no display.</p>
<p>It consumes around 8mA... you can see my blog post about that http://bengoncalves.net/2015/10/01/oled-display-and-arduino-with-power-save-mode/</p>
<p>Then I think keeping the display would be better. I was thinking of using only the accelerometer sensor and a pulse sensor so that it can become a fitness tracker.</p>
Cool! I also wanna do a project about a watch based on Arduino. I image the watch could recognize body gesture instead of control by button. And now the question is how to recognize the gesture by the data received from the sensor?
Excuse me, can you please mail me the schematic for the watch please? It Because i really dont understand the way you tell how to install all of the electronic in word :).. im kind of person that can understand by picture and not by read ..sorry
<p>I put the schematic to download inside the file Eagle.zip that you can find above. Thanks.</p>
Hey man, its me again...just want to ask you how do i put 2 more button in the circuit ?since it look pretty dificult to use only one button .
<p>oh, my bad.. i didnt see the file haha... thanks </p>
<p>Saw your project through twitter.<br>Looks promising!</p>
<p>Wow, and thank you so much for sharing your process. Out of curiosity how long did it take you from start to finish? ... presuming you had all the parts on hand</p>
<p>It took two days. But I copied part of my code from my other previous projects.</p>
Hey man it me again,umm you know I buy the sensor board from the link that you suggest and the thing is the sensor didn't arrive at me yet, and it already over from the estimate days that they mention,I bought all item from the link that you give and all of them has already arrive except the sensor board and it really worry me out since the price for that item was really expensive for me and I have complain about that problem to the seller using email and I didn't get any reply . So I hope you can help me about that because I really getting pump up to build this watch :(
<p>Well if it helps you, I bought a lot of items from that seller and all of those arrived just fine. Perhaps its the way he posted it on the mail. Do you have tracking code? Here in Brazil these chinese items can take up to three months to arrive. But I trust the seller. Hope you item arrive soon.</p>
Well maybe you right...BTW I live in Malaysia so usually it only take two or three weeks to arrive, maybe I'm too impatient.
<p>You will face many problems during you Project. I'm making a blog to write about the next version of my watch http://bengoncalves.net/</p>
Yeah thats true. And I will surely checkout the blog that you create
<p>Excuse me . I want to ask a question . I do the step like you , but my OLED can't display the screen like yours . What may be the problem I had ?</p>
<p>This is my situation .</p>
<p>Are you using my code? or did you write one yourself?</p>
I am using your code
<p>I updated the code. See if it works.</p>
<p>It works , but there still are something wrong . I can't push the button to switch the mode. Will the button affect it ? I use the four leg button . </p>
<p>Otherwise , the second changes too late . </p>
<p>On this latest version I put the arduino to sleep, and all the sensors to sleep. It is easier to take this part of the code out because It messes with the button and with the timer. </p>
<p>Excuse me . Is the code &quot;wire.beginTransmission(0x68)&quot; different from 0x3D or 0x3C ?</p>
<p>0x68 is 104 in decimal and 3D is 61 and 3C is 60.</p>
<p>If I use different address , should I have to change other code like 0x6A of wire.write(0x6A) ? Or the only different problem to all ssd1306 is address? </p>
<p>Again, I cant understand what you are saying. What problem do you have with your circuit? Which sensor is not working? Each sensor has its own address. Mine are these. Only the 50 and 51, that I added extra right now.</p>
<p>Sorry about that . I'm not native speaker ,too . I'm a little poor at English . I means that the program only find 0x3C . Should I adjust the number code in wire.beginTransmisson and wire.write to 0x3C ? I using the scanner code here, http://playground.arduino.cc/Main/I2cScanner .</p>
<p>And there are something wrong happen again . </p>
<p>No, it's not the code. If i2cscanner dont find all your sensors, it means that they are no connected right. The problem is on the board. Check your connections. The 0x3c means the arduino is only finding the display, but no sensor. In the picture it seems your sensor is on, with VCC and GND right (led on), so I would guess you connected wrong SDA and SCL (you inverted them). Check that. Post results.</p>
Ok
<p>this is the all thing I got .</p>
<p>Well, the 0x68 is the MPU6050 (accelerometer) and the 77 is the BMP180 (pressure, temperature and altitude sensor). Still, there is the Compass to be found yet. But good job, you are improving your project. There is a problem you can see if fix this. The sensor board have 5v input and 3.3V output. Your pro mini is 5V? if not, like mine, that was 3.3V, I just put the Vcc from the arduino on the 3.3V output from sensors and left the 5V input unconnected. If your arduino is 3V and you are supplying it like was 5V, then there could be a problem.</p>
Will the problem happen for USB limite ? Mine is 3.3V ,and the board I choose right .The downloader connect board and notebook is 3.3V.
<p>No... but did your programmer have 3.3V and 5V options? mine ftdi tool has a jumper to switch between them. In the back of it.</p>
Yes,and I choose 3.3V.
<p>Are the addresses of HMC58883L and OLED same ? </p>
<p>Yes, they are different addresses for different parts. Depends on your AD0 pin on the sensors board their number may wary. Use i2cscanner to check their correct addresses. Search i2cscanner on Google.</p>
Will the address affect all other code about 0x..?