Post Reply 
Generic Calculator Shield for Arduino Photo-journal
04-09-2015, 01:00 PM (This post was last modified: 04-09-2015 01:10 PM by MarkHaysHarris777.)
Post: #44
RE: Generic Calculator Shield for Arduino Photo-journal
Greetings, you can review post 34 and 35 for the back-story... I have updated the analog keyboard somewhat (taking Matthias' comments to heart, regarding the hardware reliability and the interrupt handler complexity); the hardware is now very reliable, and the interrupt handler is now very simple.
The schematic and basic idea have not changed; however, I compressed the voltage divider some (replaced 1k at the top end with 3 k). The biggest change is the addition of a one-shot interrupt pulse generator via a 555 timer circuit. I reworked the bread-board with hi-res Fritzing to make things a bit clearer:

[Image: GenericCalculatorAnalogKeyboard-bb2.jpg]

Essentially, the LM339 (shared by all four input lines) 'senses' when the keyboard is pressed and sends a ground-shot to pin 2 of the 555 timer. The 555 has been setup as a one-shot monostable circuit which, when triggered, produces a *very clean* rising edge interrupt strobe of about 235 mS. The RC circuit is a 2M resistor into a .05 mF cap. The output on 555 pin 3 eliminates contact bounce for the interrupt completely and gives the Edison a very nice hysteresis which has so far by my testing been flawless.

Green lines on the pic are ground potential while red are Vcc 5v. The orange lines are the comparison lines from the voltage divider, the yellow line is the trip wire to the 555, the white line is the interrupt line to the Edison --to read the ADC block (via i2c), and the blue line(s) is sense-data line read in by the interrupt handler.

The interrupt routine with this mod does only two thing very rapidly: 1) sets the key analog registers for later, and sets a flag in my i2c_bus struct, then blows out. A later routine sees the flag, and processes the command line|key entry /

I will include the code, a screen shot or two, and some tips|updates relevant to the Edison on my other blog|journal. As for the Arduino(s) its a fairly easy analog read --- the blue line goes to A5 on the Arduino and the Arduino pulls back a number between 0 - 1023. On the Edison things are a little dicier since it has not got an on-board ADC block... we need to read the ADC via i2c, and that's fairly tricky.

PS I'm really pumped about the analog keyboard at this point... only two lines (not counting Vcc and gnd) and absolutely reliable; so, unorthodox or not, I'm going with it--- its going to be way cool.


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

Messages In This Thread
RE: Generic Calculator Shield for Arduino Photo-journal - MarkHaysHarris777 - 04-09-2015 01:00 PM

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