Reading from rotary switch (multiplexed? )

Hi everybody,

I want to build a multiple countdown clock with adjustable input

I have to input 5 time in the format 00:00:000 mm:ss:000

I was thinking about using 5 set of 7 rotary switch each

but how can I read all the values ?

(there are some rotary switch with only 0-5 range ? is not a real problem because I can check if the input is correct with the software but a 0-5 dial will be more user friendly)

Thanks

You could do that with one rotary encoder and a push-button switch to define whether the encoder was being turned for seconds or minutes.

As the encoder turns one way, for seconds, add another second to the time, for each click. When it passes 60, add a minute, and reset seconds to 0. When it turns the other way, subtract a second per click. Borrow a minute, if needed.

Why do you think you need 5 rotary encoders to set tens of minutes, ones of minutes, tens of seconds, and ones of seconds? What would the other one be for?

I was thinking about using 5 set of 7 rotary switch each

What's the 7 mean? What kind of switches are you thinking of?

Hi everybody.

the interface MUST be very easy to use and very quick to set up , so there must be a dial for every digit

This is how the setup interface will look like


My problem is that Arduino don't have so many input pin so i need some hint on how to read all this data on the setup

:slight_smile: :slight_smile:

ok , today I talked a little with the future users of the device and they agree to use screwdriver dial (they are all Vintage Vespa owners and many of them are more than 70 years old , they have no problem for the screwdriver , they just asked for bigger numbers) ;D ;D

I also reduced the input to 4 digit for each time ( make no sense trying to have a millisecond precision on an Old Vespa racing)
so the countdown range will be from 000,1 to 999,9 seconds

So I was thinking about using 3 digital pin to choose wich time , 2 digital pin to choose wich rotary

to use 4 analog input to (save the digital pin) for reading the rotary value

and to show the count down on a display like this one

a 4 digit 7 segment display

how many pin I need (and do I need some additional chip ) to drive a display like that ?

thanks
Simone

Sorry but that display is no good for you, it is just a raw LCD and need proper LCD driving and multiplexing. Also LCDs are difficult to see in bright daylight. Go for something like an intelligent LED display, like being currently discussed on this thread :- http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1283258903/15#15

:cry: :cry:

oops I was thinking that LCD was the best in the sun , I have a bike computer similar to this one and the screen is very easy to read in the sun


I was thinking that the LCD i choose was very similar to the one inside the bike's computer.

How are called that type of screen ?

The one I was choosing was a reflective one.

I choose it because digit are very big (25mm high) and the power requirement is very small

there are some similar LCD (reflective , big digit , low power) easier to interface with arduino

(my dream will be something wit just 4 pin to choose the digit and 4 pin to send the value :smiley: :smiley: )

;D ;D ;D

ok let see if you like this my first try

on the right there are the rotary ( just one pictured) with a 5 bit mux (or demux? ) to choose one rotary at the time.

The value from the rotary end into the analog input where i can readit with an AnalogRead and convert it to 0/1 value (Im using the analog for reading to save digital pin)

on the left there are the 7 segment displays , with 4 pin I choose witch digit I need to update , with the other 4 pin I send the value to the driver for conversion from 4 bit to 7 segment (I found out that this driver can be made by just a lot of diodes and wires :o )

let see if you like this my first try

Sorry no.

  1. You are using pins 0 & 1, this will interfere with the serial communications.
  2. You don't use multiplexers like that. What is the multiplexer part number anyway?
  3. You don't connect switches to the analogue pins.
  4. You should do a proper schematic where we can see what the switch connections actually are. What you have is a construction diagram, you draw that after you draw the schematic.
  5. What is the part number of your driver?
  6. The arduino pins can't source enough current to drive the common anodes of the display. There are 7 segments and a 30mA limit (don't design for 40mA maximum) so that only gives you 4mA per segment, this will not be bright enough.
  7. You need current limiting resistors in the cathodes.

Sorry but it doesn't even begin.
Try looking up how to drive seven segment displays in the playground
http://www.arduino.cc/playground/Main/InterfacingWithHardware

To answer the original question you need a 74LS155 demultiplexer wired up as a 1 line to 8 demultiplexer. You then put the input to ground, then there will be a logic zero on the output pin designated by the three select pins.

Each output pin goes to the common wiper of one switch. The 4 switch outputs go through a diode each with the cathode towards the switch and the anode to the digital arduino input (you can configure the analogue inputs as digital inputs). Repeat this for each of your 8 rotary BCD switches. Each switch has it's own set of 4 diodes and connects to a different pin on the 74LS155 but all going to the same 4 input pins as the other switches. Then enable the internal pull up resistors on the digital inputs.
To read any one rotary switch but the number of it on the three select pins and read the four input pins.

To read more than 8 switches then cascade two or more of the 74LS155 chips.

There is a whole host of BCD switches here:-

Some are quite expensive.

:slight_smile: :slight_smile: :slight_smile: :slight_smile:

thanks for the great help

I used Arduino for some small project with the Ethernet shield (web interface for analogic or digital sensor) but is my first time that I'm using it with some external electronic

So I need to buy 3 74LS155 chip
16 rotary switch
some wire

For the LCD parts I was thinking to use reflective LCD so save power , Arduino can drive this kind of display directly?

  • what kind of chip I need to drive this type of LCD ( 4 digit 7 segment reflective LCD)

Thanks Again Simone

Sorry , the display is this one

http://it.rs-online.com/web/search/searchBrowseAction.html?method=searchProducts&searchTerm=294-8825&x=0&y=0