Maker Pro
Maker Pro

8-bit A/D converter?

M

Mad Scientist Jr

Jan 1, 1970
0
(This is continued over from another thread which no longer concerns
quadrature)

I need a circuit to read a potentionometer (for instance Atari 2600
paddles which I think are 1 M ohm) and translate its value to an 8-bit
number (0-255) and turn on/off 8 switches to send the number. It has to
be relatively inexensive and fit in a small project box and preferably
work on 5V 5 mA. Does anyone know where I can find such a board or
device, or plans to build one easily without knowing much electronics?

Many thanks.
 
A

Aria

Jan 1, 1970
0
I would use a microcontroller. I recently developed a board that uses a
MC68HC908QY4 chip from motorola. It has built-in A to D Converter and
more than 8 outputs and programming it is fairly simple considering
that it comes with a C Compiler from motorola meaning that you can
program it in C instead of assembly language.
It can run off 5V, not sure abot the 5 mA but very likely it can handle
it.

Aria
 
all you need a plain jane stand alone A/D with parallel TTL outputs,
for example

http://www.analog.com/en/prod/0,,AD7819,00.html

and uses only 3.5mA of 5V power and cost $2.50 . you can bread board
this in a few minutes, hook up the input, power and a few logic signals
and there you go


"turn on/off 8 switches to send the number"

not sure what you mean about this, the TTL outputs of an A/D can't
drive much load, have to know what you interfacing too to help you
anymore, there are hundreds of A/D's to choose from to tailor to your
project, most are cheap and low power and the datasheets have the
schematic you need
 
M

Mad Scientist Jr

Jan 1, 1970
0
I have one potentionometer (1 M ohm) with 2 leads, and 16 wires which
are hot/gnd of 8 switches coming from a Hagstrom KE72 keyboard input
device (you connect switches to it, and it maps them to different
keypresses and sends them to your PC as keyboard input, see
www.hagstromelectronics.com). I think the 8 ground wires are all from a
common ground but they are separate wires. So I just need to know where
to solder the wires of the potentionometer and the wires of the 8
switches.
 
R

Rich Grise, but drunk

Jan 1, 1970
0
(This is continued over from another thread which no longer concerns
quadrature)

I need a circuit to read a potentionometer (for instance Atari 2600
paddles which I think are 1 M ohm) and translate its value to an 8-bit
number (0-255) and turn on/off 8 switches to send the number. It has to
be relatively inexensive and fit in a small project box and preferably
work on 5V 5 mA. Does anyone know where I can find such a board or
device, or plans to build one easily without knowing much electronics?

This is frickin' ludicrous.

WHAT ARE YOU TRYING TO ACCOMPLISH??????

Thanks,
Rich
 
R

Rich Grise, but drunk

Jan 1, 1970
0
I have one potentionometer (1 M ohm) with 2 leads, and 16 wires which
are hot/gnd of 8 switches coming from a Hagstrom KE72 keyboard input
device (you connect switches to it, and it maps them to different
keypresses and sends them to your PC as keyboard input, see
www.hagstromelectronics.com). I think the 8 ground wires are all from a
common ground but they are separate wires. So I just need to know where
to solder the wires of the potentionometer and the wires of the 8
switches.

What does the manual for the "Hagstrom KE72 keyboard input device" say?

Odds-on, it won't support a joystick pot - that's what the joystick
port is for.

What exactly is it you want to accomplish, what do you have on hand,
what have you already tried that didn't work? These sort of answers
are indispensable when it comes to troubleshooting.

Thanks,
Rich
 
"turn on/off 8 switches to send the number"
not sure what you mean about this, the TTL outputs of an A/D can't
drive much load, have to know what you interfacing too to help you
anymore, there are hundreds of A/D's to choose from to tailor to your
project, most are cheap and low power and the datasheets have the
schematic you need

I think I figured out what he meant, althought it was not straightforward :)
The keyboard connects to the computer via an 8x8 matrix of vdc/gnd ground
combination (I assume). And the potentiometer is supposed to send it's
value down the same wires.
I can sense a conflict between keyboard and joystick right here ;)

