transistor IC

CrossRoads:
Okay, browsed the links, I don't understand what the tower does with the number.

Your code will read the 4 pins, result is:

digit1 = (8 * 8bit + 4* 4bit + 22bit + 11bit);

so (1001) = 9,
1000 = 8
0111 = 7
0110 = 6
0101 = 5
0100 = 4
0011 = 3
0010 = 2
0001 =1
0000 = 0

Pretty basic stuff.

See, that wasn't how i was looking at it. I was looking at it with 10-pole rotary switches, where you have a common, and each position/pole represented a different numerical digit. I understand binary/octal/hexadecimal, but I don't understand how the switch gets octal out of a position. In which case, an arduino wouldn't be needed, the switches would feed directly to the shift register (which i dont understand either)

You can find mechanical switches like that. You didn't say what you had, that's why I asked.
Your method will require 10 input pins. The alternate just 4. How many IO pins do you have available?

An ATMega168 or ATMega328 part can do this task with its 20 IO pins; or you can have unique IO pins for all the switches and all the segment drivers and use a much larger microcontroller that costs more, but only need a buffer for each LED segment.

Tradeoffs, tradeoffs ...

CrossRoads:
You can find mechanical switches like that. You didn't say what you had, that's why I asked.
Your method will require 10 input pins. The alternate just 4. How many IO pins do you have available?

An ATMega168 or ATMega328 part can do this task with its 20 IO pins; or you can have unique IO pins for all the switches and all the segment drivers and use a much larger microcontroller that costs more, but only need a buffer for each LED segment.

Tradeoffs, tradeoffs ...

I posted a link some pages up to the 10 position switched, after the simple drawing.

I would like to use the cheaper arduino uno, but it doesn't have enough outputs for the 3 displays (21 pins total, plus the input). So I'm thinking I'm stuck with the mega 2560.

but if I can reduce wires and complications using the octal switches, I'm all for it!

Okay, I missed the 10 pile switch back in reply #14.

So tell me, what's preferable:
Arduino promini that's built into every box mounted on a board with three tcip6595s to drive the LEDs, and a FTDI Basic that is used to program them but is not installed in the box:
http://search.store.yahoo.net/yhst-27389313707334/cgi-bin/nsearch?query=promini&searchsubmit=Go&vwcatalog=yhst-27389313707334&.autodone=http%3A%2F%2Fwww.gravitech.us%2F

All can be installed on a board similar to this for secure installation.
The 2nd picture replaces the promini with its minimal circuit.

I like how simple that looks.

Do you have a schem for it? How hard is it to program, and I'm guessing you have it set to increment on button press? How would I modify that for the multiple inputs per display, or would each display have it's own board like that?

since power is cut after each pass, the other nice thing about 10 pile rotary switches, is that they're solid state, and will hold after power loss. Unless I could somehow write the last number to memory and have it come up when power is re-initiated, and be controlled using up/down buttons.

Think you could wire this up?

The other switches are just read on a periodic basis (10 mS?), display is updated as soon as they are read.
Being mechanical also, they will display the same until changed.

This will be simple to program.

CrossRoads:
Think you could wire this up?

The other switches are just read on a periodic basis (10 mS?), display is updated as soon as they are read.
Being mechanical also, they will display the same until changed.

This will be simple to program.

that makes things very much more clear! Thank You. Looks very simple indeed, just a few IC's and resistors for each segment. Very nice. And thank you for taking the time to draw it :slight_smile:

So the pro-mini reads the switches, sends the chips a serial form of the number, and the chips decode it per display?

LM7805: http://www.mouser.com/ProductDetail/Fairchild-Semiconductor/LM7805ACT/?qs=sGAEpiMZZMtzPgOfznR9QQTeY9%252bkcWD8

LM7812: http://www.mouser.com/ProductDetail/Fairchild-Semiconductor/LM7812CT/?qs=sGAEpiMZZMtzPgOfznR9QY2TGDlep%252bek

TPIC595: http://www.mouser.com/ProductDetail/Texas-Instruments/TPIC6B595N/?qs=sGAEpiMZZMtsbn1GaJysl1mvuihK4f5q5rvouWD%252bBjQ%3D

Where do you get the sockets and pre-punched board..I am jealous.

Since I'm using 12V & 5V regulators, should I cascade them so the 5V runs off the 12V, or let the 5V run off the 11.8~14.6V DV RMS input?

"So the pro-mini reads the switches," Yes
"sends the chips a serial form of the number, " Yes
" and the chips decode it per display?" No, that decoding is done in the software.
For example, to have the digit 1 display, you would allow segments B & C to turn on

A
F B
G
E C
D

and turn off the rest.
So with DRN0 controlling SegmentA
1 -> B
2 -> C
3 -> D
etc.
and if DRN0 is bit 0 in a databyte, you would send out 1 to turn Off a segment and 0 to leave on a segment
Thus data byte B11111001
would turn off all but Segments B & C , thus displaying a 1 on the display.

For sockets, I like using these

cut off as many pins as you need
or a shorter-pin version
http://www.dipmicro.com/store/HDR40X1FM

and a board from here
http://www.futurlec.com/ProtoBoards.shtml#PRBRDLG

altho I prefer these, little more money but very nice quality.
http://www.eio.com/p-23780-velleman-ecs12-eurocard-1-hole-island-39-x-31-fr4.aspx

Shop around for good prices, cheap delivery.

That makes sense. So we're setting each display panel to be a binary bitstring, where each position is a segment.

So arduino is taking the switch value, converting it to a bitstring, send it in serial form to the 595's, and they check the position-value for each digit, turn on 0's and turn off 1's.

seems straight forward.

How do I tell each 595 what set of serial data to listen to?

As wired in this case, you will send out 3 bytes every time using the shiftout() command.

http://arduino.cc/en/Reference/ShiftOut

In your void loop code, after reading the switches and deciding what you want to send, you will have

digitalWrite(D2, LOW); // sets up the parts to receive data
// format: shiftOut(dataPin, clockPin, MSBFIRST, databyte);
shiftOut(D4, D3, MSBFIRST, byte1); // may need to swap byte1 & 3, 
shiftOut(D4, D3, MSBFIRST, byte2); // or possibly use LSBFIRST,
shiftOut(D4, D3, MSBFIRST, byte3); // have to see how your output & order looks
digitalWrite(D2, HIGH); // moves the data to the shift register output pins

so to expand on that-

5/8 switch: byte1 (binary 0 or 1)
rotary 1: byte2
rotary 2: byte3

digitalWrite(D2, LOW); // sets up the parts to receive data
// format: shiftOut(dataPin, clockPin, MSBFIRST, databyte);
shiftOut(D4, D3, MSBFIRST, byte1); // may need to swap byte1 & 3, 
shiftOut(D4, D3, MSBFIRST, byte2); // or possibly use LSBFIRST,
shiftOut(D4, D3, MSBFIRST, byte3); // have to see how your output & order looks
digitalWrite(D2, HIGH); // moves the data to the shift register output pins

so D2 tells the 595's that the data is coming, synchronizes the clocks on D3, and sends the byte on D4?

Sort of - D2 goes low, opens the shift register for receiving data.
Data is output on D4, D3 clocks it into the shift register - the software makes that happen 8 times for a byte.
(the software looks like: output bit x of D4, output D3 Hi then Lo, repeat for 7 more bits)
Three bytes are sent out, shifting thru the data thru registers.
When the shifting is done, D2 going high puts the data on the output pins of all three parts at once so they appear to be updated at the same time.