Withings Pop Activite: Electronic Analysis

IMG_20170306_195524907.jpg

There are two big electronic questions to answer about the activite:

  • Why does the double tap not work well?
  • What are all the parts on the board?

I have decided to document my answers to these questions in a narrative form because I think it is interesting to hear how people solve problems.

Double Tap:

It is pretty obvious that the double tapping is going to be sensed by the accelerometer, the ADXL362.  Unlike the popular STM accelerometers, the ADXL362 does not have built in double tap detection, although it does have a acceleration-based interrupt that can wake it from sleep.  In order to see how the accelerometer was configured, I stuck a logic analyzer on the SPI lines of the device and took several logs of the device in various states, especially power-on and while being tapped.

I used a saleae logic 8 and the logic software to capture the logs and exported them to text files to be parsed by python, which was necessary since each log was several hundred entries long.  This made it easy to distinguish between things that are important that change across logs from things that are not important, like slightly different acceleration readings.

The gist of what the device does on startup is:

  1. turn on the device and read some ID registers
  2. reset
  3. Read the registers again, set some thresholds*
  4. Set up FIFO and FIFO watermark
  5. Read status until FIFO watermark overflow
  6. Read FIFO
  7. Reconfigure FIFO**

The asterisk-ed items are the most interesting, since these are he registers that carry over to the actual operation of the device, and to detecting taps.  Since they get reconfigured several times, we need to look at the register states at the very end of all the configuration.  It is odd to me to see that the ID registers are poked so much and that the device is reset and read again-it makes it seems like they are using some boilerplate library to set this up.

The relevant registers that have been touched are:

THRESH_ACT_L 0XC7: sets the activity threshold to 199, which is about 1/4 g when FILTERCTL is set to 0x41

FIFO_CONTROL 0X0A: puts the device in stream mode, set MSB in FIFO buffer watermark, and turns off temperature measurement

INTMAP1 0X24: interrupt on pin 1 on either hitting the inactivity threshold or the fifo watermark

INTMAP2 0X10: interrupt pin 2 on hitting the activity threshold

FILTERCTL TO 0X41: +/-4 g range, at 25 hz, half bandwidth off

POWER_CTL 0X02: put into measurement mode

So there you have it- the device is just waiting for a signal of more than a quarter g, and then it will signal the host processor that an activity occurred.  But lets dive in a little deeper on the double tapping to see how it is detected.

Capture.PNG

 

In practice, we can investigate this behavior with the logic analyzer by sniffing the SPI lines as well as the output pin to the minute hand that moves when you double tap.  Circled in blue is the minute hand moving, and in red is the SPI transaction that detected the double tap.  The block of transactions in the middle is very similar to the power on interactions mentioned above.  I saw this pattern in several instances about 5 seconds before the minute hand ticks.

Capture2.PNG

 

zooming in on the red part shows us that there is a long time where the chip is selected, but not being read.  Lets take a look at the accelerometer data from that read.

tap 2 total.png

 

The pink line is the total acceleration, and the horizontal line is the activity threshold, which the tap threshold is probably greater than.  The blue line is the “break” in reads.  Since the total number of reads is the whole FIFO, it seems like the window for tapping is at most about 6.8 seconds (512 records % 3 * (1/25Hz)).  Likely the window is smaller than that- assuming the break happens right when the second tap is detected, we can see that the window from the last tap to the previous one is about 25 records, or about 1 second.

tap 1 total.png

 

This is backed up by a second reading, in which the second tap was detected after about 25 readings.  This very strict timing and a relatively high acceleration threshold is probably why it is so hard to get the double tapping to work.  One thing that could make it easier on users is having a larger or more permissive window, but to only sense tapping one direction- it would reduce the cost of having to sift through 1/3 of the data, and it would probably be less prone to noise.  Or you could just do what I did and bang on the face of the watch all day.

What is on the board?

img_0137

The board is shockingly bare.  In the upper left hand corner, there is the NRF51288, and its accompanying crystals (silver).  Right below it is an almost invisible ST micro Balun.  Just south of the crystals at 9 o’clock is some kind of mystery part with an inductor, or possibly an antenna.  South of that looks to be a reverse polarity protection diode.  At 6 o’clock is the motor, and at 5 o’clock is the motor driver, marked “1X W48”  At 1 o’clock is the ADXL 362 accelerometer, mounted right next to where the chassis PCB is screwed to the case.  Just CCW of that looks like some antenna balancing circuitry, but it is hard to be sure.

