You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • So I tested the $8 one with rechargeable battery and I have mixed feelings about it.

    First I measured current drawn from battery with original firmware when it is sleeping and got ~ 6uA. This is not bad at all if my meter shows correct value.

    Then I flashed Espruino build I already had for those small $4 keychains and it worked while debugger was attached over SWD but when I disconnected debugger it went into reboot cycle blinking the LED. After some head scratching I figured out it is missing support for internal nrf52 DC/DC! After building another firmware with this disabled the reboot loops stopped. Interesting that it worked while debugger was attached. Probably the DC/DC has different modes based on current and with low current it rebooted.

    Then I tried to figure out LEDs etc. It is still the same, there is one (RED) led on pin D20 however this one is not visible from outside at all! It is next to 32MHz crystal on the back of the device. Then the LED2 is D17 and this is visible under the blue button. It is actually pair of two LEDs from both sides. Then there is another pair but it does not go to nrf52 at all, it shows charging state and goes off when the charger chip stops charging full battery. No other extra pin is used, even no analog pin reads battery voltage so you don't know how much is left. They probably still kept original CR2032 design. Maybe checking E.getAnalogVRef() going below 3.3V could signal empty battery.

    Then I tried buzzer and this is the worst bit in a way. When trying previous code function freq(f){if(f === 0)D14.read();else analogWrite(D14,0.96,{freq:f});} it immediately reboots when trying any sound!

    Perhaps mix of DC/DC disabled with weak voltage regulator and/or missing/weak capacitors cannot cope with the current drawn by magnetic buzzer even with duty cycle of 0.96 (i.e. only 4/100 on, 96/100 off)! I found out it does not reboot immediately when I set it >=0.973 however it still reboots when BLE radio draws more on connect/disconnect. 0.98 seems to be safe enough but the sound is not very loud. However it is similar to most of the other keychains (so quite poor). Unfortunately my guess that li-po battery could give more current and louder sound was wrong.

    So it is still quite capable device for the money when only button/led/BLE/NFC is needed but the design could be better. I'll see how long the battery lasts.

    Too bad there is no spare GPIO going to any trace to reuse. However since the analog pins on the nrf52 are next to each other I can perhaps solder some voltage divider from battery to the middle of them and won't damage anything else. Then I can pick the best one to read the value. They are tiny but 4 of them is big enough area I guess.

About

Avatar for fanoush @fanoush started