Go Down

Topic: 1-of-10 decoder/demultiplexer using less than 4 inputs? (Read 3655 times) previous topic - next topic


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?


May 21, 2012, 09:08 am Last Edit: May 21, 2012, 09:10 am by stoopkid Reason: 1
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.

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.


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.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com


I'm trying to send power to one of 10 wires

What sort of power? An LED or a 1KW motor?


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 Gray aka the GRAYnomad www.robgray.com


Thanks for the speedy replies guys :)

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!


May 21, 2012, 01:26 pm Last Edit: May 21, 2012, 01:30 pm by Graynomad Reason: 1
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 Gray aka the GRAYnomad www.robgray.com


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.


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...


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 :)

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


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.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131