The really interesting thing is what is not on the board.  Very frequently with this kind of product, you will have some kind of voltage converter and a memory chip.  And for the relatively higher-current steppers, I would expect to see some kind of h bridge or FETs.

For the pop, it seems like a voltage regulator (or converter) is not needed since there are so few components, and the two heavy hitters on battery usage- the NRF and the ADXL, need to be on in low power sleep or collecting data all the time.  Since they sleep so much it is possible that the quiescent current to keep the converter running would overcome the savings in power from running at a lower voltage.

As for memory, this is the AA variant of the chip which has the expansive 256 kB flash (twice the AB variant), but only 16 kB RAM (Half the AC variant).  I imagine most of the records are then processed in some way and stored on the chip.  This saves on parts, and power on a second chip, but apparently limits the tracking 38 hours between syncs.

connex1 wheel.png

The motors that drive the hands (the movements) are probably driven from the 5mA high-current outputs on the NRF.  There can be up to 3 at any given time, meaning that a the NRF can dump a shocking 15mA out at a time, at the battery voltage.  This is consistent with reports form users that at the end of the battery life, the hands stop working, even though the watch knows what time it is.  At the end of the battery’s life, the voltage will drop, and less power will be delivered to the motor- some of these motor movements will fail, and the clock face will be wrong.  Above you can see the current output (green line) from driving the motor- the peaks are around 15 mA above the “floor”.

5x press3.png

On the other hand, the motor is too large for the NRF to handle, so some kind of FET arrangement is used to drive it.  It takes 60 mA (peak) from the battery!  That is why setting a lot of alarms is taxing on the device.

Final Thoughts:

This is a pretty simple electronics-wise for such a sophisticated device, which speaks volumes about the team that designed and built it- it is pared down to the absolute minimum complexity, with only the barest of sensor packages.  Yet I feel the device does deliver on what it promises to do.

 

Withings Activite Pop Teardown

IMG_0022.JPG

The best looking wearable I have seen, and this is the cheap version

Shockingly, nobody has taken the time to do a detailed teardown of the engineering marvel that is the Withings Activite.  I snagged the “pop” version for $40 bucks on ebay and wore it for a few days before tearing it down.  I noticed a couple of things in that time:

  • it’s not good at measuring bouldering as activity
  • the double tap function almost does not work
  • the alarm seems like it works pretty well
  • you cant read it in the dark, which makes it pretty useless as a watch

Now for the teardown- this will be the first of several posts.  This just details actually taking the thing apart.  The next two will look at the interesting electrical and mechanical aspects.

Mechanical Teardown:

IMG_0071.JPG

Step one is to pry off the back with a screwdriver using the small divot under the button.  This is the official way to replace the battery, although withings recommends taking it to a professional screwdriver user to do this.  NB if you are not going to destroy your watch, it is probably a good idea to do this with a soft, wide, rounded tool, not a random screwdriver.  This will avoid marring the case.  In the rear case there is a tiny spring plunger, a piece of foam to back up the battery, and an o ring.

Here you can see the back, the battery, and the watch.  Note the holes on the left bottom of the watch.  These cover a programming/debug header.

IMG_0104.JPG

Once the screws are removed, the vibration motor needs to be carefully pried off of the plastic, since it is still attached to the PCB with wires.

IMG_0116.JPG

At last, the PCB is unmasked.  Here you can see the vibration motor (6 o’clock), dome switch (12 o’clock, yellow), debug/programming header (6 o’clock to 9 o’clock), and battery clips.  Also sprinkled throughout (and important) are a number of screw heads (silver) and test points (yellow).

IMG_0125.JPG

With the smallest screws in the world removed, we can now separate the PCB from the movement of the watch.  The V-twin in the middle is from the minute and hour hand, while the single-cylinder looking thing drives the activity meter.  We can also see the front of the PCB for the first time.  Interestingly, the movements are attached electrically to the thin PCB with ENIG plated pads being screwed directly to metal standoffs in the movements.  Behind the movements is a piece of plastic, which serves to help orient the components and seat the vibe motor.

IMG_0137.JPG

