[Bangle.js 2] modification: add buzzer, bigger battery, more switches, minus HRM #7292
Replies: 1 comment
-
Posted at 2024-09-16 by @gfwilliams The hole is around 8.4mm but I don't fancy your chances. Even if you found one it's in the middle of the watch so is unlikely to make much noise. All I could suggest is maybe you could epoxy a tiny one (10mm or so) to the rear of the watch and put the battery over it, but you might have to look at using a smaller/thinner battery to get the space for it. Posted at 2024-09-16 by JeonLab Thank you, @gfwilliams for your reply. Well, I'm not sure how loud sound I would get with such a small buzzer (if I could find one) in the middle of the watch fully surrounded by other components in a sealed case. I guess you are suggesting to attach a thin piezo, but I'm not sure how loud it would be without any amplifier which will take up space as well. Maybe I can put some SMD amp where the motor used to be. BTW, what's the thickness of the motor? Posted at 2024-09-17 by @gfwilliams The motor is 2.1mm thick The motor itself has an FET driving it, so if you were to replace the motor and use those pins you would have some amplification anyway Posted at 2024-09-17 by JeonLab @gfwilliams, thanks again for your reply. Posted at 2024-09-17 by @fanoush
I think piezo may not work "as is" but magnetic buzzer will as it is very similar in principle to motor. Posted at 2024-09-18 by @gfwilliams There's no schematic, no. But there is https://www.espruino.com/Bangle.js2+Technical which does contain a lot of information about it.
Yes, you'd probably have to put a resistor across it at minimum if driving from a FET. Posted at 2024-09-18 by JeonLab Thanks, Gordon. Posted at 2024-11-19 by JeonLab I (finally) opened the watch and attached a 27mm diameter piezo disc (with cutting sides to fit in the case) directly to the pin D43 (UATX) and GND. Even without a MOSFET, it sounded loud enough before reassembling the watch. But after assembling the watch and glued the screen, the sound level decreased significantly as expected. It was kind of an experiment. The piezo disc was not glued to any hard surface (such as inside of the watch back) which is needed for the disc vibrate properly.
I wish I had another extra pin for digital input, but I guess there is no more extra pin, is there? If there is one, I could add one more switch. Actually, if I could use 2 DI pins, I could add 3 switches using binary input. The reason why I want a bigger battery is for my golfing (golf-gps). Because it needs the GPS on all the time, the battery lasts about 5 hours which is normally fine even if there is some delay on the course. But if there is a longer delay, the watch can't work until the end of the game. I'm also very much interested in Gordon's GPS low level communication that he improved the fix time a lot. I'd like to find a way to reduce battery consumption by the GPS, power saving mode or data retrieving frequency adjustment, etc. Attachments: Posted at 2024-11-19 by @halemmerich How do you drive the piezo in software? Just triggering the output pin in a loop? Your wishes for a new case seem similar to mine, maybe you can find some useful information in my thread trying to design a custom case. https://forum.espruino.com/conversations/388860/ Posted at 2024-11-19 by JeonLab @halemmerich, yes, I saw your post for the custom case. That looks pretty good. Here is the function to drive the piezo.
And here is an example to call the function.
Posted at 2024-11-19 by @halemmerich Nice, I did not know that Posted at 2024-11-19 by JeonLab
Yes, Posted at 2024-11-20 by @gfwilliams Great! If you had another spare pin (UARX?) you could put the piezo between the two which effectively doubles the voltage swing on it: https://www.espruino.com/NRF52LL#create-a-square-wave-on-pin-d0-with-the-inverse-of-the-square-wave-on-d1- Just a thought, but if you're getting rid of the HRM I'd maybe think about drilling out the HRM hole and then gluing the piezo to the back of the case. That way the case would be sealed but you'd have a way for the sound to escape. As for extra IO, if you're willing to dig around on the board you might be able to find something. For instance I don't know if Or maybe if you're disconnecting the HRM then the pins for that might be on testpoints? https://www.espruino.com/Bangle.js2+Technical is a good start but I imagine you found that already! Posted at 2024-11-20 by JeonLab That's interesting to be able to double the voltage. I will take a look. But I still want another extra pin(s) for additional switches, so I will see if I can find any other unused pins. Since I'm not going to use the HRM, I guess I can use some of those pins like HRM_INT, HRM_SDA or HRM_SCL from the connector. Can I get the pinouts of the HRM header? Thanks! Posted at 2024-11-20 by @gfwilliams There's no schematic, no. I believe the PCB is 4 layers so it's not easy to trace out! Basically everything I know is in https://www.espruino.com/Bangle.js2+Technical But if you find a testpoint, all the pins we know are marked in that doc so you can just try toggling/reading the other pins and see if anything happens? Posted at 2024-11-20 by JeonLab Thank you, Gordon. Posted at 2024-11-21 by JeonLab I disconnected the HRM connector and checked each pins to find which is which. So I located 4 pins (D21: HRM_POWER, D22: HRM_INT, D24: HRM_SDA, D32: HRM_SCL). I was excited to see if I could use them as digital input for extra switches. Of course, the HRM power was off. I couldn't find any information on the GPIOTE and why I got the errors. Does anyone have any clue? Update: Update 2: Posted at 2024-11-22 by @gfwilliams I do occasionally see It's complaining about an issue setting a hardware watch with setWatch - but are you actually trying to do that, or are you just reading the pins with digitalRead? It's possible that there is an issue with HRM_INT because the firmware may be inserting its own watch on that for the HRM at a lower level? It should still work as a GPIO though, and other pins should be able to be watched Posted at 2024-11-22 by JeonLab Well, I was trying to use the hardware watch, setWactch to monitor switches all the time. I will try with digitalRead and report back. Posted at 2024-11-25 by JeonLab From the HRM connector header, I could only identify HRM_SDA (D24) and HRM_SCL (D32). I guess the other pins (HRM_INT and HRM_POWER) are gated. It’s hard to trace without removing components which likely damage parts. Thanks. Posted at 2024-11-26 by @gfwilliams So you've got HRM_SDA/HRM_SCL/UARX/UATX - that's 4 pins? I don't know of others I'm afraid, but you could always look at using an I2C or OneWire IO expander? You could glue a chip to the PCB and then wire from that to the pins. OR if it's just for buttons, connect each button to one IO pin with a resistor to GND, then when you see the IO pin drop to GND in a setWatch, remove the watch, set the pin high and then lower it, and see how long it takes to hit 0 again, and the time taken will depend on the value of the resistor and hence the button. Something like:
If it works well enough then potentially you could even use 2^n resistor values so you can detect more than one button being held at a time Posted at 2024-11-26 by JeonLab @gfwilliams, I was looking for easier and simple solution by using existing pins. I know, I'm lazy. :) Posted at 2024-11-26 by Ivor also, I think the UARX and UATX pins can be configured as analog IO so you could use buttons with resistors against those for a simple solution also? Posted at 2024-11-26 by @gfwilliams I think UART are on 42/43 (P1.10,P1.11) which I'm pretty sure aren't analog? It's usually 2..5 + 28..31 and those don't seem on anything that's easily available: https://www.espruino.com/Bangle.js2+Technical Posted at 2024-11-26 by JeonLab D43 and D42 work as either digital I/O or analog output, not for input. Posted at 2024-11-26 by Ivor ah good point. got my numbers wrong! doh. 🤦♂️ Posted at 2024-11-26 by JeonLab Here is my solution with diodes. See attached animated gif. Attachments: Posted at 2024-11-28 by @enaon
can you verify this? Maybe you have 4 watches already running, and you are hitting a limit of 6. I have seen this limit in the past, on the Rock watch, with fanoush's firmware I could not enable a watch for the second button, with jefmer's it was ok, I think the bangle2 firmware has the same limit. Maybe run this on the console to check how many you have running. Posted at 2024-11-29 by JeonLab I just tested setWatch with 3 pins (D32, D24 and D22 (found this pin additionally)) and confirmed only the first 2 pins with setWatch work. I don't know how many GPIOTE handlers are available in nRF, but it seems only two channels are available for users. Posted at 2024-11-29 by @enaon
I am not sure this is an nRF restriction, this is why I am posting, so that Gordon and Fanoush will correct me :) In any case, please run this to verify how many watches are running when you get the mesage that no more watches are available. Maybe some app is using a watch etc. Posted at 2024-11-29 by JeonLab
I'm not sure what this command does, but D17 is the BTN1 for Bangle.js 2. Posted at 2024-11-29 by @enaon
It just lists the watches that are currently running. So you only have the BTN watch, and you can only enable two more, a total of three? Posted at 2024-11-29 by JeonLab After I tried to set pins with setWatch for the 3 pins, I ran your command again. Here is the result.
Posted at 2024-11-29 by @enaon
a bit strange, I guess you run the setwatch command two times for pin D24, but where is the D17, the BTN1? Maybe try assigning the watch number to a variable, so that you can then clear them and do your test better, like so? clearWatch(testD22) Posted at 2024-11-29 by JeonLab D17 is not listed because I ran the code in the RAM only setting 3 pins with setWatch. If I added the code to my clock app, D17 is also listed. Still no clue for the D24 appears again at the end of the list. It's nothing to do with the hardware, so you can try with your own watch, I guess. Posted at 2024-11-29 by @enaon
nice, thanks for your time, I was just curious because on some older firmwares there was no limit on the number of watches I think. But yes, it is not important, thanks. Posted at 2024-11-29 by JeonLab I didn't mean to be rude. I just realized my previous reply might have sounded not very nice. My apologies. I'm also curious about the limits, but I just wanted to say I found a solution and I was fine without more interrupts. Thank you. Posted at 2024-11-29 by @enaon
you were not, I was a bit, it was clear that you had it solved, yet I was returning to the watches limit thing. Sorry, all is ok :) Posted at 2024-12-18 by JeonLab I have finally designed the new case for my modification and 3D printed and assembled the watch. It has a piezo buzzer, the same motor (moved to the right side wall), USB type C charging port, 350mAh battery and 4 additional switches. attached is a picture of the assembled modified watch. I will show some more pictures later. As I explained before, the HRM module was removed and 3 pins (D32, D24, D22) from the header was used to get 4 switch inputs. Everything works as I expected, but the accelerometer stopped working. I have checked the components (the accelerometer chip and caps and resistors around the chip) visually (with a magnifying glass) but couldn't find anything wrong. I wonder if the power for the accelerometer chip is through the HRM header. Is there anything I can check? Below is the reading of the accelerometer.
These values don't change when I move the watch. So the question is whether removing the HRM module can affect to the accelerometer. Any thoughts? Attachments: Posted at 2024-12-19 by @gfwilliams Wow, that's very impressive! The accelerometer is on the PCB and it has its own I2C lines, so I wouldn't have thought that anything you do with the HRM would affect it. You could check with Posted at 2024-12-19 by JeonLab Hi Gordon, Posted at 2024-12-19 by @gfwilliams Well, if you try reading a bunch of registers with it ( Posted at 2024-12-19 by @fanoush It needs some parameters https://www.espruino.com/Reference#l_Bangle_accelRd
this reads WHOAMI register at 0x0f address and value 20=0x14 is KX022 (as per https://www.mouser.com/datasheet/2/348/KX022_1020_Specifications_Rev_12_0-1101230.pdf#page=36 ) Posted at 2024-12-19 by JeonLab @gfwilliams and @fanoush, thank you for your responses and suggestions. I tried your suggested tests and all returned 255. Posted at 2024-12-20 by JeonLab I flattened the battery and waited for about an hour and tried to turn on and it did. So, I waited overnight to make sure the battery's fully discharged (it may not be fully discharged, but just below the voltage threshold of the FET) so that the accelerometer is not powered (hopefully). Posted at 2024-12-20 by @enaon
since you have made a new case, don't you have access to the battery terminals? You can short them for half a second, the BMS on the battery will turn off, and turn on again once you plug in the charger. Posted at 2024-12-20 by JeonLab @enaon, that’s good idea! I will try. Thanks. Posted at 2024-12-20 by @fanoush do not take "for a second" literally, whole second is far too much, just a brief moment - the fastest you can make it, or you may damage the battery Posted at 2024-12-20 by @enaon yes sorry, not a full second, just a touch will do. Posted at 2024-12-20 by JeonLab @fanoush and @enaon, ha ha ha, I know. I will be careful. 😀 Posted at 2024-12-20 by JeonLab Nope! It didn't work. I guess I messed up something on the PCB somehow. Strange, I don't see anything wrong. hmmmm Posted at 2024-12-21 by JeonLab Well, I disconnected the battery and reconnected, but it didn't solve the issue with the accelerometer. I think I have done all I could try. I don't want to damage other parts, so I will stop trying to figure it out. Although I'm going to miss the pedometer, but that's not a big deal. My main reason to design the new case and adding so many (most people won't need it) buttons and buzzer and bigger battery was for my golfing (https://banglejs.com/apps/?id=golf-gps ). Currently it uses swipes for moving the holes and adding/subtracting scores while I'm playing, but if I touch (and slide) accidentally, the score or the hole changes unintentionally. That's why I wanted to have physical buttons (left/right and up/down) and bigger battery for continuous use of GPS. The buzzer is my preference over the vibration motor. Although I lost the pedometer, I'm happy with the other modification. I have attached some pictures to show the internal arrangement of components in case someone's interested. The motor is moved to the right side wall in a tightly fit hole. This motor vibrates radially, not axially, so it feels much stronger than original configuration (taped on the battery). The buzzer sounds loud enough. I have tested with a MOSFET and direct drive from the pin D43, but didn't see any difference, so just connected directly to the pin D43 for simplicity. As for the battery life, I tested yesterday with continuous GPS running after full charge and it lasted over 9 hours. Attachments: Posted at 2024-12-21 by @halemmerich That's awesome! Turning the motor on its side and fixing it to the case directly to amplify the buzz is something I could imagine to do in my next version as well since it is well cushioned/dampened when on the battery. Posted at 2024-12-28 by JeonLab I opened my modified watch again to measure current for other reasons, and found the accelerometer was loose from the PCB. I gently touched it and was detached easily. During the modification, I haven’t touched that area with anything, especially the soldering iron. Attachments: Posted at 2025-01-06 by @gfwilliams That's a good point! I'm afraid I don't know what the exact part number is. Looking at the PCB image you posted though, if you need to re-attach in the correct orientation the dot on the accelerometer case should be in the bottom left corner Posted at 2025-01-06 by JeonLab In the same Technical information page, the I2C device list says it's Kionix KX022. I looked it up and found that was the correct part with 12 pins. Posted at 2025-01-07 by @gfwilliams Argh, sorry to hear about your accelerometer. Thanks for the update though - I'll change the docs - I think KX023 was mentioned because that's what the Bangle.js 1 had and I forgot to update the file when moving over. I can definitely recommend getting a heat gun - the chinese ones are pretty cheap and mine's been super helpful for this kind of thing. We actually have some Bangles here that you might be interested in? for instance some where the SWD pins never worked so we couldn't program them. Most likely it's just an assembly fault and the board is OK, and as you're taking them to bits anyway it might be fine. Posted at 2025-01-07 by JeonLab @gfwilliams, I found those parts on Aliexpress and ordered a couple of them already. Thank you for your offer though. Also I'm thinking to buy a hot air gun as well. Posted at 2025-01-07 by @fanoush
there are very cheap ones that don't even have temperature control nor air flow control, then the next level is something like this Posted at 2025-01-07 by JeonLab @fanoush, thank you very much for the information of the hot air gun with links. It looks good for my purposes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2024-09-15 by JeonLab
I couldn't find (maybe missed) any post that anyone tried to replace the vibration motor with a buzzer which I think it's more useful.
Before opening my precious watch, I'd like to find out whether any buzzer can fit in the space. I couldn't find the dimension of the motor from the technical detail page, so can anyone let me know the size (diameter and thickness) of the motor in the Bangle.js 2?
Then I would start looking for a buzzer with that size.
Any comments will be appreciated.
Thanks,
J
Beta Was this translation helpful? Give feedback.
All reactions