Just an educated guess.

Would proberbly be a good idea to look for another input on the computer.
Some AVR/PIC have A/D builtin + gpio pins. Good solution?
 
J

Jonathan Kirwan

Jan 1, 1970
0
What does the manual for the "Hagstrom KE72 keyboard input device" say?

Odds-on, it won't support a joystick pot - that's what the joystick
port is for.

What exactly is it you want to accomplish, what do you have on hand,
what have you already tried that didn't work? These sort of answers
are indispensable when it comes to troubleshooting.

Rich, I think he has a KE72, has already invested time in setting it
up and working with the drivers, wants to continue using it for
whatever he is doing, and now just wants to get some kind of paddle
control working with it. All of the 72 inputs use a single, common
ground line. I believe that it uses two 2x20 (40 pin) connectors, so
there are an extra 8 pins which are all just wired in common to the
ground. Like some of the pins of the PC parallel port.

I'd guess that the KE72 uses resistor pull-ups on the 72 lines, but
the web page says it can accept CMOS outputs and that when they drive
low it will treat that as an active signal.

Where he gets the 5V @ 5mA, I don't know. Somewhere else, I suspect.
I have a hard time believing that the pull-ups can source that much
for each of the 72 lines, and still provide anything close to 5V
because that would mean something in the area of 100 ohm pull-ups.

If I had to guess, and not knowing anything about the other connectors
on this device, I'd say they used 1k ohm pull-ups on each input and
that therefore they specify 5mA when the switch is closed to ground.
So, I'm guessing that the OP sees that and figures, "5V @ 5mA", or
else sees where the manufacturer says as much. Which isn't the same
thing as saying that whatever he hooks up can use 5mA.

Jon
 
M

Mad Scientist Jr

Jan 1, 1970
0
Rich, I think he has a KE72, has already invested time in setting it
up and working with the drivers, wants to continue using it for
whatever he is doing, and now just wants to get some kind of paddle
control working with it.

Exactly - I already have joysticks plugged into it, and they work
great. Now I want to hook up 8 or more paddle controls and build a
"foos-pong" table. I successfully plugged an atari driving controller
in and read/decoded it with quadrature for a simple paddle game, but
the encoder's resolution (16 pulses per rev) is too low - you need to
turn the knob 20x to move across the screen. So I started looking into
other methods - how hard/expensive can it be to build 8 rotary
controllers and hook them to a computer?
Where he gets the 5V @ 5mA, I don't know.
Which isn't the same
thing as saying that whatever he hooks up can use 5mA.

That's what Hagstrom told me the power is on each of the switches. I
would like whatever I use to run off the power on the KE72, if
possible.

I am looking at 2 methods

1) potentionometer to ADC to 8 keyboard inputs on the ke72
(representing 8-bit absolute value, 0-255). problems: not knowing much
electronics, i would need an all-in-one unit that i just wire the pot
and keyboard inputs into, also can the ke72 power it

2) a rotary encoder like used in a mouse that simulates keypresses on 2
keys, for quadrature-like input (not the same as quadrature but similar
from what i understand). problems are pretty much the same as above, i
need an all in one unit or plans on building one

So next is some research into units that are all-in-one, and some
internet research and electroncis book reading and playing around with
a breadboard if i can't find such units
 
M

Mad Scientist Jr

Jan 1, 1970
0
I think I will need to find something that, from a black box point of
view,
has 2 wires coming in from the potentionometer, 1 ground wire (5v, 5
mA)
coming in from the keyboard, and 8 hot wires coming in from the
keyboard.
The circuit would run off the 5v, and have 8 built in relays to connect
the
ground to the 8 wires to send a binary number 0-255:

hot wire # bit
1 1
2 2
3 4
4 8
5 16
6 32
7 64
8 128
 
J

Jonathan Kirwan

Jan 1, 1970
0
That's what Hagstrom told me the power is on each of the switches. I
would like whatever I use to run off the power on the KE72, if
possible.

It's actually .5mA as you originally said. I just called and talked
with Dave (they generously have an 888 number) and he told me they use
10k pull-ups at each of the 72 pins. There is a +5V stand-off on the
card, though. I assume you could draw power from that and probably at
whatever is possible from the PS2 port. (I was wrong to imagine this
as a PCI card -- it has no fingers there and uses the connector only
for mechanical support.) I have a hunch you can pull more than 5mA
from the PS2 port.
I am looking at 2 methods

1) potentionometer to ADC to 8 keyboard inputs on the ke72
(representing 8-bit absolute value, 0-255). problems: not knowing much
electronics, i would need an all-in-one unit that i just wire the pot
and keyboard inputs into, also can the ke72 power it

2) a rotary encoder like used in a mouse that simulates keypresses on 2
keys, for quadrature-like input (not the same as quadrature but similar
from what i understand). problems are pretty much the same as above, i
need an all in one unit or plans on building one

So next is some research into units that are all-in-one, and some
internet research and electroncis book reading and playing around with
a breadboard if i can't find such units

I'm still a little confused about the board, not wanting to invest a
lot of time reading the docs. Does it talk to your PC via the PS2? If
so, is the separate RS-232 they mention an unused connector for now?
You might consider attaching a mouse there and writing your own code
to parse the tiny packets it sends. After adapting the mouse to your
mechanism, of course. That would save having to do quadrature,
because the mouse already does all that for you and nicely packets up
the info for you into a few characters (three or five -- something
like that.)

Jon
 
M

Mad Scientist Jr

Jan 1, 1970
0
Yes, the board emulates a PS2 keyboard.

The parallel port is for programming the KE72 so it knows what key
codes to send to the PC for what switches are closed.

The board also has a trackball/mouse interface, but this won't suit my
purpose which is to attach 8 paddles.

Using the ADC module (see drawing) that would take 8 inputs + 1 for
fire = 9 inputs per paddle to send an absolute value to the KE72, and
conveniently 9 inputs x 8 paddles is accomodated exactly by the 72
inputs.

The current challenge is to find or build an ADC module like the one in
the drawing. The potentiometer would be a 1 M ohm, because this is
designed to work with a stock atari 2600 paddle controller (no
modification necessary on the controller)
 
W

Wim Ton

Jan 1, 1970
0
Mad Scientist Jr said:
I have one potentionometer (1 M ohm) with 2 leads, and 16 wires which
are hot/gnd of 8 switches coming from a Hagstrom KE72 keyboard input
device (you connect switches to it, and it maps them to different
keypresses and sends them to your PC as keyboard input, see
www.hagstromelectronics.com). I think the 8 ground wires are all from a
common ground but they are separate wires. So I just need to know where
to solder the wires of the potentionometer and the wires of the 8
switches.
8 Switches means 256 different combinations. Using a normal pot., that means
about 1 degree per value. Sounds like requiring very subtle manipulation.
Or do you want only 8 different values?

Wim
 
C

Craig Yarbrough

Jan 1, 1970
0
Just a couple of thoughts. I haven't looked at the KE72, but are you
going to have enough I/O ports to hook up 8 bit ADC * 8 paddles = 64
lines? Also, looking at the ADC example given earlier, each ADC may
pull ([email protected]= 3.5mA) * 8 = 28mA + buffers, etc, call it maybe
50mA???? Are you going to be able to draw that kind of current from a
PS2 port? Or perhaps have a separate battery to power your 'ADC
Module'?

- Craig
 
M

Mad Scientist Jr

Jan 1, 1970
0
Yes there are enough i/o ports - the KE72 has 72 of them, which will
work in any combination simultaneously.

The power issue is a problem. I would hate to have to rely on battery
power but maybe all 8 can be powered by an AC adapter.
 
M

Mad Scientist Jr

Jan 1, 1970
0
256 values would be ideal, each input = 1 bit, so the output = 8 bits,
or a value of 0-255
 
C

Craig Yarbrough

Jan 1, 1970
0
AC adapter.

Yup.

8-bit ADCs, some 74LS244 buffers between them and the KE72, and let
software crunch the data. I think we're done here! :)

- Craig
 
Top