Here is the PCB.  Major components include:

-NRF51288 Bluetooth SOC, of course.  This is the WLCSP BGA version, which makes sense because much of the board is covered by the movements. (11 o’clock, rectangle)

ADXL362 accelerometer by analog devices.  A super low power accelerometer.  It will be interesting to think about why they went with that over something cheaper from ST micro. (1:30, square)

-Probably an h-bridge or motor driver (4 o’clock, square)

The rest of the paraphernalia is the usual flotilla of antennas and crystals.  Interestingly, there is a non-pop 8 pin device, 3 pin device, and 2 pin device.  I will have to think about what those might be.

img_0147.jpgThe next step of course is to remove the crystal/glass (in this case, lime glass).  This is so I can take off the hands, which will let me take a closer look at the movements by detaching them from the face of the clock.  I was not sure how everything was held in, but I suspected glue, since a press fit would be a bit risky (and possibly not very water tight).  After evenly heating to about 275 C to soften any glue, I was able to press everything out of the front of the watch with my fingers.

IMG_20170302_171634254

At this point, the hands were still pressed onto the shafts of the movments.  Like most dials, these can be removed with a careful application of tweezers as pullers near the shaft that they are pressed onto.

IMG_20170302_171908229

Here the hands are removed, the double shaft/collar of the hour/minute hand is exposed.  The hour hand rides on the outer hollow shaft, and the minute hand goes on the inside.  The activity hand is much smaller and brass, while the two other hands appear to be aluminum.

IMG_20170302_172454752.jpg

With the hands removed, the movements are no longer constrained to the face of the watch.  Here is the top of the activity movement, showing the output shaft.  Those four silver things are actually tiny machine screws.

IMG_20170302_172617288.jpg

Here is the bottom of the movement.  The four gold colored metal bits are threaded metal standoffs.  Tiny truss head screws pull the traces on the movement into intimate contact with exposed traces on the PCB.  On the reverse side of the copper-coated laminate, the two electromagnets are soldered to copper on the other side, connecting them to the PCB.

IMG_20170302_172704294

A shot from the side showing the internal gearing of the drive.  The complicated stackup of fiberglass, metal, plastic and tiny gears can clearly be seen.

IMG_20170302_180533889.jpg

With the screws removed, I managed a closeup shot of the magnet that drives the mechanism.

IMG_20170302_195146140.jpg

To determine how it worked, I screwed the movement back onto the PCB and connected to the app to “set the time” which works by positioning all the hands to reference positions.  This let me rotate the hand arbitrarily.  By putting a very tiny dot of prussian blue on the magnet, I was able to see that it was in the same spot every other tick- in other words, the magnet rotates 180 degrees per tick.

Final Thoughts:

IMG_0062.JPG

Most fitness trackers are a variant of a PCB in a box with some kind of typical (LCD, OLED, LED) interface.  Even the iconic nike fuelband is just a cool rendition of LEDS inside of a piece of plastic.  The activite is a well-crafted and very complicated departure from what I normally expect from an activity tracker.  It feels a lot more sophisticated and it blends into everyday clothing compared to a colored piece of plastic with a glowing display.  Since it has a primary battery, it does not even intrude in my daily thing-charging rituals.  I think I understand why people would choose this over a fitbit or garmin vivo-thing.

 

 

GoPro Viewfinder

IMG_20160720_165046844

The GoPro is quickly becoming my favorite camera to take hiking.  It is lightweight and unobtrusive, compared to even a small DSLR or compact.  The battery lasts long enough, and with a case on it it can be waterproof.  I actually carry a pair of them, one with a screen and a polarizing filter and an LCD for landscape photography, and one just for pointing and shooting with no filter or LCD.

eyefinder

One issue I have with the LCD is I can’t see it at all in the sun.  Its not particularly high brightness, resolution, or contrast, and if I can’t see it, it is just burning battery.  Not being able to see it also makes it impossible to properly adjust the polarizing filter, which means I end up with blurry, flat photos sometimes.

To resolve this problem, I printed a shroud to go around the back of the camera.  Friction and potentially rubber bands can be used to hold the camera in place.  A lens and an eyeshield make it comfortable to hold up to the eye and see what you are shooting.

IMG_20160720_165129199

It looks like it works so far.  I am excited to give it a test run in the real outdoors, although it may need a few more features before then- like something to hold in the camera, and eyelets for a strap.

Filter Cafe

DCIM104GOPRO

DCIM104GOPRO

Filter Cafe was second on my “outliers” tour.  It was near a train stop, but one that was relatively out of the way- Dupont Circle on the red line.  After a lovely train ride and eventual departure from the air conditioned bliss that is the D.C. metro, I hoofed it a few blocks to Filter Cafe which is situated in what amounts to a back alley off of the main street.  It is bizzare street- just back entrances to buisnesses (dry cleaners and the like) with people smoking on them, then a small coffee shop.

Filter Cafe would be at home on Newbury Street in Boston.  It shares a lot of architectural themes that you find at places like Wired Puppy or Sofa Cafe, which is to say it is a garden level shop with a few patio tables out front, with a long, brick lined interior containing few tables.  It even has a bay window as an entrance.  Unlike Boston, it was still insanely humid and hot and I arrived to find it full of people seeking air conditioned asylum there, so I had to sit outside.  Also, Newbury street is not a back alley.

Since I got there in the afternoon, I was compelled to order a pour over (no drip coffee is available in the afternoon).  Like Newbury street, this was expensive.  I opted for what I hoped would be a fruity African blend, which was served in a small cup with the Filter logo silkscreened onto it.  It was black on the outside, with orange enamel on the inside.  The coffee was acidic and smoky, without much fruityness to balance it out.  It had a lingering minty aftertaste, but your milage may vary.  Overall not a bad cup of coffee, just not my favorite flavor.

Since all thirteen indoor seats were taken, and I didn’t want to sit on a windowsill, I ended up sitting outside pondering the insanity of drinking 10 ounces of hot coffee in the brutal DC heat.  Fortunately, this gave me a chance to assess the patio situation.  The options were two faux-cedar folding tables accompanied by pop-orange plastic molded chairs, or a weathered white oak bench.  I opted for a chair at an empty table, and hoped that someone left the inside before I finished my coffee.

DCIM104GOPRO

That’s the whole thing!  13 seats, weird lights, coffee bar

At some point, I noticed  few people leaving so I swooped in and took their seat in the refreshing air-conditioned room.  The indoors is your typical long brick room, on the right there is seating, including a bench with five tables and five chairs (10 seats), as well as a small 3 seat bar with stools.  The left is occupied by the coffee counter, including pour over station, espresso, and pastry area.

The chairs are red, which matches their custom printed vinyl-wrapped La Marzocco, and the bricks.  The rest of the place is made of various kinds of wood stained in slightly mismatched walnut colors.  The low ceiling, air conditioning, and dark wood give it a cool, underground feeling, although I bet in the winter this turns into a cozy, warm space quite easily.

The lighting was dim, contributing to the cool cave-like feel, but the upside-down glass light shades projected crazy (but totally static) patterns on the walls.  The light temperature was warm from bouncing off all of the walls, which definitely put some points in the warm/cozy column.

I think one of my favorite parts was a printed poster (on plain A4 paper) that declared “My body is like a filter, coffee goes in and sarcasm comes out”.  That and they also have a bathroom (possibly a legal requirement in DC).

DCIM104GOPRO

Purveyors of “Functional Objects For All Surface”

On the way back to the train I stopped at “Tabletop” to pick up a new notebook- I had filled up my last page and I needed more space for the rest of the shops!

Dolcezza

DCIM104GOPRO

Dolcezza next to the bus stop

On my way from Slipstream to a bus stop, I ran into yet another cafe!  As I mentioned, part of the rules of coffee travel is that if you see a real cafe, you have to go.  And so I went.

Dolcezza is a gelato bar and espresso shop.  It is spotlessly clean, and extremely cold inside.  All of the places in D.C. have some kind of air conditioning, but only here was I verging on uncomfortably cold.  As in, bring-a-jacket winter-is-coming cold.  but it was also a relief from the humid and hot outdoors, so it was bearable.

I had an espresso shot.  Unlike the rest of the country, all the esprsssos I got in D.C. were actually single shots- not double shots.  Typically in Boston/LA/SF I see an “espresso” being pulled as a double shot for americanos and espressos, but in D.C. they were all just single shots.

The shot was served in a brown, thick walled espresso cup with matching saucer.  Surprisingly, there was no sparkling water to go with it, although other people seemed to get some.  The coffee was very acidic, with a fruity finish and a sweet aftertaste- I think it was stumptown hair bender roast.

DCIM104GOPRO

The interior

The cafe is laid out around a long bar with gelato and coffee.  A doorway protrudes into the space in the middle of the bar, creating to bays for small tables and chairs (pictured).  The floor is white tile and is quite clean.  Overall, it reminds me of a very clean ice cream parlor or train station.  The tables are marble-esque, and the chairs are stained red wood upholstered with red leather, or wood stained to match the chairs.  Both are comfortable enough.

I believe this is supposed to be an Italian styled place, and it does seem like it would be at home in the north end in Boston.  It does seem like a place where you could come and comfortably read the paper or meet up with someone, but I think the gelato (which I did not try) is their real strength, not coffee.  If I went back,  I would have to try it.

Northside Social

DCIM104GOPRO

The approach to NoSo

Northside Social, or “NoSo” is out in what might be considered the suburbs of Washington D.C.  It is a huge building, boasting ample patio seating, a huge first floor, and a second floor which is a wine bar (with an espresso machine).  It is certainly the biggest coffee bar I visited on my trip, and it is open late because of the wine bar- this made it the ultimate destination for my day 1 trip, since I could arrive at just about any time and still expect the place to be open.

I had a cup of drip coffee, roasted by intelligentsia.  I may have been a little exhausted and buzzed at this point, but I would describe the coffee as smoky and acidic, with a fruity aftertaste.  It is worth noting that there are two options for drip coffee- a regular cup, and a “mug” of coffee which is two 10 oz mugs of coffee (one refill).  I am impressed by how considerate and innovative they are with this offering- this is the only place I have seen something like this on the menu, almost explicitly inviting you to stay for as long as possible.

DCIM104GOPRO

2nd Floor/Wine Bar

The inside of the cafe is tastefully decorated in coffee-drip paintings of famous actors and personages.  The tables are wooden, and plentiful.  Towards the back of the cafe the tables get  little less uniform, but they is still a ton of seating.  The second floor wine bar is decorated with more paintings, and is furnished with light wood tables and bar stools.  If you look carefully, you can see Clint Eastwood in the photo above.

The wine bar was equally as inviting and as accommodating as the coffee bar.  I ordered a highly modified and delicious grilled cheese for dinner, while I made some notes on my trip so far (pictured above).

SlipStream

DCIM104GOPRO

DCIM104GOPRO

Slipstream was not on my original list, but as I was headed to compass coffee on day 2, I passed it.  One of the rules of coffee travel is that if you come across a decent looking cafe, you must go- so I went!

It turned out to be a great decision.  First off, I was hungry, and their breakfast food options were much better than any of the other coffee shops I visited that day.  Second, they have good coffee, as well as coffee cocktails-  not something you see everyday (or ever, in MA).  I was sorely tempted to try one of the coffee cocktails, but it was 8 A.M. and I had a long day of coffee ahead of me, so I opted for my gold standard of coffee comparison- a cup of black drip coffee.

DCIM104GOPRO

toast for breakfast

The coffee is apparently roasted by “Madcap Coffee” and it is balanced between sweet and acidic.  It is not unlike el gallo blend, but it is balanced instead of acidic.  It was served in a notneutral lino coffee mug, which is actually a fairly normal looking white mug.

The bar stools and chairs are a light colored wood, while the tables are stained a dark walnut color.  I think this brings attention to the weighty tables, over the chairs, which are comfortable but unremarkable.

DCIM104GOPRO

The back, under the skylights

The lighting is interesting and worth noting, since the place is a single large chamber that serves as both a brunch spot, a bar, and a coffee shop.  It is modern and clean, with lots of glass, wood, air and light.  Most of the light is provided by the floor-to ceiling windows at the front of the cafe, as well as the skylights at the back of the cafe.  The rest is rather dimly lit by reflected light from the outdoors, and more indirect lighting from large domed reflectors on the ceiling.  This means that there is little in the way of direct lighting, making the inside seem soft.  In the daytime this gives it a cool, shady feeling, and I imagine at night it gives it a nice bar ambiance.

I am very happy that I made the stop at slipstream.  I ended up with a full stomach and plenty of time left to explore the rest of the city.