Author Topic: EEVblog #1159 - World's Most Precise Pocket Calculator  (Read 21572 times)

0 Members and 1 Guest are viewing this topic.

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37730
  • Country: au
    • EEVblog
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #50 on: January 04, 2019, 01:47:54 am »
I was hoping this leakage thing could be video worthy, but just measured mine and only got 5uA. I hate when stuff works  ;D
 

Offline Kean

  • Supporter
  • ****
  • Posts: 2089
  • Country: au
  • Embedded systems & IT consultant
    • Kean Electronics
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #51 on: January 04, 2019, 05:38:55 am »
I hate when stuff works  ;D

Those of us who create and ship products think a little differently!   :phew:
Actually, you do that too...  :-DD
 

Offline Thomas

  • Regular Contributor
  • *
  • Posts: 117
  • Country: no
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #52 on: January 04, 2019, 07:04:57 pm »
I was hoping this leakage thing could be video worthy, but just measured mine and only got 5uA. I hate when stuff works  ;D
Too bad your unit is OK :-DD I think that could have been a great video, as I think quite a few people are experiencing this issue.

Swissmicros asked if I felt competent to replace the capacitors myself, which I said yes to. They said it would not void the warranty, and they would be happy to send the caps to me. No need for that. Easy for me, easy for them.

Refreshing to see this kind of support in this day and age. Especially for this kind of product.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14447
  • Country: fr
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #53 on: January 05, 2019, 01:41:44 am »
Swissmicros asked if I felt competent to replace the capacitors myself, which I said yes to. They said it would not void the warranty, and they would be happy to send the caps to me. No need for that. Easy for me, easy for them.
Refreshing to see this kind of support in this day and age. Especially for this kind of product.

Yes, it's very impressive. The fact that even merely opening the case would not void the warranty is a big plus, not to mention replacing components. Of course they saved some of their own time, so that was a win-win. Kudos to them.
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37730
  • Country: au
    • EEVblog
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #54 on: January 05, 2019, 05:56:38 am »
I was hoping this leakage thing could be video worthy, but just measured mine and only got 5uA. I hate when stuff works  ;D
Too bad your unit is OK :-DD I think that could have been a great video, as I think quite a few people are experiencing this issue.

Yep, very dissapointed!

Quote
Swissmicros asked if I felt competent to replace the capacitors myself, which I said yes to. They said it would not void the warranty, and they would be happy to send the caps to me. No need for that. Easy for me, easy for them.
Refreshing to see this kind of support in this day and age. Especially for this kind of product.

 :-+
 

Offline Leo Corradini

  • Newbie
  • Posts: 1
  • Country: br
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #55 on: January 05, 2019, 08:21:37 pm »
I just love being able to print on my hp 82240B printer with the hp42s!
 

Offline jklasdf

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #56 on: April 26, 2019, 09:15:44 am »
emece67 is right about not all of the firmware being open source. The code is arranged so that there's still a completely closed-source OS "shell" that just runs one application, a port of Thomas Okken's Free42 (which itself is properly open source and licensed under the GPL). See https://www.hpmuseum.org/forum/archive/index.php?thread-10870.html for further discussion.

Several months ago, swissmicros did reorganize things and make available some code on github as 0xdeadbeef states, but the OS "shell" itself is still distributed only as a binary. For example, I wanted to look into the keyboard debouncing algorithm used, and change it to use something similar to what's described here: https://summivox.wordpress.com/2016/06/03/keyboard-matrix-scanning-and-debouncing/. But the source code isn't available. All that swissmicros did was provide an "SDK" so that you can build a new application on top of their closed OS "shell".

Nonetheless, several months ago, when swissmicros reorganized things as a separate OS "shell" running Thomas Okken's Free42 application, a lot of people congratulated swissmicros for finally making things "open source", which confuses things. But they really didn't do much more than is legally required (and which they arguably should have had properly separated in the first place). There is still no way to build/modify the code for the lower-level parts of the calculator. And I do think their keyboard debounce algorithm is probably suboptimal (a lot of recent calculators that use a flash microcontroller instead of a custom ASIC or masked rom do seem to get this wrong for some reason...key debouncing just doesn't seem to be get enough attention for firmware development). The DM42 does also have keyboard issues related to the hardware itself (dirty contacts), but there's no way to verify if the debouncing algorithm makes things worse.

For comparison, finding the code for the WP-34s is incredibly easy, and I would consider it a truly open-source calculator (at least the firmware). The algorithm used is a lot simpler than what is described at https://summivox.wordpress.com/2016/06/03/keyboard-matrix-scanning-and-debouncing/. The code for debouncing on the WP-34s can be seen at: https://sourceforge.net/p/wp34s/code/3903/tree/trunk/main.c#l312
Code: [Select]
#ifdef DEBOUNCE_ON_LOW
        /*
         *  A key is newly pressed, if
         *  a) it wasn't pressed the last two times checked
         *  b) it is pressed now
         */
        keys.ll &= ( ~last_keys & ~KbDebounce );
#else
        /*
         *  A key is newly pressed, if
         *  a) it wasn't pressed last time we checked
         *  b) it has the same value as the debounce value
         */
        keys.ll &= ( ~last_keys & KbDebounce );
#endif

Currently DEBOUNCE_ON_LOW is defined, so the code used for debouncing is the top part. The rest of the keyboard handling is a little more complicated, because it also needs to handle keys held down. (If a function key is held down, that key's function is displayed. If it's held down for even longer, eventually "null" is displayed and the key doesn't do anything when released. This is useful for when you forget what key's assigned to what with custom keyboard assignments in user mode). For me, the biggest usability issue with the WP-34s is the keyboard. The keys themselves give a nice definite click, but I can't always be 100% sure that there aren't repeated or missing keystrokes, although it's maybe fine 99.99% of the time. I think the debouncing is still slightly better than the stock HP 30b firmware (which the calculator is based on). The DM42 is far worse with missing keystrokes.

On the WP-34s though, there's also an incredibly annoying delay between when you press the key, and when it actually takes effect. I think the key function/"null" display handling is what causes the delay. It'd be interesting to see the code for the DM42. The code for swissmicro's voyager models is more freely available, although the deboucing isn't great, see dm_lpc111x_sdk/drivers/keyboard/keyboard.c line 252 in https://www.swissmicros.com/dm_lpc111x_sdk.tar.gz
Code: [Select]
      if (!gpioGetValue(ROW(j)) || !gpioGetValue(ROW(j)) || !gpioGetValue(ROW(j)))
        keys[press_count++]=KEY_CODE[k];

The key must be polled as being pressed down three times consecutively to register. If the DM42 is using similar code, depending on the polling interval used on the DM42, this might be a problem.
 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1572
  • Country: de
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #57 on: April 26, 2019, 09:54:42 am »
I just wonder: did you bring that up in their forum?
It's very hard to judge that without some insight, but I'd imagine a small company like Swissmicros is scared of Chinese copycats and tries to hide some of their IP by keeping it closed source.
I guess for a full open source version you need to wait for the 43S. At least I would think they won't rely on any closed source remnants.
Trying is the first step towards failure - Homer J. Simpson
 

Offline jklasdf

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #58 on: April 26, 2019, 05:58:54 pm »
Hi, I haven't brought up the licensing/source code availability in the swissmicros forum (I don't have an account), but unfortunately I do think the OS "shell" being closed source is completely intentional. To be fair, Michael at Swissmicros did put a lot of work into the DM42 and does of course have the right not to release the OS "shell" including the keyboard handling routines. I personally would like to be able to see and modify the source code for the keyboard handling routines, but there's no legal requirement for Swissmicros to do so. Unfortunately a lot of people mistakenly believe that the entire source code for the calculator is open source, but this is not the case.

Swissmicros have modified their build so that it is possible to build and run modified versions of Thomas Okken's Free42, but these modified .pgm files must run on the OS "shell" for which the source code is unavailable. Their official license statement is here (note that there is no intention of releasing the "system" protion of the code):
https://www.swissmicros.com/License_Statement.php
 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1572
  • Country: de
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #59 on: April 26, 2019, 06:35:56 pm »
I actually meant if you brought up the potential debouncing issue in the Swissmicros forum. I guess there is  certain chance you will be listened to.
Besides, Michael Steinmann answered per email the last time I tried, so it's not like there is no way to communicate.
Trying is the first step towards failure - Homer J. Simpson
 

Offline jklasdf

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #60 on: April 26, 2019, 07:47:29 pm »
Thanks I'll look into creating a forum account or emailing if he is responsive sometime this weekend. I assumed you meant the licensing part given the rest of your post and your original post trying to correct emece67.
 

Offline Thomas

  • Regular Contributor
  • *
  • Posts: 117
  • Country: no
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #61 on: November 15, 2021, 07:14:39 pm »
Long time, low activity on this thread.
I measured the standby current consumption on my DM42 again today, still ~4.5µA, all good.

Then I discovered, by accident, when I press a key (any key) the current draw is ~4.7mA. Pressing more than one key doesn't change it.
That can't be good for battery life?
Sure, buttons are not pressed for long periods of time. But then again, there are a lot of key presses! That's kinda what you do with a calculator ;D

Can this be a design issue?
A normal keyboard matrix with scanning wouldn't cause this kind of current?

Edit:
Just realized Swissmicros have their own forum, posted there too.
« Last Edit: November 16, 2021, 03:31:13 pm by Thomas »
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 37730
  • Country: au
    • EEVblog
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #62 on: November 22, 2021, 04:40:19 am »
Long time, low activity on this thread.
I measured the standby current consumption on my DM42 again today, still ~4.5µA, all good.

Then I discovered, by accident, when I press a key (any key) the current draw is ~4.7mA. Pressing more than one key doesn't change it.
That can't be good for battery life?
Sure, buttons are not pressed for long periods of time. But then again, there are a lot of key presses! That's kinda what you do with a calculator ;D

Can this be a design issue?
A normal keyboard matrix with scanning wouldn't cause this kind of current?

Surely that wouldn't be the keypad matrix, it almost certainly would be the processor waking up and processing at full speed?
That being said, for just processing a keypress, there is no need to run the processor full speed.
 

Offline Thomas

  • Regular Contributor
  • *
  • Posts: 117
  • Country: no
Re: EEVblog #1159 - World's Most Precise Pocket Calculator
« Reply #63 on: November 22, 2021, 01:00:51 pm »
Yeah, seems excessive to me. Should be easy enough to fix.
Might not be deemed important enough to warrant a firmware update.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf