nRF52 Smartwatch from Scratch
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
schematic.pdfProject schematic (rev. 7) - Current as of 2022-06Adobe Portable Document Format - 143.65 kB - 06/12/2022 at 20:56 |
|
|
Ref.SPEC_LS018B7DH02_LD-29604_171002.pdfLS018B7DH02 Datasheet, since it exists nowhere else on the internet. Sharp assures me that, despite the "confidential" watermark, this is totally fine to share.Adobe Portable Document Format - 1.55 MB - 02/20/2020 at 04:47 |
|
|
This is the first update in quite a while! First, the timeline. I wore the watch daily from the time of my last update until roughly the end of the summer. Then, I accidentally hit my wrist against something and popped the acrylic screen protector free. When I took the watch fully apart to re-seat everything and glue the acrylic piece back in, I discovered that the PCB was significantly rusted and decided to take the opportunity to redesign the case. Then real life got hellishly busy and I did nothing until roughly mid-December. I started wearing the watch daily again some time in January, and haven't had any problems since. Some observations:
The biggest problem with the previous iteration was waterproofing. Since then, I redesigned the enclosure to use an annular snap-fit design instead of cantilevered tabs (check here for a better description than I could write). This means that it's a much tighter fit (it took some pressing in the vice to get everything properly snapped closed), but I've had no trouble with water getting into the watch since I made the change. I also floated a prototype case in a bowl of water overnight (with the snap joint below the waterline) and no water got in, so I'm reasonably confident that it's good enough for daily wear. The other possible point for water to get in is the button bar, so I increased the flange on the flexible TPU part and haven't had a problem.
There's still a problem that I haven't worked out with the MAX17262 fuel gauge that causes it to always report 35% battery or less, but empirical results don't lie: I'm getting 2.5-3 weeks of use on a single charge, which includes ample flashlight use. I'm pretty pleased with this; I sleep with the watch on, so I can't charge it overnight, but plugging it in for an hour every few weeks is a completely acceptable interruption to my daily routine as far as I'm concerned. I may even be able to extend the life further if I do some aggressive optimization, but I'm not certain it's worth the effort at this point.
I still haven't made a lot of headway as far as the mobile app. Mostly I just haven't had the motivation; I don't actually need any smart watch features. I would like to be able to set the time automatically via my phone to account for RTC drift, but being a few seconds off every now and then is only slightly maddening.
Now that I don't think the hardware is going to change much anymore, it seems like I don't have any more excuses to avoid cleaning up the schematic and posting it. I'll try to get that done in the next week or so. The software is also a mess, but I'll try to get that posted as well in case anyone is interested.
If you have questions, leave them in the comments and I'll do my best to answer them!
I've been working on the watch a fair amount, but I realized I've been bad about project logs. So here's a sort of omnibus update:
That's me, having just washed my hands. The cloudiness you see is not, unfortunately, a trick of the light, but a bit of water that got in (presumably through the flashlight hole) and stuck between the acrylic protector and the screen. Luckily this didn't damage anything, and eventually it cleared up on its own. It did, however, demonstrate the need for something a little more robust than a hole with an LED poking out.
Adding a small protrusion for the light turned out not to impact the aesthetics nearly as much as I'd expected. I cut a small circle of clear acrylic and sealed it into the hole with a healthy drip of superglue, and I haven't had water issues on that side since. I do occasionally get a bit of water seeping in around the white button bar on the other side of the watch if I'm not careful, so the next revision of the case will likely include a better buffer there (or perhaps just make the TPU fit more snugly to keep water out). I don't need the watch to be fully submersible or waterproof, but it needs to be able to stand up to handwashing without damage.
/* * Views are the primary UI structure. A view is a bit like an "app" on a * smartphone. The active view's draw() method is called (by the system * controller object) when the screen updates, and when user events happen (like * button presses), the active view handles them. * ...
As usual, pictures first:
The project is slowly moving again! The reason for the long time between updates is primarily that rev. 5 didn't work, I got discouraged, and I stopped working on it for a while. Pictured, jammed into the case, is rev. 6, which has a few improvements:
The flashlight feature is stupidly bright. At full brightness, it's significantly brighter than my cell phone's "flashlight" feature. After using it to navigate around my dark bedroom at night, I may have to dial it back just so I don't blind myself. It also draws somewhere around an amp, which is not a great thing to do with a 500mAh battery (a 2C draw). It also gets extremely hot; I'm hesitant to leave it on for more than 30 seconds at a time for fear of melting the solder joint. This explains why the breakout boards available for the XM-L2 are chunks of aluminum bigger than my watch itself... the next revision will probably use an aluminum daughterboard PCB that can act as a heatsink, and the final form for the watch might involve a machined aluminum case rather than the 3D printed version.
The flashlight mounting also needs some work. The XM-L2 lens isn't, as I initially thought, hard plastic. It's soft, and I managed to mar it with the tip of my tweezers when I was trying to mount it. It still works, but it doesn't look great.
The remaining question is battery life. I haven't done any profiling on a rev. 6 board yet (it's a pain to take in and out of the case, so I plan to assemble a second one for testing at some point). My empirical testing has so far indicated that battery life is pretty decent; I've been wearing it nonstop since Thursday evening (when these pictures were taken) without charging it. It's now Saturday afternoon, and the MAX17262 reports 94% remaining (which I don't especially trust), and a battery voltage of 4.0V (which I do), down from 4.2V at full charge.
Now that the watch basically works mechanically, it's time to turn to software. The next few updates, whenever they are, will likely be focused on the watch UI and/or the mobile app rather than the hardware. If I get a good power profiling setup, I may focus on some power optimization too.
After wearing the watch for about a week, I plugged it in to upload some new firmware and immediately started having issues with the built-in USB connection on the chip. My suspicion is that the ESD fairy struck again, this time damaging the MCU rather than a power system. Rev. 5 (and rev. 5.1, which is identical except for adding pads for a current shunt resistor so I can more accurately measure power consumption) includes ESD protection in the form of a TVS diode, so I think I'll take a break for a week or so until the new boards and parts come in rather than continue to destroy components every few days.
The good news: in wearing the watch for a week, I've found that it draws about 8% of the battery per day. This is an extremely rough estimate, but (assuming I can trust the readings from the MAX17252, which I'm not sure of) is a promising sign: that points to an average ~200 uA consumption, pre-battery-optimization but also pre-BLE-enable. I did manage to get ahold of an oscilloscope, so when rev. 5 comes in I'll be able to get much more accurate consumption numbers.
Small update tonight: I just finished routing the rev. 5 PCB for the watch, which has a few small but notable improvements:
I also did a tiny bit of software work to move towards having a real interface. This involved shuffling around a bunch of source files to make PlatformIO's build system happy, but otherwise there's not much to report.
The next few updates will probably be software, since I'll probably get daughterboard and dock prototype board finished tomorrow and sent out for fab over the weekend, then I'll have to wait a week or two before I can start assembling and testing.
Pictures first:
A bunch of good progress. In no particular order:
The little bit of bad news: something weird is going on with the power system. I had two MCP73831's (the battery charger IC) go up in proverbial smoke within an hour of each other a few days ago, on two different revisions of the board. The only things in common were the battery, which may (?) have had a loose lead, and the USB cable. Hopefully it was the battery, and now that I've replaced the lead it'll all be fine. Hopefully.
The work continues! I'm approaching the point where the fact that I have no idea how to write an android app is going to bite me, so good tutorials and examples (especially ones that do BLE things in the background) would be highly appreciated in the comments :)
Good news! I've mostly assembled the rev. 4 board, and it seems to work. The biggest change is a boost regulator that drives the LCD at 5V, instead of the previous VIN (which could be as low as the 3V cutoff voltage of the battery). This means that the screen will continue to work even when the battery voltage starts to sag. It comes at a cost -- the TPS60151 is rated at 90uA quiescent current -- but on the whole I think this makes the usable life on a single charge substantially longer (since the whole voltage curve of the battery is usable now). One future optimization might be to use VIN until it sags too low, then enable the boost regulator, but that gain probably isn't worth the complexity.
I say "mostly assembled" because, somehow, I've misplaced my nrf52840 modules. The power systems seem to work, but without disassembling my rev3 prototype (which I've been wearing for the past few days), I don't have brains to test the I2C devices. Hopefully those will be delivered this weekend, and I'll be able to have a working rev. 4 watch next week.
In mechanical news: in the months since my last serious work on this project, I bought some differently-sized nozzles for my 3D printer. This means that I can print the case with an 0.2mm nozzle rather than the 0.4mm stock nozzle and get some much finer details. This lets me cut a little bit of thickness out of the watch! The prototype I'm wearing is 13.00mm thick, and I may be able to cut most of another millimeter off if I figure out a safe way to press the LCD directly against the protective acrylic. 13mm definitely doesn't feel too big, though.
More updates soon. I'm glad to be back at work on the watch!
Good news! Two apparently-intact displays arrived from Digikey today! I'll need a few days to get the rest of the project out of storage and load the project state back into my head, but at long last the project can continue!
Interestingly, these new displays don't have the "NO OPTICAL BONDING" sticker on them. I wonder if this means that I can press them right up against the acrylic... I'll have to find out.
I guess I'll see y'all next year!
I've been waiting patiently for the replacement display module to ship so that I could get working on the watch again. When I ordered the replacement(s) in September, the backorder ship date was November 13th. For those playing along at home, that was Friday of last week. I've put several requests in to Digikey asking why the parts haven't shipped; the impression I get is that the delivery from Flex hasn't come in yet. Hopefully I'll hear something soon. In the meantime, I'm just... waiting.
On the plus side, Sharp's website finally acknowledges the existence of the LS018B7DH02! It's listed as "new" (ignore the fact that I found reference to it in catalogs back to 2018) and still doesn't have a datasheet attached, nor does there seem to be any way to actually get one (I have an email out to my local supplier), but it's a start.
I've given some passing thought to a redesign of the physical layout to use a more available display, but I haven't found one I like. They're all either too big, too small, or too power hungry. In other project news, some time in the last month and a half the battery ran out. I haven't been checking it very often, so I don't have any real sense of when exactly it gave up.
Create an account to leave a comment. Already have an account? Log In.
You know, I don't actually remember. I ended up not getting reliable current readings from the MAX17262 (I never figured out why, despite lots of trying), and as such I didn't really trust the fuel gauge.
My most recent design uses the nPM1100, which doesn't have current monitoring but does have a charger, buck converter, and dynamic power path management all built in. I finally got what I believe are the final boards for this revision assembled right before I left town for a week; my plan is to test them, assemble the watch, and then make a post about it. I've changed a fair amount in this revision :)
Not a big smartwatch guy myself -- I have a fitbit i was gifted so i wear it. Proves useful as a health monitor -- that's for sure, but as far as watch -- you have the time on your phone. check it.
Anyways, I love how your project is a brick on your wrist. I like it + you like never have to charge it. Give me one!
Amazing work! In one of your pictures I noticed a second FPC coming out of the display. Are you working with an Azumo/Flex Lighting display? Do you have plans to throw a backlight into your project? I figure with the massive torch in your project a backlight is a little redundant : )
I'm working on something very similar (Although admittedly I'm a little further behind) and I think the lighting seems like a good fit for my interests. Here's my progress if you're curious:
https://hackaday.io/project/178301-dingwatch-03
Good eye! Yep, the display I'm using is [1], which is a great screen with a great light that seems to be impossible to find... if you scroll back in the project log here, you'll see some of my early tests with the display in addition to the six month gap in progress when I was waiting for a replacement to ship. If you decide to go with one of these displays, I recommend getting yourself a backup in case you need it!
[1] https://www.digikey.com/en/products/detail/azumo/12616-06_T3/9602610
And good luck on your watch! I'm impressed by the extent to which you seem to have everything planned out, as opposed to my "let's order a PCB and see what happens" approach.
Once I have something cool to show, definitely! Right now I'm still messing with the hardware, but when I have that basically down I'll probably make a demo video of some sort, then more as I add more features to the software.
This is an amazing work, and I'm especially impressed by the huge battery capacity in such a low profile. Viewing the small and clean PCB gets me thinking about changing my design ( https://hackaday.io/project/177210-suhr ) to something with integrated BT.
Are you working with standard 1.6mm PCBs? I was thinking about switching to a thinner PCB as soon as I'm happy with my design.
Can you give me some info on your acrylic protector and how you mounted it? It looks really great in the images.
Thanks! I'm using 0.8mm PCBs, which I got from JLCPCB at the same cost as standard 1.6mm ones. The only real difference is that I need to be careful putting it in my board vise when I assemble it... I nearly snapped one once.
The acrylic protector actually wasn't in most of the photos. I just uploaded this one (https://hackaday.io/project/169967/gallery#5c9d18570800ebe16d9972533e55b14d) that shows what the watch currently looks like. It's cutout from a ~1mm (I think 1/32" nominal) acrylic sheet. It's currently superglued in to the 3d printed case. The weird reflection artifacts are actually from a protective film on the screen, since I don't want to take it off until I have a final-ish design. I may switch it out for anti-glare acrylic at some point, but for prototyping it's fine.
Thanks for the info.
I was looking at this photo when walking about the acrylic protector: https://hackaday.io/project/169967/gallery#804939cbe3c7792c45d262b83fc2b968
I was just surprised about the evenly black border around the screen, and thought it was something printed onto the protector. But it's good to know that this is achievable with just superglue. I think I will give this a try in my next revision. After all it would save me another 1mm of thickness. Thanks for the hint.
Cool, I didn't know you could get low quantity 0.8mm prototypes that inexpensively. I typically order at Aisler, which I'm quite happy with, but they don't offer thinner boards.
Oh yeah, the evenly black border is actually two different parts: first is a super thin "shelf" in the printed plastic that I glue the acrylic to. Second is a bezel that's just a solid-color engrave on the acrylic that I did to give it some texture, then I colored in the engraved part with a black sharpie :)
All of it is purely cosmetic to hide the bezel/margin built in to the screen.
I love this project, its been an inspiration for me pushing my own project along lately. What software features are you thinking about implementing when you've got the newest boards assembled?
Hey, thanks! I've gotten so much inspiration from other projects here on hackaday, so I'm glad that I can do a bit to pay that forward :)
As for "non-standard" features, I really only have two in mind so far:
1. The ability to use the watch as a BLE input device. If I could have a mode that maps two buttons to Space and Backspace on a virtual keyboard, the watch is usable as a remote control for slideshows / presentations.
2. A button that's basically the "magic button." I've got a lot of smart home devices controlled by Home Assistant (home-assistant.io), so I want one button on the watch to relay a "magic button pressed" command back to Home Assistant, which would then use its internal state to do something. If I just left the house, magic button would arm the alarm system. If I just got into bed and it's roughly bedtime, magic button would turn off the lights. If I'm watching a show, magic button would play/pause it. The possibilities are endless, and all that's required is the ability to send an HTTP request (via the smartphone) back to a server :)
The other thing that's a class-A feature, though not exactly software, is the flashlight. I've designed a Cree XM-L2 flashlight LED into the latest revision, so I'll always have a wrist-mounted flashlight wherever I go. I also considered a laser pointer, but that didn't feel quite as necessary (or, frankly, safe)
PS - I just went and looked at your smartwatch project. Very cool! You're way further along on the companion app than I am (which is to say I haven't even started to start on mine...), so I might poke you for pointers if I get stuck :)
It's interesting and cool to me that we ended up with a few of the same design choices (like the MAX1726x fuel gauge) and a few wildly different ones. I'm looking forward to watching your progress!
I've never heard of home-assistant.io, now that I've seen it there's no going back and I'll probably have to give it a try for something. Using 1 button to do any number of tasks sounds interesting and the flashlight is definitely handy. I'm looking forward to seeing this project progress.
and re:PS - Thanks! there's still a few bugs to work out but I hope you find it helpful! I also noticed the MAX1726x, thought that was funny. It really is an awesome series for this kind of application.
Nice! I went a similar route.
A very nice display is this one: https://www.digikey.de/product-detail/de/flex-lighting/12378-03_T1/12378-03_T1-ND/9602616
It's even 8bit color and daylight-readable...but as all of those flex lighting modules a little exensive. I even found a 1.3'' cap touch overlay that fits on top with an FT6236 controller on ali and bought 2 but these particular ones cannot be found online anymore.
In the end I ended up getting some SMA-Q2s which also contains a backlit JDI LPM013M126A and designing custom PCBs for them. They have been around for much longer than most fitness trackers. For the price of one of those digikey displays you also get a nice enclosure and a good battery. Of course that's not quite from scratch, but still an interesting project. Getting almost one week of battery life out of it.
https://github.com/BigCorvus/SMA-Q2-nrf52840-dualMode-firmware
https://github.com/BigCorvus/SMA-Q2_replacement_board_v2
Some great firmware has also been written for the original board as you probably know being around on hackaday: https://hackaday.io/project/85463-color-open-source-smartwatch
Thanks for the comment! That display is very tempting -- 8-bit color with 3.3v logic is something I hadn't seen. I think I'm going to stick with the display I ordered because it's a bit bigger (1.8" vs 1.28"), and that gives me a bit more room to play in terms of both watch size and board space underneath it :)
The SMA-Q2 stuff is also really interesting, but since this is as much a learning experience as it is about creating a final product (if not more so), I think I'm going to hold off. I'll probably look at your schematic as reference, though!
Become a member to follow this project and never miss any updates
I am also trying to make a design with the MAX17262, and I also want to have the PCB made at JLPCB.
How did you route out the ALRT pin of the MAX17262? Have you managed to do this in a way that JLPCB is able to manufacture?