Pages: [1]   Go Down
Author Topic: 1-of-10 decoder/demultiplexer using less than 4 inputs?  (Read 2061 times)
0 Members and 1 Guest are viewing this topic.
Gold Coast, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to send power to one of 10 wires using as few digital outputs as possible.

I think I'm going to have to use a 1-of-10 decoder/demultiplexer and control it with 4 digital outputs on the Arduino.

My question is...

Does a demultiplexer exist that can switch between 1 of 10 outputs, that is controlled via 1 PWM input (instead of 4 digital inputs)?

Can anyone think of a way to send power to one of 10 wires, using only one PWM output on the Arduino?
Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

First thought would be a 595 shift register, you get a heck of a lot more than 10 outputs with just 3 inputs. 8 outputs per chip, daisychain the chips without using any more pins from the arduino. Very versatile.
http://arduino.cc/en/Tutorial/ShiftOut

But if you're really looking for just one pin maybe you need to find something that works with serial communication... I wouldn't know much about that.
« Last Edit: May 21, 2012, 02:10:43 am by stoopkid » Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1273
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If I understand your question correctly you want to send PWM to one of 10 wires using as few Arduino outputs as possible.

Using 3 pins you can use the ShiftPWM library (I think that's what it is called) that simulates PWM using 595 shift registers. I have had up to 32 PWM outputs driving leds simultaneously using an Uno.

Using 2 pins you could clocking a CD4017 IC with one pin (each clock pulse turns on the next output from the chip), feeding that into a transistor to switch the PWM line to one of 10 outputs. Look for the datasheet to see how it works.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 625
Posts: 34106
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm trying to send power to one of 10 wires
What sort of power? An LED or a 1KW motor?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8512
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Those LED bar graph chips may do this, you can set them to produce a single on LED rather than the bar graph and they tan an analog input.

It's been a while, I think the LM3914 is such a chip.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Gold Coast, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the speedy replies guys smiley

Here's what I'm trying to do...

I have an Arduino Uno R3.

I have some indicators that display a number from 0 to 9, depending on which one of 10 wires is powered.

I want to stack 6 of these together to create a 6-digit display.

With 10 inputs per digit, 6 digits would need 60 wires. If I use a BCD-to-decimal decoder, I can get away with 4 wires per digit, but that still takes up 24 digital outputs on the Arduino.

If I buy a Mega, I can make it work, but I was hoping to do it with my Uno somehow.

I'll do some reading on the 595 Shift registers, and the LED bar graph chips to see if they can do what I need... Thanks again!
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8512
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Now we have more details I would probably go with a string of shift registers.

To rephrase Grumpy_Mike's question, are these 10 inputs logic-level or actually driving the displays? IE how much current is required?

______
Rob
« Last Edit: May 21, 2012, 06:30:27 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 625
Posts: 34106
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have some indicators that display a number from 0 to 9, depending on which one of 10 wires is powered.
These aren't high voltage nixi tubes are they. If so that changes the answers.
Logged

Gold Coast, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Whoops... here's the electrical info from the datasheet:

Input Voltage:4 ±0.25 D.C.
Input Current:105mA Nominal @ -20°C; 164mA Max. @ -54°C
D.C Terminal Resistance:38Ω ±5% @ -20°C
Input Power:0.42 Watts Nominal @20°C; 0.68 Watts Max. @ -54°C

They're from old aeroplane gauges. They look like odometers from a car (painted numbers on little wheels), except each digit is individually controllable.

Here's a photo I found to show you what I mean...

Logged

Gold Coast, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

After a bit of reading, I've decided to use 8x 74HC595's in series to give me 64 outputs using only 3 Arduino pins smiley

Graynomad, your LED bar graph chip idea is genius! I think I'll try that anyway just for fun.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 625
Posts: 34106
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Input Current:   105mA Nominal @ -20°C; 164mA Max. @ -54°C
You won't get that sort of power from the output pins of a shift register. The outputs will need amplifying through a transistor.
Logged

Pages: [1]   Go Up
Jump to: