-
That is for version 2 of the watch, you talked about releasing button 2 so you probably have Bangle.js 1 as bangle 2 does not have second button?
https://www.espruino.com/binaries/espruino_2v19_banglejs.zip is the right one?
-
-
-
I don't know but I just guess that it is custom made in a sense that they decided how the watch should look and then contracted some smartwatch manufacturer to make it. I am guessing mainly because it does not have HR sensor nor touchscreen and has so many buttons, it looks like watch you can operate in space suit :-)
BTW, there is a marking on PCB so someone called RICHTECHIE designed this RT-H120D board , googled and found this video https://www.youtube.com/watch?v=VPVwuRLbFrI
-
Oh, so that's the mystery watch we have in Espruino tree already for 2 years!
https://github.com/espruino/Espruino/blob/master/boards/DICKENS.py
Thanks for the FCC ID link, there is also user manual there describing some features of the watch.
Some people in comments there don't like the watch (no hr sensor :-), let's hope it will be available on ebay.
EDIT: many of them are already available but so far for pretty insane prices https://www.ebay.com/itm/266401866971
-
Nice :-)
but I'm kind of afraid to brick my device in the process.
Use watchdog, ping it only when button is not held. Something like this https://github.com/fanoush/ds-d6/blob/master/espruino/DFU/Magic3/code.js#L1C1-L6C1
will reboot if something freezes the interpreter event loop or you hold the button. With Rock you can even use the second button for that (BTN2)If you flashed my bootloader then it is standard Espruino bootloader so it should enter DFU mode when you hold button at reboot time for less than 3 seconds or it enters Espruino but avoids running any js code at startup if you hold it longer (test it now :-), if you put watchdog pinging on BTN2 then you could decide to just reboot (by holding BTN2) or also enter DFU or skip code at startup by holding both.
You could also enable watchdog directly inside C startup code if you modify Espruino FW and are afraid of freezing at FW initialization before js code is executed.
Also if you don't use or trust watchdog then keep battery level low and/or enable something that drains battery fast to let it die sooner (backlight, or maybe Serial port is more harmless - it should die in a day or two from full battery) and you can then hold BTN1 before you attach charger.
-
Pixl.js is nrf52832, it has only 1 uart preconfigured to pins D0,D1 https://github.com/espruino/Espruino/blob/master/boards/PIXLJS.py#L23 and https://github.com/espruino/Espruino/blob/master/boards/PIXLJS.py#L113
When you disconnect from BLE the interactive console is switched to Serial and interferes with your usage. You can useBluetooth.setConsole(true)
to force interactive console to stay away from serial even when bluetooth is disconnected. -
-
I tried to replace this magnetic buzzer by piezo but it does not work, it makes no sound, found explanation here https://www.murata.com/en-eu/support/faqs/sound/sounder/char/sch0007 - "You cannot produce a sound from a piezoelectric sounder by simply replacing an electromagnetic buzzer with a piezoelectric sounder in this circuit."
I also found another buzzer from similar cheap tracker tag and that one is 15ohm and is much louder. sadly it is also quite a bit bigger so won't fit inside. It looks like this one https://www.aliexpress.com/i/1005005047243506.html
Anyway the one on the board posted by parasquid is still not that bad, the other boards have the 10 ohm resistor replaced by higher values and those are more quiet. Also I don't see diode there.
As for the SPI flash pinout on the cheap NFCBoxLink ones I got last time - it really matches USON-8 package - VCC,GND,/WP,/HOLD pins are all in correct place and VCC, GND are connected. It is same SPI flash package as used on Raspberry Pico board - found 2MB chips here https://www.aliexpress.com/item/1005004379141351.html - will try to kill at least one NFCBoxLink board by adding it via reflowing by hot air. It is not that much useful there, I know, but still :-)
-
So it is not piezo but something called magnetic buzzer, matches this picture and description https://www.aliexpress.com/item/1649570962.html
EDIT: or this https://www.quartz1.com/price/techdata/VS5030B.pdf
-
not sure what the wiring can be to work like that
it is GND -> some transistor/FET marked Y2, switched by pin D14 -> one side of piezo -> 12ohm piezo/speaker -> 10ohm resistor -> VCC
so 22 ohm in total between VCC and GND when D14 is low (more precisely 22 ohm between VCC and top of the FET)
That is a bit strange because I=U/R = 3/22 ~= 136mA but I guess that battery cannot give more so the rest is internal resistance of battery
EDIT: attached picture - red are both sides of the speaker, R is 10 ohm resistor, V is VCC, G is GND
-
So just to be clear, you actually bought https://www.aliexpress.com/item/1005005726070115.html and that's what is in the picture above?
Yes, exactly. Getting two with untracked shipping would be $9.75 total including VAT and shipping for me. I actually got three with tracked shipping so it was $5.6 a piece :-)
Yes 32mA looks like short, maybe the battery cannot give much more than that, not sure what the wiring can be to work like that.
-
Was checking power consumption to use the CR2032 battery sensibly. Used meter with mA scale with two fractional digits (have better one but couldn't find right cables :-).
- default advertising of 375 ms gives value between 0.02-0.04mA, when changing to 750 it drops to .01-0.00mA
- default connection interval (7.5ms) when connected gives about 0.6mA, when changing to 50 it drops below 0.1mA and is still good enough for interactive console
LED is over 1mA (1.7? forgot exactly), analogWrite drops it down and it is still visible
Piezo (tested with board that parasquid posted in post #5)
- when set to 0 (
D14.reset()
) it draws 32mA (!!) don't do that! - sound done via
analogWrite(0.5,{freq:440})
eats half of that - 16mA(!!) don't do that! analogWrite(0.97,{freq:440})
draws fraction of that (below 1mA?) and I don't hear any difference in loudness (analogWrite(0.03,{freq:440})
of course draws fraction below 32mA and sounds the same)
Did the measurements because I noticed E.getAnalogVref() gives voltage below 2.5V for the tag where I tested the piezo while other gave me 3.0V. So looks like I have basically killed the battery when trying to play sounds :-)
- default advertising of 375 ms gives value between 0.02-0.04mA, when changing to 750 it drops to .01-0.00mA
-
-
Good find, I think we did not have any source and the datasheet did not say much.
When searching github now https://github.com/search?q=hrs3603.c&type=code there is something added about 1 year ago.Often the glue source comes with some linkable library with the HR/BP/SPO2 algorithm, without that you only get raw PPG data.
Also the trick can be with tuning it on the fly so that the PPG data is good quality see this example for VC31 in bangle https://github.com/espruino/Espruino/blob/master/libs/misc/hrm_vc31.c#L268
-
Tried to play some simple tunes via piezo as per https://www.espruino.com/Making+Music and it is not very loud. So these are not like those you stick to lost baggage that make really loud sound. I wanted to pair it with Bangle as alarm clock beep or for some notification alerts but it is too quiet for that. It is louder than piezo in Bangle 1 but not by that much.
Maybe if I make a hole in the body where the piezo is, it will be better.
-
It was good timing. Never tried NFC before but now I am testing those 52832 based keychain NFC tags https://forum.espruino.com/conversations/388395/
They are simple - no sensors, just button, two leds, piezo and NFC, but they are small and cheap and even have 32kHz crystal and DC/DC enabled. Espruino on the keychain is cool and NFC and piezo speaker is a nice bonus, typical smart watch is missing both.
-
I don't have a precise idea yet of what I want to do with it, apart from restoring its time and fitness abilities.
Not sure about the fitness part, not even sure @jeffmer got the heartrate sensor working.
Any other projects on this watch I should know about ?
There is also eucWatch made by @enaon
https://github.com/enaon/eucWatch/tree/main
https://enaon.github.io/eucWatch/I tend to use a lot of closures in my code, and I'm wondering if the overhead of that coding style is going to be significant enough to be a problem.
closures are not an issue but low memory in general is
-
-
I have reported it here https://github.com/espruino/Espruino/issues/2406
Looks like bug as all the allocations and adding termination part uses full length.
Until that is fixed you could also use the code above in post #1 which emulates whole NFC tag including everything.
-
Oh, actually when checking nfcRaw method it has same limitation :-(
https://github.com/espruino/Espruino/blob/master/libs/bluetooth/jswrap_bluetooth.c#L2638
So it is not as raw as one would expect. -
Adding a longer URL just truncate it
you mean you need url over 246 characters?
Any clue on how to fix this ?
I think this line is the issue, it saves length as single byte
https://github.com/espruino/Espruino/blob/master/libs/bluetooth/jswrap_bluetooth.c#L2456
also mentioned here https://github.com/espruino/Espruino/blob/master/libs/bluetooth/bluetooth.h#L335
Most probably this limit is because the SR bit for short record is set in the header so the payload length is really using only 1 byte.Fortunately there is also the
NRF.nfcRaw
where you can build whole array as you wish including short bit cleared and payload length stored in 32 bits.
More info about the structure e.g. here https://w3c.github.io/web-nfc/#the-ndef-record-and-fields
Maybe easiest is to use NFC TagWriter to write such long url over NFC and see how the array looks and start from that and build it with NRF.nfcRaw yourself? -
Yes. When you buy it, it is yours, so you can do anything you want with it including flashing any other firmware you make yourself.
see also https://hackaday.io/project/175577-hackable-nrf52840-smart-watch
EDIT: and BTW since you are starting almost from the scratch just FYI - there are more hackable nrf52840/52832 watches so if you'd rather get different shape, display type, buttons there are some others (also some are quite cheap on aliexpress, one example the Magic3/C17 here ). However Bangle2 is maybe the best one - it has SWD on the back and everything is working including HR sensor which is an issue on other watches, also the screen is always on and sunlight readable which is quite unique.
-
There is a lot to do after doing
device.gatt.connect()
see everything below this https://github.com/espruino/EspruinoWebTools/blob/master/uart.js#L209
As for FDS - it is used. Normally there are 2 blocks reserved for it, it is the number 2 in this line
https://github.com/espruino/Espruino/blob/master/boards/BANGLEJS2.py#L115
but bangle2 has Storage in external SPI flash so this does not matter and more flash is free (and it should not overlap with anything) but still 2 blocks should be used - defined via FDS_VIRTUAL_PAGES define here).
And the location is right below the bootloader, here