Espruino on your watch!

Posted on
Page
of 10
  • @Gordon there is nothing wrong with your pinout it is all working you did great job with that
    https://yadi.sk/i/wYe5nyGPucfek
    I even got LCD running (initial test) we just need to get accelerometar up and running did you notices that one adress pin is high so the address is not default it is 1F, I will try to get it working and send you the code, Im shure we can get it running on espruino ....

    And one question how can i get lower with espruino code?
    Can I see OLED driver? this would be great if I could because then I could test it and maybe (just maybe) improve something ..

  • @user67183 thanks! However I have got most of that working with Espruino already (including the OLED - you could look at the configuration code I posted up for it). Are you using the same pins as I did, or is your watch different?

  • Yes, my pinout is the same.

    Did you able to get accelerometer working?

    I have readed I2C pins (put them as input)

    //P0_16 SCL -- default HIGH probably pullup
    //P0_15 SDO/ADR -- default HIGH probably pullup
    //P0_14 SDI/SDA -- default HIGH probably pullup
    //P0_13 Trigger -- default LOW
    //P0_12 INT1 -- default LOW
    //P0_11 INT2 -- default HIGH probably pullup
    //P0_10 nCS -- default HIGH probably pullup -- from datasheet is this pin is high I2C is enabled so this is ok
    // The Slave Address associated with the KX022 is 0011111X,
    // where the programmable bit, X, is determined by the assignment of ADDR (pin 1) to GND or IO_Vdd.
    // So in this case we have adress 0011111
    // 1Fh 3Fh 00111111

    then I put I2C scaner code and found accelerometer at that address

    I2C device found at address 31 0x1F 0

    in mbed there is some problem with I2C library
    https://developer.mbed.org/questions/691­78/NRF51-DK-I2C-not-working/
    so I need to adapt sensor library
    https://developer.mbed.org/teams/Rohm/co­de/KX022/
    with code from I2C scanner
    https://developer.mbed.org/users/Cannonb­all2134/code/I2C_Scanner/

  • Got it all running with arduino
    OLED library needs to be fix and KX022 is in main file without library but it will will be fixed.

    http://www.lemilica.com/smarty-the-watch­-it-is-aliveeee/
    http://www.lemilica.com/ble-on-samsung-g­alaxy-fame/

  • The watch I ordered arrived sooner than expected. As I expected the watch doesn't contain a nRF51, it actually uses a Dialog DA14580, we've seen this chip before in this thread. So no Espruino, but, this one does actually pair to my phone. I took some pictures while deconstructing it, I could post them if anyone is interested on how the Heart Rate sensor connects.

  • hi there !

    I received the following few hours ago, so I'm joining the fun ;p

    Is the following all that's needed to program it using Espruino ?
    STM32F3


    1 Attachment

    • Photo du 83822474-09- à 23.17.jpg
  • Actually, since using that I found the nRF52 devkit is a more sensible price: http://www.mouser.co.uk/ProductDetail/No­rdic-Semiconductor/NRF52-DK/?qs=79dOc3%2­f91%2fccrafuGv4fOw%3d%3d

    If you get the nRF52 DK then you get the new nRF52 chip in it as well, and can play around with the code that'll run on Puck.js too.

    The flashing is way easier too. You just wire the board up to a 0.1" header, and then it appears as a USB flash drive and you just copy the hex file over to that drive.

    It's slightly more expensive than the discovery board but it's totally worth it :)

  • All right, thanks for the input

    I'll see if I buy it after trying with the less expensive board - which has plenty of I/O as well ( considering it 'll give me plenty of hours of fun with Puck.js as well as messing with smart watches ;p )

  • Does anyone have a recent link to the actual 10$ nRF51822, I'm having trouble locating a vendor for this actual band...

    Thanks!

  • hi there

    for the link to the smartwatch I received recently: http://www.ebay.fr/itm/281909052367?_trk­sid=p2057872.m2749.l2649&ssPageName=STRK­%3AMEBIDX%3AIT

    -> enjoy ;)

  • Thank you! This is a great hack, hoping to participate.

    I was able to find this link for similar U.S. ...

    http://www.ebay.com/itm/141945516791, I took a gamble on this being a nRF51822 version.

    Also, this is relevant.

    https://www.amazon.com/Active-Gear-Water­proof-Activity-Tracker/dp/B01FVDNEXA/ref­=sr_1_29?ie=UTF8&qid=1473447669&sr=8-29&­keywords=nRF51822

    This is clearly label nRF51822, but twice the cost.

    R.

  • Hi - I was just playing around and added an OLED driver to the Espruino build (it should now auto-add a g variable which you can write to and then flip). However it looks like I've managed to lose my watch so I have no way to test it!

    I've attached the hex file that may work, and the branch with the code on is: https://github.com/espruino/Espruino/tre­e/DO003-oled


    1 Attachment

  • Lots of interest so I did a little surfing to find out more. These links seemed to point to Magellian Echo One link to Amazon shows a price of $22.00.
    Also found another chip Taiyo Yuden Bluetooth® Smart Modules based on ARM Cortex M0 32bit processor, ARM Cortex M4F 32bit processor.

    http://embedded-computing.com/articles/i­pv6-over-bluetooth-smart-takes-wearables­-from-smartphone-to-standalone/

    http://www.mouser.com/new/Taiyo-Yuden/ta­iyo-yuden-bluetooth-modules/?cmmmc=PressRelease-PR--NordicSemi-_-nRF52SoCs--2016-05-12

    http://www.mouser.com/new/nordicsemicond­uctor/nrf52-series-soc/?cmmmc=PressRelease-PR--NordicSemi-_-nRF52SoCs--2016-05-12

    Searching for Magellan’s Echo produced these links:
    https://www.amazon.com/dp/B00FZHUNSC?encoding=UTF8&ref=de_a_smtd&showDetailTechData=1#technica­l-data

    https://devzone.nordicsemi.com/blogs/792­/new-features-in-nrf52/

    So does the Magellan Echo look like a worthy purchase?

  • Taiyo Yuden just make the modules as far as I know - to be honest I'd use Raytac, as that's what I use for Puck.js.

    I'm not convinced the Magellian Echo One uses nRF52? http://www.nordicsemi.com/node_206/node_­305/Product-Related-News/Magellan-s-Echo­-smart-sports-watch-uses-Nordic-Semicond­uctor-chip-to-stream-smartphone-app-data­-for-up-to-11-months

    Or if it does you want to be really sure you get the one that does, as the 2013 one nRF8001 which Espruino won't run on.

    However if someone does make an nRF52 watch (I'm sure they will soon, if they don't already), that'd be really interesting.

    I'd start a new thread for that though. This thread should really stay as being for the DO-001 sports watch so it doesn't get too confusing :) Any other watch will definitely have different pinouts to those that I posted up here.

    Just to add: if someone finds a cheap nRF52-based watch that looks hackable I'd be happy to post a write-up or video that walks through the process of reverse-engineering it (taking macro shots + tracing tracks). My guess is some of the more mainstream watches will use multilayer PCBs and stuff that'll be much harder to reverse engineer though, so we may end up waiting until a cheap knock-off appears.

  • Doing some more digging

    In contrast, the Magellan Echo Smart Sports Watch was designed as an open platform and can work with any application that can leverage a ruggedized smartwatch in several colors (Figure 3, right). The watch leverages the power of both a smartphone and sports-related apps. It uses Bluetooth Smart to connect a smartphone and watch, putting the power of a smartphone right on the user’s wrist. An ARM® Cortex®-M3 runs the watch while a Bluetooth chip from Nordic Semiconductor provides the communications, and ST Micro supplies the accelerometer. Echo is compatible today with the iPhone 4S, 5, 5C and 5S. Android support is coming in early 2014.
    http://chipdesignmag.com/sld/blog/tag/wi­fi/

    The 32-bit Giant Gecko MCU, based on the ARM® Cortex®-M3 core, also plays a key role in the sport watch’s energy efficiency, enabling the Echo to operate for up to 11 months on a single CR2032 coin-cell battery. The Magellan Echo design team achieved their ultra-low energy goals by optimizing the Giant Gecko MCU’s five different energy modes and leveraging the MCU’s low-energy sensor interface (LESENSE) and peripheral reflex system (PRS). These features enable energy-friendly and autonomous peripherals to handle timing and sensor control without involving the CPU.

    http://www.businesswire.com/news/home/20­140106005026/en/Silicon-Labs-Giant-Gecko­-MCU-Enables-Echo

  • So that's a no then - the Magellan Echo won't run Espruino with BLE (there is an Espruino port to the Gecko, but then you have to write your own BLE driver for the BLE chip).

    Of course there's nothing to say that there isn't a newer version of the watch available.

  • Hi there

    I just received my nRF52 DK ( !!! :D ), so I guess time has come to test this out before messing things up I got few questions before diggin deeper in the docs ;)

    Also, the following articles seemed somehow related:
    http://hackaday.com/2016/09/14/hacking-a­-dollar-store-bluetooth-device/, http://troydenton.ca/?p=168

    So as from now ... nRF51822 / CC2541 / DA14580 / RDA5871 at least ? :)

    The attached pic is from a friend's watch ( also a cheap one ) - didn't digg that yet ;)


    2 Attachments

    • smartWatch_MEDIATEK_ARM_MT6261DA.jpg
    • nRF52DK_SWD_connection-01.jpg
  • Yes, the DK will just autodetect (I also wired up VDD - not sure if that's needed though, it is VDD sense rather than a VDD supply).

    Nordic provide some jlink tools - I forget where.... But you can read with a command-line function from those.

  • thanks for the confirmation ;)

    I am [ still ] digging the nordic doc .. I hope I'll get that cli option ;p

    Aside from that, seeing the following appear on the forum ( http://forum.espruino.com/conversations/­292530/#comment13202218 ), I was wondering about the 2 following use cases:

    • when a paired phone & the watch are away from each other ( far than a set/adjustable threshold ), vibrate/ring the watch & display a message ( "notification" ? ) on it ( we could also do so on the phone as well - & also ring it - depending on what can be done on its side .. ) *
    • push notifications from a paired laptop to be displayed on the screen until the user presses the button ( to get back to "normal watch" mode )

    *although it 'd be far fetched ( or is it not ? ), I'd love to be able to locate a paired phone using a tiny arrow cursor on the watch ^^

  • I'm afraid you can only do distance (and only very roughly), not angle (unless you have >1 phone).

    On my list of example apps to make with Puck.js there's a website where multiple phones connect and upload all the beacons they can see and their GPS location. It should be possible to triangulate the position in situations like that...

  • I found this blog posting today, relevant I think

    http://www.rogerclark.net/nrf51822-based­-fitness-trackers/

    "However searching for “TW64 nRF51822” does find some watches marketed as a TW64 which do contain the nRF51822, which lead me to Shenzhen DO Intelligent Technology Co., Ltd. on Alibaba. I contacted them to find out more details and found that all of their smart watch/ fitness trackers use the nRF51822

    Their product numbers are P101,P102,ID100HR,ID105,ID105HR,ID107,ID­107HR,ID101HR,ID110HR,ID111HR and ID115HR

    So if you are looking for an nRF51 based smart watch, your best bet is to search using one of those model numbers, and double check the details in the eBay / AliExpress / Gearbest etc listing to confirm it does mention the nRF51822

    In the end I decided to buy an ID100HR and a ID107HR, via AliExpress."

    These caveats, I assume, guarantee getting a fitness band with a nRF51822 ARM BLE SoC on board...

    R.

  • Thanks - the one I had success with (and which I posted the schematics for) is one of those.

    I don't know how it relates, but it was marketed as the iDO / DO 003

  • Here's another watch (BLE and other sensors) that might be of interest:

    http://www.gearbest.com/smart-watches/pp­_236144.html $26.29 + china shipping

    https://www.tindie.com/products/Mixtile/­mixtile-gena/ $34.00 free shipping in USA

    http://www.mixtile.com/topic/721601/mixt­ile-gena/ more info

    27.6x40.2x9.1mm, includes LCD display, 8MB ram, 16MB rom,
    Javascript API, MT6260 (ARM7EJ) + nRF51822 processors
    buttons on sides of module, micro usb socket, lipo battery
    apparently includes ios integration, but lousy docs for devs.

    These things are apparently common and available from a lot of vendors.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Espruino on your watch!

Posted by Avatar for Gordon @Gordon

Actions