Seeking schematics/plans for decimal to binary (microswitch/relay) selector/controller

I am interested in building a "selector" gadget for devices that take jumpers to select a program, such as this game cartridge where you have 5 jumpers to select program #0-31 (the jumpers represent the binary number):

formatting link
formatting link
formatting link

The selector would have two 7-segment LEDs that display the currently selected program number (0-31), and a couple pushbuttons (+/-) that let you increase/decrease the program #. The device translates the number into binary and turns on/off the appropriate switches or relays which are attached to the jumpers on the device (ie the above game cartridge).

Or I would even like to build a kind of analog to digital converter device which has a potentiometer (for example 100k) which gets translated into an 8-bit number (0-255) and 8 switches get opened/closed that represent the value of the pot. Adding three 7-segment LEDs to display the current value in decimal would be cool and then it could be used as a "selector" as well.

Does anyone know of any plans or schematics out on the Web to construct something like these? (For now I just wire switches to the jumpers.)

Thanks.

Reply to
mad.scientist.jr
Loading thread data ...

formatting link

Yes, an AVR should work. Your requirements are very similar to our project: Two or Four buttons, 3 digits LCD, 4 channels A2D, runtime current 2mA, power down current 50uA. A button cell battery (CR2032) would last 6 months in power down.

See:

formatting link

Reply to
linnix

--
If you want to do it in hardware you could use a couple of 74XX193's
feeding an EEPROM with a lookup table burned into it as described
below. 

You'd also want to decode 32 and 128 (overflow for your setup and
underflow for the counter) and use those decodes to generate a reset
pulse which would send the counter and the displays back to zero.
Reply to
John Fields

Why don't you just use a rotary switch which opens and closes four outputs. You can get binary coded decimal or hexadecimal - if you use a hex switch your users have to understand the the sequence

0,1,2,3,4,5,6,7,8,9,A,B.D,E,F.

Farnell stocks both kinds of switch in a variety of formats, and there must be other broad-line distributors who cater to the segment of the market.

It's a lot easier and cheaper than programming a PIVC and wiring up 7- segment displays.

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

--
What, no "C"? ;)
Reply to
John Fields

Oops. That should have been 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. Sorry.

Hexadecimal rotary switches have a pointer on the rotating bit which points to the appropriate number out of the 16 printed on the front of the part - you see the numbers and the pointer by virtue of the light reflected from them. Wasting time and effort duplicating this with a seven segment display may play well in Texas, but in areas where congenital stupidity is not part of the birthright it would be seen as a bit odd.

You can pay of the order of $20 (if the U.S. dollar hasn't completely collapsed since I looked at this evening paper) for a fancy hexadecimal switch intended to end up on the front panel of "professional" gear, or you can pay a couple of dollars for a part in a dual-in-line package intended to be soldered into a board.

Even Texas now has minimum wage legislation, so spending a couple of hours wiring up several unnecessary seven segment display would chew up rather more money than you'd need to spend even on a professional rotary switch.

My Digi-Key paper catalogue offers RTE DIL parts for around $3.00 each

- the catalogue does date back before the last Republican assault on the U.S. economy, so current prices may be higher.

And a couple of expensive 7-segment displays to tell you how far you'd rotated the shaft?

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

What's the term for the kind of switch/knob/input-device that is just a knob on the front with some sort of spring loaded positioning at detents. There are several/many detent positions per rotation but no numbers on the front panel.

They are used for things like uProc controlled scopes where the sweep speed has a zillion settings. You give the knob a spin to get to the right range then fiddle a bit to get to the exact setting you want.

Inside, I assume they have a 2 bit optical encoder and a set of magnets to make the detents.

--
These are my opinions, not necessarily my employer's.  I hate spam.
Reply to
Hal Murray

--
They're called rotary encoders.

http://en.wikipedia.org/wiki/Rotary_encoder
Reply to
John Fields

[snip]
[snip]

You could use a multi-turn potentiometer. A 10 turn pot would make it much easier, since a selection would then be 14°, which would be much more manageable. Using a 'heavy' knob, which would keep spinning due to angular momentum would make it less tedious to dial from 0 to 255.

One issue with this approach is that it might change if it is near the cutoff point, or worse, oscillate between two due to vibration.

Another issue has to do with my microwave (that I just dumped today because of terrible interference problem with cordless phones) which had a a spinning knob to select the cook time. It was a free spinning dial, which would change more quickly depending on the velocity of the dial. It was very tedious to use, so while the interface might seem like a good idea, it probably isn't.

(The uWave was a Panasonic 1300W oven, for those who wish to avoid interference. I even went out and bought a 5Gig phone to avoid it, and it actually interfered with the new phone. I'm surprised it passed FCC testing. It must have been spraying EM all over the airwaves to interfere with a 5Gig phone.)

Regards, Bob Monsen

Reply to
Bob Monsen

Sounds like a bad seal implementation, hard to get more than 1uW/cm^2 even right on top of the panel or door. Interference that bad could only be caused by insufficient or severely imbalanced tightening of the 'tron' bolts and gasket.. or it may have been something awry with the input filter on that crummy little 36KHz inverter, if it had one of those.

Reply to
Fred Bloggs

I use Comcast (I know, but it's what's available) and I see only a few spam posts a day here, mostly cheap shoes and that damned islamospammer, with the odd update on the old chain letter.

Reply to
Stephen J. Rush

--
I guess you missed this part about using a single-turn pot and an
ADC:

"However, if you used only the 5 MSBs, that's 330°/31 steps, which
will get you 10.6° per step, which is eminently doable." :-)

That would also get rid of the tedium of getting to a distant
channel and the expense of the 10 turn pot.
Reply to
John Fields

On Jan 27, 7:17 am, John Fields wrote: I'm hugely digressing here:

A sort of cute trick for making a front pannel on a breadboard /proto version is:

Draw up you suggested pannel with a CAD package. Print it on the Laser printer. Take the 3M transfer tape and put the glue down on the metal panel. Stick down the printed version. Punch the holes to line up and install the controls.

You can add the 3M sticky Mylar to make the panel stay looking good for a while.

This works fairly well for a "it will be kind of like this" version. It also works OK for making quick test jigs.

[....]

I use

formatting link
to make things up to about 100MHz. With a bit of creative use of tinsnips, you can cut them down for what is needed.

Reply to
MooseFET

This would be an easy project using a 8-pin picmiro (12f508,12F629...) pic12f508 cost about a buck at digkey.com You could use a simple momentary-switch to step through from 0-31 If you already have one of the pic progammers found on the web, here's some code to get you started.

cblock count endc

Init clrf count

main

btfsc GPIO,3 ;loop until switch is cleared goto main incf count,f ;increment count by 1 movf count,w ;copy count to Working Register movwf GPIO ;Send Data to OUTput ports xorlw .31 ;check to see if count is 31 btfss status,z ;If so reset back to Init goto Init ;reset count to zero goto main ;if count is not 31 then to main end

Reply to
maxfoo

--
What I like to use for stuff like that is a sticky-back repro film
like Rayven 420, a polyester film with an adhesive backing so you
don't have to use transfer tape.  

The part that's nice about using transfer tape, though, is that you
can print the mirror image of the panel on the film and then stick
it to the panel toner side down.  That makes the image right-side up
and puts the film between the outside world and the toner, keeping
it from getting scuffed up.
Reply to
John Fields

e:

take

:

se

ere

he

7-

Don't be silly. The client makes up their own mind. The trick is give them the information they need to make a choice that they are happy with at the time, and will stay happy with for some time to come.

In your opinion - as if it mattered.

You don't second guess them - you offer them them Stilton and Roquefort as alternatives to the Kraft Cheddar they learned about the school canteen.

And 555 experts get job offers from all over the world?

Sure. They are less likely to come back bitching about me not telling them about a better solution when they find out it exists. But then again, your customers would not be all that enterprsing to start with.

Well, you would like to think that.

I was perfectly well aware that the OP wanted to select one of 31 channels. It is less clear that they needed - or really wanted - an eleborate, expensive and complicated decimal display of the channel number.

Dymo labels look terrible and don't last.

No. But it might well serve the purpose.

Wire-wrapping isn't all that quick - pushing the device into the printed circuit board doesn't take long, but making all the necessary connections takes ages.

If the OP actually needed a decimal display - in most cases all that is necessary is an unambiguous indication of the channel selected and a hexadecimal number serves the purpose just as well as a decimal number - it isn't as if the OP wants to do arithmetic with the number displayed.

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

--
OK, the OP has all of the stuff I proposed and by now he must have
read your "contribution", so let's wait and see what he decides he
wants to do.  Unfortunately, if he decides in my favor, I'm sure
you'll heap some abuse on him for making that choice since you've
already done so with that slur demeaning his .sig for no reason at
all other than to drag him down.
Reply to
John Fields

'Your audience' is waiting by himself in an Interstate Highway rest room for his next gay sex partner.

--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

Perhaps for you.

Your opinion of information you can't understand isn't exactly useful or interesting.

Another message you obviously didn't understand

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

Since you've responded to the post, you are - by definition - part of the audience, as is John Fields.

Obviously, you can speak for yourself, but you may be traducing John.

-- Bill Sloman, Nijmegen

Reply to
bill.sloman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.