Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Designing numerous 7-segments with other features

Status
Not open for further replies.
I'm trying to design a product that have the following features for mass production, and I'm asking from your experience, how to get the lowest price for the components, quality of the chips in terms of stability due to temperature ( it must work in temps over 40+c )

1. I would like to control a 27 7-Segment display, which way to go ? just connect lots of switch transistors, and give them one data lines ? or there are easier ways, dedicated chips, with low price ? I have checked the MAX7219, but it's price is around 11$, that's so expensive for me.

2. I would like to be able to read and play MP3 files, and also some other files, so I'm sure I would like to have an SD-Card
3. I need also a RTC
4. RF control ability
5. On power failure, I would be able to use another battery, power monitoring ?
6. Debugging Keys + LCD

So what would be the best uC for those purposes in terms of stability, money,..etc ?
For each item, what would be your choice for the design ? or do you know a kit that has most of these features and tried it ?

I have been away from the Electronics industry since 2008, and I mostly need help to refresh my memory.
 
Last edited:
Semiconductor companies might give you a better price for quantity.

Also manufacturing costs need to be considered, discrete transistors might be cheaper but would take considerably more assembly time.
 
Thanks,

I'm on my way for designing the 34 7-segment display, I'm not aware of a design which gives cost and easier to control, saving uC pins to control other things. Any other idea for achieving that ?
 
Shift register is a chip which converrts serial signal to parallel. You clock in a sequence of 238 bits (34 x 7) and it turns on/off the corresponding lines. To control 238 lines, you would need 30 8-bit chips. Although I've never tried such a long chain. There's a big variety of them, slow, fast, with or without buffers. Look them up at **broken link removed**.
 
For a dedicated IC, the HT1632 seems to allow control of a matrix of 32x8 (e.g. 32 7 segment displays) and has an SPI interface. They can be purchased for under $3, incl. shipping.

Or you can use 5 SIPO shift registers (40 outputs) to drive 32x8, each line buffered with a transistor.

Alternately, use 40 (buffered) outputs of a uC for 32x8.
 
Last edited:
@dough83
Thanks for your ideas. Would you tell me please for the last one 40(buffered) outputs, how would I control the 32 7-segments using only 40 lines ? is it like persistence of vision ?
For example, I would like to send digits 12 to the first two segments, then 24 to the following two segments and so on. I would go for ULN2803, is it ok ?
 
The 2nd and 3rd both use 40 outputs for 32x8 LED drive. If you want 34x8, then you can do it with 42 outputs.

The drive method is called multiplexing, and yes, it relies on persistence of vision. Eight outputs are used to drive the 7 segments (+ decimal point); we'll refer to these outputs as '*'. The remaining 32 (or 34) connect to the common anode/cathode of each LED display module. First, you load the state of segment 'a' of all the digits into the 32 outputs then pulse the 'a' output of your '*' port, with the other 7 '*' outputs inactive. Next you load all the states of the 'b' segments into the 32 outputs, followed by a pulse on the 'b' output of the '*' port. The goes on for c, d, e, f, g and finally the decimal point. Each segment (that is activated) will be driven for 1/8 of the time.
 
I'm little bit confused, I'm not sure If I got the idea regarding the connections.
I have made a sample schematic design, I would like to know If I'm in the correct way or not.
 

Attachments

  • prayer_times.PDF
    70 KB · Views: 193
Almost. The LED 7-segment digits have pins for the 7 segments and decimal point as well as a common pin, which either connects to all anodes or all cathodes of the module (if you buy a common-anode or common-cathode module). Because you want to use ULN2803 to drive yours, you should get command cathode variant (the ULN' drives the cathodes). You cannot use ULN2803 to drive the anodes; you can use discrete transistors for that instead.

Have a look at http://archive.siliconchip.com.au/static/images/articles/i1118/111861_7lo.jpg - hopefully that will give you the gist of how to connect it. I know that in that link only discrete transistors are used; your ULN's replace transistors in place of Q9-Q12 in that image (and obviously you have more than the 4 modules shown)

111861_7lo.jpg
 
dougy83 Thanks so much for your help. It seems I missed something, does each segment have to have a switch on it's VCC ? to switch it at some time interval ? sor If I have 32 segments TS1 = 1/40 ms, delay, TS2 2/40ms ?
 
I'm not sure what you mean. All the 'a' segments (anodes) are connected together, all the 'b' segment anodes are connected together, ... , all the DP (if present) segment anodes are connected together. You then have 7 or 8 transistors to drive these. Just like in the picture above.
 
dougy83
I tried your idea for 2 segments, and I tried to blink the 'a' segment for segment 1, and then tried to blink 'b' segment.
both are overlapped, and they appear on both segments.

It seems that I have to have for each 7-segment a transistor that controls each segment, but in that case I will go for 32 transistors again.

that's the code for the arduino:

Code:
void loop() {
  
    digitalWrite(latchPin, LOW);
     shiftOut(dataPin, clockPin, LSBFIRST, 0x40);
    //take the latch pin high so the LEDs will light up:
    digitalWrite(latchPin, HIGH);  
    delay(100);

    digitalWrite(latchPin, LOW);
     shiftOut(dataPin, clockPin, LSBFIRST, 0x20);
    //take the latch pin high so the LEDs will light up:
    digitalWrite(latchPin, HIGH);
    // pause before next value:
    delay(20);
 
}
 
Can you attach the schematic? The code is missing the bit to either set the segment, or to select the digit (depends on circuit you're using).
 
dougy83 I have problem right now to drive the P Mosfet with the demux.
I would like to control now each segment separately.
Kindly find the attached schematic.

Thanks for help!
 

Attachments

  • testing_shift.PDF
    68.7 KB · Views: 237
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top