Searching \ for 'How to scan 9 keys with only 3 wires?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=how+scan+keys+with
Search entire site for: 'How to scan 9 keys with only 3 wires?'.

Truncated match.
PICList Thread
'How to scan 9 keys with only 3 wires?'
1999\02\19@022439 by Wagner Lipnharski

picon face
We got this problem in 1992.

We needed to scan 9 keys on a keyboard, and we
had space only for 3 wires, no other microchip
could be added to the circuit.

A terrible complication was involved:
One wire was GROUND to shield the 3 feet keyboard cable,
so in real we got only two wires plus ground.

How would you do it using a PIC as the mcu???

I will give you 10 minutes to think, then after
that just see the answer at:
http://www.ustr.net <--- click "Diagrams"

have fun,
Wagner Lipnharski

1999\02\19@023123 by White Horse Design

flavicon
face
At 07:23 19/02/99 , Wagner Lipnharski wrote:

>We needed to scan 9 keys on a keyboard, and we
>had space only for 3 wires, no other microchip
>could be added to the circuit.
>
>A terrible complication was involved:
>One wire was GROUND to shield the 3 feet keyboard cable,
>so in real we got only two wires plus ground.
>
>How would you do it using a PIC as the mcu???

Resistive network and ADC.

Regards

Adrian
---
WWW    WWW   Adrian Gothard
WWW WW WWW   White Horse Design
WWWWWWWWWW   +44-385-970009 (Mobile/SMS), +44-118-962-8913/4 (voice/fax)
WWWW  WWWW   spam_OUTwhdTakeThisOuTspamzetnet.co.uk, http://www.users.zetnet.co.uk/whd
---
Developers of GPS satellite-based tracking systems for vehicles/helicopters

1999\02\19@081902 by ryan pogge

flavicon
face
>>We needed to scan 9 keys on a keyboard, and we
>>had space only for 3 wires, no other microchip
>>could be added to the circuit.

>>How would you do it using a PIC as the mcu???
>
>Resistive network and ADC.
>
>Regards
>
>Adrian

was it a PIC with onboard ADC? you forgot to metion what PIC
it was.

1999\02\19@121454 by David W. Duley

picon face
In a message dated 2/18/99 11:31:30 PM Pacific Standard Time, .....whdKILLspamspam@spam@ZETNET.CO.UK
writes:

<<
Resistive network and ADC.

Regards

Adrian
--- >>
You don't even need the ADC  Just a .001 cap and 8 resistors would do it.  I
do the same thing with a 5 position rotary switch on a product I produce.  It
works great.

Dave Duley

1999\02\19@124809 by Harold Hallikainen

picon face
On Fri, 19 Feb 1999 07:27:43 +0000 White Horse Design <whdspamKILLspamZETNET.CO.UK>
writes:

>Resistive network and ADC.


       I've always thought that this idea of using resistors to encode
several switches to be read by the A/D in a PIC was interesting.  Anyone
have a sample design on this that uses a standard resistor network and is
simpler than building our own R-2R D/A?  My doodling with stuff always
comes up with something pretty nonlinear or pretty complicated.
       Re "scanning" 9 keys with 1 wire...  If we're looking for only
one closure at a time, I guess we could just have a series string of
resistors and have the switches send the A/D the voltage from one tap on
the string.  If we're interested in detecting multiple key closures, we'd
have a rough time fitting 9 keys into 8 bits!
       Most of my applications involve DIP switches or thumbwheel
switches instead of momentary key closures, so I need to detect several
bits at once.  Again, any simple resistor network ideas to send, say, 4
bits into a single A/D input on a PIC?

Harold



Harold Hallikainen
.....haroldKILLspamspam.....hallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm


___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

1999\02\19@184421 by Wagner Lipnharski

picon face
Harold Hallikainen wrote:
> Re "scanning" 9 keys with 1 wire...  If we're looking for only
> one closure at a time, I guess we could just have a series string of
> resistors and have the switches send the A/D the voltage from one tap on
> the string.  If we're interested in detecting multiple key closures, we'd
> have a rough time fitting 9 keys into 8 bits!

The series resistor network works nice and it is easy to assemble
when you have all the keys isolated, at least one side of the
switches, so you can connect this switch side to the resistors
points, and the other side (a common) connected to the "adc".

At that moment we were using a matrix keypad, and it was not
possible to do anything else.  So, it was somehow a kind of a
headache to found an easy solution with "popular" resistor values,
and keep the voltage step almost equal from switch to switch.

Someone suggested to attach a cmos 555 in some way at the analog
keyboard output, trying to control a frequency, so it will
be easier to read even in a mcu without analog input.

Wagner Lipnharski
http://www.ustr.net/electronics/diagrams.htm

1999\02\19@233852 by dave vanhorn

flavicon
face
Resistors..

1999\02\19@234441 by dave vanhorn

flavicon
face
At 08:05 AM 2/19/99 -0500, ryan pogge wrote:
>>>We needed to scan 9 keys on a keyboard, and we
>>>had space only for 3 wires, no other microchip
>>>could be added to the circuit.
>
>>>How would you do it using a PIC as the mcu???
>>
>>Resistive network and ADC.

>was it a PIC with onboard ADC? you forgot to metion what PIC
>it was.


You don't need an ADC, but it's kind of convenient.
I can do it with one wire in addition to ground, if I get to see both ends
of the wire, otherwise I need two plus ground.

1999\02\19@235725 by dave vanhorn

flavicon
face
>At that moment we were using a matrix keypad, and it was not
>possible to do anything else.  So, it was somehow a kind of a
>headache to found an easy solution with "popular" resistor values,
>and keep the voltage step almost equal from switch to switch.


You can do the matrix with resistors too. Think about it.
I think even multiple key closures are possible. (maybe not all possible
combos)

1999\02\20@021416 by Wagner Lipnharski

picon face
dave vanhorn wrote:
> Wagner wrote:
> >At that moment we were using a matrix keypad, and it was not
> >possible to do anything else.  So, it was somehow a kind of a
> >headache to found an easy solution with "popular" resistor values,
> >and keep the voltage step almost equal from switch to switch.
>
> You can do the matrix with resistors too. Think about it.
> I think even multiple key closures are possible. (maybe not all possible
> combos)

We did with resistors, I was explaining why we used the strange
configuration instead just 9 resistors in series. :)
Take a look at:  http://www.ustr.net/electronics/diagrams.htm
Wagner.

1999\02\22@140455 by White Horse Design

flavicon
face
At 13:05 19/02/99 , ryan pogge wrote:
>>>We needed to scan 9 keys on a keyboard, and we
>>>had space only for 3 wires, no other microchip
>>>could be added to the circuit.
>>>How would you do it using a PIC as the mcu???
>>
>>Resistive network and ADC.
>
>was it a PIC with onboard ADC? you forgot to metion what PIC
>it was.

Since your question mandated the use of a PIC my answer obviously implies a
PIC with an ADC.

Your question was "how would you" not "how did you".

I haven't done it with a PIC before. I considered simply 10 resistors in
series with a switch from the junction of each from the 5V end (R1) to the
top of the 10th (R10) above GND. Thus the voltage levels at R10 (ADC i/p)
would be 5V, 500mV, 333mV, 250mV, 200mV, 167mV, 142mV, 125mV, 111mV.

A 5V 8 bit ADC would have 19mV resolution, accuracy say to 1 bit, so a bit
dodgy at the bottom end. A 12 or 14 bit ADC would be ok though. I know the
circuit is simplistic but I ain't designing one, just answering your
question! A matrix solution would be better of course (like yours).

Regards

Adrian
---
WWW    WWW   Adrian Gothard
WWW WW WWW   White Horse Design
WWWWWWWWWW   +44-385-970009 (Mobile/SMS), +44-118-962-8913/4 (voice/fax)
WWWW  WWWW   EraseMEwhdspam_OUTspamTakeThisOuTzetnet.co.uk, http://www.users.zetnet.co.uk/whd
---
Developers of GPS satellite-based tracking systems for vehicles/helicopters

1999\02\22@170925 by Tony Nixon

flavicon
picon face
> I haven't done it with a PIC before. I considered simply 10 resistors in

That's the reason I used a 317 regulator, so that the 'span' between
keys is relatively constant. I suppose a constant current source may do
the same.

The trouble is that some key pads have an on resistance tolerance upto
200R which can cause problems with low value resistors.

--
Best regards

Tony

Multimedia 16F84 Beginners PIC Tools.
** NEW PicNPro Programmer and Port Interface **

http://www.picnpoke.com
Email picnpokespamspam_OUTcdi.com.au

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...