Convert one output into another for 7 seg. display - Page 1
Forum section: electronics / beginners

author: Spemo
author_rank: Regular Contributor
timestamp: June 16, 2019, 09:22:04 am
content: 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

author: mariush
author_rank: Super Contributor
timestamp: June 16, 2019, 09:47:41 am
content: 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.

author: pwlps
author_rank: Frequent Contributor
timestamp: June 16, 2019, 09:58:54 am
content: Quote from: Spemo on June 16, 2019, 09:22:04 amhttps://www.ti.com/lit/ds/symlink/cd4511b.pdf($0.5)

author: sleemanj
author_rank: Super Contributor
timestamp: June 16, 2019, 10:07:29 am
content: 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.

author: Psi
author_rank: Super Contributor
timestamp: June 16, 2019, 10:08:42 am
content: Quote from: pwlps on June 16, 2019, 09:58:54 amPlus he would need a Decimal to BCD Encoder

author: Brumby
author_rank: Unknown
timestamp: June 16, 2019, 10:23:38 am
content: 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.

author: Gyro
author_rank: Super Contributor
timestamp: June 16, 2019, 10:26:16 am
content: 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%20arrayPricey though.

author: Spemo
author_rank: Regular Contributor
timestamp: June 16, 2019, 05:18:40 pm
content: Quote from: pwlps on June 16, 2019, 09:58:54 amQuote from: sleemanj on June 16, 2019, 10:07:29 amThis 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

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 16, 2019, 10:08:45 pm
content: 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.

author: pwlps
author_rank: Frequent Contributor
timestamp: June 17, 2019, 09:56:24 am
content: Quote from: Spemo on June 16, 2019, 05:18:40 pmNot 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.pdfThis 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_circuitsQuoteI'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

author: mikerj
author_rank: Super Contributor
timestamp: June 17, 2019, 10:55:16 am
content: Quote from: Spemo on June 16, 2019, 05:18:40 pmNote 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.

author: pwlps
author_rank: Frequent Contributor
timestamp: June 17, 2019, 11:06:25 am
content: Quote from: mikerj on June 17, 2019, 10:55:16 amGood 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.

author: Spemo
author_rank: Regular Contributor
timestamp: June 18, 2019, 06:31:36 pm
content: 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 boardoh and board size is 18x30cm

author: soldar
author_rank: Super Contributor
timestamp: June 18, 2019, 07:41:30 pm
content: 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.

author: Spemo
author_rank: Regular Contributor
timestamp: June 18, 2019, 07:52:14 pm
content: 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...

author: soldar
author_rank: Super Contributor
timestamp: June 18, 2019, 08:11:21 pm
content: Quote from: Spemo on June 18, 2019, 07:52:14 pmAgain, if you get it to count in BCD it will be much simpler.

author: pwlps
author_rank: Frequent Contributor
timestamp: June 18, 2019, 09:12:56 pm
content: Quote from: Spemo on June 18, 2019, 06:31:36 pmI'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.EditOops, 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.

author: mariush
author_rank: Super Contributor
timestamp: June 18, 2019, 10:46:04 pm
content: 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" headersex. 4 diodes common cathode, 20 cents @ 100, 7 cents each in 3k pieces:toshiba-semiconductor-and-storage / 1SS309-TE85LFor bav700 :diodes-incorporated/BAV70DV-7or bav70hdw, around 13 cents for 4 diodes :diodes-incorporated/BAV70HDW-7Make 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.

author: David Hess
author_rank: Super Contributor
timestamp: June 19, 2019, 02:48:11 am
content: Quote from: Gyro on June 16, 2019, 10:26:16 amA 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.

author: floobydust
author_rank: Super Contributor
timestamp: June 19, 2019, 03:59:07 am
content: Nuts and Volts magazine Transistor Digital Clockproject used 556 of 1N4148 diodes, mostly for the combinational logic.It looks like a lot of soldering.

author: Spemo
author_rank: Regular Contributor
timestamp: June 20, 2019, 12:16:27 pm
content: Quote from: floobydust on June 19, 2019, 03:59:07 amyep, 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

author: Brumby
author_rank: Unknown
timestamp: June 20, 2019, 02:47:34 pm
content: I'll give you credit for showing me the greatest number of relays I've ever seen on a single board.