Showing posts with label stylish. Show all posts
Showing posts with label stylish. Show all posts

Citi Bike Helmet

Sunday, 23 June 2013

Citi Bike Helmet

 

Overview 

Improve your visibility with style! Mod up this bike helmet with LED strip, a FLORA GPS, and find your way to the nearest Citi Bike station with ease. We used a Carrera foldable helmet, which has grooves between the protection, perfect for NeoPixel strip.

Before you begin this project, we recommend reading the following guides:
Do not affix electronics to the outer smooth surface of your bike helmet! Helmets are designed to be smooth for your safety.
This project was created in collaboration with Tyler Cooper & Justin Cooper, with major video help from Risa Rose and JM Imbrescia.

Tools & Supplies 

For this project, gather up:

Any entry level 'all-in-one' soldering iron that you might find at your local hardware store should work. As with most things in life, you get what you pay for.
Upgrading to a higher end soldering iron setup, like the Hakko FX-888 that we stock in our store, will make soldering fun and easy.

Do not use a "ColdHeat" soldering iron
! They are not suitable for delicate electronics work and can damage the Flora (see here).

Click here to buy our entry level adjustable 30W 110V soldering iron.

Click here to upgrade to a Genuine Hakko FX-888 adjustable temperature soldering iron.

Learn how to solder with tons of tutorials!

You will want rosin core, 60/40 solder. Good solder is a good thing. Bad solder leads to bridging and cold solder joints which can be tough to find.

Click here to buy a spool of leaded solder (recommended for beginners).

Click here to buy a spool of lead-free solder.

You will need a good quality basic multimeter that can measure voltage and continuity.

Click here to buy a basic multimeter.

Click here to buy a top of the line multimeter.

Click here to buy a pocket multimeter.

Don't forget to learn how to use your multimeter too!

Don't forget your wire strippers, pliers, and flush snips!

Wiring Diagram 

Repeat the process above with the GPS module, connecting corresponding TX/RX pads to FLORA (remember that TX goes to RX and RX goes to TX).

Sugru insulates the back of the GPS module from the LSM303 and FLORA main board, and also provides a semipermanent sticky situation. The silicone is not quite an adhesive, though it will remain affixed unless you choose to carefully peel it off.

The lithium polymer battery slides behind the elastic of the head brace. We sewed a small fabric pouch around the battery, which in turn was stitched to the elastic. 

Build Circuit 


Wrap a long piece of NeoPixel strip throughout the grooves in the Carrera "foldable" helmet. Start at one back edge, shifting the strip so that four LEDs are visible to the rider along the front brim.

Cut the strip to length at the opposite back edge and tack the LED strip to the nylon webbing in the grooves of the helmet with a needle and clear thread. We didn't affix to every piece of webbing, just in enough spots to secure the LED strip.
Do not affix electronics to the outer smooth surface of your bike helmet! Helmets are designed to be smooth for your safety.

Using a needle and more clear thread, affix the FLORA main board to the back head brace of the helmet through two unused pins (we used the 3.3v pad next to the USB port and the GND pad next to the JST connector).

Strip and tin three wires, then solder them to the input side of the LED strip.

Cut to length, strip and solder these wires to VBATT, D6, and GND, referring to the wiring diagram on the previous page if necessary.

Solder small flexible wires to the LSM303 accelerometer/compass module, then apply a small piece of Sugru to cover the back of the module. Stick it in the middle of the FLORA main board, making sure not to cover the on/off switch or reset button. We are making a circuit sandwich!

Solder the wires to 3.3v, SCL, SDA, and GND on FLORA, referring again to the wiring diagram.

Program it

Created by Becky Stern
The Citi Bike Helmet code takes the FLORA to the limit. The code is used to drive LEDs, the FLORA GPS module, and the FLORA compass/accelerometer module. It looks at a long list of all Citi bike sharing stations in NYC (over 300!) and determines which coordinate is closest to you. It then uses the GPS module, and the compass module to navigate you there. Click the button below to download the code.
Download the Citi Bike Helmet Arduino Sketch
This code example requires the following Arduino libraries:
Adafruit GPS library which can be downloaded from https://github.com/adafruit/Adafruit-GPS-Library
Adafruit NeoPixel library which can be downloaded from https://github.com/adafruit/Adafruit_NeoPixel
Pololu LSM303 library which can be downloaded from https://github.com/pololu/LSM303
Learn how to install libraries here.
Right near the top of the sketch, you are going to see a long list of GPS coordinates that look like this:


float lat_lon[LAT_LON_SIZE][2] PROGMEM = {
{40.767272, -73.993928},
{40.719115, -74.006666},
{40.711174, -74.000165},
These coordinates were copied and pasted using a bit of node.js (learn more here). This also means that if you live in a city other than NYC that has a bike sharing program, you can use our code to get your own list of coordinates. If you live in NYC, all of the current bike share stations are loaded into the sketch.
The next piece of important code is this:


Adafruit_NeoPixel strip = Adafruit_NeoPixel(45, 6, NEO_GRB + NEO_KHZ800);
int FarRight = 9;
int CenterRight = 10;
int CenterLeft = 34;
int FarLeft = 35;
int HeadsUp[] = {35, 34, 10, 9};
int RightStrip[] = {8, 7, 6, 5, 4, 3, 2, 1, 0};
int RightCenterStrip[] = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};
int LeftCenterStrip[] = {33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23};
int LeftStrip[] = {36, 37, 38, 39, 40, 41, 42, 43, 44};
int counter = 0;
This is where we set up which LEDs on our helmet are used. This will likely need to be updated to fit your own bike helmet project. Learn more about how the FLORA NeoPixels work here.

In the setup function, you will find a section that deals with calibrating the FLORA compass module.


// Calibration values. Use the Calibrate example program to get the values for
// your compass.
compass.m_min.x = -581; compass.m_min.y = -731; compass.m_min.z = -1097;
compass.m_max.x = +615; compass.m_max.y = +470; compass.m_max.z = 505;
Included with the Pololu LSM303 library is a little sketch that will get you these values. Run the sketch and view the serial monitor. Then tilt your helmet/sensor in every possible direction. When done, dump the values in the serial monitor into the above bit of code (replacing our values).

Thats about all you need to know to get started. Upload the code to your FLORA, and you are ready to hit the road.
To test out your animations inside, try the following code that reacts to just the compass:


#include <Adafruit_NeoPixel.h>
#include <LSM303.h>
// Test code for Adafruit Flora GPS modules
//
// This code shows how to listen to the GPS module in an interrupt
// which allows the program to have more 'freedom' - just parse
// when a new NMEA sentence is available! Then access data when
// desired.
//
// Tested and works great with the Adafruit Flora GPS module
// ------> http://adafruit.com/products/1059
// Pick one up today at the Adafruit electronics shop
// and help support open source hardware & software! -ada

Adafruit_NeoPixel strip = Adafruit_NeoPixel(45, 6, NEO_GRB + NEO_KHZ800);
int FarRight = 9;
int CenterRight = 10;
int CenterLeft = 34;
int FarLeft = 35;
int HeadsUp[] = {35, 34, 10, 9};
int RightStrip[] = {46, 8, 7, 6, 5, 4, 3, 2, 1, 0, 46};
int RightCenterStrip[] = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};
int LeftCenterStrip[] = {33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23};
int LeftStrip[] = {46, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46};
int counter = 256*5;

#include <Wire.h>
#include <LSM303.h>

LSM303 compass;

void setup() {
Serial.begin(9600);
Wire.begin();
compass.init();
compass.enableDefault();

strip.begin();
strip.show(); // Initialize all pixels to 'off'

// Calibration values. Use the Calibrate example program to get the values for
// your compass. M min X: -561 Y: -679 Z: -558 M max X: 232 Y: 109 Z: 224
compass.m_min.x = -561; compass.m_min.y = -679; compass.m_min.z = -558;
compass.m_max.x = 232; compass.m_max.y = 109; compass.m_max.z = 224;
}

void loop() {
compass.read();
int heading = compass.heading((LSM303::vector){0,-1,0});

//Use this part of the code to determine which way you need to go.
if ((heading > 348.75)||(heading < 11.25)) {
Serial.println(" N");
//Serial.println("Forward");
GoForward(strip.Color(0, 51, 20), strip.Color(255, 255, 0), 200);

}

if ((heading >= 11.25)&&(heading < 33.75)) {
Serial.println("NNE");
//Serial.println("Go Left");
GoForward(strip.Color(0, 51, 10), strip.Color(255, 255, 0), 200);
}

if ((heading >= 33.75)&&(heading < 56.25)) {
Serial.println(" NE");
//Serial.println("Go Left");
TurnLeft(strip.Color(11, 79, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 56.25)&&(heading < 78.75)) {
Serial.println("ENE");
//Serial.println("Go Left");
TurnLeft(strip.Color(39, 79, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 78.75)&&(heading < 101.25)) {
Serial.println(" E");
//Serial.println("Go Left");
TurnLeft(strip.Color(74, 79, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 101.25)&&(heading < 123.75)) {
Serial.println("ESE");
//Serial.println("Go Left");
TurnLeft(strip.Color(74, 79, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 123.75)&&(heading < 146.25)) {
Serial.println(" SE");
//Serial.println("Go Left");
TurnLeft(strip.Color(79, 61, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 146.25)&&(heading < 168.75)) {
Serial.println("SSE");
//Serial.println("Go Left");
TurnAround(strip.Color(79, 61, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 168.75)&&(heading < 191.25)) {
Serial.println(" S");
//Serial.println("Turn Around");
TurnAround(strip.Color(79, 32, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 191.25)&&(heading < 213.75)) {
Serial.println("SSW");
//Serial.println("Go Right");
TurnAround(strip.Color(79, 61, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 213.75)&&(heading < 236.25)) {
Serial.println(" SW");
//Serial.println("Go Right");
TurnRight(strip.Color(79, 61, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 236.25)&&(heading < 258.75)) {
Serial.println("WSW");
//Serial.println("Go Right");
TurnRight(strip.Color(74, 79, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 258.75)&&(heading < 281.25)) {
Serial.println(" W");
//Serial.println("Go Right");
TurnRight(strip.Color(74, 79, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 281.25)&&(heading < 303.75)) {
Serial.println("WNW");
//Serial.println("Go Right");
TurnRight(strip.Color(39, 79, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 303.75)&&(heading < 326.25)) {
Serial.println(" NW");
//Serial.println("Go Right");
TurnRight(strip.Color(11, 79, 0), strip.Color(255, 255, 0), 200);
}

if ((heading >= 326.25)&&(heading < 348.75)) {
Serial.println("NWN");
//Serial.println("Go Right");
GoForward(strip.Color(0, 51, 10), strip.Color(255, 255, 0), 200);
}
}

void TurnLeft (uint32_t c, uint32_t stripe, uint8_t wait) {
strip.setPixelColor(CenterRight, 0);
strip.setPixelColor(CenterLeft, 0);
strip.setPixelColor(FarLeft, c);
strip.show();
for(uint16_t i=0; i<11; i++) {
strip.setPixelColor(LeftCenterStrip[i], strip.Color(0, 0, 0));
strip.setPixelColor(LeftStrip[i], strip.Color(0, 0, 0));
strip.show();
delay(30);
}
//delay(wait);
strip.setPixelColor(FarLeft, 0);
strip.show();
colorWipe(stripe, 30);
//delay(wait);
}

void TurnRight (uint32_t c, uint32_t stripe, uint8_t wait) {
strip.setPixelColor(CenterRight, 0);
strip.setPixelColor(CenterLeft, 0);
strip.setPixelColor(FarRight, c);
strip.show();
for(uint16_t i=0; i<11; i++) {
strip.setPixelColor(RightCenterStrip[i], strip.Color(0, 0, 0));
strip.setPixelColor(RightStrip[i], strip.Color(0, 0, 0));
strip.show();
delay(30);
}
//delay(wait);
strip.setPixelColor(FarRight, 0);
strip.show();
colorWipe(stripe, 30);
//delay(wait);
}

void TurnAround (uint32_t c, uint32_t stripe, uint8_t wait) {
strip.setPixelColor(CenterRight, c);
strip.setPixelColor(CenterLeft, c);
strip.show();
for(uint16_t i=0; i<11; i++) {
strip.setPixelColor(LeftCenterStrip[i], strip.Color(0, 0, 0));
strip.setPixelColor(RightCenterStrip[i], strip.Color(0, 0, 0));
strip.show();
delay(30);
}
//delay(wait);
strip.setPixelColor(CenterRight, 0);
strip.setPixelColor(CenterLeft, 0);
strip.show();
colorWipe(stripe, 30);
//delay(wait);

}

void GoForward (uint32_t c, uint32_t stripe, uint8_t wait) {
strip.setPixelColor(CenterRight, c);
strip.setPixelColor(CenterLeft, c);
strip.show();
for(uint16_t i=0; i<11; i++) {
strip.setPixelColor(LeftCenterStrip[i], strip.Color(0, 0, 0));
strip.setPixelColor(RightCenterStrip[i], strip.Color(0, 0, 0));
strip.show();
delay(30);
}
colorWipe(stripe, 30);
//delay(wait);
}

// Slightly different, this makes the rainbow equally distributed throughout
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<11; i++) {
strip.setPixelColor(LeftCenterStrip[i], strip.Color(255, 255/i^16, 255/i^16));
strip.setPixelColor(RightCenterStrip[i], strip.Color(255, 255/i^16, 255/i^16));
strip.setPixelColor(RightStrip[i], strip.Color(255, 255/i^16, 255/i^16));
strip.setPixelColor(LeftStrip[i], strip.Color(255, 255/i^16, 255/i^16));
strip.show();
delay(wait);
}
}


// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
if(WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}

Wear it!

Created by Becky Stern

The sample code uses the LEDs at the right and left edge of the helmet's brim to signal you to turn, and uses the two LEDs in the center of your forehead to tell you "go forward" (solid blue) or "turn around" (blinking red). Customize to your own navigation style!


Oh hey! You weren't thinking of wearing this helmet in the rain, were you? The circuit isn't waterproof! We recommend removing the battery if you have to wear it in the rain, then waiting until it's completely dry before reconnecting.

   


Repeat the process above with the GPS module, connecting corresponding TX/RX pads to FLORA (remember that TX goes to RX and RX goes to TX).

Sugru insulates the back of the GPS module from the LSM303 and FLORA main board, and also provides a semipermanent sticky situation. The silicone is not quite an adhesive, though it will remain affixed unless you choose to carefully peel it off.

The lithium polymer battery slides behind the elastic of the head brace. We sewed a small fabric pouch around the battery, which in turn was stitched

Optional: Generating Coordinates

Created by Becky Stern
You may need to re-generate the coordinates for the bike stations from time to time, and this page will show you how to do that.

Another reason you may want to re-generate coordinates is so you can use the bike share system in your city with the helmet! It isn't limited to the NYC Citi Bike system.

The below code will parse the wonderful citybik.es api:


var request = require('request');
var BIKE_SHARE_URL = 'http://api.citybik.es/citibikenyc.json';
request(BIKE_SHARE_URL, function (error, response, body) {
if (!error && response.statusCode == 200) {
var comma = ",";
var locations = JSON.parse(body);
locations.forEach(function(l, i) {
if (i === locations.length-1)
comma = "";

console.log(" {" + (l.lat / 1000000).toFixed(6) + ", " + (l.lng / 1000000).toFixed(6) + "}" + comma);
});

console.log(locations.length);
}
});
Let's not get too far ahead of ourselves though. First, we need to install the dependencies to run that code.

To start with, you'll need node.js. It's a really easy install. Navigate to http://nodejs.org, and follow the installation instructions for your operating system (Windows, Linux, and OS X are supported).

Next, create a folder somewhere (mine is titled 'cityparser'). Then, create a file in that folder titled parser.js and copy and paste the above snippet of code into that file, and save it.

Now, open your favorite command line utility (Terminal.app, cmd.exe, etc) and navigate into the 'cityparser' folder.

Now, we need to install the one dependency that is required for the parser to run. Execute the following from within the cityparser folder:


npm install request
Now that you have request installed, you can (finally!) run the parser to generate the locations for your particular city bike share program.

Execute the following command to run the parser:


node parser.js
Great! It should have output a bunch of coordinates with a count at the end of it.

For example, these are the last few of my output:


{40.715348, -73.960241},
{40.741472, -73.983209},
{40.736502, -73.978094},
{40.744449, -73.983035},
{40.702550, -73.989402},
{40.698920, -73.973329},
{40.716887, -73.963198},
{40.734160, -73.980242},
{40.725500, -74.004451},
{40.705311, -73.971000},
{40.765909, -73.976341}
311
If your output is similar to the above, you'll now want to choose the correct BIKE_SHARE_URL for your city (NYC pre-loaded).

Open the citybik.es api page, and scroll down to the section titled "System" and "JSON". Choose your location from the dropdown, and then replace it in the parser.js file variable "BIKE_SHARE_URL" and re-run the program.

Ok, now to set up your sketch. The last number in the results is the count of locations in that bike share. Take that number and place it in the sketch for the size of the array:


#define LAT_LON_SIZE 311
Then, copy and paste all of the locations (not the number), and replace the existing locations in the Bike Helmet Sketch. It should look something like this:


float lat_lon[LAT_LON_SIZE][2] PROGMEM = {
{40.767272, -73.993928},
{40.719115, -74.006666},
{40.711174, -74.000165},
{40.683826, -73.976323},
{40.702550, -73.989402},
{40.698920, -73.973329},
{40.716887, -73.963198},
{40.734160, -73.980242},
{40.725500, -74.004451},
{40.705311, -73.971000},
{40.765909, -73.976341}
};
Now, compile your sketch, upload it, and start biking!








Read more ...

TIMESQUARE Watch Kit

Saturday, 22 June 2013
 TIMESQUARE Watch Kit
Show up stylish AND on time to any event with this awesome looking DIY watch.

Overview 

Show up stylish AND on time to any event with this awesome looking DIY watch. We have a few watch kits here at Adafruit but we finally have one that looks good and fits well, even for ladies and kids and others with smaller wrists and hands. Its got a 8x8 bit matrix display and a repurposed silicone watch band for a professional look.
64 LEDs light up to tell you the time in a variety of ways. Built into the kit are 3 different watch 'faces' - a scrolling marquee with time and date, a binary watch display (for geeks, robots and binary fans), and a moon phase display (for beach-combers, werewolves). There's also a built in battery meter so you can check your battery life. Want to make your own watch? Easy! The microcontroller is an Arduino-compatible, all you need is an FTDI Friend and the Arduino IDE and you can design your own watch faces and upload them to the TIMESQUARE.
1106moon_orig.jpg

Engineered for greatness by PaintYourDragon, this watch squeezes over 1000 full time displays out of a coin battery, and a 1+ year 'resting' lifetime, so you can use this as a day-to-day time keeper.

This watch comes with a ultra bright red LED matrix and a black silicone watch band that fits all wrists from children to adult.
This is a DIY kit, and requires some basic soldering/assembly to put together. It is a beginner kit, so this is a fine project to use in learning how to solder. Tools are not included, you'll need a soldering iron, solder and diagonal cutters as a minimum. Check the tutorial page for details on what tools and steps are required to assemble. Take about 1-2 hours to put together. Build it in the afternoon and you'll be done in time to hit the clubs in the evening.

Tools List 

Tools

There are a few tools that are required for assembly. None of these tools are included. If you don't have them, now would be a good time to borrow or purchase them. They are very very handy whenever assembling/fixing/modifying electronic devices! I provide links to buy them, but of course, you should get them where ever is most convenient/inexpensive. Many of these parts are available in a place like Radio Shack or other (higher quality) DIY electronics stores.

Soldering iron

Any entry level 'all-in-one' soldering iron that you might find at your local hardware store should work.  As with most things in life, you get what you pay for.  

Upgrading to a higher end soldering iron setup, like the Hakko FX-888 that we stock in our store, will make soldering fun and easy.

Do not use a "ColdHeat" soldering iron
!  They are not suitable for delicate electronics work and can damage the kit (see here).

Click here to buy our entry level adjustable 30W 110V soldering iron.

Click here to upgrade to a Genuine Hakko FX-888 adjustable temperature soldering iron.

Solder

You will want rosin core, 60/40 solder. Good solder is a good thing. Bad solder leads to bridging and cold solder joints which can be tough to find.

Click here to buy a spool of leaded solder (recommended for beginners).

Click here to buy a spool of lead-free solder.

Multimeter
You will need a good quality basic multimeter that can measure voltage and continuity.

Click here to buy a basic multimeter.

Click here to buy a top of the line multimeter.

Click here to buy a pocket multimeter.

Flush Diagonal Cutters

You will need flush diagonal cutters to trim the wires and leads off of components once you have soldered them in place.

Click here to buy our favorite cutters.

Solder Sucker

Strangely enough, that's the technical term for this desoldering vacuum tool. Useful in cleaning up mistakes, every electrical engineer has one of these on their desk.
Click here to buy a one.

Helping Third Hand With Magnifier

Not absolutely necessary but will make things go much much faster, and it will make soldering much easier.
Pick on


Parts List 

  • TIMESQUARE PCB - half thickness black PCB
  • ATMEGA328P - preprogrammed microcontroller
  • DS1337 - 8 pin real time clock chip
  • 32.768KHz Crystal - thin silver cylinder
  • Right angle buttons - two for either side
  • 20mm coin battery holder
  • 0.1uF ceramic capacitor - yellow blobby
  • 1 x 10K resistor - brown black orange gold
  • 8 x 47 ohm resistor - yellow violet black gold
  • 1.5" 8x8 matrix (not shown)
  • Silicone rubber watch band
  • Clear plastic cutout back
  • CR2032 Coin cell battery

Kit Assemblyhttp://adf.ly/QwpMn 


First up, check that you have all the electronic parts laid out on your table and ready for soldering!

Start by placing the PCB in a vise to keep it steady. We'll be soldering parts on TOP, where the silkscreen shows the component placing. The first part we'll place is the 10K resistor. This resistor is marked brown black orange gold. (It's also the only single resistor of that color)

Bend the resistor into a staple and slip the wire leads into the two holes so that the resistor covers the outline labeled R10 in the bottom right corner shown here

Bend the wire leads out so the resistor sits flat against the PCB. Then you can flip it over and it wont fall out!

With your soldering iron heated up and ready, solder in both leads of the resistor. To do this, heat up the round ring pad and the wire lead at the same time for 2 or 3 seconds, then dip the end of the solder into the heated joint to melt it in.
Then remove the solder and the soldering iron.

Once the soldering is complete, we can clean up by clipping the leads of the resistor. This keeps them from shorting to something else. Use diagonal or flush cutters to clip the wires right above where the solder joint ends.

Next we'll solder in the yellow blobby 0.1uF capacitor. This capacitor is part of the reset circuitry as well, and is used to help reset the chip when we want to reprogram it.

Ceramic capacitors, like resistors, are not directional. So put it in any way it fits, next to the R10 resistor, so its surrounded by the C1 outline

Then bend the leads and flip over the board.

Solder in the capacitor's two legs just like you did with the resistor

You did great with the first two parts, now we will solder in the remaining resistors R1-R8 . These resistors are the LED 'choke' resistors - they keep the LED matrix's light even and avoids having too much current draw that would kill the battery off!

All the resistors are the same 47 ohm value - Yellow Violet Black Gold

Here we placed and soldered all 8 at once but you can go one at a time if you want to take it a little slower!

Solder in all the resistors, either one at a time or all 8 at once! Make sure you don't forget any solder points, though.

Next clip all the leads!

Next up we will put in the first chip. This chip has 8 legs and has the label DS1337 on top. Make sure you've got the right label on the chip.

This chip is the "real time clock" - the timekeeper. It is a ultra-lo-power circuit, whose only task is to keep track of the time, so its pretty good at it. It's possible to have the main microcontroller chip (the next one we'll do) keep track of the time, but its not as good at it (both in terms of power and precision) so we splurged on having a seperate RTC

The important thing about chips is that they are not like resistors and capacitors in that they can't be placed 'either way'. It must be placed the right way or the chip wont work. Look for the end of the chip with a notch and a dot. These must match up the silkscreened image on the PCB so make sure the notches line up.

Solder all eight pins of the RTC

No need to clip them after they're done


Next we'll do the big microcontroller chip. This chip is the brains, it does all of the displaying and button handling. Most of the time its 'sleeping' and when you press a button it wakes up and shows the time. It has a lot of pins because the matrix requires 16 pins to draw, and then you need some more pins for buttons, the RTC chip, reprogramming, etc.

The chip is an ATMEGA328P that has been pre-programmed at the Adafruit factory to have an Arduino-compatible bootloader and our default watch display code.

To begin, flatten the pins to make them more parallel || shaped intsead of A shaped. Hold the chip in your hand and press all the pins one side at a time against a flat table.

Then when you press it into the holes, make sure each pin has made it into a matching hole, and its sitting flat against the PCB

Like the RTC, this chip must be put in the right way. The notch on the chip must go on the left side as in these photos. Check twice to make sure you have the chip in right!

Solder all 28 pins!

No need to clip them after they're done

Next we'll place both the battery holder, and the timing crystal. The battery of course is how we power the watch, and this holder keeps it in place. The timing crystal is the "Quartz Crystal" in watches, that keeps time by resonating

The battery holder does have a special way it must go, make sure you can slide the battery in by having the open side facing out

The crystal can go in either way, its symmetric, like the resistors

The battery holder will slip out if you flip over the board, so before flipping the board, solder one leg side from the top. The holder is a great heatsink so it may take a little longer than usual to solder in

Flip it over and solder in the other battery pin, then go back and do the first one.

Also, solder and clip the two crystal pins

Lastly, place the two interface buttons. You'll use these to set the time, display the time, and change watch faces.

Both go on either side of the board, and they'll snap in.

Then flip the board over and solder in all 4 pins of each

Finally, the fun part! The matrix!

The LED matrix is what you'll be looking at - 64 individual LEDs in a plastic case.

The Matrix is not symetric, it must go in the right way on the right side.
Look for the writing on the side of the matrix, this side must go on the side of the PCB with a dot as you see here. Also the matrix goes on the OPPOSITE side of the other parts!

Check that the 28-pin microcontroller pins aren't in the way of the matrix, it should sit nice and flat

Now solder in all the pins of the matrix, you may have to angle the iron tip a bit to avoid burning other parts

You can clip the leads but you don't have to (they're less long than the height of all the other parts!

Get the remaining parts out of the kit - a 20mm coin battery, silicone band and optional clear plastic back

Insert a 20mm (CR2032) coin cell battery so that the  flat + side is facing up and the bumpy side is facing down into the PCB

Place the clear back first into the band so it's at the bottom. Then stretch the band and scootch the assembly in, pulling the rubber to fit around!

When you've got it all in, you may need to pull/press the band around the PCB to have the 'nubs' fit into the notches that are molded into the band

That's it! You can now continue on to set the time and/or adjust your fit

ADJUSTING FIT


After you've assembled your watch there are a few ways to change the fit of the band around the PCB. First is trimming down the nubs on the PCB. These are there to help keep the board inside the rubber band. However, they may be long depending on your wrist size, and band (all the bands are slightly different)

Simply trim them down a millimeter at a time to help avoid them from sticking out too much

Another easy way to adjust the fit is to remove the plastic back - its not essential and for smaller wrists it may make the watch a little bulkier than desired.

OTHER TWEAKS

Kapton tape is a heat-resistant and electrically insulative tape that's used a lot in electronics. This isn’t included with the watch, but if you’ve been in this hobby for a while there’s a good chance you already have a roll handy. Wonderful stuff.
One or two layers of Kapton tape applied to the watch face make it less prone to washing out under bright light. The tape’s color is similar enough to the red LEDs that they shine through with little difficulty, while most ambient light is blocked.
Rubylith film (from a decent old-school art supply store) would probably

Setting the Time 

First wake the watch by tapping either side button. With the time display active, you can enter time-setting mode by holding down both side buttons for about two seconds. If using the watch for the first time, or after swapping batteries, it may wake in time-setting mode automatically.

Tap →⌚ or ⌚← tap

Hold
→⌚←
2 sec

Date and time are set by cycling through each digit. The currently-active digit is shown with a blinking underline cursor. Tap the left button to advance to the next digit, or tap the right button to increment the current digit (it will “roll over” to 0 or 1 as needed).

Tap →⌚ = Next digit⌚← Tap = Current digit +1

There are two digits each for the year, month, day, hour and minute, and the watch will briefly display the symbols Y, M, D, etc. when moving from one pair of digits to the next. The high and low digits are set individually…this is different from most digital clocks, we find it faster and less troublesome. The range for each digit varies, and the watch will keep the values in check.
There is no seconds adjustment. Seconds will be reset to zero when exiting time-setting mode.
The last “digit” is a 12- or 24-hour display mode selection. 12/24 currently only affects the marquee mode; the binary display is limited to 12-hour time. Advancing past the 12/24 item will scroll back to the first digit of the year. So if you overshoot a digit you wanted to set, just repeatedly tap the left button until you roll around to it again.

Tap →⌚ = Y→Y→M→M→D→D→H→H→M→M→12/24↩

To exit time-setting mode and return to the last time display mode, hold down both buttons for two seconds again.

Hold
→⌚←
2 sec


Time Display Modes 

Tap the right or left side buttons to wake the watch and show the time in the current display mode.

Tap →⌚ or ⌚← tap

Hold the left or right buttons (not both) for 2 seconds to move back or forward through modes.

Hold →⌚ 2 sec or ⌚← hold 2 sec

The sequence of modes is:

↪Marquee↔Binary↔Moon Phase↔Battery Gauge↩


Marquee mode

Inspired by the famous Dow Jones news ticker, this scrolls the current time from right to left.

Tap either side button while active to switch the display from time to date. Tap again to show the time.

Binary mode

Bright dots represent a binary “1,” dimmer dots are “0.” “Off” dots separate the digits.

The hour (1 to 12) is shown as four 2x2 pixel blocks across the top.

Minutes and seconds are 1-pixel blocks, with the high and low digits separated for easier reading (3 bits and 4 bits, respectively).

The display at left shows 4:09 and 12 seconds.

Moon Phase mode

Displays the current phase of the moon.

The resolution is limited somewhat by the screen. It’s generally accurate, but this is not a medical device — do not rely on this data if you are prone to lycanthropy.

Battery Gauge

This displays the approximate battery level.

Frequent button presses may temporarily lower the battery voltage more than this display indicates. After assembling your watch, you might run through the first battery pretty quickly in your enthusiasm to show everyone. If it seems to have suffered a premature demise, allow the watch to rest for a few hours, or try a fresh battery.
Sometimes the watch display may appear dim or flickery, regardless of the display mode. This happens when the battery voltage runs low. It’s normal behavior, an attempt by the watch to preserve battery life. Allow it to rest or replace the battery soon.

Uploading New Firmware

Now you've had your watch for a few days/weeks/months and you want to come up with your own watch designs. Lucky for you, this watch is designed specifically to be super easy to hack! If you know how to program Arduino, you're basically already there.

You'll need the Arduino IDE, and also some knowledge of how to read and write Arduino code.

To program the watch itself, you'll need an FTDI cable or FTDI Friend. This will connect your computer to the watch. If you're using an FTDI cable or anything other than the Friend, you'll also need some extra long header to press-fit.

Simply place a 6-pin extra long header into the FTDI connector and slip the other end into the top of the watch PCB, to match this photo.  Be sure to have a battery in the watch, as it does need to be powered while programming!


Next, download the TIMESQUARE watch codebase from github. Visit the github page and click on DOWNLOAD to download the ZIP file and uncompress the folder.
Rename the folder to Watch (check that the renamed folder contains the Watch.cpp and Watch.h files) and install into the arduinosketches/libraries folder. For information how to use and install libraries, see our tutorial!

Restart the IDE

When programming, select Lilypad Arduino w/ ATmega328 as the "board" type

Downloads

 
Read more ...