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.
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 |
|
|
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.
Due to a lack of both motivation (owing to broken hardware) and time (owing to life), I haven't worked on the watch since the last project log 11 days ago. However, in that time, I did leave the board connected to the battery (albeit without a screen). On a whim today, I measured the voltage across the battery, and I got a surprising 3.9 volts. The "full" voltage is 4.2V, and LiPo batteries don't discharge linearly. In fact, based on this chart from Adafruit, I've lost less than 20% of the battery in the last 11 days:
There's no screen connected, no backlight use, and no Bluetooth communications, so this result doesn't really represent a real-life test. However, it does confirm that my estimates of multiple weeks on a single charge weren't completely ridiculous.
It's not all good news, though. When I plugged in my test display (the one that doesn't fit in the case), it had tons of display artifacts that made it unreadable. These cleared up immediately as soon as I connected USB power, which leads me to believe that I do actually need that 5V boost converter after all. I suppose I've got nothing but time to add it...
I finally tracked down the source of the problem with the screen: with the repeated removal and insertion into the case, the glass of the LCD basically cut the ribbon cable that connects it to the PCB. Unfortunately, it did so in a way that's not reparable, so the watch is screenless until mid-November when I can get a replacement.
On the plus side, I made some software progress, including scaffolding that will let me run a version of the watch code on Linux. This means that I can at least continue work on the interface while I wait.
The rest of the PCB works well enough, so I can use that to test my BLE code in the meantime. I can still make progress on the project, but it's immensely unsatisfying to do so without being able to wear the result.
The repository is a bit of a mess, but you can check it out here.
Create an account to leave a comment. Already have an account? Log In.
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
Awesome! are you going to upload a video of it?