Post Reply 
Generic Calculator Shield for Arduino Photo-journal
03-02-2015, 07:01 AM (This post was last modified: 03-02-2015 07:04 AM by MarkHaysHarris777.)
Post: #1
Generic Calculator Shield for Arduino Photo-journal
Greetings,
Well, I'm starting a new photo-journal; this time documenting the 'Generic Calculator Shield' for an Arduino micro-controller. The shield is intended ultimately for the Arduino Due, but will also work nicely on the Arduino Mega2560, and even on the Uno. The idea on this project is to produce and open hardware open software development system (including initial firmware) to get the community involved in generic calculator development in the open micro-controller 'maker' space. The hardware and software specs will be published here, google code, source forge, and Arduino (possibly Make). Others will be able to build their own shield, or optionally they will be able to 'order' an assembled shield which they may plug into their Arduino without having to own a soldering iron. In any case, the main idea is to move the development of a generic calculator (business, scientific, computing|software, even 'four banger') into the 'Maker' community (DIY) and others. The more people involved the better. A good place to get this started is the MoHPC community of RPN affectionados. So, we start here with one hi res pic under a thumb nail (thank you Dave F): Then a general description of the project goals:

[Image: Arduino_Uno.jpg]

This pic is my Arduino binary calculator and general 'sketch' laboratory I'm currently playing with while I get feel for this micro-controller. The upper board is a 'MakerShield' and the lower board is the Arduino Uno. The unit has looked just like this for two weeks (the real work is going on in the 1.6 IDE on my mac mini... where the frame-work is now up to 7K and several hundred lines of C|C++ coding).

The general idea here is to produce a 'calculator shield' which will contain a five column x seven row click-button keyboard, 16x2 backlit LCD display, and pinouts. Included with the shield will be initial firmware-framework for community collaboration with a common interface. The unit will be able to be used as a development framework, but will also be a fully functional calculator easily cased which will last for years to come.

Initially the calculator will have keyboard system, VT102 terminal system I|O, LCD library interface display system, and will provide the framework and functionality of a programmable HP35, or TI30 (basic scientific functions with keystroke programming, classic RPN stack configurable for eight levels with or without input buffer.

Well, as I make progress with the hardware (and firmware) I'll be posting pics and INO files here (as well source forge, code google, and Arduino). Feel free to jump in when things get going a little further.

PS Yes, casing buttons (overlays) and enclosures are being investigated as well. If you have ideas regarding same, let me know; frankly, I am investigating 3D printing and micro 3D printing options (yes we can!).

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-02-2015, 08:16 AM
Post: #2
RE: Generic Calculator Shield for Arduino Photo-journal
Use an Intel Edison or something else with:
  • Lots of memory
  • Lots of flash
  • Fast CPU
  • Good library support (thinking Intel's decimal library or equivalent).

- Pauli
Find all posts by this user
Quote this message in a reply
03-02-2015, 04:49 PM
Post: #3
RE: Generic Calculator Shield for Arduino Photo-journal
Hello!

Great idea! That's something I've been thinking about for some time as well. And I already have a big box of parts. My latest acquisition is a 12V 4Ah LiPo battery that should be good for powering such a calculator for a whole day, even if it uses an LED instead of an LCD.
Keep in mind that the Due uses 3.3V signals while the Uno and Mega have 5V which makes development of a universal shield a little more difficult.

Regards
Max

BTW: There are Intel Edison Arduino breakout boards available like this one here: https://www.sparkfun.com/products/13097
Hard and software can be developed using a cheap and easily programmable Arduino and then stepped up to the Edison if necessary.
Find all posts by this user
Quote this message in a reply
03-02-2015, 05:05 PM
Post: #4
RE: Generic Calculator Shield for Arduino Photo-journal
BTW Marcus, have you found Dave Jones uWatch?
Find all posts by this user
Quote this message in a reply
03-02-2015, 09:43 PM
Post: #5
RE: Generic Calculator Shield for Arduino Photo-journal
(03-02-2015 04:49 PM)Maximilian Hohmann Wrote:  There are Intel Edison Arduino breakout boards available like this one here: https://www.sparkfun.com/products/13097

That's the one I've got or at least very similar.
Haven't used it for anything yet Sad

- Pauli
Find all posts by this user
Quote this message in a reply
03-03-2015, 03:38 AM (This post was last modified: 03-03-2015 03:39 AM by MarkHaysHarris777.)
Post: #6
RE: Generic Calculator Shield for Arduino Photo-journal
(03-02-2015 08:16 AM)Paul Dale Wrote:  Use an Intel Edison or something else:
  • Lots of memory
  • Lots of flash
  • Fast CPU
  • Good library support (thinking Intel's decimal library or equivalent).

Yes; absolutely. I have an Intel micro-controller coming; and I have the Arduino IDE to support it (should be fun to include). I have been looking at 'big num' support, and if you remember from another thread, I am keen on being able to specify configurable arbitrary digits (within limits). There are some rather nice big num arbitrary digit libraries available... but that is down the road a bit.

I have been reading about Galileo and Edison boards from Intel; seems like the Edison is the way to go from an Intel standpoint (your opinion the same?). I also do not have any problem developing on two (more) devices in parallel (and of course I'm still thinking eventually of a desktop machine that utilizes more than one micro-controller... there is time for all of that.

Thanks for the feedback; let you know what I find out.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-03-2015, 03:44 AM
Post: #7
RE: Generic Calculator Shield for Arduino Photo-journal
(03-02-2015 04:49 PM)Maximilian Hohmann Wrote:  BTW: There are Intel Edison Arduino breakout boards available like this one here: https://www.sparkfun.com/products/13097
Hard and software can be developed using a cheap and easily programmable Arduino and then stepped up to the Edison if necessary.

Yes, perfect. i'm planning to start on Arduino, get the frame-work going, and then develop in parallel. The Edison board is very impressive; but so is the Due, IMHO. ... should play with both and see what develops.

Thanks!

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-03-2015, 03:52 AM
Post: #8
RE: Generic Calculator Shield for Arduino Photo-journal
Greetings, I replicated my development system gnu/linux this afternoon; Mint 17 64 bit (Debian->Ubuntu) derivative; looks great-- runs fine.

Today was the first time I've uploaded firmware to the AVR with gnu/linux; pretty exciting, because that's my mobile platform! ... so I can take this mess on the road.

marcus

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-03-2015, 03:59 AM
Post: #9
RE: Generic Calculator Shield for Arduino Photo-journal
(03-03-2015 03:52 AM)MarkHaysHarris777 Wrote:  Greetings, I replicated my development system gnu/linux this afternoon; Mint 17 64 bit (Debian->Ubuntu) derivative; looks great-- runs fine.

Today was the first time I've uploaded firmware to the AVR with gnu/linux; pretty exciting, because that's my mobile platform! ... so I can take this mess on the road.

marcus
Which programming gadget do you use? I have several (Dragon, AVR jtag mark II, and my favorite USB Tiny) For all of my production manufacturing, I use the USB Tiny with avrdude because I can include both the program and fuse settings into a complete script. The USB Tiny doesn't include debugging, but it is much quicker for programming.
Find all posts by this user
Quote this message in a reply
03-03-2015, 04:23 AM
Post: #10
RE: Generic Calculator Shield for Arduino Photo-journal
(03-03-2015 03:59 AM)BarryMead Wrote:  Which programming gadget do you use? I have several (Dragon, AVR jtag mark II, and my favorite USB Tiny) For all of my production manufacturing, I use the USB Tiny with avrdude because I can include both the program and fuse settings into a complete script. The USB Tiny doesn't include debugging, but it is much quicker for programming.

I have not invested in an icsp programmer yet; but I plan to do so. Have not been able to decide which is better; you may have helped with that! At the moment I am programming this thing through the on-board boot loader ( normal sketching, coding, via the 1.60 Arduino IDE, and I have not even considered changing the boot loader ).

I was looking at tiny today; very reasonably priced.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-04-2015, 05:54 AM (This post was last modified: 03-04-2015 06:03 AM by MarkHaysHarris777.)
Post: #11
RE: Generic Calculator Shield for Arduino Photo-journal
(03-03-2015 03:59 AM)BarryMead Wrote:  Which programming gadget do you use? I have several . . .

Barry, I am hearing that the Arduino Uno board, or the Teensy board, my be used as the icsp programming gadget running TinyISP.

The other programmer recommended is here.

What say you?

PS TinyISP may become important for avr assembler development. It would be nice to program with the avr-g++ compiler (normal sketching) but in the units with limited memory and slower speeds, assembler may be better ... tucked in the back of this old mind...

marcus

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-04-2015, 06:43 AM (This post was last modified: 03-04-2015 06:47 AM by BarryMead.)
Post: #12
RE: Generic Calculator Shield for Arduino Photo-journal
(03-04-2015 05:54 AM)MarkHaysHarris777 Wrote:  Barry, I am hearing that the Arduino Uno board, or the Teensy board, my be used as the icsp programming gadget running TinyISP.

The other programmer recommended is here.

What say you?

PS TinyISP may become important for avr assembler development. It would be nice to program with the avr-g++ compiler (normal sketching) but in the units with limited memory and slower speeds, assembler may be better ... tucked in the back of this old mind...

marcus
That Pololu programmer is probably nearly identical to the Ada Fruit "USB Tiny" programmer that I use.
The advantage to the Pololu is that you don't have to assemble the kit. The advantage to the USB Tiny
is that it has both the 6-pin ISP and the 10-pin ISP cables. Personally I never use the 10-pin ISP cable
so the Pololu programmer is probably better.

I never program AVR microcontrollers in Assembly. I always use C because it is much less prone
to errors, and almost as efficient as Assembly. The AVR GCC compiler is a standard install on most Linux distros.

You are right about being able to program the Tiny without an ISP device. It can be programmed in native
C or Arduino sketches right over the USB port. If you want to do more powerful things with your regular
Arduino, however the ISP port can be useful, because you can't get to all of the processor's capabilities
with only Arduino sketches.
Find all posts by this user
Quote this message in a reply
03-05-2015, 05:31 AM
Post: #13
RE: Generic Calculator Shield for Arduino Photo-journal
If you want a pretty end product, you will probably want slim(low profile) layout.
If you want low profile, Arduinos and Beaglebones aren't the best choice.

The Edison, and the Raspberry Pi Compute module, use a SIMM style connector. In theory, you should be able to get a keypad and display onto a custom interface board, with room left for a flat LiPo battery, without getting too fat.

To do the same with a Due (no shield connectors), you'd have to redesign a custom board. Possible, but more of a headache.
Find all posts by this user
Quote this message in a reply
03-05-2015, 07:08 AM
Post: #14
RE: Generic Calculator Shield for Arduino Photo-journal
(03-05-2015 05:31 AM)sa-penguin Wrote:  connectors), you'd have to redesign a custom board. Possible, but more of a headache.

Yes. The prototypes will initially be development boards only... the actual deliverable will need to be lite, thin, ... and probably on the Edison. The desktop programmer (what Walter calls a battle-ship) is another story... and my prototype for that is planned for my "Royal cl130," from 1993. But, that is also another story. Thanks for the input.

I'm not planning a 'shield' in the classic sense of "pluggable into the Arduino" card-to-card; rather, the prototype board will be calculator sized on risers ( 3 cm ) with the (whatever) underneath attached via ribbon cables. The deliverable will have the board (whatever) mounted to the backside of the keyboard back plane; with the lith ion batt under or ahead of that. If it were as fat as the HP35, I would not care... if it were just a tad fatter than the HP35s would be perfect (all debatable).

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-05-2015, 07:27 AM (This post was last modified: 03-05-2015 07:30 AM by MarkHaysHarris777.)
Post: #15
RE: Generic Calculator Shield for Arduino Photo-journal
I am playing around with the Arduino micro-controller; planning on prototyping on the Uno, MEGA2560, Due, and the Intel Edison with the Arduino breakouts. My MEGA2560 came today by mail; as well I built my parallel binary display module | debugger. So, the pics, then some comments:

[Image: ATMEGA2560_binary_display2.jpg] [Image: binary_display2.jpg] [Image: binary_display_bot2.jpg]

The MEGA2560 is a faster micro-controller, has more memory, and way more pinouts (digital and analog). This guy is fun; the big brother of Uno. The new IDE works splendidly with this board. I built the parallel binary display board today (serial is coming tomorrow) using a bar LED driven with 74LS04 inverter package, powered on-board with a 7805 fed from the Arduino Vin. This setup is a binary calculator (RPN) four level stack with one function (+), and [enter] button, and a compliment button for subtraction. Its six digit binary, but gets the framework going; as well, provides me with some instrumentation (you know I am big on instrumentation toys)!

I'm planning to read the keyboard with four lines, and to talk with the LCD with three lines; however, the Due and the Mega (the Edison too) give the opportunity for plenty of I|O lines should that be faster or (just better) to do things in parallel rather than serial. Time will tell.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-06-2015, 10:56 AM (This post was last modified: 03-06-2015 10:58 AM by MarkHaysHarris777.)
Post: #16
RE: Generic Calculator Shield for Arduino Photo-journal
Greetings, my binary | hex serial display & debugger is half completed and tested operational. The LED bar in the top of the panel is a 10 digit binary display being driven by a CD74HCT273E octal D-type latch with common 'clock' (strobe) and common MR (master reset). I have the three 273s wired as shift registers (Big-endian) -- the board being a 24 bit display. I can drive the board with two(2) lines; one for data, and the other for the 'clock' strobe (high-going, leading edge triggered). I am using the serial display now for binary computation (RPN) and the parallel display for mode|status|annunciations.

[Image: binary_serial2.jpg]

The lower-left button on the Makershield is the [ENTER] key, and the four buttons on top-left 'clock-wise' are 1) '0', 2) compliment, 3) '+', and 4) '1'. I am using pairs of buttons 'held together' for blue and gold key, so that I have a full compliment of 10 bit binary functions.

The real keyboard panel and buttons are in the mails, and the VT102 serial console is coming along nicely.

PS Did I mention the Mega is fun!

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-11-2015, 07:20 PM
Post: #17
RE: Generic Calculator Shield for Arduino Photo-journal
Greetings, well, the hex, octal, decimal SPI display board is complete and operational. The driver code and a header file are provided which demonstrate how to write to the display board. The display board and firmware will display hex, octal, and decimal right-side-up or inverted. You will notice from the pics I have chosen to invert the board placing the digits near the bottom. A full schematic of the board is available. Some pics, then comment:

[Image: hex-display2.jpg] [Image: a3-schema2.jpg]

The board is a Serial Parallel Interface (SPI) board utilizing three 74HCT273 D-Type octal flip-flops cascaded to form a 24-bit shift register. Writing to any of the display units requires writing 24 bits out the dataline (one bit at a time) sending a clock-pulse (strobe) on each bit, which causes the bits to shift into the register. The benefit is that twenty-four bits (lines) can be controlled from the Arduino (or whatever) with only two lines-- strobe, and data. There is a third line (MR) master reset; it is not necessary, but does make clearing the display easier; although, since this display has an inverted LED bar, to really clear the whole display requires a 24 bit write-- which is fast.

The Arduino ino code file shows the routines I wrote to handle this display board; its header file is included for completeness.

A board like this is fun, and makes a great calculator display (think of the Wang 700c); however, for our purposes the real display will be a 16x2 LCD, but the principles are the same. Should you want to, a larger display can easily be made with more digits... just add more seven segment display chips and an equal number of 273 chips.

PS The under side of the board can be seen in a stereoscopic photo (worked over with Gimp). View the photo with the "crossed eyes" technique for a truly magnificent view. Who says only software can be 'spaghetti code' ?

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-11-2015, 09:32 PM
Post: #18
RE: Generic Calculator Shield for Arduino Photo-journal
Hello!

Looks promising! Forget about the ugly LCD and stick with LEDs :-)

(03-11-2015 07:20 PM)MarkHaysHarris777 Wrote:  Should you want to, a larger display can easily be made with more digits... just add more seven segment display chips and an equal number of 273 chips.

Have you looked at the max7219 display multiplexer? With a single chip that only needs three lines from the arduino you can drive an 8-digit seven segment display. (For example: http://www.ermicro.com/blog/wp-content/u...219_00.jpg) Or an 8 by 8 dot LED matrix (less than 3$ on eBay directly from Hong Kong, shipping and multiplexer chip included...).

Regards
Max
Find all posts by this user
Quote this message in a reply
03-11-2015, 10:58 PM
Post: #19
RE: Generic Calculator Shield for Arduino Photo-journal
(03-11-2015 09:32 PM)Maximilian Hohmann Wrote:  Forget about the ugly LCD and stick with LEDs :-)

(03-11-2015 07:20 PM)MarkHaysHarris777 Wrote:  Should you want to, a larger display can easily be made with more digits... just add more seven segment display chips and an equal number of 273 chips.

Have you looked at the max7219 display multiplexer? With a single chip that only needs three lines from the arduino you can drive an 8-digit seven segment display. (For example: http://www.ermicro.com/blog/wp-content/u...219_00.jpg) Or an 8 by 8 dot LED matrix (less than 3$ on eBay directly from Hong Kong, shipping and multiplexer chip included...).

'ey Max! ... good to hear from you. The 7219 is a pretty cool chip; worth playing with sometime. I have often thought about making a modern replica of the Wang 700c. I would put more function into it, of course, but it would have the classic click button panel on the bottom with the rising two register 12 digit red display above. The Wang 700c had nixie tubes-- but we don't need to go that far!. The trouble with the LED displays is power. And with a dual 12 digit display it would also require a switching 5v power supply.

If I were to make my own LED seven seg driver for a large display I would not use the 273. I would find a shift register like the 74HC595, or the 74HC164. I used the d-type flip flops (273) because I had them.

Well, you can run the leds (as you know) with about half of their max forward current, comfortably. You probably noticed I used 330 ohm limiting resistors; gives a forward current of 7.8 mA per pin on the seven seg devices, and 7.5 mA per pin on the led bar display. The cool thing about the 273 is that it can 'source' and 'sink' 8 mA per pin! But still, even at that, with all 24 bars 'ON' my little display is drawing about 184 mA. Even limiting the current a dual twelve digit seven seg display would draw a little more than 1.3 amp--- the 7805 can tolerate about 1.5 amp for short periods but really isn't supposed to be used for loads more than about an amp. So, maybe two of them?

Anyway, I am looking for a way to drive the 12 digit display (LCD) in my Royal cl130 (dead, from 1993). Otherwise, I may put some LEDs in that thing! I'll keep the 7219 in mind... thanks.

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
03-12-2015, 12:47 AM (This post was last modified: 03-12-2015 12:49 AM by MarkHaysHarris777.)
Post: #20
RE: Generic Calculator Shield for Arduino Photo-journal
Greetings, ... ok, I finished my development keyboard prototype; pic following. The initial breadboard will have 5 columns x 7 rows, will be interrupt driven, and will be read by the analogRead() calls from the Arduino IDE.

I'm simulating the [ENTER] key from the center of the keyboard. The keyboard will have two layers (second not shown in this pic) to house additional ICs as needed. The hex LCD display will be bolted to the keyboard at one end.

I am currently designing my voltage divider network and interrupt circuit; coming soon, if it all works. ;-)

[Image: b3-keyboard2.jpg]

Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)