Let's build a calculator...



#2

hi all,
this would be my first posting here.

over the years many have suggest that HP should either re-release the HP42, or create a follow-on product based upon it. it occurs to me that the technology and software now exists for the open source community to instead realize this goal.

there exists 'free42', a set of C++ code that duplicates nearly identically the HP42 functionality, and which continued to be refined. the code footprint is somewhere in the 500k region, and it runs on a processor of less than 20mhz (thinking of a low-end palm pda here) with acceptable speed.

there also exists a set of hardware in the form of the uWatch ( http://www.calcwatch.com ) created by david jones. a quick check on microchip's website reveals that the pic24 processors dave uses are available with up to 512kb of flash and 32k of ram, with speeds up to 80 mips.

it seems that with a PCB costing perhaps $10, a $5 processor, $10 LCD, and a handful of small SMD switches, realizing a HP42 would take little more than porting the free42 code.

comments anyone? in particular i'd like to hear dave's thoughts!

cheers,
rob :-)


#3

and futher discussed (OpenRPN), but I doubt it will lead to anything beyond prototype stage. 50USD in parts usually lead to prices up to 150-200USD for commercial products.


#4

Your timing is interesting. I just attended an award presentation for the HP35. It turns out that the most difficult and most costly part of a calculator these days is the keyboard. Processors are cheap, cheap, cheap as are displays. Any 32-bit RISC processor core can deliver what's needed for computation at low power (that's what's used in the latest HP35s) but read the posts of the people in this forum and you'll quickly see how important the keyboard feel and reliability are to the overall impression of calculator quality. It's far more important than the phrase "a handful of switches" would imply. Keyboard reliability and feel were big problems for the HP35 and were also problems for the HP 9825A desktop calculator/computer project that I worked on. Those simple, mechanical keyboard keys are always a problem that drives manufacturing bats.


#5

well, small switch construction has come a long way over the years, and it is relatively easy to add just a little more componentry and use a bit of spare computing power to hide away a multitude of switch issues.

for development i'd use just the individual small switches with a printed overlay that covered the whole keyboard (similar to many modern appliances, in particular whiteware). then move on to either a simple plastic moulding (with hinged keytops) over the same switches and with a metal screen-printed escutcheon... i'd possibly even consider using domes.

btw, i've spent the last 4 years working in a group developing winCE machines with in-house designed keypads, so i've got a little bit of experience on that front.


#6

Never underestimate the time, effort, skill and craftsmanship required to make truly outstanding mechanical parts.

Same goes for software...what is that "law" of software budgets?


#7

"Never underestimate the time, effort, skill and craftsmanship required to make truly outstanding mechanical parts": the trick is to come up with a design that works without the parts needing to be outstanding, yet still provide a function and finish that allows the user to imagine how precision the internal workings are.

#8

AFAIR from an old Heathkit spare parts sheet, the costs ("back then, in the early 70s") where something like
1/5th CPU
1/5th display+driver
1/5th keyboard
1/5th NiCd cells
1/5th enclosure, bits&pieces and rest of electronic components

I'd assume that the "CPU" (containing several state-of-the-art chips) probably made up 50% or even more on HP calculators. The TI Klixon keyboard was probably as expensive as the HP keyboard (stainless steel framing), besides the keyboards on early ICC-804Ds and JE-850Us (which both used reed relays) the best keyboards ever encountered :)

The chinese HP "clones" are probably less than a handful of USD when mass produced - but one has to consider 50000-100000 USD or even more for development/tooling, plus an "initial production run". That's probably 0.5 million USD of geek investment :)


#9

Frank,

I guess that your hand has 5 fingers ;-))

Think about 2 fingers for a two-line scientific calculator and about 5 fingers for a "Natural Textbook" calculator similiar to the SmartCalc 300S (which I still use and like)!

Here we have a Casio fx-82MS Clone for USD 2.10 @ 5,000 pieces.

Here a Casio fx-82ES Clone for USD 5.10 @ 3,000 pieces.

And in this business you are not talking about these "sampling" quantities.

Regards,
Joerg


#10

Quote:
Frank,

I guess that your hand has 5 fingers ;-))

Think about 2 fingers for a two-line scientific calculator and about 5 fingers for a "Natural Textbook" calculator similiar to the SmartCalc 300S (which I still use and like)!

Here we have a Casio fx-82MS Clone for USD 2.10 @ 5,000 pieces.

Here a Casio fx-82ES Clone for USD 5.10 @ 3,000 pieces.

And in this business you are not talking about these "sampling" quantities.

Regards,
Joerg


I recently posted pricing I got for a tiny shirt pocket size scientific, it was around US$0.50ea in quantity!

Dave.

#11

just had a quick look at openRPN. it lacks one important thing - any software!! but free42 exists, is fully functional, with source code ready to be ported to a new platform. i'd never consider such a project if free42 hadn't already been developed already over a number of years.

and i suspect than many people would be quite happy to pay us$150-$200 for an HP42 built out of modern components, with code that is upgradable and maintained.

Edited: 16 Apr 2009, 10:42 a.m.


#12

Quote:
and i suspect than many people would be quite happy to pay us$150-$200 for an HP42 built out of modern components

As much as I would like to believe this, I have my doubts. The only reason that the old HP 42s commands such high prices is limited supply. Once you introduced a new version with unlimited availability, market prices will drop significantly. See what happened with the Voyagers; the HP 10c, 11c, 15c and 16c are no longer made, so prices remain high, but the HP 12c sells for much less due to production of the modern version. Even true vintage original versions of the HP 12c sell for a fraction of the price of the other out-of-production Voyagers. Ultimately, I think the market size for a resurrected HP 42s may not be large enough to justify its return.


#13

I agree. You couldn't just re-release the 42 nor the 15 as it was and expect anything like the same level of enthusiasm as the originals. People have moved on and have different expectations - like text and graphics for example.

Here's my pitch: I've already developed all the software; http://www.voidware.com/reckon runs on the Casio fx-9860g. It could also run easily on the Hp50g or any independent platform. It uses no dependent libraries and has its own computation code including its own number system.

You can play with the number engine (my test system) here: http://www.voidware.com/reckon/reckon.exe

Remember that's a command line test, so no graphics nor use of the Pi symbol or anything else, bare bones only!

So when you say, let's build a calculator. go ahead make me the hardware, i've already done the software :-) i would like:

a good keyboard, say 4 rows of 10 for landscape.
a hi-res mono screen, say 320x240 min. Color? if you've got it.
works off ordinary batteries please.
512k ram min.
256k rom space min.
something like an ARM processor, or at least something with a half decent compiler (the casio has the hitachi HS3)
real time clock.
USB connection.

anything more than that, the skys the limit!


#14

#15

Quote:
just had a quick look at openRPN. it lacks one important thing - any software!!

Actually, the software stack was/is the most developed part of the openRPN project. Look for *fix (starfix) on sourceforge.


- Pauli

#16

Quote:
just had a quick look at openRPN. it lacks one important thing - any software!!

That's incorrect.

openRPN has software called *fix(?)

What OpenRPN has always lacked is hardware, not even a prototype, that's why the project died.

Dave.

#17

Oh boy, here we go again. Time to make some popcorn, sit back and watch how long this one takes to fizzle out... :^)


#18

Here is one of the past related threads I could remember the search terms to find.

#19

512KB of flash on a PIC24 is not enough for Free42 without hacking some stuff out. 512KB of flash is barely enough on an ARM in Thumb mode with high optimization.

Also Free42 is designed for systems that have much more RAM available for working storage than is available in the PIC24. Getting it to work in 32KB of RAM is possible but not easy. (I know, as I've worked on it for use on a different microcontroller.)


#20

I just did a quick free42 build with -Os optimisation and gcc-4.2 and got the following sizes:

$ size free42bin free42dec
text data bss dec hex filename
374317 11720 34120 420157 6693d free42bin
473136 12984 34928 521048 7f358 free42dec
$ ls -l free42bin free42dec
-rwxr-xr-x 1 pauli pauli 388916 2009-04-17 09:10 free42bin
-rwxr-xr-x 1 pauli pauli 490832 2009-04-17 09:13 free42dec

My experience is that ARM Thumb is a little bit smaller than x86.

Not a great test (especially for the binary math version) since I'm not statically linking but there does appear to be some headroom there.


- Pauli


#21

there seems to have been a few interesting contributions over night - it's now 11:30am here in new zealand.

my suggestion of a pic24 was largely influenced by the existence of the uWatch project, and the presence of someone on the forum who had experience with the toolchain. can anyone suggest a better processor choice, perhaps an Atmel arm7? the only major limitations i will impose are practical ones:

- enough (1mb or more) flash on board,

- enough (64kb or more) ram on board,

- NOT a BGA package - needs to be something i can hand-solder,

- capable of a more-or-less single chip design,

- obtainable in small quantities,

- we also need someone who is already familiar with programming it

my criticisms of the openRPN project still stand: a quick look at their website revealed no hardware design, and the only software seemed to be version 0.2 :(
again, free42 is a mature set of software, which is 100% what is guiding my suggesting this project.

and regarding costings: the HP48 used to cost HP something like us$10 to manufacture when it first came out, with much of the 'profits' that the company made above this going into repaying the R&D costs. here today we are looking at a product where all the cost will be in the hardware (that cost HP us$10 or so), with R&D for free (in the form of free42 and donated development time).


#22

Quote:
my criticisms of the openRPN project still stand: a quick look at their website revealed no hardware design, and the only software seemed to be version 0.2

The version number isn't flattering. Download the software, compile it and try it out. Most of RPL is there and it is fairly bug free. More functions need to be added naturally but what is there is decent enough. I even used *fix as my text based calculator of choice for a while.

- Pauli

#23

Here are my ARM versions from http://sense.net/zc/free42/.

-rw-r--r--    1 egan     egan       448880 Apr 26  2006 free42bin
-rw-r--r-- 1 egan egan 552324 Apr 26 2006 free42dec
Dynamic linked.

I have already tried to cross compile free42 sans GUI for the 50g, but it is too large. The 50g has ~400K for C programs, however I have been unable to launch executables > 80K. Although I have no problem using all ~400K for application data.

What I find amazing is the collective works of Hrastprogrammer, e.g. 42S emulation using the 42S ROM on the 48GX! http://www.hrastprogrammer.com/hp42x/index.htm


#24

What arm compiler version are you using?

There has been some significant improvements in the 4.x gcc versions.

Back on 3.x, I did a bit of testing gcc and -O1 produced the smallest fastest code for low cache ARM CPUs. -O2 and -Os produced about the saem (larger & slower) code.


- Pauli


#25

In 2006 it was GCC 3.x. Now I use 4.2.2 for HPGCC.

#26

Well, what a coincidence... just last night I started back-of-the-envelope work for a Mk2 uWatch. Time will tell if anything comes of it...

Some comments:

#1

Forget software, don't even think about it, the hardware is *everything*.

Without a decent hardware platform to work from a calculator does not exist. This has been proven time and time again with DIY calc projects. Once you have a hardware platform, the software will come, the software is flexible, and there is no shortage of code and coders out there. It never ever works the other way around for something like a calculator, unless your aim is purely a software project and you don't care about how crap the hardware is.

#2

Forget group projects, they are doomed to failure. A project like this needs one person and one person alone to come up with some hardware and make all the decisions.

#3

The hardware is not trivial, in fact it is very difficult.

Sure, in a day I can lay out a circuit and a PCB with a processor, some switches and an LCD, and it will work like a calculator. Unfortunately it will look and feel so "prototype" that no-one will want to use it.

Ask Eric how much time and effort he has put into his DIY-RPN calc, that has only in recent revisions just started to resemble something that people would be happy to use physically.

#4

Unless you have the resources and money of a large company, a fully custom calculator hardware design that looks and works like a decent product is very difficult to achieve. And if you can't achieve a reasonable working quality, I say don't bother.

Hardware is not cheap either. Yes, processors are fairly cheap, blank PCBs are cheap, but things like quality switches and LCD's are not. At least not in small volume. My uWatch is expensive because the parts are expensive, and all the small parts add up. The switches are expensive and single source, connectors are expensive, battery holders are expensive, some of the screws are a dollar each etc.

You have to either cheat and/or be very very clever in off-the-shelf part design if you want to produce a calculator that people will want to buy and use.

On the uWatch I cheated a lot. I used a PCB for the front panel and labeling, I got away without keytops, and by the novelty of the design I got away without a custom case or any other custom parts.

It is not a hugely usable design, but it's the only one out there and it's novel. So it's been reasonably successful in a niche way.

#5

Quite frankly I've come to the conclusion that it would be a waste of time and effort for anyone to try and do a full-size custom DIY calculator.

Why?

There are just too many hardware options available off-the-shelf. The iPhone, PDA's, the Casio 9860, the HP 20B, HP48/50 and even some TI's can be preprogrammed? etc
And newer calculator designs are becoming more more open and re-programmable. HP are moving in this direction.

There has been talk about hacking an existing product (e.g. LCD and PCB replacement), and that may have some merit to a niche market if someone can find a cheap and easy way to do it.

If your goal is to have a new HP42 then you can have that right now on an iPhone or other device. Why anyone would bother with a custom hardware project to recreate the real thing is beyond me. All that effort, time and money, just so you can have something with real buttons seems a tad silly, even if you did manage to pull it all off at a reasonable price and quality.

If you really want a high end DIY calc, don't waste time and effort doing it from scratch. Simply take an existing re-programmable calc, use it as the hardware platform, and look at changing the front panel and key legends. Low cost, low risk, short development, and a high quality result. You won't get that result with DIY from scratch for any cost you'd be able to afford.

#6

What do I think is a worthwhile project?

Given the above that the full size calculator market is difficult and options already exist. I'm going to concentrate on smaller calcs, with either another watch, or maybe even a REALLY TINY shirt pocket or belt clip calc.

My current sketches and thinking show a tiny (38mm x 27mm) 128x64 LCD, small tact switches again (but possibly bigger than the uWatch) that surround the screen, and the PCB front panel worked good last time. A thin rechargable battery, perhaps some rocker encoder switches, and a more powerful processor.

The case and front panel integration is the hardest part, but I have some ideas that may simplify this.

I'm getting the initial feeling it should be possible to come up with a smaller, thiner uWatch with integrated watch band, more rugged, and a dot matrix display that takes much less power.
Fewer keys probably, but anyone who thinks that is a negative is missing the point of a project like this.

Intended market?

The uWatch is fiddly to assemble and not very rugged. That is why I have not sold it as anything but a kit. Also, the uWatch is very niche because it's pretty much just a calculator and not much else, and most people don't want to buy a kit.

So any next device I picture being less calculator-like, and more general purpose computing-like. Easier to assemble, more rugged, and sellable as a built-up product. Not designed for the calculator enthusiast market, but the infinitely bigger geek market. (Flame mail welcome)

Yet, I also plan to keep the uWatch's off-the-shelf parts concept to keep development costs down. Perhaps a custom case will be needed, but I have an idea to possibly make that simple enough I can do with my feeble mechanical CAD skills.

Oh, and last but not least. It doesn't matter what you come up with, you will never ever please anything but a minority. And even then they'll still want something different.

Will I actually go through with it? Don't know, I work on whims :->

Dave.

Edited: 16 Apr 2009, 9:45 p.m.

#27

HP has handed you TWO completely re-writable blank slates; the new 12c with it's ability to
be an 11c, 15c, 16c or 10c or a combination thereof (or a 15c minus some things, plus your specialized routines) and the 20b with it's (ok strange) 2 line screen. And HP will give you the development package.
Use it or loose it.


#28

Quote:
HP has handed you TWO completely re-writable blank slates; the new 12c with it's ability to
be an 11c, 15c, 16c or 10c or a combination thereof (or a 15c minus some things, plus your specialized routines) and the 20b with it's (ok strange) 2 line screen. And HP will give you the development package.
Use it or loose it.

Yep, and it's a safe bet to say there is more to come. So I wouldn't be rushing into any DIY calc from scratch...

Curiously, I wonder if it would be possible to have say the 11C, 15C, and 16C ROM's fit inside the new 12C calc and then switch between them?

BTW, has anyone done a tear-down on one of those new 12C's yet?, I don't remember seeing anything...

Dave.


#29

It would be very surprising if the CPU didn't have enough flash space for all the voyager ROMs together.


- Pauli

#30

dave, et al;

sam kim said "or" not "and" but who knows? by axing the useless algebraic portion of the 12c and adding trig, nailed to 6 of the unused "g" keys (and p<>r/r<>p on two others of course) one could have a real do-it-all calcer.

17c anyone?


the really intriguing thing he hinted at was that by using the base of say the 15c (minus any unused functions); one can make a trade, or profession specific calculator out of eitherthe 12c or 20b. if i understood him correctly; he has handed the illuminati (that's you guys & girl) a chance to turn your programming skills into pin money.


#31

Quote:
by axing the useless algebraic portion of the 12c and adding trig, nailed to 6 of the unused "g" keys (and p<>r/r<>p on two others of course) one could have a real do-it-all calcer.

FWIW, find a draft here (I posted a similar one earlier here). The function set includes 15C and a good part of 16C. As was mentioned already many times, the LCD ist the limiting factor of both platforms HP opened recently. So I'm looking forward to Dave's work with a real dot matrix.

Ceterum censeo: HP, launch a 43S.

Walter


#32

Quote:
FWIW, find a draft here (I posted a similar one earlier here). The function set includes 15C and a good part of 16C. As was mentioned already many times, the LCD ist the limiting factor of both platforms HP opened recently. So I'm looking forward to Dave's work with a real dot matrix.

I've just ordered a couple of THESE and THESE

Not huge, but usable, very tiny, and low power.

And on the keyboard front I have a novel idea to save space. And how does a tiny trackball sound?

Dave.


Edited: 17 Apr 2009, 2:04 a.m.


#33

Hello!

Quote:
And how does a tiny trackball sound?

Not so good, to be honest... For me, two of the main purposes of a calculator is to save time and increase accuracy. Compared to a proper keyboard, track ball is much worse in both respects.

Greetings, Max


#34

Quote:
Not so good, to be honest... For me, two of the main purposes of a calculator is to save time and increase accuracy. Compared to a proper keyboard, track ball is much worse in both respects.

It's not for calculator use, the watch can be used for other things too remember.

Dave.


#35

I say, "go for it". A calculator with just buttons has already been done. I would like to see new ideas and new applications. I've often wished the 42S had a thumb wheel like many PDA phones have/had so that I could scroll through code faster.


Possibly Related Threads...
Thread Author Replies Views Last Post
  WP 34S New Build with older GCC Marcus von Cube, Germany 4 250 06-22-2013, 05:12 PM
Last Post: Marcus von Cube, Germany
  HP-15C Simulator / Release 3.2.00, Build 5319 Torsten 10 520 05-11-2013, 05:19 PM
Last Post: Thomas Klemm
  Debug4X and "divide by zero" when attempting build Joe Veazey 3 224 11-25-2012, 08:45 PM
Last Post: Han
  they build their calculators like they build their words db (martinez, ca.) 22 848 10-30-2012, 05:57 AM
Last Post: Frank Boehm (Germany)
  [WP34s] Build error on linux 64bit Nobby K. 9 374 04-08-2012, 02:11 PM
Last Post: pascal_meheut
  WP34s V3 - Build Number recommended? Thomas Chrapkiewicz 27 1,042 01-28-2012, 01:22 PM
Last Post: Marcus von Cube, Germany
  WP34s build compiler David Griffith 19 706 01-06-2012, 08:49 AM
Last Post: Marcus von Cube, Germany
  Matrix functions on the WP 34s Build 1685: in a word "incredible" Gene Wright 78 1,699 10-06-2011, 09:16 AM
Last Post: Crawl
  WP34s: new build with Matrix functions? fhub 2 169 10-03-2011, 01:02 PM
Last Post: fhub
  WP-34S build problems on Linux Eric Smith 5 262 10-03-2011, 01:27 AM
Last Post: Marcus von Cube, Germany

Forum Jump: