Author Topic: Convert one output into another for 7 seg. display  (Read 2007 times)

0 Members and 1 Guest are viewing this topic.

Offline SpemoTopic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
Convert one output into another for 7 seg. display
« on: June 16, 2019, 09:22:04 am »
Hello everyone,
I'm trying to solve a problem.
In the past, I've build a few relay clocks, which used hundreds of diodes to convert the signal from the relays to a usable output for a seven segment display.

The problem is, these diodes take up a lot of space, and to be honest, all the wires to make it happen drive me mad. Also there is a problem with the connections, sometimes they can't be seperated electrically properly and that causes all kinds of problems with the counting circuit.

To explain the problem:

I have 10 outputs of the counter circuit, 0 to 9.
This has to be converted into 7 outputs, where several have to be on at the same time, to display a number.

I've attached a picture with the solution I used for it.


Is there a way to simplify this, maybe to use a single IC or something?

Thank you for your help
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5170
  • Country: ro
  • .
Re: Convert one output into another for 7 seg. display
« Reply #1 on: June 16, 2019, 09:47:41 am »
Literally any microcontroller with 10 input pins and a few output pins.
An 8 channel led driver IC can be used if the led digits are too big and need more much power than what micro can provide.

Arduino is cheap, plenty of tutorials around. once everything works on dev board you buy and use to code on, you can buy just the chip separately and program it.
Same for Microchip PIC micros - programmer is now 10-15$, chips can be less than 1$, editor and tutorials are free.
 
The following users thanked this post: Psi

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: Convert one output into another for 7 seg. display
« Reply #2 on: June 16, 2019, 09:58:54 am »
Is there a way to simplify this, maybe to use a single IC or something?

https://www.ti.com/lit/ds/symlink/cd4511b.pdf   ($0.5)
« Last Edit: June 16, 2019, 10:03:13 am by pwlps »
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3051
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Convert one output into another for 7 seg. display
« Reply #3 on: June 16, 2019, 10:07:29 am »
Note that pwlps' suggestion takes a BCD input, you have a decimal from your counter by the sound of it, you might find a decimal to 7-segment driver, but might also be easier to just put a decimal-to-BCD encoder in front of it (74HC147 etc), or change your counter to a BCD output.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10385
  • Country: nz
Re: Convert one output into another for 7 seg. display
« Reply #4 on: June 16, 2019, 10:08:42 am »
Is there a way to simplify this, maybe to use a single IC or something?

https://www.ti.com/lit/ds/symlink/cd4511b.pdf   ($0.5)
Plus he would need a Decimal to BCD Encoder
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12413
  • Country: au
Re: Convert one output into another for 7 seg. display
« Reply #5 on: June 16, 2019, 10:23:38 am »
There are several chips around that can do BCD (4 bit binary) to 7 segment, but I'm not aware of any that do a 1 of 10 to 7 segment.


However, as a younger lad, I did exactly what you did with a fistful of diodes - but my solution was more "3-dimensional" than planar.  All it had was 10 wires coming in and 7 wires going out.

The construction began with a strip of Veroboard, 7 holes by 10 holes.  I then lined up and soldered the diodes along one row of the Veroboard for one decoding sequence, then the next sequence on the next row and so on.  Every diode was inserted without bending any leads - and in the end it looked like a black and silver forest.  Once these were all done, I added another piece of Veroboard on top, with the tracks running at 90ยบ to the ones at the bottom.

When finished, you will have a block of diodes that provide all the decoding with 10 strips of copper on one end (for the input) and 7 strips of copper on the other for the 7 segment output.  Replacing a failed diode with this construction is quite the challenge - but if you wanted to make this easier, you could run a series of simple bus-bars along one end instead of using a second piece of Veroboard and just solder the diode leads to them.  I'd suggest adding some insulating material between the rows, just to make sure there are no accidental shorts.

You can build this the size of a 7 x 10 field of diodes and, if maintainability isn't important, you can make it the height of the length of the body of a diode plus two pieces of Veroboard.  To give yourself the best opportunity to change diodes out, use the bus-bar approach and don't cut anything off the length of the diode leads.
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 10174
  • Country: gb
Re: Convert one output into another for 7 seg. display
« Reply #6 on: June 16, 2019, 10:26:16 am »
You could go old school and program an 8 bit parallel EPROM to do it. 10 or more address inputs and 8 outputs to drive the segments (and dp if you want).

At least its a single chip solution, and pretty too (if UV EPROM).


EDIT: As an alternative, you can get SIP diode arrays in common anode and common cathode configuration. These might make life a bit easier. eg: https://uk.farnell.com/w/c/semiconductors-discretes/diodes/small-signal-diodes?diode-case-style=sip&st=sip%20diode%20array Pricey though.
« Last Edit: June 16, 2019, 11:48:45 am by Gyro »
Best Regards, Chris
 

Offline SpemoTopic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
Re: Convert one output into another for 7 seg. display
« Reply #7 on: June 16, 2019, 05:18:40 pm »
Is there a way to simplify this, maybe to use a single IC or something?

https://www.ti.com/lit/ds/symlink/cd4511b.pdf   ($0.5)
Note that pwlps' suggestion takes a BCD input, you have a decimal from your counter by the sound of it, you might find a decimal to 7-segment driver, but might also be easier to just put a decimal-to-BCD encoder in front of it (74HC147 etc), or change your counter to a BCD output.

This seems to me like a good option - 2 chips per counter, and some LED driver (transistors?) - that should simplify the whole thing.
Pretty easy to get for me aswell, which are named CD4511BE and CD74HC147E here., will const me about 1.50โ‚ฌ for the pair, 9โ‚ฌ for the whole clock.

The question is, do they work with less than 10 inputs?

Thanks a lot for your help

« Last Edit: June 16, 2019, 05:23:03 pm by Spemo »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 4004
  • Country: nl
Re: Convert one output into another for 7 seg. display
« Reply #8 on: June 16, 2019, 10:08:45 pm »
The easiest way to build stuff like this with diodes is with strip board.

You have 10 inputs, which then become ten rows on your strip board.
Then each column is for one of the outputs.
You put the diodes vertically in the stripboard, and only solder one side to the stripboard.
Then on the columns you solder a wire over all the diodes of that column.

It's neat, tidy, easy to make and understand.
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: Convert one output into another for 7 seg. display
« Reply #9 on: June 17, 2019, 09:56:24 am »
This seems to me like a good option - 2 chips per counter, and some LED driver (transistors?) - that should simplify the whole thing.

Not sure you need any transistors, the CD4511BE can source up to 25mA per output. If this is not enough you can replace it by an open-collector TTL version like the classic 7447 (a bit more expensive):

http://www.ti.com/lit/ds/symlink/sn7447a.pdf

This one can sink 40mA per output.  And there are several other versions (some are obsolete probably, I did not check), you can check for BCD to 7-segment decoder/driver  in the 74xx table:

https://en.wikipedia.org/wiki/List_of_7400-series_integrated_circuits


Quote
The question is, do they work with less than 10 inputs?

I'm not sure I understand the question, I would say naively if you set all unused inputs to the logic low state it will work  :)
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: gb
Re: Convert one output into another for 7 seg. display
« Reply #10 on: June 17, 2019, 10:55:16 am »
This seems to me like a good option - 2 chips per counter, and some LED driver (transistors?) - that should simplify the whole thing.
Pretty easy to get for me aswell, which are named CD4511BE and CD74HC147E here., will const me about 1.50โ‚ฌ for the pair, 9โ‚ฌ for the whole clock.

The question is, do they work with less than 10 inputs?

Thanks a lot for your help

Note that the 74HC147 has inverted outputs so it is not directly compatible with the CD4511BE without an extra inversion stage.  The inputs also also inverted, so ensure that works for your application.
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: Convert one output into another for 7 seg. display
« Reply #11 on: June 17, 2019, 11:06:25 am »
Note that the 74HC147 has inverted outputs so it is not directly compatible with the CD4511BE without an extra inversion stage.  The inputs also also inverted, so ensure that works for your application.

Good remark indeed, so finally a 7447 or similar open-collector driver IC with active-low logic will be simpler.  This will likely be more than 1.50โ‚ฌ for the pair though.
 

Offline SpemoTopic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
Re: Convert one output into another for 7 seg. display
« Reply #12 on: June 18, 2019, 06:31:36 pm »
hmmm, are there any chips that are easily compatible with each other, without the need for an inversion stage?


I mean this is what it looks like now, if I have to do this with 3 chips, then I might not find a place for them on the circuit board....
It would come out tho 18 chips in total...

 as you can see it's pretty crowded.... the arrows and the orange lines mark the positions of the diodes.... the white wires connect them to the counter modules on the outside of the circuit board


oh and board size is 18x30cm
« Last Edit: June 18, 2019, 06:41:21 pm by Spemo »
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Convert one output into another for 7 seg. display
« Reply #13 on: June 18, 2019, 07:41:30 pm »
I am not sure how the relay clock is designed or what the purpose is but if you could get it to output BCD instead of 1 of 10 it would simplify things a lot. And you could probably save some relays as well.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline SpemoTopic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
Re: Convert one output into another for 7 seg. display
« Reply #14 on: June 18, 2019, 07:52:14 pm »
it's a clock circuit designed to be a clock - for seconds, minutes, hours. it counts in decimal, basicly what you see on a normal digital clock is what it's actually counting. makes some nice noises... sure a lot of relays, but alt least you know by the noise if just a minute went by or an hour...
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3595
  • Country: es
Re: Convert one output into another for 7 seg. display
« Reply #15 on: June 18, 2019, 08:11:21 pm »
it's a clock circuit designed to be a clock - for seconds, minutes, hours. it counts in decimal, basicly what you see on a normal digital clock is what it's actually counting. makes some nice noises... sure a lot of relays, but alt least you know by the noise if just a minute went by or an hour...

Again, if you get it to count in BCD it will be much simpler.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: Convert one output into another for 7 seg. display
« Reply #16 on: June 18, 2019, 09:12:56 pm »
hmmm, are there any chips that are easily compatible with each other, without the need for an inversion stage?

I'm not sure, the priority encoders IC I saw are active-low I/O (but maybe I didn't search enough).

Otherwise you can have everything done with a simple 20pin PLD like the ATF16V8CZ.

Edit  Oops, maybe not, I think only 8 inputs can be configured as combinatorial-only.  But a slightly bigger one like the ATF22V10CZ or ATF750C should do.
« Last Edit: June 18, 2019, 10:07:16 pm by pwlps »
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5170
  • Country: ro
  • .
Re: Convert one output into another for 7 seg. display
« Reply #17 on: June 18, 2019, 10:46:04 pm »
Any reason why my microcontroller idea would be bad? Seems like you could easily get a 16/24/32 pin micro in DIP package and reduce a lot of wires and diodes.

To reduce the number of diodes and wires ... you could use common cathode diodes, maybe have for example tiny PCBs made with 2 common cathode surface mount diode packs mounted on a tiny pcb with 0.1" headers

ex. 4 diodes common cathode, 20 cents @ 100, 7 cents each in 3k pieces: toshiba-semiconductor-and-storage / 1SS309-TE85LF
or bav700 : diodes-incorporated/BAV70DV-7
or bav70hdw, around 13 cents for 4 diodes : diodes-incorporated/BAV70HDW-7


Make for example individual parts with 4 diodes per pack... you'd need 2-3 per segment, so you don't waste much.

You could easily design a PCB and use v-scoring to cut small rectangles out of a bigger pcb... you'd save space by not using thick individual diodes and maybe you could use ribbon cables with 0.05" (1.27mm) spacing instead of 0.1" to reduce space used and make it easier to keep track of wires, instead of soldering individual wires.
 


« Last Edit: June 18, 2019, 10:51:21 pm by mariush »
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 17428
  • Country: us
  • DavidH
Re: Convert one output into another for 7 seg. display
« Reply #18 on: June 19, 2019, 02:48:11 am »
You could go old school and program an 8 bit parallel EPROM to do it. 10 or more address inputs and 8 outputs to drive the segments (and dp if you want).

A PAL or similar can also be used; they were practically designed for this sort of application.  I have seen both used and with one extra input, the outputs can be inverted to support both common cathode and common anode displays.

For artistic stuff though, I like the idea of a diode or even better, a transistor array.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7680
  • Country: ca
Re: Convert one output into another for 7 seg. display
« Reply #19 on: June 19, 2019, 03:59:07 am »
Nuts and Volts magazine Transistor Digital Clock project used 556 of 1N4148 diodes, mostly for the combinational logic.
It looks like a lot of soldering.
 

Offline SpemoTopic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: de
Re: Convert one output into another for 7 seg. display
« Reply #20 on: June 20, 2019, 12:16:27 pm »
Nuts and Volts magazine Transistor Digital Clock project used 556 of 1N4148 diodes, mostly for the combinational logic.
It looks like a lot of soldering.
yep, that is a lot of soldering to do, that is around the same amount of diodes I used per clock circuit I made so far ... plus all the flyback diodes for the relays......

I mean this is what it looks like...all of them in a row
« Last Edit: June 20, 2019, 12:21:58 pm by Spemo »
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12413
  • Country: au
Re: Convert one output into another for 7 seg. display
« Reply #21 on: June 20, 2019, 02:47:34 pm »
I'll give you credit for showing me the greatest number of relays I've ever seen on a single board.   :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf